Re: [O] Exporting table.el tables to LaTeX: set environment?
Gary Oberbrunner ga...@oberbrunner.com writes: If I have a table.el table, is there any way to set the LaTeX table environment for it (longtable, tabularx etc.)? AFAICT no, #+ATTR_* is for stuff that are written in Org syntax. -- Bastien
Re: [O] Spreadsheet formula evaluation without using tables?
Hi Asif, Asif asif.haswa...@gmail.com writes: Is it possible to have a list of tasks each with a formula to track progress in percentage based on other subtasks? The result will look like this: * [ 30%] Project Name ** [ 50%] Task A ** [ 10%] Task B You cannot do this with Org percentage cookies, but you can do it by using a dedicated property. The property for each entry would contain a percentage value, then the column sum can display a formula of your own. See the manual and this turorial http://orgmode.org/worg/org-tutorials/org-column-view-tutorial.html for a start. -- Bastien
Re: [O] Holidays without fixed dates
Hi Pete, Pete Ley peteley11...@gmail.com writes: For instance, New Year's Day is always on January 1st, but something like the start of Daylight Saving Time is always around the same time but on the closest Sunday. Is there a ready-made solution for working this sort of thing into the agenda? So far I just have holidays in my agenda that have fixed dates with ++1y repeat intervals on them. I'm just wondering if there exists a solution or if I should make one. I set my holidays in a variable, then add this variable to `calendar-holidays', then display the diary in the agenda. See http://bzg.fr/emacs.html and look for holiday. -- Bastien
Re: [O] modifying header when in columns mode
Hi David, David Rees d...@studgeek.com writes: If I try to use a standard key like S-up I get: org-self-insert-command: Text is read-only: Type `e' to edit property. If I try to eval org-priority I get: org-priority: Text is read-only: Type `e' to edit property Use S-left or S-right instead. That the keybinding for cycling through properties values' from within the :PROPERTIES: drawer, and since priorities are just special properties, the column view allows you to cycle through values with the same key. This is only the case for properties that have a finite set of possible values you can cycle through. For others like SCHEDULED, using C-c C-s will do. HTH, -- Bastien
Re: [O] auto-fill-mode for text changes (plain-lists) indentation
Hi Rémy, Rémy Abergel remy.aber...@parisdescartes.fr writes: it works quite well but it seems to change the plain-lists indentation. * without auto-fill-mode + item 1 :: description comes here indentation makes text start here + item 2 :: another description + item 3 :: here is a quite long description, that would be nice to have an automatic carriage return here indentation makes text start here * with auto-fill-mode + item 1 :: description comes here Now text is indented from here :-( + item 2 :: another description + item 3 :: here is a quite long description, it is nice to have an automatic carriage retrun here! but now text is indented from here :-( Is there anyway to use auto-fill-mode without changing indentation? No, but you may want to use (setq org-description-max-indent 5) which indents descriptive lists in a nicer way IMHO. -- Bastien
Re: [O] question about performance when having multiple todo blocks from the same org files ..
Hi Rainer, Rainer Stengele rainer.steng...@online.de writes: I was wondering if Org does run through all the org files again and again in order to collect the data wanted Yes it does. Tips for optimizing the agenda speed can be found here: http://orgmode.org/worg/agenda-optimization.html But I'm not sure it will help in this case. -- Bastien
Re: [O] org-store-link without having to press Enter?
Nick Dokos ndo...@gmail.com writes: Bastien b...@gnu.org writes: 1. collect various links through a session 2. store the last one for a new task 3. dump all links into some read later heading so I think this feature deserves to be in core. What do you and others think? Much better! Thanks -- and thanks for fixing the typos in the patch. I'll wait for Sébastien's feedback on this and install the patch in master if it fits his needs. +(defun org-insert-last-stored-link (arg) + Insert the last link stored in `org-stored-links'. Not sure whether it's worth adding a comment here: I had to experiment a bit to convince myself that an interactive call without a prefix arg passed 1 as the value of arg. I found it unclear but that may be just my ignorance. My (highly subjective) stand on this: people who will not read the code don't need to understand that the default ARG value will be 1, those who want to read the code also want to make the extra effort to understand why p makes the ARG default value to 1. This is fairly standard Elisp code :) -- Bastien
Re: [O] [BUG] Testing fails after rename of ob-sh
Hi Rick, Rick Frankel r...@rickster.com writes: Eric- After doing a git pull including the rename of ob-sh.el to ob-shell.el, testing fails with the error: Cannot open load file: no such file or directory, ob-sh The attached patch fixes it but I'll let Eric apply or amend it. Changes in stash@{0}^2^..stash@{0} 3 files changed, 53 insertions(+), 53 deletions(-) testing/lisp/test-ob-sh.el| 52 --- testing/lisp/test-ob-shell.el | 52 +++ testing/org-test.el | 2 +- Deletedtesting/lisp/test-ob-sh.el diff --git a/testing/lisp/test-ob-sh.el b/testing/lisp/test-ob-sh.el deleted file mode 100644 index 87e2a95..000 --- a/testing/lisp/test-ob-sh.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; test-ob-sh.el - -;; Copyright (c) 2010-2014 Eric Schulte -;; Authors: Eric Schulte - -;; This file is not part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see http://www.gnu.org/licenses/. - -;;; Comment: - -;; Template test file for Org-mode tests - -;;; Code: -(org-test-for-executable sh) -(unless (featurep 'ob-shell) - (signal 'missing-test-dependency Support for Sh code blocks)) - -(ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies () - Expanded shell bodies should not start with a blank line -unless the body of the tangled block does. - (should-not (string-match ^[\n\r][\t ]*[\n\r] - (org-babel-expand-body:generic echo 2 '( - (should (string-match ^[\n\r][\t ]*[\n\r] - (org-babel-expand-body:generic \n\necho 2 '() - -(ert-deftest test-ob-sh/dont-error-on-empty-results () - Was throwing an elisp error when shell blocks threw errors and -returned empty results. - (should (null (org-babel-execute:sh ls NoSuchFileOrDirectory.txt nil - -(ert-deftest test-ob-sh/session () - This also tests `org-babel-comint-with-output' in -ob-comint.el, which was not previously tested. - (let ((res (org-babel-execute:sh echo 1; echo 2 '((:session . yes) -(should res) -(should (listp res - -(provide 'test-ob-sh) - -;;; test-ob-sh.el ends here Newtesting/lisp/test-ob-shell.el diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el new file mode 100644 index 000..c2f2fa1 --- /dev/null +++ b/testing/lisp/test-ob-shell.el @@ -0,0 +1,52 @@ +;;; test-ob-shell.el + +;; Copyright (c) 2010-2014 Eric Schulte +;; Authors: Eric Schulte + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see http://www.gnu.org/licenses/. + +;;; Comment: + +;; Template test file for Org-mode tests + +;;; Code: +(org-test-for-executable sh) +(unless (featurep 'ob-shell) + (signal 'missing-test-dependency Support for Sh code blocks)) + +(ert-deftest test-ob-shell/dont-insert-spaces-on-expanded-bodies () + Expanded shell bodies should not start with a blank line +unless the body of the tangled block does. + (should-not (string-match ^[\n\r][\t ]*[\n\r] + (org-babel-expand-body:generic echo 2 '( + (should (string-match ^[\n\r][\t ]*[\n\r] + (org-babel-expand-body:generic \n\necho 2 '() + +(ert-deftest test-ob-shell/dont-error-on-empty-results () + Was throwing an elisp error when shell blocks threw errors and +returned empty results. + (should (null (org-babel-execute:sh ls NoSuchFileOrDirectory.txt nil + +(ert-deftest test-ob-shell/session () + This also tests `org-babel-comint-with-output' in +ob-comint.el, which was not previously tested. + (let ((res (org-babel-execute:sh echo 1; echo 2 '((:session . yes) +(should res) +(should (listp res + +(provide 'test-ob-shell) + +;;; test-ob-shell.el ends here Modified testing/org-test.el diff --git a/testing/org-test.el b/testing/org-test.el index c2a9fd4..879d45e 100644 --- a/testing/org-test.el +++
Re: [O] most robust linking practices?
Thanks for the clarifying questions. The files are all on a unix file system served over nfs, so everyone has the same / root. the users (students) have read access to my files. I am working towards creating packages of notes in org-mode (they might even be installed as emacs packages) for the courses that I teach. Having relative paths within a package certainly makes sense. I would like to link to notes in other packages too, as the courses are related, and build on each other. but I won't know in advance where those get installed. It sounds like those packages will have to have some variables configured to make that work out. Thanks for the tips on tweaking link formats and id behavior! j On Thu, Jan 16, 2014 at 5:32 PM, Nick Dokos ndo...@gmail.com wrote: John Kitchin jkitc...@andrew.cmu.edu writes: Hi all, I am using org-mode in a multiuser environment, (i.e. many people have access to the org-files). I create org-files with links in them to other files, and I am trying to find the most robust way to do that. For example, in one file in section I type C-c l to store a link, and then later C-c-C-l to insert it in another file. That link looks like this: [[file:~/dft-book/dft.org::*Introduction%20to%20DFT][Introduction to DFT]] It works for me, but not for other users, because of the ~ in it. How do the other users have access to this file? Is it in a shared filesystem? Are *all* the files you want to share in a shared filesystem? Does everybody have write access or are they read-only? There is org-link-file-path-type which can be set to noabbrev to use links with absolute paths (without ~). That would work in a single namespace but not e.g. if everybody mounts some shared FS over NFS and uses a different mount point. Relative paths would work better in that case. I have tried using org-id, with mixed results. I set this up in my init file ;; automatically create ids for links (require 'org-id) (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id) Now, when C-c l is typed, it creates a unique id in the heading, and the link looks like this: [[id:065443d5-59d7-4119-b530-7b63af28349b][Background]] I haven't figured out a detail though. If the original file is not open, org-mode does not seem to find it when I click on it. In the same emacs process or a different one? I haven't seen this but the last time I used IDs was some years ago (but see below). Am I missing some setup for org-id? I can see here http://orgmode.org/worg/org-api/org-id-api.html that there is some concept of a database of ids, but I didn't see anything about using it. How would another user click on that id link and get to the file if they didn't have the database? The id database is kept in a file: , | org-id-locations-file is a variable defined in `org-id.el'. | Its value is ~/.emacs.d/.org-id-locations | | Documentation: | The file for remembering in which file an ID was defined. | This variable is only relevant when `org-id-track-globally' is set. | ` so it would have to be in a shared place for others to use. But it seems that writing this file out is racy. It can be made read-only of course but you would not be able to create new links. The problem is that as you create links the id locations are kept in a variable org-id-locations in memory. The value of the variable is saved to the file when emacs exits and when org-id-find is called and cannot find the id (I think), or you eval (org-id-locations-save) explicitly. In particular, if the database file is up-to-date, then starting another emacs and following an id-link works whether the target file is already visited or not. Maybe what you are seeing is this discrepancy. Finally, the end goal here is to package a set of interlinked org-files that someone else would use as a standalone package. What is the best link strategy for that? My guess would be relative file links: all the files are in the hieararchy under a single directory and all the file links are limited to point strictly within the hierarchy, using relative pathnames. Nick
Re: [O] auto-fill-mode for text changes (plain-lists) indentation
Hi Bastien, Thank you for this solution, it will do for me :-) Regards, Rémy. Le 17/01/2014 10:07, Bastien a écrit : Hi Rémy, Rémy Abergel remy.aber...@parisdescartes.fr writes: it works quite well but it seems to change the plain-lists indentation. * without auto-fill-mode + item 1 :: description comes here indentation makes text start here + item 2 :: another description + item 3 :: here is a quite long description, that would be nice to have an automatic carriage return here indentation makes text start here * with auto-fill-mode + item 1 :: description comes here Now text is indented from here :-( + item 2 :: another description + item 3 :: here is a quite long description, it is nice to have an automatic carriage retrun here! but now text is indented from here :-( Is there anyway to use auto-fill-mode without changing indentation? No, but you may want to use (setq org-description-max-indent 5) which indents descriptive lists in a nicer way IMHO.
Re: [O] most robust linking practices?
Hi John, John Kitchin jkitc...@andrew.cmu.edu writes: The files are all on a unix file system served over nfs, so everyone has the same / root. the users (students) have read access to my files. I am working towards creating packages of notes in org-mode (they might even be installed as emacs packages) for the courses that I teach. Having relative paths within a package certainly makes sense. I would like to link to notes in other packages too, as the courses are related, and build on each other. but I won't know in advance where those get installed. It sounds like those packages will have to have some variables configured to make that work out. How about defining a slew of links in org-link-abbrev-list. Say, one for each set of class notes. Maybe you'd maintain two copies of such a list, one that assumes your shared file system is being used and one that assumes some layout convention in the user's home directory. Your users could pick the best one or use them as a starting point for their own customization. The fact that the link definitions may contain inline lisp functions may help to organize this. I guess you would need some way to update your reader/user's copy of the list as it evolves. Immediately, I don't have any ideas about that. I've started to use this approach a little. So far, just to reference some common external links. Here's my setup: #+BEGIN_SRC elisp ;; Custom external links ;; http://orgmode.org/manual/Adding-hyperlink-types.html#Adding-hyperlink-types ;; http://orgmode.org/manual/Link-abbreviations.html#Link-abbreviations (defun bv-link-resolve-github (tag) (replace-regexp-in-string : /blob/master/ tag)) (setq org-link-abbrev-alist '( (ghsite . https://github.com/brettviren/%h;) (ghfile . https://github.com/brettviren/%(bv-link-resolve-github)) (dbtrac . http://dayabay.ihep.ac.cn/tracs/dybsvn/ticket/%h;) )) #+END_SRC -Brett. pgpR2F1YSCk2N.pgp Description: PGP signature
Re: [O] most robust linking practices?
John Kitchin jkitc...@andrew.cmu.edu writes: The files are all on a unix file system served over nfs, so everyone has the same / root. the users (students) have read access to my files. I am working towards creating packages of notes in org-mode (they might even be installed as emacs packages) for the courses that I teach. Having relative paths within a package certainly makes sense. I would like to link to notes in other packages too, as the courses are related, and build on each other. but I won't know in advance where those get installed. It sounds like those packages will have to have some variables configured to make that work out. IIUC, everybody sees the same namespace (students in read-only mode, you in rw: but /a/b/c/foo.org is the same file for everybody). If that's the case, then all methods (absolute or relative pathnames and/or ids) should work, no? I'd still do relative pathnames for individual packages. For interpackage links, you might want to do a sort of double indirection[fn:1]: for each package, create a directory with a symlink farm where the symlinks point off-package: package1: /p1/c/foo.org contains an org link to file:../farm/bar.org /p1/farm/bar.org - /p2/c/bar.org (- means symlink) package2: /p2/c/bar.org It should be possible to construct the symlink farms mechanically (and if not, see [fn:1] :-).) Assuming that the indirections are not too onerous, it should be possible to arrange things so that installation consists of setting one symlink in each package: package1: /p1/c/foo.org contains an org link to file:../farm/bar.org /p1/farm/bar.org - ./bar/bar.org /p1/farm/bar - /p2/c package2: /p2/c/bar.org Only /p1/farm/bar needs to be adjusted. Or just go whole-hog with ids (but take good care of the id file: double and triple backups would not be excessive imo). Since only you can modify the file, it should work OK. Footnotes: [fn:1] http://en.wikipedia.org/wiki/Indirection - the David Wheeler quote :-) Nick
[O] Different behavior of exported results in org-babel
Hi everyone, I use the latest version of org-mode (from github) and I update it daily. I noticed some changes recently in org-babel (ob-R). Here's a sample code to explain the problem : #+TITLE: Test export #+AUTHOR: Ahmadou H. DICKO #+PROPERTY: session *R* #+PROPERTY: cache yes #+PROPERTY: exports both #+PROPERTY: tangle yes #+OPTIONS: toc:nil * Minimal example This works quite well #+begin_src R :exports both :results output mtcars[1:2, 1:2] #+end_src I just want the output without code but I have this 'bf7c7b2c131fcf88c89639d10326a972f0ff25' before the code #+begin_src R :exports results :results output mtcars[1:2, 1:2] #+end_src I use emacs 24.3.1, org-version 8.2.5f (updated this morning) and R 3.0.2 You can find attached the sample code and output, if you have something different please let me know. Thanks for your help. -- Ahmadou H. DICKO statistician economist (Ingénieur Statisticien Économiste) PhD candidate in Climate change economics Faculty of economics and managment - Cheikh Anta Diop University West African Science Service Center on Climate Change and Adaptated Land Use (WASCAL) Center for Development Research (ZEF) - University of Bonn email : ahmadou.di...@ucad.edu.sn twitter : @dickoah github : github/dickoa https://github.com/dickoa tel : +221 33 827 55 16 portable: +221 77 123 81 69 Title: Test export Test export 1 Minimal example 1.1 with exports both mtcars[1:2, 1:2] mpg cyl Mazda RX4 21 6 Mazda RX4 Wag 21 6 1.2 with exports results only bf7c7b2c131fcf88c89639d10326a972f0ff25]: mpg cyl Mazda RX4 21 6 Mazda RX4 Wag 21 6 Author: Ahmadou H. DICKO Created: 2014-01-17 Fri 16:33 Emacs 24.3.1 (Org mode 8.2.5f) Validate example.org Description: Binary data
Re: [O] [BUG] Testing fails after rename of ob-sh
Rick Frankel writes: After doing a git pull including the rename of ob-sh.el to ob-shell.el, testing fails with the error: Cannot open load file: no such file or directory, ob-sh What commit were you on before the pull and what branch/commit are you on now? Also, what's the output of make config-test (if you've added sh to BTEST_OB_LANGUAGES, simply remove it). Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
Re: [O] [BUG] Testing fails after rename of ob-sh
Achim Gratz strom...@nexgo.de writes: Rick Frankel writes: After doing a git pull including the rename of ob-sh.el to ob-shell.el, testing fails with the error: Cannot open load file: no such file or directory, ob-sh What commit were you on before the pull and what branch/commit are you on now? Also, what's the output of make config-test (if you've added sh to BTEST_OB_LANGUAGES, simply remove it). I believe Achim's suggestion should be the correct one. See the comment of the commit making this change. , | commit b319475a86451defbdbac064684dd59fd6b0b7d0 | Author: Eric Schulte schulte.e...@gmail.com | Date: Fri Dec 13 10:03:05 2013 -0700 | | fix tests with the renamed ob-shell.el | | Note, users may have to edit their local.mk files to change the | value of BTEST_OB_LANGUAGES to remove sh and include shell. ` Best, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [ANN, OT] Emacs web-server, a new option for serving Org-mode files
Andrea Rossetti andrea.rosse...@gmail.com writes: Eric Schulte schulte.e...@gmail.com writes: I've written an Emacs web-server [1], which may be used to interact with Org-mode over HTTP. It has no dependencies aside from needing Emacs 24 or later and it should be easy to install and use [2]. Thanks Eric for having shared this project. Unfortunately in my setup (Emacs 24.3.1, Windows 7) I could not run even the first hello world. If some Windows user has time and chance to try, may I please ask if they run web-server successfully. Hi Andrea, For better or worse I have no access to a Windows machine and can't address any windows problems. Sorry I can't be of more help, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [BUG] Testing fails after rename of ob-sh
On 2014-01-17 12:34, Eric Schulte wrote: Achim Gratz strom...@nexgo.de writes: What commit were you on before the pull and what branch/commit are you on now? Also, what's the output of make config-test (if you've added sh to BTEST_OB_LANGUAGES, simply remove it). I believe Achim's suggestion should be the correct one. See the comment of the commit making this change. , | commit b319475a86451defbdbac064684dd59fd6b0b7d0 | Author: Eric Schulte schulte.e...@gmail.com | Date: Fri Dec 13 10:03:05 2013 -0700 | | fix tests with the renamed ob-shell.el | | Note, users may have to edit their local.mk files to change the | value of BTEST_OB_LANGUAGES to remove sh and include shell. ` Guess I missed that commit message. I looked at the original commit but not the fix. FWIW, I ran it with an clean checkout (but copied my old local.mk), so I guess the issue is that the orginal genaration of local.mk added sh to the list of languages (i never added it manually). I think this is going to bite a lot of people using the master branch. rick
Re: [O] Different behavior of exported results in org-babel
Ahmadou Dicko dicko.ahma...@gmail.com writes: Hi everyone, I use the latest version of org-mode (from github) and I update it daily. I noticed some changes recently in org-babel (ob-R). Here's a sample code to explain the problem : #+TITLE: Test export #+AUTHOR: Ahmadou H. DICKO #+PROPERTY: session *R* #+PROPERTY: cache yes #+PROPERTY: exports both #+PROPERTY: tangle yes #+OPTIONS: toc:nil * Minimal example This works quite well #+begin_src R :exports both :results output mtcars[1:2, 1:2] #+end_src I just want the output without code but I have this 'bf7c7b2c131fcf88c89639d10326a972f0ff25' before the code #+begin_src R :exports results :results output mtcars[1:2, 1:2] #+end_src I used your reproducer (thanks for providing it!) and was able to duplicate your results (more or less - I get this 7c7b2c131fcf88c89639d10326a972f0ff25]: before the second set of results). If I evaluate both code blocks by hand in the org buffer and *then* export, I don't get the extra junk. I use emacs 24.3.1, org-version 8.2.5f (updated this morning) and R 3.0.2 You can find attached the sample code and output, if you have something different please let me know. Nick
Re: [O] Different behavior of exported results in org-babel
Thanks for testing. As a workaround I will use your trick (in buffer evaluation before exporting) but I was thinking of writing a filter. On Fri, Jan 17, 2014 at 7:04 PM, Nick Dokos ndo...@gmail.com wrote: Ahmadou Dicko dicko.ahma...@gmail.com writes: Hi everyone, I use the latest version of org-mode (from github) and I update it daily. I noticed some changes recently in org-babel (ob-R). Here's a sample code to explain the problem : #+TITLE: Test export #+AUTHOR: Ahmadou H. DICKO #+PROPERTY: session *R* #+PROPERTY: cache yes #+PROPERTY: exports both #+PROPERTY: tangle yes #+OPTIONS: toc:nil * Minimal example This works quite well #+begin_src R :exports both :results output mtcars[1:2, 1:2] #+end_src I just want the output without code but I have this 'bf7c7b2c131fcf88c89639d10326a972f0ff25' before the code #+begin_src R :exports results :results output mtcars[1:2, 1:2] #+end_src I used your reproducer (thanks for providing it!) and was able to duplicate your results (more or less - I get this 7c7b2c131fcf88c89639d10326a972f0ff25]: before the second set of results). If I evaluate both code blocks by hand in the org buffer and *then* export, I don't get the extra junk. I use emacs 24.3.1, org-version 8.2.5f (updated this morning) and R 3.0.2 You can find attached the sample code and output, if you have something different please let me know. Nick -- Ahmadou H. DICKO statistician economist (Ingénieur Statisticien Économiste) PhD candidate in Climate change economics Faculty of economics and managment - Cheikh Anta Diop University West African Science Service Center on Climate Change and Adaptated Land Use (WASCAL) Center for Development Research (ZEF) - University of Bonn email : ahmadou.di...@ucad.edu.sn twitter : @dickoah github : github/dickoa https://github.com/dickoa tel : +221 33 827 55 16 portable: +221 77 123 81 69
Re: [O] [BUG] Testing fails after rename of ob-sh
Eric Schulte writes: I believe Achim's suggestion should be the correct one. See the comment of the commit making this change. The part of Bastiens patch changing (org-babel-do-load-languages 'org-babel-load-languages '((sh . t) (org . t to (org-babel-do-load-languages 'org-babel-load-languages '((shell . t) (org . t looks like a good fix, though. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada
Re: [O] Different behavior of exported results in org-babel
Ahmadou Dicko dicko.ahma...@gmail.com writes: Thanks for testing. As a workaround I will use your trick (in buffer evaluation before exporting) but I was thinking of writing a filter. I think this is a bug, so wait a bit before writing the filter. Eric Schulte will probably know what's wrong immediately, but if he is busy, somebody should be able to figure it out quickly. Nick
Re: [O] [Orgmode] POLL: the 40 variables project
On Thu, Jan 29, 2009 at 3:49 AM, Carsten Dominik wrote: Hi, yesterday I did this command in my org-mode git repo: grep defcustom lisp/*el |wc -l and got 378 as an answer. 378 user-customizable variables, no kidding. It's been almost 5 years since that last check and about time to do it again. And it's even crazier now. :) manishsharma:org-mode/ (master) $ git --no-pager log --pretty=format:'%aD %H' -1 Fri, 17 Jan 2014 12:45:21 +0100 bf304c34854e2f07001e8180508f0c833d17307f% manishsharma:org-mode/ (master) $ grep defcustom lisp/*el |wc -l 808 A big thanks to everyone. --Manish
[O] Making org-agenda-list hide items scheduled for the future
I use the weekly/daily agenda and want to be able to use the SCHEDULED keyword to hide items until the scheduled time comes up. I don't want to think about them until then. How can I set up org-agenda-list to do this? This is the list of agenda items, not the TODO list. I already have org-agenda-todo-ignore-scheduled set to future. It does not help. I am using org-mode 8.2.4, Emacs 24.3.2, CentOS Linux 6.5. Michael Hoffman
[O] [RFC] Move ox-koma-letter into core?
Hello, ox-koma-letter is an export back-end living in contrib, which, as you may know, allows to easily produce letters from Org. I think this is a nice feature to have[fn:1]. Should we have it in core? There is one thing to consider, though: Viktor Rosenfeld (Cc'ed) contributed a significant number of lines of code to the file but hasn't signed FSF papers, AFAIK. WDYT? Regards, [fn:1] Luis Anaya's ox-groff.el seems to provide similar features but I haven't tested it. Though, AFAICS, Groff is more limited than LaTeX. -- Nicolas Goaziou
[O] user-error: :END: line missing at position 3413
I've just got my broadband back again after 9 days without it, and that was a l-o-n-g time! I've updated my emacs to 'Emacs 24.3.50.1' 2014-01-01 on prometheus, modified by Debian, and updated org from ELPA. But now I cant get it to load because it always shows 'user-error: :END: line missing at position 3413'. I asked about it on #emacs on IRC, and was told this is something to do with org-mode. So, can you help me track it down please? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk efever = http://www.efever.blogspot.com/ efever = http://sharon04.livejournal.com/ my git repo = https://bitbucket.org/boudiccas/dots Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.4.2 Registered Linux user 561944 signature.asc Description: PGP signature
Re: [O] M-right does not demote some subheadings in a region
It seems to work. Thank you, Bastien. I wasn't sure if this was the same bug as Susan's, but it seems to be. Why does folding affect semantics? On 1/15/14, Bastien b...@gnu.org wrote: This is the same bug than the one Susan reported, and it was fixed yesterday. Please update and confirm. Thanks, -- Bastien -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] Different behavior of exported results in org-babel
Ahmadou Dicko dicko.ahma...@gmail.com writes: As a workaround I will use your trick (in buffer evaluation before exporting) but I was thinking of writing a filter. A better workaround is to delete the white space (spaces, tabs and newlines) at the end of the file: without that, the problem goes away. If white space is added to the end of the file, the problem might reappear, with different amounts of junk added depending on the amount of added white space. I have traced it down to org-babel-exp-process-buffer: it does the deletions of the source code blocks (possibly putting them back again if the header args tell it to) but it does not always delete the right region. More details later. Nick
[O] bug still there: M-right does not demote some subheadings in a region
I spoke too soon. This bug is /definitely/ still there. I can reliably corrupt the buffer with ordinary M-right on a region of text. It happens every time on every region of text, as far as I can tell. * test org *** before *** beg of region *** a -- fold this * b * c * d * e *** end of region *** after If Susan's bug is fixed, then this is a different bug. On 1/15/14, Bastien b...@gnu.org wrote: This is the same bug than the one Susan reported, and it was fixed yesterday. Please update and confirm. Thanks, -- Bastien -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] bug still there: M-right does not demote some subheadings in a region
I cannot bisect, but 37eba7c is good and any recent master or maint is bad. On 1/17/14, Samuel Wales samolog...@gmail.com wrote: I spoke too soon. This bug is /definitely/ still there. I can reliably corrupt the buffer with ordinary M-right on a region of text. It happens every time on every region of text, as far as I can tell. * test org *** before *** beg of region *** a -- fold this * b * c * d * e *** end of region *** after If Susan's bug is fixed, then this is a different bug. On 1/15/14, Bastien b...@gnu.org wrote: This is the same bug than the one Susan reported, and it was fixed yesterday. Please update and confirm. Thanks, -- Bastien -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] bug still there: M-right does not demote some subheadings in a region
Well, never mind. I must have had some compiled file lying around. It is definitely working now [for now at least]. Thank you.
[O] Slight misbehaviour with `C-x r t' in Org
Hi, Org people. I hope you're all doing fine, and wish you much enjoy this new year! :-) Let me report a little strange behaviour I observed a few times. Here is the textual content of an Org file: --8---cut here---start-8--- * Trying a =b= *c* /d/ --8---cut here---end---8--- It is displayed like this, with org-hide-emphasis-markers to nil: , | * Trying blue | a normal | =b=grey | *c*bold | /d/italics ` But, as I keep org-hide-emphasis-markers to t, what I see is: , | * Trying blue | a normal | b grey | c bold | d italics ` Now, in this mode, if I put the mark on the `a' letter and the point on the `d' letter, and type `C-x r t SPC SPC RET', I then see: , | * Trying blue | anormal | = b= normal | * c*blue | / d/ normal ` So, the spaces are inserted after the opening marker, while I would have expected to see them inserted before it. My actual examples are of course bigger than the toy example above, but even then, this is easily corrected with some light edition. But yet, I find it inconvenient having to always revise text after shifting it (I often use `C-x r t'), in case of inline markup randomly happening at the beginning of a line. François
Re: [O] Fwd: [bug] Beamer export fails in current master
On Thursday, January 16, 2014 5:29:32 AM HKT, Nicolas Goaziou wrote: I see nothing wrong in that process. Can you still reproduce the error with latest Org? Quite strange. I just moved up to current master -- Org-mode version 8.2.5f (release_8.2.5f-518-gd74205 @ /home/dlm/share/org-mode.git/lisp/) -- HEAD is: ~~ commit d74205b0f9e0707642c7b81e1c33a4a059323bea Author: Nicolas Goaziou n.goaz...@gmail.com Date: Fri Jan 17 23:05:20 2014 +0100 ox-koma-letter: Improve defcustom docstrings ~~ Now, with a simple org file, just a few frames, C-c C-e l B finishes successfully. With my full presentation, I get a different error [1]. Moreover, I wanted to see if the :noexport: tags had something to do with it, so I hit shift-tab twice to show all and then M-S-5 :noexport: RET RET, then ! to replace all. It completed the second replacement (third top-level heading) and threw another error related to org-element--cache [2]. You can get my files at: https://github.com/jamshark70/scweek2014 The one I was trying to export is ./shows/01-intro/01-contents.org. To produce the .tex file, you'll also need ./shows/slidehead.org and ./shows/glossary.org. It's not especially pressing -- I can keep using org 8.2.4. But, for whatever reason, org element cache seems to be broken in my environment. hjh [1] Debugger entered--Lisp error: (wrong-number-of-arguments #[(tree data) \303\304H \204 [tree cl-struct-avl-tree--tags data avl-tree--do-delete 0 error avl-tree--cmpfun accessing a non-avl-tree- 2 avl-tree--dummyroot accessing a non-avl-tree- 1] 5 (/usr/share/emacs/23.3/lisp/emacs-lisp/avl-tree.elc . 14229)] 4) avl-tree-delete([cl-struct-avl-tree- nil nil ... 0] [nil nil ... 0] ... 0] [nil [nil nil ... 0] ... 1] ... 0] nil nil 0] org-element--cache-compare] (keyword (:key EMAIL :value :begin 130 :end 141 :post-blank 1 :post-affiliated 130 :parent nil)) nil t) (cond ((not data) (throw ... t)) (( ... end) nil) (t (setq end ...) (avl-tree-delete org-element--cache data nil t))) (let ((node ...) data) (while node (let* ... ...)) (cond (... ...) (... nil) (t ... ...))) (while (let (... data) (while node ...) (cond ... ... ...))) (let ((beg ...)) (while (let ... ... ...))) (let ((inhibit-quit t) (offset ...) (end ...)) (let (...) (while ...)) (unless (zerop offset) (catch ... ...))) (catch (quote escape) (let (... ... ...) (let ... ...) (unless ... ...))) (progn (catch (quote escape) (let ... ... ...)) (org-element--cache-cancel-changes)) (if (org-element--cache-pending-changes-p) (progn (catch ... ...) (org-element--cache-cancel-changes))) (when (org-element--cache-pending-changes-p) (catch (quote escape) (let ... ... ...)) (org-element--cache-cancel-changes)) (save-current-buffer (set-buffer buffer) (when (org-element--cache-pending-changes-p) (catch ... ...) (org-element--cache-cancel-changes))) (with-current-buffer buffer (when (org-element--cache-pending-changes-p) (catch ... ...) (org-element--cache-cancel-changes))) (progn (with-current-buffer buffer (when ... ... ...))) (if (buffer-live-p buffer) (progn (with-current-buffer buffer ...))) (when (buffer-live-p buffer) (with-current-buffer buffer (when ... ... ...))) org-element--cache-sync(#buffer 01-contents.org2) (progn (org-element--cache-sync (current-buffer))) (if (and (not ignore-changes) (org-element--cache-pending-changes-p)) (progn (org-element--cache-sync ...))) (when (and (not ignore-changes) (org-element--cache-pending-changes-p)) (org-element--cache-sync (current-buffer))) (progn (when (and ... ...) (org-element--cache-sync ...)) (if (not ...) (gethash key org-element--cache-objects) (let ... ...))) (if (and org-element-use-cache org-element--cache) (progn (when ... ...) (if ... ... ...))) (when (and org-element-use-cache org-element--cache) (when (and ... ...) (org-element--cache-sync ...)) (if (not ...) (gethash key org-element--cache-objects) (let ... ...))) org-element-cache-get(3203) (let* ((cached ...) (begin ...)) (cond (... ... ... ...) (... ...) (... ... ... ...) (t ...))) (let ((origin ...) element next) (end-of-line) (skip-chars-backward \n) (cond (... ...) (... ... ...)) (goto-char origin) (let* (... ...) (cond ... ... ... ...)) (let (... parent special-flag) (while t ... ... ...))) (save-restriction (widen) (let (... element next) (end-of-line) (skip-chars-backward \n) (cond ... ...) (goto-char origin) (let* ... ...) (let ... ...))) (save-excursion (save-restriction (widen) (let ... ... ... ... ... ... ...))) (org-with-wide-buffer (let (... element next) (end-of-line) (skip-chars-backward \n) (cond ... ...) (goto-char origin) (let* ... ...) (let ... ...))) (catch (quote exit) (org-with-wide-buffer (let ... ... ... ... ... ... ...))) org-element-at-point() (progn (org-element-at-point)) (unwind-protect (progn (org-element-at-point)) (set-match-data save-match-data-internal (quote evaporate))) (let ((save-match-data-internal ...))
Re: [O] Extract source code /with/ captions
Nick Dokos ndokos at gmail.com writes: Try: --8---cut here---start-8--- (defun hjh-print-src-blocks () Iterate src blocks from org-element and print them to *Messages*. (interactive) (let ((tree (org-element-parse-buffer))) (org-element-map tree 'src-block (lambda (element) (message \n\n\nELEMENT:) (print (substring-no-properties (plist-get (car (cdr element)) :caption))) --8---cut here---end---8--- Finally coming back to this. It seems that the actual string-with-properties may be nested at different levels within the :caption object. I tried Nick's version with a different test file, and it failed with a wrong type error. The while below seems to work, though I suppose it could throw an error under some circumstances. Is there an easier way to locate the real stringy-thingy in the middle of the structure, when you can't predict exactly what the structure will be? (defun hjh-print-src-blocks () Iterate src blocks from org-element and print them to *Messages*. (interactive) (let ((tree (org-element-parse-buffer))) (org-element-map tree 'src-block (lambda (element) (setq element (car (cdr element))) (let ((caption (plist-get element :caption))) (while (and caption (not (stringp caption))) (setq caption (car caption))) (message \n\n\nCAPTION:) (print (substring-no-properties caption))) hjh
Re: [O] Extract source code /with/ captions
For posterity, this is doing what I want. It's with some shock that I note, I'm actually starting to understand LISP. hjh (defun hjh-get-string-from-nested-thing (thing) Peel off 'car's from a nested list until the car is a string. (while (and thing (not (stringp thing))) (setq thing (car thing))) thing ) (defun hjh-src-blocks-to-string () Iterate src blocks from org-element and add them to a string. (interactive) (let ((tree (org-element-parse-buffer)) (string ) (counter 0)) (org-element-map tree 'src-block (lambda (element) (setq element (car (cdr element))) (let ((caption (hjh-get-string-from-nested-thing (plist-get element :caption))) (source (hjh-get-string-from-nested-thing (plist-get element :value (when caption (setq counter (1+ counter)) (setq string (concat string (format /* Listing %d. %s */ %s\n\n counter (substring-no-properties caption) (substring-no-properties source string)) (defun hjh-src-blocks-to-buffer () Put all the captioned source blocks from a buffer into another buffer. (interactive) (let* ((contents (hjh-src-blocks-to-string)) (bufpath (buffer-file-name)) (newname (concat (file-name-sans-extension bufpath) .scd)) (bufname (file-name-nondirectory newname)) (newbuf (get-buffer-create bufname))) (with-current-buffer newbuf (erase-buffer) (insert contents) (set-visited-file-name newname)) (switch-to-buffer-other-window newbuf)))
Re: [O] user-error: :END: line missing at position 3413
Von: Sharon Kimble boudic...@talktalk.net Datum: Fri, 17 Jan 2014 23:33:15 + An: Emacs-orgmode@gnu.org Betreff: [O] user-error: :END: line missing at position 3413 I've updated my emacs to 'Emacs 24.3.50.1' 2014-01-01 on prometheus, modified by Debian, and updated org from ELPA. But now I cant get it to load because it always shows 'user-error: :END: line missing at position 3413'. I asked about it on #emacs on IRC, and was told this is something to do with org-mode. So, can you help me track it down please? Hi Sharon, I had the same problem several times. Somehow, I seemed to have deleted the :END: line of a Log Drawer in org-mode. It recently helped me to start Emacs with the debug-init option like this: emacs --debug-init Then in the Messages log, I found a trace to the corresponding org-file and then after opening the file in a buffer you can jump to the line where the problem occurs with M-x goto-char 3413 (in your case) There were 2 other solutions proposed which I have not tested yet (see attached messages below). Kind regards Martin -- Weitergeleitete Nachricht Von: Bastien b...@gnu.org Datum: Tue, 14 Jan 2014 21:52:31 +0100 An: Martin Beck elwood...@web.de Cc: emacs orgmode-mailinglist emacs-orgmode@gnu.org Betreff: Re: File mode specification error: (error :END: line missing at position 63362) Hi Martin, maybe you can use this helper function: (defun bzg-find-corrupted-property-drawers () Find corrupted property drawers. (interactive) (let (msgs) (save-excursion (goto-char (point-min)) (while (search-forward :PROPERTIES: nil t) (let ((search-end (save-excursion (org-end-of-subtree t (if (not (search-forward :END: search-end t)) (push (format Missing :END: at %d in %s\n (point) (buffer-name)) msgs) (if (not msgs) (message No corrupted property drawers) (switch-to-buffer-other-window *Org missing :END:) (mapcar 'insert msgs A bit rought at the edges, but perhaps useful. -- Bastien -- Ende der weitergeleiteten Nachricht -- Weitergeleitete Nachricht Von: Brian Wood bw...@berkeley.edu Organisation: UC Berkeley Datum: Mon, 04 Mar 2013 13:12:56 -0800 An: emacs-orgmode@gnu.org Betreff: Re: [O] [OT]: Search for missing :END: I just found a few of these errors in *Messages* and since I have 20 .org files, I used this approach cd ~/orgmode # this gives me the byte offset the filename for each matching line grep -br 'CLOCK: ' * ~/tmp/org-missing-end.txt #this searches within a few bytes of the byte offset reported by emacs grep -E :3007.: ~/tmp/org-missing-end.txt Searching within a few bytes was not necessary. In my case I found a :CLOCK: string at the byte-offset in the error message. -- Brian Wood Applications Programmer UC Berkeley IST -- Ende der weitergeleiteten Nachricht
Re: [O] user-error: :END: line missing at position 3413
On Sat, 18 Jan 2014 07:03:21 +0100 M elwood...@web.de wrote: Von: Sharon Kimble boudic...@talktalk.net Datum: Fri, 17 Jan 2014 23:33:15 + An: Emacs-orgmode@gnu.org Betreff: [O] user-error: :END: line missing at position 3413 I've updated my emacs to 'Emacs 24.3.50.1' 2014-01-01 on prometheus, modified by Debian, and updated org from ELPA. But now I cant get it to load because it always shows 'user-error: :END: line missing at position 3413'. I asked about it on #emacs on IRC, and was told this is something to do with org-mode. So, can you help me track it down please? Hi Sharon, I had the same problem several times. Somehow, I seemed to have deleted the :END: line of a Log Drawer in org-mode. It recently helped me to start Emacs with the debug-init option like this: emacs --debug-init Then in the Messages log, I found a trace to the corresponding org-file and then after opening the file in a buffer you can jump to the line where the problem occurs with M-x goto-char 3413 (in your case) There were 2 other solutions proposed which I have not tested yet (see attached messages below). Thanks for this Martin, it set me on the right track to solving it. It puzzled me why one particular org file would load but nowt else, so I had a close look at it. There were no missing :END: but the goto-char was directing me to a specific place in the file, this file was my 'organizer.org' storing all details of hospital appointments, there was absolutely no way that it could be corrupted. And then I remembered that I had restored the file from an autosave backup, at which point I copied everything over to a organizer.txt, saved and restarted emacs. And everything just loaded up so nicely, problem solved! So I then saved the organiser.txt as organiser.org, and it still all works nicely. Thanks Sharon. Kind regards Martin -- Weitergeleitete Nachricht Von: Bastien b...@gnu.org Datum: Tue, 14 Jan 2014 21:52:31 +0100 An: Martin Beck elwood...@web.de Cc: emacs orgmode-mailinglist emacs-orgmode@gnu.org Betreff: Re: File mode specification error: (error :END: line missing at position 63362) Hi Martin, maybe you can use this helper function: (defun bzg-find-corrupted-property-drawers () Find corrupted property drawers. (interactive) (let (msgs) (save-excursion (goto-char (point-min)) (while (search-forward :PROPERTIES: nil t) (let ((search-end (save-excursion (org-end-of-subtree t (if (not (search-forward :END: search-end t)) (push (format Missing :END: at %d in %s\n (point) (buffer-name)) msgs) (if (not msgs) (message No corrupted property drawers) (switch-to-buffer-other-window *Org missing :END:) (mapcar 'insert msgs A bit rought at the edges, but perhaps useful. -- Bastien -- Ende der weitergeleiteten Nachricht -- Weitergeleitete Nachricht Von: Brian Wood bw...@berkeley.edu Organisation: UC Berkeley Datum: Mon, 04 Mar 2013 13:12:56 -0800 An: emacs-orgmode@gnu.org Betreff: Re: [O] [OT]: Search for missing :END: I just found a few of these errors in *Messages* and since I have 20 .org files, I used this approach cd ~/orgmode # this gives me the byte offset the filename for each matching line grep -br 'CLOCK: ' * ~/tmp/org-missing-end.txt #this searches within a few bytes of the byte offset reported by emacs grep -E :3007.: ~/tmp/org-missing-end.txt Searching within a few bytes was not necessary. In my case I found a :CLOCK: string at the byte-offset in the error message. -- Brian Wood Applications Programmer UC Berkeley IST -- Ende der weitergeleiteten Nachricht -- A taste of linux = http://www.sharons.org.uk efever = http://www.efever.blogspot.com/ efever = http://sharon04.livejournal.com/ my git repo = https://bitbucket.org/boudiccas/dots Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.4.2 Registered Linux user 561944 signature.asc Description: PGP signature