From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Open all #+INCLUDED:d files? Date: Fri, 12 Dec 2014 12:35:59 -0500 Message-ID: <87oar8epog.fsf@alphaville.usersys.redhat.com> References: <874mt1yv2j.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzU8c-0008TY-Lt for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 12:36:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzU8X-0004Mi-Iq for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 12:36:22 -0500 Received: from plane.gmane.org ([80.91.229.3]:52008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzU8X-0004MW-CK for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 12:36:17 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XzU8V-0007Zy-9D for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 18:36:15 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Dec 2014 18:36:15 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Dec 2014 18:36:15 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rainer M Krug writes: > Rasmus writes: > >> Rainer M Krug 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