[Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread Joost Kremers
Hi all,

If I export (part of) an org-mode file to LaTeX, the LaTeX file is created in
the same directory as the org-mode file. Is there a way to specify the file
should go somewhere else? Googling and looking through the manual didn't give me
anything concrete. There is apparently a property EXPORT_FILE_NAME, but setting
this doesn't seem to have any effect. (Though I may be using it wrong, there
wasn't any description or example of it in the manual... Plus, I'd like to be
able to specify just the export directory, not necessarily the file name as 
well.)

TIA

Joost


-- 
Joost Kremers
Life has its moments

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread suvayu ali
On Mon, Dec 13, 2010 at 11:47 AM, Joost Kremers
joostkrem...@fastmail.fm wrote:
 There is apparently a property EXPORT_FILE_NAME, but setting
 this doesn't seem to have any effect. (Though I may be using it wrong, there
 wasn't any description or example of it in the manual... Plus, I'd like to be
 able to specify just the export directory, not necessarily the file name as 
 well.)


I think you have to set it as a property for the sub-tree you are
trying to export. So whenever you export only that sub-tree, the file
name will be taken from that property. For setting the directory you
could try something like 'directory/filename.pdf' instead of just the
usual file name. (untested) I am not aware of any directory only
settings for export of sub-trees. But then I am not org-mode power
user. :-)

If it is not already there, I would also like to have a feature like
that. In my case I want to export to some remote directory over ssh to
some directory on my 'webserver:~/public_html' directory. I would like
to set this on a per file basis. Don't know whether that is possible
or not. Haven't had the time to explore in detail. When I was using
emacs-muse, I used this feature extensively (I used to choose this
interactively, so changing remote directories was pretty convenient
with tab completion support from tramp)

Hope that helps.

-- 
Suvayu

Open source is the future. It sets us free.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread Joost Kremers
On Mon, Dec 13, 2010 at 12:07:56PM +0100, suvayu ali wrote:
[EXPORT_FILE_NAME]
 I think you have to set it as a property for the sub-tree you are
 trying to export. So whenever you export only that sub-tree, the file
 name will be taken from that property.

I tried various incantations, including the one you mention, none of them seem
to have any effect...

 For setting the directory you
 could try something like 'directory/filename.pdf' instead of just the
 usual file name. (untested) I am not aware of any directory only
 settings for export of sub-trees.

Actually, I'm exporting a region, but that should pretty much work the same way.

The thing is, I'm keeping lots of stuff in several org files and occasionally I
want to export some of it (in this case it was a table) to latex/pdf in order to
print it or send it to someone. I'm not actually interested in the .tex or .pdf
file itself and I don't want to clutter up the directory containing my org
files. So preferably the latex/pdf file should go into ~/tmp or /tmp, where it
can sit until I clean it out.


-- 
Joost Kremers
Life has its moments

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread suvayu ali
Hi Joost,

On Mon, Dec 13, 2010 at 12:34 PM, Joost Kremers
joostkrem...@fastmail.fm wrote:
 On Mon, Dec 13, 2010 at 12:07:56PM +0100, suvayu ali wrote:
 For setting the directory you
 could try something like 'directory/filename.pdf' instead of just the
 usual file name. (untested) I am not aware of any directory only
 settings for export of sub-trees.

 Actually, I'm exporting a region, but that should pretty much work the same 
 way.

 The thing is, I'm keeping lots of stuff in several org files and occasionally 
 I
 want to export some of it (in this case it was a table) to latex/pdf in order 
 to
 print it or send it to someone. I'm not actually interested in the .tex or 
 .pdf
 file itself and I don't want to clutter up the directory containing my org
 files. So preferably the latex/pdf file should go into ~/tmp or /tmp, where it
 can sit until I clean it out.

I just tested this, it seems to work as expected.


* Smearing:smear:
  :PROPERTIES:
  :EXPORT_FILE_NAME: tmp/smearing.html
  :END:

** Some sub-tree 1

** Some sub-tree 2


Does this not work for you?

-- 
Suvayu

Open source is the future. It sets us free.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread Joost Kremers
On Mon, Dec 13, 2010 at 12:52:41PM +0100, suvayu ali wrote:
 I just tested this, it seems to work as expected.
 
 
 * Smearing  :smear:
   :PROPERTIES:
   :EXPORT_FILE_NAME: tmp/smearing.html
   :END:
 
 ** Some sub-tree 1
 
 ** Some sub-tree 2
 
 
 Does this not work for you?

