emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* File local variables and export?
@ 2009-05-04 19:13 Jason Riedy
  2009-05-05  8:40 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Riedy @ 2009-05-04 19:13 UTC (permalink / raw)
  To: emacs-orgmode

I'm trying to change org-export-latex-image-default-option to
"width=.7\\linewidth" in a file local variable.  It's set correctly as a
buffer local variable, and it's having no effect on the export.  My
guess is that the buffer-local property is stopping it as soon as
org-export-as-latex runs set-buffer.

I can smuggle the value in by adding an entry to org-export-plist-vars
referring to org-export-latex-image-default-option and pulling the value
from the plist, but that feels incorrect.

Am I missing something?  Or should I look into grabbing
buffer-local-variables before set-buffer and setting the variables in
the output buffer?

BTW, there's a typo in org-export-region-as-latex's docstring.  Replace
retunr with return...  That pops up in the docbook export, too. ;)

Jason

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

* Re: File local variables and export?
  2009-05-04 19:13 File local variables and export? Jason Riedy
@ 2009-05-05  8:40 ` Carsten Dominik
  2009-05-05 15:15   ` Jason Riedy
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2009-05-05  8:40 UTC (permalink / raw)
  To: Jason Riedy; +Cc: emacs-orgmode


On May 4, 2009, at 9:13 PM, Jason Riedy wrote:

> I'm trying to change org-export-latex-image-default-option to
> "width=.7\\linewidth" in a file local variable.  It's set correctly  
> as a
> buffer local variable, and it's having no effect on the export.  My
> guess is that the buffer-local property is stopping it as soon as
> org-export-as-latex runs set-buffer.
>
> I can smuggle the value in by adding an entry to org-export-plist-vars
> referring to org-export-latex-image-default-option and pulling the  
> value
> from the plist, but that feels incorrect.

To me it sounds correct, actually.  I have added this, and will add
other variables as needed.

>
> Am I missing something?  Or should I look into grabbing
> buffer-local-variables before set-buffer and setting the variables in
> the output buffer?
>
> BTW, there's a typo in org-export-region-as-latex's docstring.   
> Replace
> retunr with return...  That pops up in the docbook export, too. ;)

Fixed, thanks.

- Carsten

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

* Re: File local variables and export?
  2009-05-05  8:40 ` Carsten Dominik
@ 2009-05-05 15:15   ` Jason Riedy
  2009-05-06  7:25     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Riedy @ 2009-05-05 15:15 UTC (permalink / raw)
  To: emacs-orgmode

And Carsten Dominik writes:
>> I can smuggle the value in by adding an entry to
>> org-export-plist-vars referring to
>> org-export-latex-image-default-option and pulling the value from
>> the plist, but that feels incorrect.
>
> To me it sounds correct, actually.  I have added this, and will
> add other variables as needed.

I was thinking about using file locals to pass arguments along to
custom functions...  Carrying a central registry feels funny.   Why
do you prefer org-export-plist-vars?

Jason

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

* Re: Re: File local variables and export?
  2009-05-05 15:15   ` Jason Riedy
@ 2009-05-06  7:25     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-05-06  7:25 UTC (permalink / raw)
  To: Jason Riedy; +Cc: emacs-orgmode


On May 5, 2009, at 5:15 PM, Jason Riedy wrote:

> And Carsten Dominik writes:
>>> I can smuggle the value in by adding an entry to
>>> org-export-plist-vars referring to
>>> org-export-latex-image-default-option and pulling the value from
>>> the plist, but that feels incorrect.
>>
>> To me it sounds correct, actually.  I have added this, and will
>> add other variables as needed.
>
> I was thinking about using file locals to pass arguments along to
> custom functions...  Carrying a central registry feels funny.   Why
> do you prefer org-export-plist-vars?

Because the buffer being exported is not current when
doing the conversion. I know that this is less than ideal,
but it is historically how the exporter developed.

Another possibility would be a way to put arbitrary values into
the property list that is used during export.  The #+OPTIONS line
does this, and we could have something like

#+EXPORT_PROPS: :value "key" .......

which would add properties to the options property list,
and any function could access their values.

- Carsten

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

end of thread, other threads:[~2009-05-06  7:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04 19:13 File local variables and export? Jason Riedy
2009-05-05  8:40 ` Carsten Dominik
2009-05-05 15:15   ` Jason Riedy
2009-05-06  7:25     ` Carsten Dominik

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).