From: Stefan Vollmar <vollmar@nf.mpg.de>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Cc: Bernt Hansen <bernt@norang.ca>
Subject: Re: Links Lost and Export-Report
Date: Wed, 18 Aug 2010 23:41:59 +0200 [thread overview]
Message-ID: <EED4861F-AEAB-474E-89CB-1346A77F3E2E@nf.mpg.de> (raw)
In-Reply-To: <87aaoj6dwe.fsf@gollum.intra.norang.ca>
[-- Attachment #1.1: Type: text/plain, Size: 4312 bytes --]
Hello,
many thanks to Bernt Hansen for finding the root of my problem.
Here is a recipe to unhappiness:
Start with two files a.org and b.org which are part of some files you have created with Org-mode in mind for efficently producing high quality HTML content. Set up Org-mode to use ids for links; do an org-store-link somewhere in file a.org, then an insert-store-link somewhere in file b.org. Enjoy short-lived happiness that everything works after exporting to HTML.
Then: delete ~/.emacs.d/.org-id-locations
This is a good way to simulate this common scenario: transfer your org files to another system, by preference with a version control system so you can be sure the files are identical on both systems and then continue working on that computer; keep in mind: this is the default state of affairs when working in a team! Also note that .org-id-locations uses absolute path names, so syncing that file across different user work stations will seldom work.
Now observe that after exporting to HTML *none* of your ID based links work that refer to locations outside the originating org file. Moreover, observe that Org-mode certainly must have noticed something did not work and failed to mention it.
org-id-update-id-locations will not help you, unless (a) you remember to use it (preferably before you have already put HTML files with broken links online; this goes for your co-workers, too!), (b) files a.org and b.org happen to be agenda files or (c) happen to be mentioned in "org-id-locations" (this I learned from "describe function: org-id-update-id-locations"). None of the above is likely.
Org-mode for HTML publishing is an excellent tool (for lots and lots of other things, too, of course) and I think using globally unique ids is, in general, a great idea. This is why I get a bit emotional about this id link business (sorry).
Here are some suggestions:
- expand the use of ids, so that, in analogy to other links, the inserted link can also contain a file name if it refers to another org fileD, maybe like this:
file-id:some-file.org#8329AEF0-4885-486A-A1B6-BB82B3E92184
- if an id is unknown, search all files in the current publishing project, using the same selection of org-files that will also be used for project-based publishing
- be verbose about links that could not be resolved, warn and potentially stop processing at that file (and while at it, also complain about unresolved macro definitions and finish with a summary line)
- mention in the org-manual that using ids is not recommended for using links between different files because they break so easily (this is hardly an option, is it?)
Let me emphasize that I am really generally a very happy org user and I am quite willing to contribute (as far as I can) to a solution to what I think is a problem with id-based links.
Warm regards,
Stefan
On 18.08.2010, at 19:15, Bernt Hansen wrote:
> Stefan Vollmar <vollmar@nf.mpg.de> writes:
>
>> [...]
>>
>>> I think you need to look in the ~/.emacs.d/.org-id-locations file. This
>>> maps link ids to files.
>>>
>>> -Bernt
>>
>> I think it is very likely that this is part of problem - I synchronize
>> the directories containing my org-files and have, so far, done nothing
>> about "~/.emacs.d/.org-id-locations".
>>
>> What is the best way to deal with this?
>> - Synchronize?
>> - Delete?
>> - Force re-generation?
>
> I think you can just regenerate the file with a call to
>
> M-x org-id-update-id-locations
>
>> I have just taken a look at that file. It seems to map one id to one
>> file. How does that help Org-mode if I rename an org-file that
>> contains an id?
>
> This will probably make your ids and files out of sync so they don't
> work for links in those files anymore. Regenerating the list for all of
> the files you have with id links should fix the problem.
>
> I use the feature but don't rename my org files so I've never run into
> this issue (if it is one).
--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, 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
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4409 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
next prev parent reply other threads:[~2010-08-18 21:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 12:42 Links Lost and Export-Report Stefan Vollmar
2010-08-18 16:13 ` Bernt Hansen
2010-08-18 16:51 ` Stefan Vollmar
2010-08-18 17:15 ` Bernt Hansen
2010-08-18 21:13 ` Stefan Vollmar
2010-08-18 21:41 ` Stefan Vollmar [this message]
2010-08-18 21:55 ` Sebastian Rose
2010-08-18 23:22 ` Stefan Vollmar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EED4861F-AEAB-474E-89CB-1346A77F3E2E@nf.mpg.de \
--to=vollmar@nf.mpg.de \
--cc=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.