it works if i export a subtree (C-c C-e 1 l), but not if i export a region (set
mark, highlight region, then C-c C-e l). also, it doesn't expand a tilde ~ to my
home directory, so writing

:EXPORT_FILE_NAME: ~/tmp/temp.tex

doesn't do what one would expect. (note that i can't write the full path because
i switch between linux and OS X, which expand ~ differently: linux to 
/home/name,
OS X to /Users/name.)

also, i'd like to be able to specify an export directory for the entire org
file, not just a subtree.


-- 
Joost Kremers
Life has its moments

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread suvayu ali
Hi,

On Mon, Dec 13, 2010 at 4:43 PM, Joost Kremers joostkrem...@fastmail.fm wrote:
 it works if i export a subtree (C-c C-e 1 l), but not if i export a region 
 (set
 mark, highlight region, then C-c C-e l).

I think I had missed your earlier comment about exporting regions.

 also, it doesn't expand a tilde ~ to my
 home directory, so writing

 :EXPORT_FILE_NAME: ~/tmp/temp.tex

 doesn't do what one would expect. (note that i can't write the full path 
 because
 i switch between linux and OS X, which expand ~ differently: linux to 
 /home/name,
 OS X to /Users/name.)


On a quick look at the docs, I can't find anything. But it does say if
the property EXPORT_FILE_NAME is set, then the exporter will respect
it. So if you could set it with some lisp, then you might have a
working solution.

However you can still make this work but only for sub-trees (not
regions) by using relative paths, as in my example. However this does
require that your org directory is the same with respect to your $HOME
on both systems. So if your org files are in $HOME/org then maybe try
../tmp/file.tex.

I know either of these are not exactly what you were looking for, but
I am just trying to work around my lack of knowledge about org-mode
internals to work out a possible solution.

 also, i'd like to be able to specify an export directory for the entire org
 file, not just a subtree.

Yes this is what I had mentioned in my first post as a feature that I
would like too (even more awesome if remote directories are permitted
:)). I think right now you can do this by specifying projects in your
init files, not sure though. I think I saw a thread related to that
within the last few of months, maybe worth a look?

-- 
Suvayu

Open source is the future. It sets us free.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread Joost Kremers
On Mon, Dec 13, 2010 at 10:57:45AM -0500, Nick Dokos wrote:
 Joost Kremers joostkrem...@fastmail.fm wrote:
  If I export (part of) an org-mode file to LaTeX, the LaTeX file is created 
  in
  the same directory as the org-mode file. Is there a way to specify the file
  should go somewhere else? Googling and looking through the manual didn't 
  give me
  anything concrete. There is apparently a property EXPORT_FILE_NAME, but 
  setting
  this doesn't seem to have any effect. (Though I may be using it wrong, there
  wasn't any description or example of it in the manual... Plus, I'd like to 
  be
  able to specify just the export directory, not necessarily the file name as 
  well.)
 
 If the more refined methods don't work for you, here is a somewhat
 brute-force way:
 
 #+BIND: org-export-publishing-directory /tmp

thanks, but this doesn't seem to work for me at all. :-(

i'm using org version 7.4, if that's relevant at all. the variable
org-export-publishing-directory is defined in org-exp.el (with defvar and a
FIXME...), but it's not used anywhere in a meaningful way, AFAICT.


-- 
Joost Kremers
Life has its moments

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export LaTeX file to different directory?

2010-12-13 Thread Jeff Horn
On Mon, Dec 13, 2010 at 12:15 PM, Joost Kremers
joostkrem...@fastmail.fm wrote:
 i'm using org version 7.4, if that's relevant at all. the variable
 org-export-publishing-directory is defined in org-exp.el (with defvar and a
 FIXME...), but it's not used anywhere in a meaningful way, AFAICT.

That just made me think... what if you define an org publishing
project with an output directory of ~/tmp or whatever, and then tell
org, within each file, that the file belongs to your tmp project? When
you publish using the current project, it should do what you're
looking for.

The only problem I can forsee is that there is no hash-plus file
property that can define which project a file belongs to. Maybe in the
future? (nudge, nudge)

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jh...@gmu.edu
jrhorn...@gmail.com

http://www.failuretorefrain.com/jeff/

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode