emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Wrong comment character when adding file local variables?


From: Rainer M Krug
Subject: [O] Wrong comment character when adding file local variables?
Date: Fri, 07 Jun 2013 15:12:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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: RMKrug<at>gmail<dot>com

Attachment: pgpMPfOUpeJlt.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]