* Open all #+INCLUDED:d files?
@ 2014-12-12 9:08 Rainer M Krug
2014-12-12 11:14 ` Rasmus
2014-12-12 11:19 ` Rasmus
0 siblings, 2 replies; 7+ messages in thread
From: Rainer M Krug @ 2014-12-12 9:08 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
Hi
Is there an easy way of opening all INCLUDEd files in an org document,
i.e. a single command or an easy way of doing it via some elisp code?
Thanks,
Rainer
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Open all #+INCLUDED:d files?
2014-12-12 9:08 Open all #+INCLUDED:d files? Rainer M Krug
@ 2014-12-12 11:14 ` Rasmus
2014-12-12 11:19 ` Rasmus
1 sibling, 0 replies; 7+ messages in thread
From: Rasmus @ 2014-12-12 11:14 UTC (permalink / raw
To: rainer; +Cc: emacs-orgmode
Hi,
Rainer M Krug <Rainer@krugs.de> writes:
> Is there an easy way of opening all INCLUDEd files in an org document,
> i.e. a single command or an easy way of doing it via some elisp code?
C-c ' and C-c & to return.
It even works on this link:
#+INCLUDE: "/tmp/t1.org::*foo"
For how to do it lisp look at how `org-edit-special', namely the keyword
part.
Hope it helps,
Rasmus
--
Send from my Emacs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Open all #+INCLUDED:d files?
2014-12-12 9:08 Open all #+INCLUDED:d files? Rainer M Krug
2014-12-12 11:14 ` Rasmus
@ 2014-12-12 11:19 ` Rasmus
2014-12-12 11:40 ` Rainer M Krug
1 sibling, 1 reply; 7+ messages in thread
From: Rasmus @ 2014-12-12 11:19 UTC (permalink / raw
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
> Is there an easy way of opening all INCLUDEd files in an org document,
> i.e. a single command or an easy way of doing it via some elisp code?
Oh, sorry, I didn't see the "all". But yeah, it should be easy with
org-element-map. Map over all keywords, ensure they are INCLUDE keywords,
move point to their :begin and call org-edit-special or similar. You
could use save-excursion, save-window-excursion to make it not suck.
You'd might have to widen first, then you could use save-restriction.
Hope it helps,
Ramsus
--
May the Force be with you
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Open all #+INCLUDED:d files?
2014-12-12 11:19 ` Rasmus
@ 2014-12-12 11:40 ` Rainer M Krug
2014-12-12 17:35 ` Nick Dokos
0 siblings, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2014-12-12 11:40 UTC (permalink / raw
To: Rasmus; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
Rasmus <rasmus@gmx.us> writes:
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Is there an easy way of opening all INCLUDEd files in an org document,
>> i.e. a single command or an easy way of doing it via some elisp code?
>
> Oh, sorry, I didn't see the "all".
No problem - so I learned about C-c & - very useful.
> But yeah, it should be easy with org-element-map. Map over all
> keywords, ensure they are INCLUDE keywords, move point to their :begin
> and call org-edit-special or similar. You could use save-excursion,
> save-window-excursion to make it not suck. You'd might have to widen
> first, then you could use save-restriction.
OK - I might look into it when I get to annoyed by the manual approach.
Thanks,
Rainer
>
> Hope it helps,
> Ramsus
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Open all #+INCLUDED:d files?
2014-12-12 11:40 ` Rainer M Krug
@ 2014-12-12 17:35 ` Nick Dokos
2014-12-12 18:07 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2014-12-12 17:35 UTC (permalink / raw
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> Is there an easy way of opening all INCLUDEd files in an org document,
>>> i.e. a single command or an easy way of doing it via some elisp code?
>>
>> Oh, sorry, I didn't see the "all".
>
> No problem - so I learned about C-c & - very useful.
>
>> But yeah, it should be easy with org-element-map. Map over all
>> keywords, ensure they are INCLUDE keywords, move point to their :begin
>> and call org-edit-special or similar. You could use save-excursion,
>> save-window-excursion to make it not suck. You'd might have to widen
>> first, then you could use save-restriction.
>
> OK - I might look into it when I get to annoyed by the manual approach.
>
The old exporter provided a function, org-export-handle-include-files-recurse,
that allowed an org-to-org export, recursively including the files. The
commit that introduced it was
5633f7084a96298f415f07c348844bd5f22eb81e
I didn't find a commit that deleted it but that's not surpising: it
probably went away when the new exporter came in.
It should be possible to add a similar function (based on element
mapping as Rasmus suggests).
There is also a function in org-hacks on Worg that did what you
are trying to do, but since it was based on the above, it no longer
works:
http://orgmode.org/worg/org-hacks.html#sec-1-10-2
That section needs to be marked obsolete (or taken out altogether).
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Open all #+INCLUDED:d files?
2014-12-12 17:35 ` Nick Dokos
@ 2014-12-12 18:07 ` Nicolas Goaziou
2014-12-12 18:13 ` Rasmus
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-12-12 18:07 UTC (permalink / raw
To: Nick Dokos; +Cc: emacs-orgmode
Hello,
Nick Dokos <ndokos@gmail.com> writes:
> The old exporter provided a function, org-export-handle-include-files-recurse,
> that allowed an org-to-org export, recursively including the files. The
> commit that introduced it was
>
> 5633f7084a96298f415f07c348844bd5f22eb81e
>
> I didn't find a commit that deleted it but that's not surpising: it
> probably went away when the new exporter came in.
This is probably equivalent to `org-export-expand-include-keyword'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Open all #+INCLUDED:d files?
2014-12-12 18:07 ` Nicolas Goaziou
@ 2014-12-12 18:13 ` Rasmus
0 siblings, 0 replies; 7+ messages in thread
From: Rasmus @ 2014-12-12 18:13 UTC (permalink / raw
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Nick Dokos <ndokos@gmail.com> writes:
>
>> The old exporter provided a function, org-export-handle-include-files-recurse,
>> that allowed an org-to-org export, recursively including the files. The
>> commit that introduced it was
>>
>> 5633f7084a96298f415f07c348844bd5f22eb81e
>>
>> I didn't find a commit that deleted it but that's not surpising: it
>> probably went away when the new exporter came in.
>
> This is probably equivalent to `org-export-expand-include-keyword'.
This is a destructive operation. But maybe ox-org for export?
—Rasmus
--
The Kids call him Billy the Saint
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-12 18:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-12 9:08 Open all #+INCLUDED:d files? Rainer M Krug
2014-12-12 11:14 ` Rasmus
2014-12-12 11:19 ` Rasmus
2014-12-12 11:40 ` Rainer M Krug
2014-12-12 17:35 ` Nick Dokos
2014-12-12 18:07 ` Nicolas Goaziou
2014-12-12 18:13 ` Rasmus
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.