help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Links Lost and Export-Report


From: Stefan Vollmar
Subject: Re: Links Lost and Export-Report
Date: Wed, 18 Aug 2010 23:13:49 +0200

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: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]