Re: [O] Automatically adding local variables to tangled file
Eric Schulte schulte.e...@gmail.com writes: [snip (4 lines)] I personally prefer the solution shown below of adding a file-local variable using the post-tangle hook. As mentioned previously this makes the detection of tangled code much faster, simpler and less error prone than grepping the file for comments. +1 On the other hand, a local variable in the tangled files to set the buffer to read-only could be very useful to avoid the mistake of editing the tangled files directly. We already set the permission of tangled files to be executable when they include a shebang line. Perhaps we could add an option (or change the default) to set the permissions of tangled files to be read only. Perhaps this could be done using the post-tangle hook with something like the following. ;; -*- emacs-lisp -*- (defun org-babel-mark-tangled-as-read-only () Mark the current file read only. If it is executable keep it executable. (if (= #o755 (file-modes (buffer-file-name))) (set-file-modes (buffer-file-name) #o555) (set-file-modes (buffer-file-name) #o444))) (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-tangled-as-read-only) I think that would be a good idea to add this in a way so that it is controled by a variable - if the variable is t, all tangled files will be set read-only, if it is nil, none will. It might be useful to also allow string / list of strings, which then would individual file names which could be set as read-only. I would leave the default as it is to guarantee backward compatibility, although I agree that the org file is the source, and the tangled file should not be changed. For the time being, I will just add this code above to my emacs.org. [snip (7 lines)] , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) |(put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | |(defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (basic-save-buffer)) | |(add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` I think the above code should be considered an implementation rather than simply a test. This is exactly what the post-tangle hook is intended to support. Is there a motivating reason for this behavior to be built in? As pointed out, I think the possibility to easily add local variables to the tangled file, will be valuable. I would opt for an the buil-in option, as this could e.g. be used to set the file read-only in emacs, adding svn information, etc. This could be achieved by supplying one variable containing strings, which contains the names of the local variables to be added and their values. For the time being, I will add the suggested code to my emacs.org. [snip (19 lines)] I agree that local-file variables show much promise, although I think (at least for now) the best way to set such variables is through the post-tangle-hook as Vitalie has already done. Ok - I'll stick to the solutions outlined above for now. Thanks a lot everybody, Rainer Best, Cheers, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug -- Rainer M. Krug email: RMKrugatgmaildotcom pgpoOxdr6ijR1.pgp Description: PGP signature
Re: [O] refine org-babel-tangle-jump-to-org?
Eric Schulte schulte.e...@gmail.com writes: the tangled file looks as follow, including the empty lines at beginning and end: , | | ## [[file:~/tmp/jumpBack.org::*newASM%20(./newASM.R)][newASM\ \(\./newASM\.R\):1]] | | logList(##) | logList(##) [snip (19 lines)] | logEnd() | return(ASM) | } | | ## newASM\ \(\./newASM\.R\):1 ends here | ` This one works, although the cursor is consistently two characters to the left then where it should be. This is off because the first line of your example is not indented correctly when tangled. Specifically, it is indented by two spaces in the source file and by four spaces in the code block. Setting the `org-src-preserve-indentation' variable to t should fix this. If I change , | #+PROPERTY: padline yes ` to , | #+PROPERTY: padline no ` the padlines are gone, ant the jumping back is completely off (from first r in return() it jumps to the third # in the last logList()). For now I think both padlines and link comments are required for the jumping functionality to work. I've updated the documentation to reflect this. Thanks - I will change it accordingly. Rainer [snip (16 lines)] #secure method=pgpmime mode=sign -- Rainer M. Krug email: RMKrugatgmaildotcom
Re: [O] Automatically adding local variables to tangled file
Rainer M Krug rai...@krugs.de writes: [snip (54 lines)] , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) |(put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | |(defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (basic-save-buffer)) | |(add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` I think the above code should be considered an implementation rather than simply a test. This is exactly what the post-tangle hook is intended to support. Is there a motivating reason for this behavior to be built in? As pointed out, I think the possibility to easily add local variables to the tangled file, will be valuable. I would opt for an the buil-in option, as this could e.g. be used to set the file read-only in emacs, adding svn information, etc. This could be achieved by supplying one variable containing strings, which contains the names of the local variables to be added and their values. For the time being, I will add the suggested code to my emacs.org. I stumbled upon one problem, though: I want to mame the tengled file, when nopened in emacs, to have the minor mode auto-revert-mode. So I did the following, which obviously did not work: , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) | (put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | | (defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (add-file-local-variable 'buffer-read-only t) | (add-file-local-variable 'eval: (auto-revert-mode)) | (basic-save-buffer)) | | (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` So is tere a way, of adding the line , | eval: (auto-revert-mode) ` to the file local variables, so that emacs sutomatically enables auto-revert-mode? Thanks, Rainer [snip (38 lines)] -- Rainer M. Krug email: RMKrugatgmaildotcom pgpmtIV7JMOVI.pgp Description: PGP signature
Re: [O] Help, I need to paste raw image from clipboard into emacs/orgmode
Thanks for the tip. Do you have an elisp piece that handles the image insertion into org buffers? Thanks, Vitalie Klaus-Dieter Bauer bauer.klaus.die...@gmail.com on Thu, 6 Jun 2013 19:16:26 +0200 wrote: Dear All, Please Help, I need to paste raw image from clipboard into emacs/orgmode, I am a microsoft onenote user and I got used to take a lot of snapshots and embed it into my notes, I think if I could know how to embed images directly into emacs/orgmode from clipboard, I will switch to emacs very easily. I searched the internet but unfortunately I didn't find the answer, Thanks a lot. Dodo Hello! While the original poster probably long since has implemented one of the previously suggested solutions (or given up) I thought I'd share a more general solution I found [1]. ImageMagick's `convert' can use clipboard: as input file (don't know if it works as output file). convert clipboard: FILENAME-WITH-EXTENSION I tested it with the cygwin and native windows versions and both worked. king regards, Klaus PS1: On Windows `convert.exe' might be shadowed by another executable, especially C:\Windows\System32\convert.exe. In that case the PATH variable should be adjusted such that ImageMagick comes before C:\Windows\system32. To check what shadows the executable, you can run where convert in the Windows-commandline. PS2: On Windows only basic image-displaying-support is included out-of-the-box. To get full support, the easiest way is to install the full GnuWin32 tools (which include the necessary image libraries) with the web-installer. -- [1] User magick in http://www.imagemagick.org/discourse-server/viewtopic.php?f=1t=7524p=22859.
[O] [PATCH] Don't ask File changed on disk in org-babel-post-tangle-hook
The problem with org-babel-post-tangle-hook is that user is always asked yes-or-no-p for file reversion. Calling auto revert (as Rainer tried) will not help. The problem is in find-file-noselect in org-babel-find-file-noselect-refresh. The following patch fixes it by silencing find-file-noselect. Besides reversion question, there are a couple of other warning/questions that are silenced, but given that org-babel-find-file-noselect-refresh is used only for reverting tangled files, this is probably not an issue. Vitalie From 2f408019b940c7e3b742dd2941f725f97645b868 Mon Sep 17 00:00:00 2001 From: Vitalie Spinu spinu...@gmail.com Date: Fri, 7 Jun 2013 12:43:55 +0200 Subject: [PATCH] avoid file warnings in org-babel-post-tangle-hook * lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): call find-file-noselect with 'nowarn argument to surpress yes-or-no-p reversion message. --- lisp/ob-tangle.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 95d518a..82f2c10 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -114,7 +114,7 @@ result. The default value is `org-babel-trim'. (defun org-babel-find-file-noselect-refresh (file) Find file ensuring that the latest changes on disk are represented in the file. - (find-file-noselect file) + (find-file-noselect file 'nowarn) (with-current-buffer (get-file-buffer file) (revert-buffer t t t))) -- 1.8.1.2 Rainer M Krug rai...@krugs.de on Fri, 07 Jun 2013 10:32:19 +0200 wrote: Rainer M Krug rai...@krugs.de writes: [snip (54 lines)] , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) |(put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | |(defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (basic-save-buffer)) | |(add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` I think the above code should be considered an implementation rather than simply a test. This is exactly what the post-tangle hook is intended to support. Is there a motivating reason for this behavior to be built in? As pointed out, I think the possibility to easily add local variables to the tangled file, will be valuable. I would opt for an the buil-in option, as this could e.g. be used to set the file read-only in emacs, adding svn information, etc. This could be achieved by supplying one variable containing strings, which contains the names of the local variables to be added and their values. For the time being, I will add the suggested code to my emacs.org. I stumbled upon one problem, though: I want to mame the tengled file, when nopened in emacs, to have the minor mode auto-revert-mode. So I did the following, which obviously did not work: , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) | (put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | | (defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (add-file-local-variable 'buffer-read-only t) | (add-file-local-variable 'eval: (auto-revert-mode)) | (basic-save-buffer)) | | (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` So is tere a way, of adding the line , | eval: (auto-revert-mode) ` to the file local variables, so that emacs sutomatically enables auto-revert-mode? Thanks, Rainer [snip (38 lines)]
Re: [O] org-list-allow-alphabetical LaTeX export
Hello, Carsten Dominik carsten.domi...@gmail.com writes: This is a good point - but this calls for something else: A mechanism to name a particular list item and refer to it by name. In LaTeX you can put a \label into an ordered list item and refer to it with \ref. I am not sure if the new exporter allows this for list items, but I do not thing so. Nicolas, has this ever been considered? I don't remember. This would be useful. Or, make sure you use a LaTeX stype or HTML style file that uses a specific labeling system. As pointed out by Rasmus in this thread, there is a cross-reference mechanism in the export framework. 1. something Item 1. 2. Reference to item [[something]]. It will work in any back-end, but obviously, will ignore alphabetical lists (link will always appear as a number). Speaking of those, my opinion is we should drop them altogether, as they are just (dubious) syntactic sugar, but some users will always expect them to be more than that. Regards, -- Nicolas Goaziou
Re: [O] Oorg-export-generic.el and emphasize
Hello, Wes Hardaker wjhns...@hardakers.net writes: celano cel...@laposte.net writes: I tried exporting a text with emphasize, but it doesn't work. The man page speaks about sections, lists and such other things, but nothing about emphasizing and bold text. http://orgmode.org/worg/org-contrib/org-export-generic.html You're right that it doesn't do this. The generic exporter really needs to be rewritten to make use of the new parser, now that it exists... I've been meaning to look into doing just that but haven't yet found the time. ox.el is a generic exporter. I think we should focus on developing export back-ends for this one instead. What feature from `org-export-generic' do you think is missing in ox.el? Regards, -- Nicolas Goaziou
[O] eval-line-and-step broken in org mode buffer
http://comments.gmane.org/gmane.emacs.ess.general/7239 I can confirm this with Org 7.8 and ESS 13.05 and R 3.0.1 under Ubuntu 12.04 LTS. eval-line-and-step (F9) when in an Org file evaluates the line in R, and then jumps the cursor elsewhere as described, instead of advancing it. eval-line-and-step-invisibly advances the cursor to the next line, but does not skip blank lines or comments. Is this an ESS or Org issue?
Re: [O] refine org-babel-tangle-jump-to-org?
Rainer M Krug rai...@krugs.de writes: Eric Schulte schulte.e...@gmail.com writes: [snip (46 lines)] For now I think both padlines and link comments are required for the jumping functionality to work. I've updated the documentation to reflect this. Thanks - I will change it accordingly. I just discovered, that I have a problem with the setting of org-src-preserve-indentation, as I am using org to write a package, and I have put DESCRIPTION into the org file (as fundamental). If I have org-src-preserve-indentation set to t, the lines start with two spaces ( ) which causes an error in reading the files. I can disable padlines for these source blocks, which is no problem, but I think I can't change the setting for org-src-preserve-indentation for a single block. Would it be possible to have this option as a header argument, so that I can change it for certain blocks? The same problem is for the local file arguments: they must not be in the DESCRIPTION and NAMESPACE file. I could use sed or similar to adjust these files, but I would rather prefer to a) be able to have org-src-preserve-indentation for tangling as a header argument b) a variable in which I can specify in which tangled files should have the local variables included. By the way, the post-tangle-hook approach works, but it has the disadvantage, that each file needs to be written twice - in the mini buffer, each tangled file is shown twice. As one org file contains several (10) tangles output files, this adds to the time needed for tangling. Cheers, Rainer Rainer [snip (16 lines)] #secure method=pgpmime mode=sign -- Rainer M. Krug email: RMKrugatgmaildotcom
Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.
Hello, Rasmus ras...@gmx.us writes: Nicolas Goaziou n.goaz...@gmail.com writes: is the attached patch better? It is, thank you. Here is another round of comments. + (replace-match (mapconcat 'identity + (if language + (cond ((member language options) + (delete AUTO) options) + ((member AUTO options) + (dotimes (n (length options) options) +(if (equal AUTO (nth n options)) +(setf (nth n options) language + (t (append options (list language + (delete AUTO options)) I suggest to use something like this instead: (mapconcat (lambda (option) (if (equal AUTO option) language option)) (cond ((member language options) (delete AUTO options)) ((member AUTO options) options) (t (append options (list language) - nil nil header 1)) + t nil header 1) Why do you need to use a non-nil FIXEDCASE argument here? Regards, -- Nicolas Goaziou
Re: [O] eval-line-and-step broken in org mode buffer
I cannot reproduce it with org 8 and ESS 13.05. So probably it fixed ñ itself or it is some local configuration of yours. In that case would be nice to know the cause. Vitalie SabreWolfy sabrewo...@gmail.com on Fri, 7 Jun 2013 11:57:20 + (UTC) wrote: http://comments.gmane.org/gmane.emacs.ess.general/7239 I can confirm this with Org 7.8 and ESS 13.05 and R 3.0.1 under Ubuntu 12.04 LTS. eval-line-and-step (F9) when in an Org file evaluates the line in R, and then jumps the cursor elsewhere as described, instead of advancing it. eval-line-and-step-invisibly advances the cursor to the next line, but does not skip blank lines or comments. Is this an ESS or Org issue?
[O] Wrong comment character when adding file local variables?
Hi when tangling the following file , | * Package Files | ** DESCRIPTION File | :PROPERTIES: | :tangle: ./DESCRIPTION | :shebang: | :padline: no | :no-expand: TRUE | :comments: no | :END: | #+begin_src R | Package: asmDrak | #+end_src | | ** NAMESPACE File | :PROPERTIES: | :tangle: ./NAMESPACE | :shebang: | :padline: no | :no-expand: TRUE | :comments: no | :END: | #+begin_src R | this is a test | #+end_src | | | ** DESC2 File | :PROPERTIES: | :tangle: ./DESC2 | :shebang: | :padline: no | :no-expand: TRUE | :comments: yes | :END: | #+begin_src R | this is a test | #+end_src ` I get the following tangled files: DESCRIPTION: , | Package: asmDrak | | ;; Local Variables: | ;; org-babel-tangled-file: t | ;; buffer-read-only: t | ;; End: ` which has the wrong comment character (should have #) NAMESPACE: , | this is a test | | ## Local Variables: | ## org-babel-tangled-file: t | ## buffer-read-only: t | ## End: ` which has the correct comment characters, and DESC2 , | ## [[file:~/tmp/tangle.org::*DESC2%20File][DESC2\ File:1]] | this is a test | ## DESC2\ File:1 ends here | | ;; Local Variables: | ;; org-babel-tangled-file: t | ;; buffer-read-only: t | ;; End: ` which has the correct comment characters for the comments, but the wrong ones for the file local variables. I use the following in my .emacs file to set the post-tangle-hook to add the local file variables: , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) | (put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | | (defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (add-file-local-variable 'buffer-read-only t) | ;; (add-file-local-variable 'eval: (auto-revert-mode)) | (basic-save-buffer)) | | (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` I assume this is a bug somewhere? Org-mode version 8.0.3 (release_8.0.3-211-gf16b53 @ /home/rkrug/.emacs.d/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4) of 2013-04-14 on actinium, modified by Debian Cheers, Rainer -- Rainer M. Krug email: RMKrugatgmaildotcom pgpjYxfWQhFUN.pgp Description: PGP signature
Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Rasmus ras...@gmx.us writes: Nicolas Goaziou n.goaz...@gmail.com writes: is the attached patch better? It is, thank you. Here is another round of comments. +(replace-match (mapconcat 'identity + (if language + (cond ((member language options) + (delete AUTO) options) +((member AUTO options) + (dotimes (n (length options) options) + (if (equal AUTO (nth n options)) + (setf (nth n options) language +(t (append options (list language +(delete AUTO options)) I suggest to use something like this instead: (mapconcat (lambda (option) (if (equal AUTO option) language option)) (cond ((member language options) (delete AUTO options)) ((member AUTO options) options) (t (append options (list language) - nil nil header 1)) + t nil header 1) It looks more elegant. I'll try to incorporate it and prepare a v4. Why do you need to use a non-nil FIXEDCASE argument here? When I don't #+LANGUAGE: en #+LATEX_HEADER: \usepackage[AUTO]{babel} becomes \usepackage[ENGLISH]{babel}. . . Why? I don't know. . . Fixedcase solves it. -- Summon the Mothership!
Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.
Rasmus ras...@gmx.us writes: Nicolas Goaziou n.goaz...@gmail.com writes: I suggest to use something like this instead: (mapconcat (lambda (option) (if (equal AUTO option) language option)) (cond ((member language options) (delete AUTO options)) ((member AUTO options) options) (t (append options (list language) It looks more elegant. I'll try to incorporate it and prepare a v4. OK. But I forgot to add , as mapconcat's third argument. Why do you need to use a non-nil FIXEDCASE argument here? When I don't #+LANGUAGE: en #+LATEX_HEADER: \usepackage[AUTO]{babel} becomes \usepackage[ENGLISH]{babel}. . . Good point. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Don't ask File changed on disk in org-babel-post-tangle-hook
Vitalie Spinu spinu...@gmail.com writes: The problem with org-babel-post-tangle-hook is that user is always asked yes-or-no-p for file reversion. Calling auto revert (as Rainer tried) will not help. The problem is in find-file-noselect in org-babel-find-file-noselect-refresh. The following patch fixes it by silencing find-file-noselect. Besides reversion question, there are a couple of other warning/questions that are silenced, but given that org-babel-find-file-noselect-refresh is used only for reverting tangled files, this is probably not an issue. Applied. Thanks, Vitalie From 2f408019b940c7e3b742dd2941f725f97645b868 Mon Sep 17 00:00:00 2001 From: Vitalie Spinu spinu...@gmail.com Date: Fri, 7 Jun 2013 12:43:55 +0200 Subject: [PATCH] avoid file warnings in org-babel-post-tangle-hook * lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): call find-file-noselect with 'nowarn argument to surpress yes-or-no-p reversion message. --- lisp/ob-tangle.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 95d518a..82f2c10 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -114,7 +114,7 @@ result. The default value is `org-babel-trim'. (defun org-babel-find-file-noselect-refresh (file) Find file ensuring that the latest changes on disk are represented in the file. - (find-file-noselect file) + (find-file-noselect file 'nowarn) (with-current-buffer (get-file-buffer file) (revert-buffer t t t))) -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Wrong comment character when adding file local variables?
All your examples are placed in fundamental mode. The comments are treated by org and thus are correct, local variables are inserted according to the major mode. I don't how this could be easily fixed on org side, but you can solve it straightforwardly with: (add-to-list 'auto-mode-alist (cons NAME\\|DESC 'R-mode)) Vitalie Rainer M Krug rai...@krugs.de on Fri, 07 Jun 2013 15:12:58 +0200 wrote: Hi when tangling the following file , | * Package Files | ** DESCRIPTION File | :PROPERTIES: | :tangle: ./DESCRIPTION | :shebang: | :padline: no | :no-expand: TRUE | :comments: no | :END: | #+begin_src R | Package: asmDrak | #+end_src | | ** NAMESPACE File | :PROPERTIES: | :tangle: ./NAMESPACE | :shebang: | :padline: no | :no-expand: TRUE | :comments: no | :END: | #+begin_src R | this is a test | #+end_src | | | ** DESC2 File | :PROPERTIES: | :tangle: ./DESC2 | :shebang: | :padline: no | :no-expand: TRUE | :comments: yes | :END: | #+begin_src R | this is a test | #+end_src ` I get the following tangled files: DESCRIPTION: , | Package: asmDrak | | ;; Local Variables: | ;; org-babel-tangled-file: t | ;; buffer-read-only: t | ;; End: ` which has the wrong comment character (should have #) NAMESPACE: , | this is a test | | ## Local Variables: | ## org-babel-tangled-file: t | ## buffer-read-only: t | ## End: ` which has the correct comment characters, and DESC2 , | ## [[file:~/tmp/tangle.org::*DESC2%20File][DESC2\ File:1]] | this is a test | ## DESC2\ File:1 ends here | | ;; Local Variables: | ;; org-babel-tangled-file: t | ;; buffer-read-only: t | ;; End: ` which has the correct comment characters for the comments, but the wrong ones for the file local variables. I use the following in my .emacs file to set the post-tangle-hook to add the local file variables: , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) | (put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | | (defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (add-file-local-variable 'buffer-read-only t) | ;; (add-file-local-variable 'eval: (auto-revert-mode)) | (basic-save-buffer)) | | (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` I assume this is a bug somewhere? Org-mode version 8.0.3 (release_8.0.3-211-gf16b53 @ /home/rkrug/.emacs.d/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4) of 2013-04-14 on actinium, modified by Debian Cheers, Rainer
Re: [O] org-list-allow-alphabetical LaTeX export
Josiah Schwab jsch...@gmail.com writes: However, the type=a thingie in ol is a bad idea: it is deprecated in the HTML spec, so it would be foolish to go chasing after it in org. I'll take a closer look the rest of your message to tomorrow, but I wanted to mention that while type was deprecated in HTML4 that is no longer the case in HTML5. http://www.w3.org/TR/html-markup/ol.html#ol.attrs.type OK - thanks for the pointer! -- Nick
Re: [O] [PATCH] Don't ask File changed on disk in org-babel-post-tangle-hook
Eric Schulte schulte.e...@gmail.com writes: Vitalie Spinu spinu...@gmail.com writes: The problem with org-babel-post-tangle-hook is that user is always asked yes-or-no-p for file reversion. Calling auto revert (as Rainer tried) will not help. The problem is in find-file-noselect in org-babel-find-file-noselect-refresh. The following patch fixes it by silencing find-file-noselect. Besides reversion question, there are a couple of other warning/questions that are silenced, but given that org-babel-find-file-noselect-refresh is used only for reverting tangled files, this is probably not an issue. Applied. Thanks, Thanks a lot. Will update then and try later. Thanks, Rainer Vitalie From 2f408019b940c7e3b742dd2941f725f97645b868 Mon Sep 17 00:00:00 2001 From: Vitalie Spinu spinu...@gmail.com Date: Fri, 7 Jun 2013 12:43:55 +0200 Subject: [PATCH] avoid file warnings in org-babel-post-tangle-hook * lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): call find-file-noselect with 'nowarn argument to surpress yes-or-no-p reversion message. --- lisp/ob-tangle.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 95d518a..82f2c10 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -114,7 +114,7 @@ result. The default value is `org-babel-trim'. (defun org-babel-find-file-noselect-refresh (file) Find file ensuring that the latest changes on disk are represented in the file. - (find-file-noselect file) + (find-file-noselect file 'nowarn) (with-current-buffer (get-file-buffer file) (revert-buffer t t t))) #secure method=pgpmime mode=sign -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] link abbreviation with multiple params, e. g. for geo locations
Hi Eric Thank you for looking into this. On Thu, Jun 6, 2013 at 7:01 PM, Eric Schulte schulte.e...@gmail.com wrote: Is the only requirement that the point from which a code block was called be accessible to the emacs-lisp code executed within that code block? Yes. If so then there should be no need for additional development. The following already works thanks to some very recently applied changes. Is release_8.0.3-207-g5dc5143 the change you mention?: commit 5dc5143578a2759611a5856de9bf9d1c7eba9283 Author: Eric Schulte schulte.e...@gmail.com Date: Thu Jun 6 10:59:27 2013 -0600 inline sets org-babel-current-exec-src-block-head In this commit I see two issues which my patch does not have: 1) The variable name org-babel-current-exec-src-block-head is the same as for a different meaning (source block head) and purpose introduced in release_8.0.3-202-gf301bbc commit f301bbcc862c2acc61749bc1e24895bf69cd4d06 Author: Vitalie Spinu spinu...@gmail.com Date: Thu Jun 6 12:04:02 2013 +0200 make src block location available to execution backends but in release_8.0.3-207-g5dc5143 the same name is used for the point-marker of call_func which is misleading. In my patch I named the variable loc for Location Of Call. And I chose intentionally a name as short as possible to keep the #+HEADER: lines not getting too wide, see e. g. the ERT in my patch. 2) Export is not supported (C-c C-c works as expected). Just today I saw a possible improvement for my patch: For a more general usage of loc than only for org-entry-get it would be better if loc in export would not contain the location of the entry start but the exact location of possibly more than one call within the same entry. For C-c C-c this is already the case. Since I don't know how to resolve this I would let it as is for now unless there is a suggestion. I would like to provide a new patch if I know what else should be improved. Michael
Re: [O] link abbreviation with multiple params, e. g. for geo locations
Hi Michael, Is release_8.0.3-207-g5dc5143 the change you mention?: yes commit 5dc5143578a2759611a5856de9bf9d1c7eba9283 Author: Eric Schulte schulte.e...@gmail.com Date: Thu Jun 6 10:59:27 2013 -0600 inline sets org-babel-current-exec-src-block-head In this commit I see two issues which my patch does not have: 1) The variable name org-babel-current-exec-src-block-head is the same as for a different meaning (source block head) and purpose introduced in release_8.0.3-202-gf301bbc commit f301bbcc862c2acc61749bc1e24895bf69cd4d06 Author: Vitalie Spinu spinu...@gmail.com Date: Thu Jun 6 12:04:02 2013 +0200 make src block location available to execution backends but in release_8.0.3-207-g5dc5143 the same name is used for the point-marker of call_func which is misleading. Perhaps the variable name should be updated, but this extension is simply a generalization to include inline code blocks as well. I don't find it misleading. In my patch I named the variable loc for Location Of Call. In the technical pigeon spoken in my own circles loc has a well established meaning, namely line of code. And I chose intentionally a name as short as possible to keep the #+HEADER: lines not getting too wide, see e. g. the ERT in my patch. 2) Export is not supported (C-c C-c works as expected). I can't reproduce this bug. The following Org-mode file. # #+PROPERTY: exports results # Two examples using `org-babel-current-exec-src-block-head'. * head :PROPERTIES: :foo: bar :END: In a block. #+name: head #+begin_src emacs-lisp (org-entry-get org-babel-current-exec-src-block-head foo) #+end_src In a call line. #+call: head() * tail :PROPERTIES: :foo: baz :END: #+begin_src emacs-lisp (org-entry-get org-babel-current-exec-src-block-head foo) #+end_src exports to the following latex % -*- latex -*- \section{head} \label{sec-1} In a block. \begin{verbatim} bar \end{verbatim} In a call line. \begin{verbatim} bar \end{verbatim} \section{tail} \label{sec-2} \begin{verbatim} baz \end{verbatim} Although I think there may well be improvements to be made to the current approach, e.g. a different variable name, or saving a list of call locations instead of just the first call location, I've yet to see a motivating example where the existing solution is inadequate. Thanks, Just today I saw a possible improvement for my patch: For a more general usage of loc than only for org-entry-get it would be better if loc in export would not contain the location of the entry start but the exact location of possibly more than one call within the same entry. For C-c C-c this is already the case. Since I don't know how to resolve this I would let it as is for now unless there is a suggestion. I would like to provide a new patch if I know what else should be improved. Michael -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] refine org-babel-tangle-jump-to-org?
Rainer M Krug rai...@krugs.de writes: Rainer M Krug rai...@krugs.de writes: Eric Schulte schulte.e...@gmail.com writes: [snip (46 lines)] For now I think both padlines and link comments are required for the jumping functionality to work. I've updated the documentation to reflect this. Thanks - I will change it accordingly. I just discovered, that I have a problem with the setting of org-src-preserve-indentation, as I am using org to write a package, and I have put DESCRIPTION into the org file (as fundamental). If I have org-src-preserve-indentation set to t, the lines start with two spaces ( ) which causes an error in reading the files. Couldn't you just not indent these code blocks. E.g., change #+begin_src R Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. #+end_src to #+begin_src R Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. #+end_src I can disable padlines for these source blocks, which is no problem, but I think I can't change the setting for org-src-preserve-indentation for a single block. This is tricky because the indentation is separate from and predates Babel, so there is no obvious straightforward way to coerce this into a header argument. Would it be possible to have this option as a header argument, so that I can change it for certain blocks? The same problem is for the local file arguments: they must not be in the DESCRIPTION and NAMESPACE file. Alright, I think you've convinced me that it could be worthwhile to add header arguments to support file local variables and read modes in tangled files. I don't have the time to implement and document these new header arguments, but the code should not be too difficult if anyone else wants to take a shot at it. In the mean time I'd adjust your hook to wrap the addition of the file local variable in something like ;; -*- emacs-lisp -*- (unless (or (string= (buffer-file-name) DESCRIPTION) (string= (buffer-file-name) NAMESPACE)) ;; file local var code goes here ) I could use sed or similar to adjust these files, but I would rather prefer to a) be able to have org-src-preserve-indentation for tangling as a header argument b) a variable in which I can specify in which tangled files should have the local variables included. By the way, the post-tangle-hook approach works, but it has the disadvantage, that each file needs to be written twice - in the mini buffer, each tangled file is shown twice. As one org file contains several (10) tangles output files, this adds to the time needed for tangling. Agreed, for file modes and maybe local vars special header arguments would be nice, maybe called tangle-mode and tangle-file-vars or something. Best, Cheers, Rainer Rainer [snip (16 lines)] #secure method=pgpmime mode=sign -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.
Nicolas Goaziou n.goaz...@gmail.com writes: It is, thank you. Here is another round of comments. v4 attached. -- C is for CookieFrom 2126f295e7137c1b90a8524108de4a7aaeac7e9f Mon Sep 17 00:00:00 2001 From: rasmus.pank rasmus.p...@gmail.com Date: Sat, 1 Jun 2013 00:20:18 +0200 Subject: [PATCH] Allow AUTO argument to org-latex-guess-babel-language. * ox-latex.el (org-latex-guess-babel-language): replace AUTO with language if AUTO is the option of the LaTeX package Babel. * ox-latex.el (org-latex-guess-babel-language): retain case in final replace-match of the function. --- lisp/ox-latex.el | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index ff0ca1d..3bfab1c 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -910,6 +910,9 @@ Insertion of guessed language only happens when Babel package has explicitly been loaded. Then it is added to the rest of package's options. +The argument to Babel may be \AUTO\ which is then replaced with +the language of the document or `org-export-default-language'. + Return the new header. (let ((language-code (plist-get info :language))) ;; If no language is set or Babel package is not loaded, return @@ -918,16 +921,19 @@ Return the new header. (not (string-match usepackage\\[\\(.*\\)\\]{babel} header))) header (let ((options (save-match-data - (org-split-string (match-string 1 header) ,))) + (org-split-string (match-string 1 header) ,[ \t]*))) (language (cdr (assoc language-code org-latex-babel-language-alist - ;; If LANGUAGE is already loaded, return header. Otherwise, - ;; append LANGUAGE to other options. - (if (member language options) header - (replace-match (mapconcat 'identity -(append options (list language)) -,) - nil nil header 1)) + ;; If LANGUAGE is already loaded, return header without AUTO. + ;; Otherwise, replace AUTO with language or append language if + ;; AUTO is not present. + (replace-match + (mapconcat (lambda (option) (if (equal AUTO option) language option)) + (cond ((member language options) (delete AUTO options)) + ((member AUTO options) options) + (t (append options (list language + , ) + t nil header 1) (defun org-latex--find-verb-separator (s) Return a character not used in string S. -- 1.8.3
Re: [O] refine org-babel-tangle-jump-to-org?
. On Friday, June 7, 2013, Eric Schulte wrote: Rainer M Krug rai...@krugs.de javascript:; writes: Rainer M Krug rai...@krugs.de javascript:; writes: Eric Schulte schulte.e...@gmail.com javascript:; writes: [snip (46 lines)] For now I think both padlines and link comments are required for the jumping functionality to work. I've updated the documentation to reflect this. Thanks - I will change it accordingly. I just discovered, that I have a problem with the setting of org-src-preserve-indentation, as I am using org to write a package, and I have put DESCRIPTION into the org file (as fundamental). If I have org-src-preserve-indentation set to t, the lines start with two spaces ( ) which causes an error in reading the files. Couldn't you just not indent these code blocks. E.g., change #+begin_src R Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. #+end_src Ah - makes sense. Haven't looked at that yet. Should be possible. If it doesn't work I'll come back to you on Monday. to #+begin_src R Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl. #+end_src I can disable padlines for these source blocks, which is no problem, but I think I can't change the setting for org-src-preserve-indentation for a single block. This is tricky because the indentation is separate from and predates Babel, so there is no obvious straightforward way to coerce this into a header argument. Ok - if it is just the case of not indenting in the source block, then it is not necessary to change it. Would it be possible to have this option as a header argument, so that I can change it for certain blocks? The same problem is for the local file arguments: they must not be in the DESCRIPTION and NAMESPACE file. Alright, I think you've convinced me that it could be worthwhile to add header arguments to support file local variables and read modes in tangled files. I don't have the time to implement and document these new header arguments, but the code should not be too difficult if anyone else wants to take a shot at it. Thanks - that's brilliant. In the mean time I'd adjust your hook to wrap the addition of the file local variable in something like ;; -*- emacs-lisp -*- (unless (or (string= (buffer-file-name) DESCRIPTION) (string= (buffer-file-name) NAMESPACE)) ;; file local var code goes here ) That is an option. I'll change it accordingly. I could use sed or similar to adjust these files, but I would rather prefer to a) be able to have org-src-preserve-indentation for tangling as a header argument b) a variable in which I can specify in which tangled files should have the local variables included. By the way, the post-tangle-hook approach works, but it has the disadvantage, that each file needs to be written twice - in the mini buffer, each tangled file is shown twice. As one org file contains several (10) tangles output files, this adds to the time needed for tangling. Agreed, for file modes and maybe local vars special header arguments would be nice, maybe called tangle-mode and tangle-file-vars or something. tangle-add-vars should be perfect. This could be a list of variables with their values and also modes (read-only, auto-revert comes to mind). One could split it though in two, I.e. an additional tangle-mode for modes, but one tangle-add-vars should be fine. Thanks a lot for all this, as it makes the integration of org, ESA and R much better. I'll see that I write up some how to for package development from org based on this. Cheers and have a nice weekend, Rainer Best, Cheers, Rainer Rainer [snip (16 lines)] #secure method=pgpmime mode=sign -- Eric Schulte http://cs.unm.edu/~eschulte -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] Wrong comment character when adding file local variables?
On Friday, June 7, 2013, Vitalie Spinu wrote: All your examples are placed in fundamental mode. The comments are treated by org and thus are correct, local variables are inserted according to the major mode. The question is why - all .R files are automatically in r mode when I open them and all other R files tangle fine. I don't how this could be easily fixed on org side, but you can solve it straightforwardly with: (add-to-list 'auto-mode-alist (cons NAME\\|DESC 'R-mode)) Ok - I'check it out on Monday. Cheers and have a nice weekend, Rainer Vitalie Rainer M Krug rai...@krugs.de javascript:; on Fri, 07 Jun 2013 15:12:58 +0200 wrote: Hi when tangling the following file , | * Package Files | ** DESCRIPTION File | :PROPERTIES: | :tangle: ./DESCRIPTION | :shebang: | :padline: no | :no-expand: TRUE | :comments: no | :END: | #+begin_src R | Package: asmDrak | #+end_src | | ** NAMESPACE File | :PROPERTIES: | :tangle: ./NAMESPACE | :shebang: | :padline: no | :no-expand: TRUE | :comments: no | :END: | #+begin_src R | this is a test | #+end_src | | | ** DESC2 File | :PROPERTIES: | :tangle: ./DESC2 | :shebang: | :padline: no | :no-expand: TRUE | :comments: yes | :END: | #+begin_src R | this is a test | #+end_src ` I get the following tangled files: DESCRIPTION: , | Package: asmDrak | | ;; Local Variables: | ;; org-babel-tangled-file: t | ;; buffer-read-only: t | ;; End: ` which has the wrong comment character (should have #) NAMESPACE: , | this is a test | | ## Local Variables: | ## org-babel-tangled-file: t | ## buffer-read-only: t | ## End: ` which has the correct comment characters, and DESC2 , | ## [[file:~/tmp/tangle.org::*DESC2%20File][DESC2\ File:1]] | this is a test | ## DESC2\ File:1 ends here | | ;; Local Variables: | ;; org-babel-tangled-file: t | ;; buffer-read-only: t | ;; End: ` which has the correct comment characters for the comments, but the wrong ones for the file local variables. I use the following in my .emacs file to set the post-tangle-hook to add the local file variables: , | (defvar org-babel-tangled-file nil | If non-nill, current file was tangled with org-babel-tangle) | (put 'org-babel-tangled-file 'safe-local-variable 'booleanp) | | (defun org-babel-mark-file-as-tangled () | (add-file-local-variable 'org-babel-tangled-file t) | (add-file-local-variable 'buffer-read-only t) | ;; (add-file-local-variable 'eval: (auto-revert-mode)) | (basic-save-buffer)) | | (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled) ` I assume this is a bug somewhere? Org-mode version 8.0.3 (release_8.0.3-211-gf16b53 @ /home/rkrug/.emacs.d/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4) of 2013-04-14 on actinium, modified by Debian Cheers, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
[O] org-publish: docview all pdf files
When I publish the project, orgmode attempts to open all pdf files (which are static content). It seems to me that some sort of indexing is being attempted though I am not sure. I think it started happening after I included creation of a sitemap. I get messages like this: DocView: process pdf/ps-png changed status to killed. This slows down publishing considerably. I have just added some large pdf files, and now it asks me for each such file whether I want to open it. org-publish gets stuck if I say yes, and aborts publishing if I say no. Is there a way, I could tell orgmode to not try to process these pdf files. pdf files are being processed through a sub-project that deals with static content (org-publish-attachment). Would be grateful for any advice. Best, Vikas
Re: [O] :session question
Achim Gratz writes: The change on the Babel side was just a few lines, but reconciling Org's notion of property syntax in various places proved to be more difficult. It's still not very well tested (it does survive the test suite obviously) and I'll need to write tests and documentation (help is welcome). Also, a new-style form of specifying header arguments for all languages (to then deprecate the old form) is missing at the moment since I'd like to get feedback on the language specific side first. No comments? Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptation for Waldorf Blofeld V1.15B11: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
[O] org-agenda-files defvar directory evaluation ?
Sorry not quite sure how to phrase the problem in the subject line there. I have the following setup in my .emacs ... (defvar org-dir /home/mash/read/org/) And use it around such as ... (setq org-directory org-dir) (setq org-default-notes-file (concat org-dir mash.org)) Now I understand that you can specify a directory such as ... (setq org-agenda-files '(/home/mash/read/org/)) But how would I do this with the variable? (setq org-agenda-files '(org-dir)) (setq org-agenda-files '(,(org-dir)) Any ideas as I would like to use it in my capture templates too ... (setq org-capture-templates '( (t Test entry (file+headline (concat org-dir test.org test) * %?) )) Many thanks, 'Mash
[O] org-babel and gnuplot
Hi I was trying a gnuplot source block, and was stricken by No org-babel-execute function for gnuplot! when I tried to execute the block. I made sure the variable org-babel-load-languages contained (gnuplot . t) , so I was quite puzzled. It turns out that I needed to explicitly add (require 'ob-gnuplot) to my .emacs file. According to the documentation, this line should not be needed for org-mode 8.03 (my current version). It this a bug in the documentation? Cheers, Carlos
Re: [O] Wrong comment character when adding file local variables?
Rainer M Krug r.m.k...@gmail.com on Fri, 7 Jun 2013 17:40:53 +0200 wrote: On Friday, June 7, 2013, Vitalie Spinu wrote: All your examples are placed in fundamental mode. The comments are treated by org and thus are correct, local variables are inserted according to the major mode. The question is why - all .R files are automatically in r mode when I open them and all other R files tangle fine. Because they are placed automatically in R mode, your files are in fundamental mode. Vitalie
Re: [O] org-babel and gnuplot
Carlos Russo carlos.ru...@ist.utl.pt writes: Hi I was trying a gnuplot source block, and was stricken by No org-babel-execute function for gnuplot! when I tried to execute the block. I made sure the variable org-babel-load-languages contained (gnuplot . t) , so I was quite puzzled. It turns out that I needed to explicitly add (require 'ob-gnuplot) to my .emacs file. According to the documentation, this line should not be needed for org-mode 8.03 (my current version). It this a bug in the documentation? Cheers, Carlos There are instructions for enabling language in the following page of the manual. http://orgmode.org/manual/Languages.html#Languages -- Eric Schulte http://cs.unm.edu/~eschulte
[O] Avoid escaping braces in LaTeX export?
Hi all, I'm wondering if there is a way to prevent the LaTeX exporter from escaping { and } characters. There are export options to control the behavior of a number of other special characters, but I don't see any way to control export of braces in the documentation. Am I just missing it? If not, I'd like to request this as a feature. Here's my use case. I often create new commands in LaTeX to abstract over some common pattern so I can easily type it and change it later if necessary. For example, when taking notes on readings, I have a command that makes its argument into an `inline comment' (basically an aside to myself) defined as follows: #+LATEX_HEADER: \newcommand{\ic}[1]{{\footnotesize [~#1~]}} Then in my notes I have things like: Marcus' point is more subtle, though, than that the substitutional reading validates these inferences or theorems while the objectual reading does not. \ic{This would not persuade Quine, for example: the failure of existential generalization in modal contexts is for Quine a reason to reject quantified modal logic, rather than give the existential quantifier a different reading.} The new exporter exports this as: Marcus' point is more subtle, though, than that the substitutional reading validates these inferences or theorems while the objectual reading does not. \ic\{This would not persuade Quine, for example: the failure of existential generalization in modal contexts is for Quine a reason to reject quantified modal logic, rather than give the existential quantifier a different reading.\} with the braces wrapping the argument for my custom command escaped. This breaks the custom command in the export. I can't test it at the moment, but I believe the old exporter did not escape these braces, as I used this command regularly and it compiled correctly. I would like to be able to get the old behavior back. I don't mind manually escaping braces when necessary, because I almost always do not want them escaped. I understand if this is not a reasonable default, but it would be nice for me if it were something I could set on an #+OPTIONS line. If others are interested in this, I can look into creating a patch. (By the way, it looks like there was a patch for a similar issue in commit c6fd49726f2eaf417361b190b37e2d8ffb5864fc, but that is from April 2009 and therefore would apply to the old exporter.) Thanks for your insights! -- Best, Richard
Re: [O] Help, I need to paste raw image from clipboard into emacs/orgmode
(defun my-org-insert-clipboard () (interactive) (let* ((image-file clipboard.png) (exit-status (call-process convert nil nil nil clipboard: image-file))) (org-insert-link nil (concat file: image-file) ) (org-display-inline-images))) That works for me (Emacs 24.3, Windows 7) though for practical use some more edge case handling (don't insert on failure, different name if file exists) will be wanted. kind regards, Klaus 2013/6/7 Vitalie Spinu spinu...@gmail.com Thanks for the tip. Do you have an elisp piece that handles the image insertion into org buffers? Thanks, Vitalie Klaus-Dieter Bauer bauer.klaus.die...@gmail.com on Thu, 6 Jun 2013 19:16:26 +0200 wrote: Dear All, Please Help, I need to paste raw image from clipboard into emacs/orgmode, I am a microsoft onenote user and I got used to take a lot of snapshots and embed it into my notes, I think if I could know how to embed images directly into emacs/orgmode from clipboard, I will switch to emacs very easily. I searched the internet but unfortunately I didn't find the answer, Thanks a lot. Dodo Hello! While the original poster probably long since has implemented one of the previously suggested solutions (or given up) I thought I'd share a more general solution I found [1]. ImageMagick's `convert' can use clipboard: as input file (don't know if it works as output file). convert clipboard: FILENAME-WITH-EXTENSION I tested it with the cygwin and native windows versions and both worked. king regards, Klaus PS1: On Windows `convert.exe' might be shadowed by another executable, especially C:\Windows\System32\convert.exe. In that case the PATH variable should be adjusted such that ImageMagick comes before C:\Windows\system32. To check what shadows the executable, you can run where convert in the Windows-commandline. PS2: On Windows only basic image-displaying-support is included out-of-the-box. To get full support, the easiest way is to install the full GnuWin32 tools (which include the necessary image libraries) with the web-installer. -- [1] User magick in http://www.imagemagick.org/discourse-server/viewtopic.php?f=1t=7524p=22859 .
Re: [O] Avoid escaping braces in LaTeX export?
Dnia 2013-06-07, o godz. 10:26:31 Richard Lawrence richard.lawre...@berkeley.edu napisał(a): Here's my use case. I often create new commands in LaTeX to abstract over some common pattern so I can easily type it and change it later if necessary. For example, when taking notes on readings, I have a command that makes its argument into an `inline comment' (basically an aside to myself) defined as follows: #+LATEX_HEADER: \newcommand{\ic}[1]{{\footnotesize [~#1~]}} Then in my notes I have things like: Marcus' point is more subtle, though, than that the substitutional reading validates these inferences or theorems while the objectual reading does not. \ic{This would not persuade Quine, for example: the failure of existential generalization in modal contexts is for Quine a reason to reject quantified modal logic, rather than give the existential quantifier a different reading.} Quick and dirty workaround (untested): #+LATEX_HEADER: \def\ic!#1!{{\footnotesize [~#1~]}} Marcus' point is more subtle, though, than that the substitutional reading validates these inferences or theorems while the objectual reading does not. \ic!This would not persuade Quine, for example: the failure of existential generalization in modal contexts is for Quine a reason to reject quantified modal logic, rather than give the existential quantifier a different reading.! Of course, you may do \def\ic(#1){...}, \def\ic~#1~{...} etc. The delimiter characters may not appear in the argument, though (nesting is not supported!). This is very un-LaTeX-y (it is much lower-level TeX syntax), but it is occasionaly useful (and heavily used by LaTeX itself, btw - this is used among others for delimiting optional arguments). Hth, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] How to postpone a fragment when exporting
Hi list, I'm preparing materials for a university course. The materials are not for students, but for teachers, and along with the syllabus for each of the topics, I'd like to include some optional tips (like what kind of problems might be good here, what to mention when teaching this etc.) The topics are first-level headlines, and I'd like to keep these tips together with the relevant topic. However, I'd prefer them to be typeset (when exported to LaTeX) at the end of the document. Is there a way to do something like this on Org side? (On LaTeX side, this is quite easy, but I don't want to clutter my Org file with LaTeX syntax like \begin{tip} ... \end{tip} etc.) I guess that babel might be good for that, but I'd prefer some simpler syntax, maybe something like this: * Topic 1) first subtopic 2) second subtopic 3) third subtopic ** Tips :postpone: - first tip - second tip If this is not possible, that's ok - I'll do the rearranging on the LaTeX side, but I was curious. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] ODT exporter not appearing in the C-c C-e menu
The subject has it all. M-x org-version gives Org-mode version 8.0.3 (8.0.3-15-g030e96-elpa @ /home/marcin/.emacs.d/elpa/org-20130522/) and M-x emacs-version GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-04-14 on platinum, modified by Debian I did not mess up with export-connected options in my .emacs at all. The zip utility is present on my (Ubuntu) system. What may be wrong? -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] :session question -- and changes to #+Property: syntax
Achim Gratz strom...@nexgo.de writes: Achim Gratz writes: The change on the Babel side was just a few lines, but reconciling Org's notion of property syntax in various places proved to be more difficult. It's still not very well tested (it does survive the test suite obviously) and I'll need to write tests and documentation (help is welcome). Also, a new-style form of specifying header arguments for all languages (to then deprecate the old form) is missing at the moment since I'd like to get feedback on the language specific side first. No comments? As I recall I was fully in favor of applying these changes, however I am not qualified to address the changes to property behaviors. Hopefully someone who works more on that side of things can address those aspects. Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] ODT exporter not appearing in the C-c C-e menu
Marcin Borkowski mb...@wmi.amu.edu.pl writes: The subject has it all. M-x org-version gives Org-mode version 8.0.3 (8.0.3-15-g030e96-elpa @ /home/marcin/.emacs.d/elpa/org-20130522/) and M-x emacs-version GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-04-14 on platinum, modified by Debian I did not mess up with export-connected options in my .emacs at all. The zip utility is present on my (Ubuntu) system. What may be wrong? Nothing. It's not loaded by default. C-h v org-export-backends RET click ``Customize'' and tick the ones you want. -- Nick
Re: [O] link abbreviation with multiple params, e. g. for geo locations
Hi Eric On Fri, Jun 7, 2013 at 5:18 PM, Eric Schulte schulte.e...@gmail.com wrote: In this commit I see two issues which my patch does not have: 1) The variable name org-babel-current-exec-src-block-head is the same as for a different meaning (source block head) and purpose introduced in release_8.0.3-202-gf301bbc commit f301bbcc862c2acc61749bc1e24895bf69cd4d06 Author: Vitalie Spinu spinu...@gmail.com Date: Thu Jun 6 12:04:02 2013 +0200 make src block location available to execution backends but in release_8.0.3-207-g5dc5143 the same name is used for the point-marker of call_func which is misleading. Perhaps the variable name should be updated, but this extension is simply a generalization to include inline code blocks as well. I don't find it misleading. Aha, now it seems to me that I must have misunderstood the variable name org-babel-current-exec-src-block-head as introduced with the first commit release_8.0.3-202-gf301bbc. Because of the src-block and head in the name and because this commit was made for debugging I thought that the variable refers to point-marker of the one and only named code block with the #+HEADER, in my thinking the function definition to be debugged. Is this understanding wrong and the variable refers to point-marker of just every code block evaluation individually, not only in the changes for release_8.0.3-207-g5dc5143 but also in the changes for release_8.0.3-202-gf301bbc ? If yes then I understand only now that the functionality of the new variable is of course the same for the changes in both commits and therefore the name has to be the same for the changes in both commits. But for me it would have helped to have some other name, containing neither src-block, which I associate it with #+BEGIN_SRC but not #+CALL line or inline call_name, nor head, which I associate with #+HEADER. I would like to suggest org-babel-exec-marker. What do you and Vitalie (CCed) think? 2) Export is not supported (C-c C-c works as expected). I can't reproduce this bug. From your attached org-entry-get-point-example.org I get with some lines omitted \section{example of a geo location, realistic to try out} \item \texttt{geo\_var is 4.56,7.89} \texttt{geo\_var is 4.56,7.89} \section{another geo location} \item \texttt{geo\_var is 4.56,7.89} \texttt{geo\_var is 4.44,5.55} but expect \section{example of a geo location, realistic to try out} \item \texttt{geo\_var is 4.56,7.89} \texttt{geo\_var is 4.56,7.89} \section{another geo location} \item \texttt{geo\_var is 4.44,5.55} \texttt{geo\_var is 4.44,5.55} Changing to #+HEADER: :var geo_var=(format %s org-babel-current-exec-src-block-head) shows that the variable is nil. The following Org-mode file. exports to the following latex From your attached export-loc.org I get the same evaluations after uncommenting #+PROPERTY: exports results Michael
Re: [O] Formatting a calculated cell entry as currency
Nick Dokos ndo...@gmail.com writes: da...@adboyd.com (J. David Boyd) writes: I've got a simple cell calculation, =@2 * 40 If @2 contained 10, is there anyway to force this to show as $400.00? I've combed through the info file, and if it is there I'm blind. This seems to work (apart from the alignment): | a | b | |---+| | 1 | $8.25 | | 2 | $16.50 | | 3 | $24.75 | #+TBLFM: $2 = 8.25*$1;$%.2f For David's benefit, if alignment matters, you could use something like ;$%6.2f for the formatting specification (with 6 changed to something that is appropriate for the scale of values you expect and whether you like a space after the $). -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_8.0.3-193-g334581
Re: [O] org-caldav will continue to work with Google Calendar
David Engster d...@randomsample.de writes: David Engster writes: Google has announced today that they will shut down their CalDAV API in September, since hey, everybody's using their own protocol anyway. Well, Google has suddenly realized that not only is CalDAV an open standard, but it's actually used outside the Googleverse. Who could've known? Anyway, they will continue to support it [1], so org-caldav should work with Google Calendar for the time being (read: until they change their mind again). Thanks for the update! I've moved over to mobileOrg on Android for my synchronisation for now but will likely come back to org-caldav sooner rather than later if/when I upgrade my phone to something like Jolla. I really do not like Android (and iOS even less). -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_8.0.3-193-g334581
Re: [O] :session question -- and changes to #+Property: syntax
Eric Schulte writes: As I recall I was fully in favor of applying these changes, however I am not qualified to address the changes to property behaviors. Hopefully someone who works more on that side of things can address those aspects. I am still hoping that one of the users that was asking for a way to specify header args at a finer granularity than just file variables would have a say. As a clarification: I'm not changing property syntax at all, I'm adding new properties that happen to have values that look like the header arguments to a source block. I've also implemented default (non-language-specific) header arguments just now. Unless you use the new property names none of the current behaviour changes (I do think the old properties should be removed some time later when people had time to convert their documents), but using the new property names will take precedence. This means if you specify 'cache yes' and also 'header-args :cache no' via properties, then the latter will take effect. Documentation and tests are still missing, but it shouldn't take too long I hope. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] link abbreviation with multiple params, e. g. for geo locations
Michael Brand michael.ch.br...@gmail.com on Fri, 7 Jun 2013 21:16:00 +0200 wrote: [...] Perhaps the variable name should be updated, but this extension is simply a generalization to include inline code blocks as well. I don't find it misleading. [...] If yes then I understand only now that the functionality of the new variable is of course the same for the changes in both commits and therefore the name has to be the same for the changes in both commits. But for me it would have helped to have some other name, containing neither src-block, which I associate it with #+BEGIN_SRC but not #+CALL line or inline call_name, nor head, which I associate with #+HEADER. I would like to suggest org-babel-exec-marker. What do you and Vitalie (CCed) think? I named it with head because head is the local variable in org-babel-get-src-block-info referring to that position. There are other functions that use -head: org-babel-goto-src-block-head, org-babel-where-is-src-block-head. But, I agree that it might be better called beg, location or position. I think src-block is not misleading, there are plenty of foo-src-block-bar in babel. May be then: org-babel-current-src-block-location? The -exec- part stands for -executed- and, might be drop. It should be explicitly named because this is a global variable which is bound only during the processing of src-blocks, simply 'loc wouldn't work. Vitalie
Re: [O] link abbreviation with multiple params, e. g. for geo locations
Michael Brand writes: But for me it would have helped to have some other name, containing neither src-block, which I associate it with #+BEGIN_SRC but not #+CALL line or inline call_name, nor head, which I associate with #+HEADER. There are multiple places in Babel where src-block-head means the header arguments to a Babel invocation. You'd have to look at the history when separate header lines and inline calls were introduced, but I think you'll find the reason for the naming somewhere in the past. 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] How to postpone a fragment when exporting
Marcin Borkowski writes: Is there a way to do something like this on Org side? (On LaTeX side, this is quite easy, but I don't want to clutter my Org file with LaTeX syntax like \begin{tip} ... \end{tip} etc.) #+begin_tip ... #+end_tip Yours, Christian
Re: [O] export to odt
Hi, Manfred Lotz writes: My question: Is there an easy way to configure the odt export to do a page break before switching to a Heading 1 line? In the end I would like to view a Heading 1 like a chapter in a LaTeX book class. It's easier to use LibreOffice to modify the Heading 1 paragraph style to always have a page break before. It's an option on the Text Flow tab on the Edit Paragraph Style dialogue. You can save the style and reuse it, cf. 12.9.4 Applying custom styles in the manual. Yours, Christian
Re: [O] A simple way to search only headlines
Thank you both Thorsten and Seb, i really appreciate the help! Seb, you wrote: The programming equivalent to C-c a s is: (org-agenda nil s) That's what you'd have to bind to a key (using a lambda function). im a complete neewb and dont really have any idea on how to do the above, can you show me an example? Best Z On Tue, Jun 4, 2013 at 3:50 AM, Sebastien Vauban sva-n...@mygooglest.comwrote: Hello Xebar, Or, for a pure Org solution: C-c a s *salsa dance searches for terms appearing only *in the headline* (including tags). That's great ,i appreciate it! Seb, is there a way to quick bind a key to the above series of commands? The programming equivalent to C-c a s is: (org-agenda nil s) That's what you'd have to bind to a key (using a lambda function). What you want is the restriction to the current buffer as well. You should update the above, looking at the doc of `org-agenda' (sorry, no time now to do it). BTW, how to find that you have to bind `org-agenda'? Simply `C-h k', followed by the key binding for which you want to know more (here, `C-c a'), such as: which function does it call? Best regards, Seb -- Sebastien Vauban
Re: [O] Differnet bg/fg by code block type
Hi again i understood from Fabrice (the dev of the excellent excellent leuven-theme) that currently Org mode only uses one background face for all the code blocks. Is that something one can request for (different color background face for different code blocks (IE, Bash,Lisp,R)? if so where should one file that request? (mailing list, bug tracker etc?) best wishes all and have a great weekend! Z On Sat, Jun 1, 2013 at 2:09 PM, Xebar Saram zelt...@gmail.com wrote: Hi all i am using a theme that allows to customize the org-mode bg/fg colors for various aspects of the code block IE `(org-block-background ((,class (:background #E0 `(org-block-begin-line ((,class (:underline #A7A6AA :foreground #55 :background #E2E1D5 `(org-block-end-line ((,class (:overline #A7A6AA :foreground #55 :background #E2E1D5 I was wondering if this could be extended in anyway to have a few different code block colors so that IE a sh block would have a different bgthen a elisp code block? best z
Re: [O] Differnet bg/fg by code block type
Hi Xebar, Xebar Saram zelt...@gmail.com writes: Hi again i understood from Fabrice (the dev of the excellent excellent leuven-theme) that currently Org mode only uses one background face for all the code blocks. Is that something one can request for (different color background face for different code blocks (IE, Bash,Lisp,R)? if so where should one file that request? (mailing list, bug tracker etc?) best wishes all and have a great weekend! it never occurred to me that code blocks in different languages might be colored differently, so naturally, I am not aware of a mechanism providing that. But now as you raised that issue, I would use such a feature as well. - Andreas
Re: [O] Avoid escaping braces in LaTeX export?
Marcin Borkowski mb...@wmi.amu.edu.pl writes: Dnia 2013-06-07, o godz. 10:26:31 Richard Lawrence richard.lawre...@berkeley.edu napisał(a): Here's my use case. I often create new commands in LaTeX to abstract over some common pattern so I can easily type it and change it later if necessary. For example, when taking notes on readings, I have a command that makes its argument into an `inline comment' (basically an aside to myself) defined as follows: #+LATEX_HEADER: \newcommand{\ic}[1]{{\footnotesize [~#1~]}} Quick and dirty workaround (untested): #+LATEX_HEADER: \def\ic!#1!{{\footnotesize [~#1~]}} Of course, you may do \def\ic(#1){...}, \def\ic~#1~{...} etc. The delimiter characters may not appear in the argument, though (nesting is not supported!). This is very un-LaTeX-y (it is much lower-level TeX syntax), but it is occasionaly useful (and heavily used by LaTeX itself, btw - this is used among others for delimiting optional arguments). Hmm, that does work for this case, thanks! Still, this won't work directly for cases where I have loaded a LaTeX package that provides a command which uses curly braces. (I could redefine such commands, as above, but that could get real ugly, real fast...). It seems like this a general problem that the exporter should have a way to handle. -- Best, Richard
Re: [O] A simple way to search only headlines
Xebar Saram zelt...@gmail.com writes: Thank you both Thorsten and Seb, i really appreciate the help! Seb, you wrote: The programming equivalent to C-c a s is: (org-agenda nil s) That's what you'd have to bind to a key (using a lambda function). im a complete neewb and dont really have any idea on how to do the above, can you show me an example? I think you're looking for something like: (define-key org-mode-map (kbd C-M-h) (lambda () (org-agenda nil s ))) You could put a line like that in your .emacs. Here's what it does: #+BEGIN_SRC emacs-lisp (define-key;; insert a new keybinding org-mode-map ;; into the Org mode map (so this won't affect bindings in non-Org buffers) ;; This is the key we're binding: C-M-h, for headline search ;; You can use whatever key you like, but you might want to check first that it isn't ;; already bound to something else (e.g., via C-h k from an Org buffer). ;; The kbd macro converts a string representation to the appropriate key code. (kbd C-M-h) ;; This is the function to run when the key is pressed. The lambda ;; form creates an anonymous function which calls org-agenda with ;; the s argument and a restriction to current buffer. (lambda () (org-agenda nil s ))) #+END_SRC Best, Richard
Re: [O] A simple way to search only headlines
Hi Richard Fantastic, thx alot for the code snippet and detailed explanation, it really helps to understand what goes on. unfortunately i get an error: Wrong type argument: commandp, (lambda nil (org-agenda nil s )) any clue? best Z. On Fri, Jun 7, 2013 at 5:50 PM, Richard Lawrence richard.lawre...@berkeley.edu wrote: Xebar Saram zelt...@gmail.com writes: Thank you both Thorsten and Seb, i really appreciate the help! Seb, you wrote: The programming equivalent to C-c a s is: (org-agenda nil s) That's what you'd have to bind to a key (using a lambda function). im a complete neewb and dont really have any idea on how to do the above, can you show me an example? I think you're looking for something like: (define-key org-mode-map (kbd C-M-h) (lambda () (org-agenda nil s ))) You could put a line like that in your .emacs. Here's what it does: #+BEGIN_SRC emacs-lisp (define-key;; insert a new keybinding org-mode-map ;; into the Org mode map (so this won't affect bindings in non-Org buffers) ;; This is the key we're binding: C-M-h, for headline search ;; You can use whatever key you like, but you might want to check first that it isn't ;; already bound to something else (e.g., via C-h k from an Org buffer). ;; The kbd macro converts a string representation to the appropriate key code. (kbd C-M-h) ;; This is the function to run when the key is pressed. The lambda ;; form creates an anonymous function which calls org-agenda with ;; the s argument and a restriction to current buffer. (lambda () (org-agenda nil s ))) #+END_SRC Best, Richard
Re: [O] A simple way to search only headlines
Xebar Saram zelt...@gmail.com writes: Hi Richard Fantastic, thx alot for the code snippet and detailed explanation, it really helps to understand what goes on. unfortunately i get an error: Wrong type argument: commandp, (lambda nil (org-agenda nil s )) Ah, sorry about that, should have tested my code before I sent it! The problem is that you have to give a /command/ to define-key (i.e., a function with a call to `interactive' in its definition). This should do it: (define-key org-mode-map (kbd C-M-h) (lambda () (interactive) (org-agenda nil s ))) Best, Richard
[O] possible bug: clocking in and out with STARTUP: logdrawer
Hello emacs-orgmode! I think I may have encountered a bug (org-mode 7.8.02, emacs 23.3.1, ubuntu 12.04.2). It seems that if I have a file with #+STARTUP: logdrawer at the top, but the LOG_INTO_DRAWER property unset on an item, clocking in and out doesn't get logged into LOGBOOK. To illustrate: #+STARTUP: logdrawer * TODO Finish important task :PROPERTIES: :Effort: 1:00 :END: (clock in and out) #+STARTUP: logdrawer * TODO Finish important task CLOCK: [2013-06-07 Fri 15:52]--[2013-06-07 Fri 15:52] = 0:00 :PROPERTIES: :Effort: 1:00 :END: But if I add the LOG_INTO_DRAWER property, now my CLOCK entry goes into LOGBOOK: #+STARTUP: logdrawer * TODO Finish important task :PROPERTIES: :Effort: 1:00 :LOG_INTO_DRAWER: t :END: (clock in and out) #+STARTUP: logdrawer * TODO Finish important task :LOGBOOK: CLOCK: [2013-06-07 Fri 15:52]--[2013-06-07 Fri 15:52] = 0:00 :END: :PROPERTIES: :Effort: 1:00 :LOG_INTO_DRAWER: t :END: I didn't see anything in the manual on this, but I apologize for spamming the list if this is intended behavior. Thanks! -Matthew
[O] bug(?) ox-html always add a timestamp in comment which can't be customized away
The culprit code is the following: (when :time-stamp-file (format-time-string (concat !-- org-html-metadata-timestamp-format --\n))) This `when' condition is always true, because :time-stamp-file is a keyword and always eval to itself, never to nil. So I think org-export-time-stamp-file should be used instead of :time-stamp-file.
Re: [O] A simple way to search only headlines
Richard Lawrence richard.lawre...@berkeley.edu writes: Xebar Saram zelt...@gmail.com writes: Thank you both Thorsten and Seb, i really appreciate the help! Seb, you wrote: The programming equivalent to C-c a s is: (org-agenda nil s) That's what you'd have to bind to a key (using a lambda function). im a complete neewb and dont really have any idea on how to do the above, can you show me an example? I think you're looking for something like: (define-key org-mode-map (kbd C-M-h) (lambda () (org-agenda nil s ))) You could put a line like that in your .emacs. The OP probably wants this in the global keymap, rather than in the org-mode-map: just like the agenda dispatcher C-c a, this functionality is useful outside an org file. --8---cut here---start-8--- (global-set-key (kbd C-M-h) (lambda () (interactive) (org-agenda nil s ))) --8---cut here---end---8--- Also C-M-h runs mark-defun by default and it's not nice to usurp global keys like that. I would suggest C-c s instead. Using the global keymap also simplifies the initialization. In order to put the key definition into the org-mode-map, the map has to be defined already, i.e the define-key has to be done *after* org is loaded; so you can't put it in an arbitrary place in .emacs. The safest way is to put it in a hook (a list of no-argument functions that are executed after the mode is set on a file): (setq org-mode-hook '( (function (lambda () (define-key org-mode-map (kbd C-M-h) (lambda () (interactive) (org-agenda nil s ) ; maybe followed by more functions in the list ) ; this paren end the list ) ; this paren closes the setq Putting it in the global map instead bypasses this problem completely since the global map is defined before .emacs is loaded. That's not to say that the global map is always the right place to define a key: on the contrary, most of the time it isn't. But in this case it is the right place *and* putting the key definition there is simpler. -- Nick
Re: [O] bug(?) ox-html always add a timestamp in comment which can't be customized away
Haojun Bao baohao...@gmail.com writes: The culprit code is the following: (when :time-stamp-file (format-time-string (concat !-- org-html-metadata-timestamp-format --\n))) This `when' condition is always true, because :time-stamp-file is a keyword and always eval to itself, never to nil. So I think org-export-time-stamp-file should be used instead of :time-stamp-file. What version are you using? In the version I have, the code looks like this: (when (plist-get info :time-stamp-file) (format-time-string (concat !-- org-html-metadata-timestamp-format --\n))) Org-mode version 8.0.3 (release_8.0.3-197-g221768) [nb: this version includes a few local commits (irrelevant to this subject)] -- Nick
Re: [O] bug(?) ox-html always add a timestamp in comment which can't be customized away
Just checked, it is the same tag (release_8.0.3), there is no change like in your code. Could you please run git blame on those lines? On Sat, Jun 8, 2013 at 1:30 PM, Nick Dokos ndo...@gmail.com wrote: Haojun Bao baohao...@gmail.com writes: The culprit code is the following: (when :time-stamp-file (format-time-string (concat !-- org-html-metadata-timestamp-format --\n))) This `when' condition is always true, because :time-stamp-file is a keyword and always eval to itself, never to nil. So I think org-export-time-stamp-file should be used instead of :time-stamp-file. What version are you using? In the version I have, the code looks like this: (when (plist-get info :time-stamp-file) (format-time-string (concat !-- org-html-metadata-timestamp-format --\n))) Org-mode version 8.0.3 (release_8.0.3-197-g221768) [nb: this version includes a few local commits (irrelevant to this subject)] -- Nick