emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* File local variables
@ 2014-12-08 10:03 Vikas Rawal
  2014-12-12  4:51 ` Vikas Rawal
  0 siblings, 1 reply; 5+ messages in thread
From: Vikas Rawal @ 2014-12-08 10:03 UTC (permalink / raw)
  To: org-mode mailing list

I used to disable evaluation of source code when exporting by using the following as the first line:

;; -*- mode: Org; org-export-babel-evaluate: nil; -*-

This is not working any more. Has something changed?

My org-version is: Org-mode version 8.3beta (release_8.3beta-614-gc10ae1 @ /Users/vikas/.emacs.d/src/org-mode/lisp/)

Vikas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File local variables
  2014-12-08 10:03 File local variables Vikas Rawal
@ 2014-12-12  4:51 ` Vikas Rawal
  2014-12-12  5:01   ` Aaron Ecay
  0 siblings, 1 reply; 5+ messages in thread
From: Vikas Rawal @ 2014-12-12  4:51 UTC (permalink / raw)
  To: org-mode mailing list



> I used to disable evaluation of source code when exporting by using the following as the first line:
> 
> ;; -*- mode: Org; org-export-babel-evaluate: nil; -*-
> 
> This is not working any more. Has something changed?
> 
> My org-version is: Org-mode version 8.3beta (release_8.3beta-614-gc10ae1 @ /Users/vikas/.emacs.d/src/org-mode/lisp/)
> 
> Vikas

I think this is a bug. Could somebody confirm.

The following line shows up in the Latex export.

; -*- mode: org; org-export-babel-evaluate: nil -*-

Vikas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File local variables
  2014-12-12  4:51 ` Vikas Rawal
@ 2014-12-12  5:01   ` Aaron Ecay
  2014-12-12  6:32     ` Kyle Meyer
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Ecay @ 2014-12-12  5:01 UTC (permalink / raw)
  To: Vikas Rawal, org-mode mailing list

Hi Vikas,

2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen:
> 
>> I used to disable evaluation of source code when exporting by using the following as the first line:
>> 
>> ;; -*- mode: Org; org-export-babel-evaluate: nil; -*-
>> 
>> This is not working any more. Has something changed?
>> 
>> My org-version is: Org-mode version 8.3beta (release_8.3beta-614-gc10ae1 @ /Users/vikas/.emacs.d/src/org-mode/lisp/)
>> 
>> Vikas
> 
> I think this is a bug. Could somebody confirm.

I can’t confirm, in the sense that including that line in a file sets
the buffer-local value of org-export-babel-evaluate to nil.

If that variable isn’t having the effect of suppressing evaluation, that
sounds like a bug, but it’s not clear that that is what is going on.
Can you send an ECM?

> 
> The following line shows up in the Latex export.
> 
> ; -*- mode: org; org-export-babel-evaluate: nil -*-

That is because ; is the comment syntax for (e)lisp.  You probably want
to begin the line with # instead.

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File local variables
  2014-12-12  5:01   ` Aaron Ecay
@ 2014-12-12  6:32     ` Kyle Meyer
  2014-12-12  6:33       ` Vikas Rawal
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2014-12-12  6:32 UTC (permalink / raw)
  To: Vikas Rawal; +Cc: org-mode mailing list

Aaron Ecay <aaronecay@gmail.com> wrote:
> 2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen:
>>> I used to disable evaluation of source code when exporting by using
>>> the following as the first line:
[...]
>> I think this is a bug. Could somebody confirm.
>
> I can’t confirm, in the sense that including that line in a file sets
> the buffer-local value of org-export-babel-evaluate to nil.
>
> If that variable isn’t having the effect of suppressing evaluation,
> that sounds like a bug, but it’s not clear that that is what is going
> on.  Can you send an ECM?

I can't confirm this either (using the following text).

,----
| # -*- org-export-babel-evaluate: nil; -*-
|
| #+begin_src emacs-lisp :exports both
|   (message "Evaluating?")
| #+end_src
|
| #+RESULTS:
| : Evaluating?
`----

'C-h v' indicates that the buffer-local value is indeed set to nil.

The only place the value of org-export-babel-evaluate is checked is
org-babel-exp-results.  Exporting the example above with
org-babel-exp-results edebugged shows that the main body of that
function doesn't execute.  So, the code isn't being evaluated at export,
unless it's happening elsewhere.

How are you checking that the code is evaluated at export?

--
Kyle

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File local variables
  2014-12-12  6:32     ` Kyle Meyer
@ 2014-12-12  6:33       ` Vikas Rawal
  0 siblings, 0 replies; 5+ messages in thread
From: Vikas Rawal @ 2014-12-12  6:33 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: org-mode mailing list

>> 
>> I can’t confirm, in the sense that including that line in a file sets
>> the buffer-local value of org-export-babel-evaluate to nil.
>> 
>> If that variable isn’t having the effect of suppressing evaluation,
>> that sounds like a bug, but it’s not clear that that is what is going
>> on.  Can you send an ECM?
> 
> I can't confirm this either (using the following text).
> 
> ,----
> | # -*- org-export-babel-evaluate: nil; -*-
> |
> | #+begin_src emacs-lisp :exports both
> |   (message "Evaluating?")
> | #+end_src
> |
> | #+RESULTS:
> | : Evaluating?
> `----


Thanks Aaron and Kyle.

I perhaps confused the fact that the line which started with a ; was showing up in the export to understand that the line was not being treated as it should.

But in my earlier org files, I always started this line with a ; and it used to work fine. Perhaps (perhaps), the behaviour has changed in terms of not treating lines starting with ; as comments in org.

Be that as it may, starting the line with a # works.

Thanks again,

Vikas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-12  6:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-08 10:03 File local variables Vikas Rawal
2014-12-12  4:51 ` Vikas Rawal
2014-12-12  5:01   ` Aaron Ecay
2014-12-12  6:32     ` Kyle Meyer
2014-12-12  6:33       ` Vikas Rawal

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).