Re: [O] Automatically adding local variables to tangled file

2013-06-10 Thread Rainer M Krug
Eric Schulte schulte.e...@gmail.com writes: 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

Re: [O] Automatically adding local variables to tangled file

2013-06-08 Thread Eric Schulte
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

Re: [O] Automatically adding local variables to tangled file

2013-06-08 Thread Achim Gratz
Eric Schulte writes: I've added a :tangle-mode header argument which may be used to control the permissions of tangled files. See the manual for instructions on it's usage. The change in org-babel-read now requires that :shebang values are quoted. I've changed the test file accordingly as

Re: [O] Automatically adding local variables to tangled file

2013-06-08 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes: Eric Schulte writes: I've added a :tangle-mode header argument which may be used to control the permissions of tangled files. See the manual for instructions on it's usage. The change in org-babel-read now requires that :shebang values are quoted.

Re: [O] Automatically adding local variables to tangled file

2013-06-07 Thread Rainer M Krug
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

Re: [O] Automatically adding local variables to tangled file

2013-06-07 Thread Rainer M Krug
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 () |

Re: [O] Automatically adding local variables to tangled file

2013-06-06 Thread Sebastien Vauban
Hi Darlan, Darlan Cavalcante Moreira wrote: 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. Waow! That makes a lot of sense, IMHO, if easily overridable with C-x C-q.

Re: [O] Automatically adding local variables to tangled file

2013-06-06 Thread Eric Schulte
It's a good idea to have useful information in the tangled file that can help these functions. But since org-mode can already tangle with comments containing useful information, isn't this enough to detect that the file is a tangled file? I personally prefer the solution shown below of

[O] Automatically adding local variables to tangled file

2013-06-05 Thread Rainer M Krug
Hi I am trying to improve my workflow of literate programming of R in org. My org file is tangled into many R files and I am using ESS to debug. If an error occurs, I can jump via ESS to the .R file, and in a second step via calling org-babel-tangle-jump-to-org into the org file where the buggy

Re: [O] Automatically adding local variables to tangled file

2013-06-05 Thread Darlan Cavalcante Moreira
It's a good idea to have useful information in the tangled file that can help these functions. But since org-mode can already tangle with comments containing useful information, isn't this enough to detect that the file is a tangled file? On the other hand, a local variable in the tangled files

Re: [O] Automatically adding local variables to tangled file

2013-06-05 Thread Vitalie Spinu
Darlan Cavalcante Moreira darc...@gmail.com on Wed, 05 Jun 2013 11:32:22 -0300 wrote: It's a good idea to have useful information in the tangled file that can help these functions. But since org-mode can already tangle with comments containing useful information, isn't this enough to

Re: [O] Automatically adding local variables to tangled file

2013-06-05 Thread Thorsten Jolitz
Rainer M Krug rai...@krugs.de writes: Hi, I am trying to improve my workflow of literate programming of R in org. My org file is tangled into many R files and I am using ESS to debug. [...] Now this is error prone, as one (or is it only me?) is easily tempted to edit the R file which is

Re: [O] Automatically adding local variables to tangled file

2013-06-05 Thread Rainer M Krug
On Wednesday, June 5, 2013, Darlan Cavalcante Moreira wrote: It's a good idea to have useful information in the tangled file that can help these functions. But since org-mode can already tangle with comments containing useful information, isn't this enough to detect that the file is a