* Using link abbrevations for EXPORT_FILE_NAME ?
@ 2015-11-03 14:07 AW
2015-11-08 19:11 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: AW @ 2015-11-03 14:07 UTC (permalink / raw)
To: emacs-orgmode
Hi,
on orgmode 8.3.2 I've got a large org-file. Offen, I need to export a subtree
like this:
-----------------
* Subtree to be exported
:PROPERTIES:
:EXPORT_FILE_NAME: /PATH/TO/FOLDER/filename
:EXPORT_TITLE:
:END:
foo
-----------------
I'd like to save the exported file in a project folder, as you can see in
EXPORT_FILE_NAME .
It would be very helpful to use link abbrevations in EXPORT_FILE_NAME :
(setq org-link-abbrev-alist
'(("anglisky" . "~/Path/whereever/%s")))
in .emacs and write:
-----------------
* Subtree to be exported
:PROPERTIES:
:EXPORT_FILE_NAME: anglisky:filename
:EXPORT_TITLE:
:END:
foo
-----------------
Possible? Feature Request?
Thank you!
Regards,
--
Alexander
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using link abbrevations for EXPORT_FILE_NAME ?
2015-11-03 14:07 Using link abbrevations for EXPORT_FILE_NAME ? AW
@ 2015-11-08 19:11 ` Nicolas Goaziou
2015-11-09 12:53 ` Stelian Iancu
2015-11-09 21:03 ` AW
0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2015-11-08 19:11 UTC (permalink / raw)
To: AW; +Cc: emacs-orgmode
Hello,
AW <alexander.willand@t-online.de> writes:
> on orgmode 8.3.2 I've got a large org-file. Offen, I need to export a subtree
> like this:
>
> -----------------
> * Subtree to be exported
> :PROPERTIES:
> :EXPORT_FILE_NAME: /PATH/TO/FOLDER/filename
> :EXPORT_TITLE:
> :END:
>
> foo
>
> -----------------
>
> I'd like to save the exported file in a project folder, as you can see in
> EXPORT_FILE_NAME .
>
> It would be very helpful to use link abbrevations in EXPORT_FILE_NAME :
>
> (setq org-link-abbrev-alist
> '(("anglisky" . "~/Path/whereever/%s")))
>
> in .emacs and write:
>
> -----------------
> * Subtree to be exported
> :PROPERTIES:
> :EXPORT_FILE_NAME: anglisky:filename
> :EXPORT_TITLE:
> :END:
>
> foo
>
> -----------------
>
> Possible? Feature Request?
Not possible. Also, link syntax sounds awkward because most links
wouldn't make sense there.
What about introducing a new property:
:EXPORT_FILE_DIRECTORY:
When set, e.g. to "dir", assuming EXPORT_FILE_NAME is set to "foo/file",
export file name becomes "dir/file".
Since you can set it per subtree or document, I think it would help in
your situation.
WDYT?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using link abbrevations for EXPORT_FILE_NAME ?
2015-11-08 19:11 ` Nicolas Goaziou
@ 2015-11-09 12:53 ` Stelian Iancu
2015-11-14 8:35 ` Nicolas Goaziou
2015-11-09 21:03 ` AW
1 sibling, 1 reply; 7+ messages in thread
From: Stelian Iancu @ 2015-11-09 12:53 UTC (permalink / raw)
To: AW, emacs-orgmode
On 08/11/15 20:11, Nicolas Goaziou wrote:
> Hello,
>
> AW <alexander.willand@t-online.de> writes:
>
>> on orgmode 8.3.2 I've got a large org-file. Offen, I need to export a subtree
>> like this:
>>
>> -----------------
>> * Subtree to be exported
>> :PROPERTIES:
>> :EXPORT_FILE_NAME: /PATH/TO/FOLDER/filename
>> :EXPORT_TITLE:
>> :END:
>>
>> foo
>>
>> -----------------
>>
>> I'd like to save the exported file in a project folder, as you can see in
>> EXPORT_FILE_NAME .
>>
>> It would be very helpful to use link abbrevations in EXPORT_FILE_NAME :
>>
>> (setq org-link-abbrev-alist
>> '(("anglisky" . "~/Path/whereever/%s")))
>>
>> in .emacs and write:
>>
>> -----------------
>> * Subtree to be exported
>> :PROPERTIES:
>> :EXPORT_FILE_NAME: anglisky:filename
>> :EXPORT_TITLE:
>> :END:
>>
>> foo
>>
>> -----------------
>>
>> Possible? Feature Request?
>
> Not possible. Also, link syntax sounds awkward because most links
> wouldn't make sense there.
>
> What about introducing a new property:
>
> :EXPORT_FILE_DIRECTORY:
>
> When set, e.g. to "dir", assuming EXPORT_FILE_NAME is set to "foo/file",
> export file name becomes "dir/file".
>
> Since you can set it per subtree or document, I think it would help in
> your situation.
>
> WDYT?
>
>
> Regards,
>
Hi,
+1 on this. I wanted this as well a while back and didn't know how to do
it (or whether it's possible or not) so I gave up.
S.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using link abbrevations for EXPORT_FILE_NAME ?
2015-11-09 12:53 ` Stelian Iancu
@ 2015-11-14 8:35 ` Nicolas Goaziou
2015-11-14 19:11 ` Aaron Ecay
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2015-11-14 8:35 UTC (permalink / raw)
To: Stelian Iancu; +Cc: AW, emacs-orgmode
Stelian Iancu <si@siancu.net> writes:
> On 08/11/15 20:11, Nicolas Goaziou wrote:
>>
>> What about introducing a new property:
>>
>> :EXPORT_FILE_DIRECTORY:
>>
>> When set, e.g. to "dir", assuming EXPORT_FILE_NAME is set to "foo/file",
>> export file name becomes "dir/file".
>>
>> Since you can set it per subtree or document, I think it would help in
>> your situation.
>>
>> WDYT?
>>
>>
>> Regards,
>>
>
> Hi,
>
> +1 on this. I wanted this as well a while back and didn't know how to
> do it (or whether it's possible or not) so I gave up.
Thanks for your feedback.
Any other feedback on the "EXPORT_FILE_DIRECTORY" feature?
Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using link abbrevations for EXPORT_FILE_NAME ?
2015-11-14 8:35 ` Nicolas Goaziou
@ 2015-11-14 19:11 ` Aaron Ecay
0 siblings, 0 replies; 7+ messages in thread
From: Aaron Ecay @ 2015-11-14 19:11 UTC (permalink / raw)
To: Nicolas Goaziou, Stelian Iancu; +Cc: AW, emacs-orgmode
Hi Nicolas,
2015ko azaroak 14an, Nicolas Goaziou-ek idatzi zuen:
>
> Thanks for your feedback.
>
> Any other feedback on the "EXPORT_FILE_DIRECTORY" feature?
In an earlier email you wrote:
> When set, e.g. to "dir", assuming EXPORT_FILE_NAME is set to "foo/file",
> export file name becomes "dir/file".
Would it make more sense to concatenate the properties: dir/foo/file?
I’m not a user of multi-file export, but here’s the kind of scenario
I imagine arising (I’ve used an abbreviated syntax for specifying
properties; hopefully it’s clear):
a.org
,----
| * A project
| ** One file
| :EFN: foo.html
|
| A link to [[bar/page.html]]
|
| ** Another file
| :EFN: bar/page.html
|
| Interesting content.
`----
b.org
,----
| * A version of the project for mobile
| :EFD: mobile
| :CSS: mobile.css
|
| #+include: a.org
`----
In this case, the link will break. (Maybe the link could be made to
work in org by using e.g. an ID link – but someone still might want the
mobile version of bar/page.html to live at mobile/bar/page.html not
mobile/page.html).
Maybe you have a different kind of use-case in mind?
Thanks,
--
Aaron Ecay
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using link abbrevations for EXPORT_FILE_NAME ?
2015-11-08 19:11 ` Nicolas Goaziou
2015-11-09 12:53 ` Stelian Iancu
@ 2015-11-09 21:03 ` AW
2015-11-10 17:22 ` Nicolas Goaziou
1 sibling, 1 reply; 7+ messages in thread
From: AW @ 2015-11-09 21:03 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Nicolas Goaziou
Am Sonntag, 8. November 2015, 20:11:23 schrieb Nicolas Goaziou:
> Hello,
>
> AW <alexander.willand@t-online.de> writes:
> > on orgmode 8.3.2 I've got a large org-file. Offen, I need to export a
> > subtree like this:
> >
> > -----------------
> > * Subtree to be exported
> >
> > :PROPERTIES:
> > :EXPORT_FILE_NAME: /PATH/TO/FOLDER/filename
> > :EXPORT_TITLE:
> >
> > :END:
> > foo
> >
> > -----------------
> >
> > I'd like to save the exported file in a project folder, as you can see in
> > EXPORT_FILE_NAME .
> >
> > It would be very helpful to use link abbrevations in EXPORT_FILE_NAME :
> >
> > (setq org-link-abbrev-alist
> >
> > '(("anglisky" . "~/Path/whereever/%s")))
> >
> > in .emacs and write:
> >
> > -----------------
> > * Subtree to be exported
> >
> > :PROPERTIES:
> > :EXPORT_FILE_NAME: anglisky:filename
> > :EXPORT_TITLE:
> >
> > :END:
> > foo
> >
> > -----------------
> >
> > Possible? Feature Request?
>
> Not possible. Also, link syntax sounds awkward because most links
> wouldn't make sense there.
>
> What about introducing a new property:
> :EXPORT_FILE_DIRECTORY:
> When set, e.g. to "dir", assuming EXPORT_FILE_NAME is set to "foo/file",
> export file name becomes "dir/file".
>
> Since you can set it per subtree or document, I think it would help in
> your situation.
Background: I'm using orgmode on different platforms, Windows and Linux. So I
(being very proud of that!) wrote an if-clause:
(setq org-link-abbrev-alist
(if (eq system-type 'windows-nt)
'(("foopath" . "//Sbs2011/ra2000/Bilder/2010/271-2011/%s")
)
'(("foopath" . "/home/AW/some/path/2011-271-project/%s")))
So on Windows foopath becomes the first path, and on Linux the second and all
my links in the orgmode files work on both platforms.
A cheap solution for EXPORT_FILE_NAME: just have two lines and comment out the
wrong one!
-----------------
* Subtree to be exported
:PROPERTIES:
# :EXPORT_FILE_NAME: //Sbs2011/ra2000/Bilder/2010/271-2011/filename
:EXPORT_FILE_NAME: /home/AW/some/path/2011-271-project/filename
:EXPORT_TITLE:
:END:
foo
-----------------
But comment seems not to work inside properties.
However, :EXPORT_FILE_DIRECTORY: would only improve _my_ situation, if I could
make it dependend on a condition.
Thank you very for your help!
Kind regards,
--
Alexander
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using link abbrevations for EXPORT_FILE_NAME ?
2015-11-09 21:03 ` AW
@ 2015-11-10 17:22 ` Nicolas Goaziou
0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2015-11-10 17:22 UTC (permalink / raw)
To: AW; +Cc: emacs-orgmode
AW <alexander.willand@t-online.de> writes:
> Background: I'm using orgmode on different platforms, Windows and Linux. So I
> (being very proud of that!) wrote an if-clause:
>
> (setq org-link-abbrev-alist
> (if (eq system-type 'windows-nt)
> '(("foopath" . "//Sbs2011/ra2000/Bilder/2010/271-2011/%s")
> )
> '(("foopath" . "/home/AW/some/path/2011-271-project/%s")))
>
>
>
> So on Windows foopath becomes the first path, and on Linux the second and all
> my links in the orgmode files work on both platforms.
>
> A cheap solution for EXPORT_FILE_NAME: just have two lines and comment out the
> wrong one!
>
> -----------------
> * Subtree to be exported
> :PROPERTIES:
> # :EXPORT_FILE_NAME: //Sbs2011/ra2000/Bilder/2010/271-2011/filename
> :EXPORT_FILE_NAME: /home/AW/some/path/2011-271-project/filename
> :EXPORT_TITLE:
> :END:
>
> foo
>
> -----------------
>
> But comment seems not to work inside properties.
>
> However, :EXPORT_FILE_DIRECTORY: would only improve _my_ situation, if I could
> make it dependend on a condition.
At this point, I suggest to write your own `org-export-subtree-to'
function. You can have a look at, e.g., `org-html-export-to-html' and
override the call to `org-export-output-file-name'.
Elisp should provide the flexibility Org cannot offer.
Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-11-14 19:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 14:07 Using link abbrevations for EXPORT_FILE_NAME ? AW
2015-11-08 19:11 ` Nicolas Goaziou
2015-11-09 12:53 ` Stelian Iancu
2015-11-14 8:35 ` Nicolas Goaziou
2015-11-14 19:11 ` Aaron Ecay
2015-11-09 21:03 ` AW
2015-11-10 17:22 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.