From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-store-link forgets external filename? Date: Mon, 6 Jul 2009 16:04:32 +0200 Message-ID: <33376D74-0D29-4D08-8653-103392A96ADF@gmail.com> References: <7B4398AB-4922-4A5E-AE6E-9F9280AD4D62@gmail.com> <47E3A1B3-8065-4739-90B9-600664BB6E56@nf.mpg.de> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNooE-0000AW-20 for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 10:04:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNoo9-00008R-Rq for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 10:04:41 -0400 Received: from [199.232.76.173] (port=47334 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNoo9-00008M-Li for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 10:04:37 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:46152) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNoo8-00054b-Tj for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 10:04:37 -0400 Received: by ewy4 with SMTP id 4so4808537ewy.42 for ; Mon, 06 Jul 2009 07:04:36 -0700 (PDT) In-Reply-To: <47E3A1B3-8065-4739-90B9-600664BB6E56@nf.mpg.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Stefan Vollmar Cc: org-mode mailing list On Jul 6, 2009, at 12:18 AM, Stefan Vollmar wrote: > Dear Carsten, > > On 05.07.2009, at 23:27, Carsten Dominik wrote: > >> Hi Stefan, >> >> the magic of id: links is just that they are globally unique, and =20 >> that >> they will find the right target even if you move the target entry >> from one file to another. Therefore, export to HTML should =20 >> automatically insert the correct file name. And this is just how =20 >> it works for me. > > thanks for the quick and detailed reply! > > [...] >> Try M-x org-id-update-id-location to fix ID confusion. > > indeed everything now works just fine after calling org-id-update-id-=20= > location in all files. However, the question remains: what went =20 > wrong and is this a rare problem? Maybe some copy-paste-artefact? This is clearly a possibility. > > One other thing: I mentioned on the list a short while ago that we =20 > need a list of headings with their corresponding links in the HTML =20 > export to generate online help in QtAssistant format. I might even =20 > get one of my students to look into it - I assume one could hook =20 > into some HTML export functions. Could you give us a hint on where =20 > to look? (org-map-entries '(list level (org-no-properties (org-get-heading 'notags)) (or (org-entry-get nil "CUSTOM_ID") (org-entry-get nil "ID"))) "LEVEL<=3D3" 'file) will return a list of elements, each with level (1-3), heading, and custom or U identifier that can be used in a link. I that what you are looking for? - Carsten P.S. Yes, the mapping API is *very* powerful, a pity that not more people use it. > > Many thanks in advance. > Warm regards, > Stefan > > >> >> HTH >> >> - Carsten >> >> >> >> On Jul 5, 2009, at 3:09 PM, Stefan Vollmar wrote: >> >>> Hello, >>> >>> I just noticed that there seems to be a problem with org-store-=20 >>> link (or in that context) with the current development version =20 >>> (6.28trans). >>> >>> I want to insert a link to one section of one org-file into =20 >>> another org-file, so I change to the file with the section I want =20= >>> to link to and use org-store-link (that section already has an ID =20= >>> property; the heading's name is displayed in the minibuffer - =20 >>> fine). I return to the file where I want to insert the link and =20 >>> use org-insert-link which offers the id I had just stored. >>> >>> (1) However, only the id is inserted and org seems to forget about =20= >>> the other file's name, "literal hyperlinks" yields: >>> [[id:2806BA39-087E-4E2E-89E6-6DFA332727D2][some heading]] >>> When exporting to HTML, the link is rendered to a local link =20 >>> (here: "#2806BA39...") of the current file rather than "./my-other-=20= >>> org-file#2806BA39...", which is a problem, of course. Clicking on =20= >>> the link in org-mode will also not open the file. >>> >>> (2) org-insert-link offers a list of ids which have been stored =20 >>> with the corresponding headings added on the right, using Arrow-Up =20= >>> and Arrow-Down will show the selected id in the minibuffer. As I =20 >>> want org to come up with unique ids for sections automatically (it =20= >>> does), I am usually not interested what ids it actually generates =20= >>> and I would suggest a different approach with org-insert-link: =20 >>> have a list of headings instead of a list of ids and show the =20 >>> selected link's heading, not its id, in the minibuffer, sorry if =20 >>> this has been discussed before. There may be cases where it is =20 >>> important to see a link's id in the selection so one could have an =20= >>> optional mode that adds the ids to the list. >>> >>> Warm regards, >>> Stefan >>> --=20 >>> Dr. Stefan Vollmar, Dipl.-Phys. >>> Max-Planck-Institut f=FCr neurologische Forschung >>> Gleuelerstr. 50, 50931 K=F6ln, Germany >>> Tel.: +49-221-4726-213 FAX +49-221-4726-298 >>> Tel.: +49-221-478-5713 Mobile: 0160-93874279 >>> Email: vollmar@nf.mpg.de http://www.nf.mpg.de >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Remember: use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > --=20 > Dr. Stefan Vollmar, Dipl.-Phys. > Max-Planck-Institut f=FCr neurologische Forschung > Gleuelerstr. 50, 50931 K=F6ln, Germany > Tel.: +49-221-4726-213 FAX +49-221-4726-298 > Tel.: +49-221-478-5713 Mobile: 0160-93874279 > Email: vollmar@nf.mpg.de http://www.nf.mpg.de > > > > >