Hi, I'm trying to link to a heading in another org file. I assume it's possible and I remember a related discussion (maybe about those links in HTML), but I didn't find it. I tried to use intuitively this syntax (it doesn't work): [[file:proj.org#*some heading]] This is similar to [[gnus:group#id]]. This syntax would disallow using # in a file name, but I think this is reasonable to do. It can be escaped with [#] like spaces. Whether org uses this syntax or another, no example of this appears at http://orgmode.org/manual/External-links.html#External-links . It could be added there. Thanks, Daniel
Hi Daniel, If I call `org-store-link' on a headline it creates a link like file:~/iese.org::*Merge%20invoke%20insert%20invokation%20statement which I can insert in any other org file using `org-insert-link'. Works fine for me. Bye, Tassilo -- Richard Stallman gets 9 bits to the byte.
Ok, so it was [[file:proj.org::*some heading]] instead of [[file:proj.org#*some heading]], fine. Could it be documented as example in http://orgmode.org/manual/External-links.html#External-links This also refers to it: http://orgmode.org/manual/Publishing-links.html#Publishing-links Daniel
Daniel Clemente <n142857@gmail.com> writes: > Ok, so it was [[file:proj.org::*some heading]] instead of > [[file:proj.org#*some heading]], fine. I've just noticed that if you have two headlines with the same text, it'll always link to the first one. > Could it be documented as example in > http://orgmode.org/manual/External-links.html#External-links This > also refers to it: > http://orgmode.org/manual/Publishing-links.html#Publishing-links Yes, that should be done. But users normally shouldn't write links manually and simply use `org-store-link' which DTRT. Bye, Tassilo
On Jan 14, 2009, at 1:17 PM, Tassilo Horn wrote: > Daniel Clemente <n142857@gmail.com> writes: > >> Ok, so it was [[file:proj.org::*some heading]] instead of >> [[file:proj.org#*some heading]], fine. > > I've just noticed that if you have two headlines with the same text, > it'll always link to the first one. Yes. Using ID links will work around this. - Carsten > > >> Could it be documented as example in >> http://orgmode.org/manual/External-links.html#External-links This >> also refers to it: >> http://orgmode.org/manual/Publishing-links.html#Publishing-links > > Yes, that should be done. But users normally shouldn't write links > manually and simply use `org-store-link' which DTRT. > > Bye, > Tassilo > > > > _______________________________________________ > 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
Carsten Dominik <dominik@science.uva.nl> writes:
Hi Carsten,
>>> Ok, so it was [[file:proj.org::*some heading]] instead of
>>> [[file:proj.org#*some heading]], fine.
>>
>> I've just noticed that if you have two headlines with the same text,
>> it'll always link to the first one.
>
> Yes. Using ID links will work around this.
Hey, that's great, I wasn't aware of that feature. And afterwards I
also found it in the docs. ;-)
BTW, the docs state:
,----[ (info "(org)Handling links") ]
| `C-c l'
| Store a link to the current location. This is a _global_ command
| which can be used in any buffer to create a link.
`----
Here, `C-c l' is neither bound in org files nor globally. I grepped my
config files but I don't set/release that key somewhere. (And if it was
bound I would complain that org shouldn't dictate global keys,
anyway. ;-))
Bye,
Tassilo
On Jan 17, 2009, at 6:18 PM, Tassilo Horn wrote: > Carsten Dominik <dominik@science.uva.nl> writes: > > Hi Carsten, > >>>> Ok, so it was [[file:proj.org::*some heading]] instead of >>>> [[file:proj.org#*some heading]], fine. >>> >>> I've just noticed that if you have two headlines with the same text, >>> it'll always link to the first one. >> >> Yes. Using ID links will work around this. > > Hey, that's great, I wasn't aware of that feature. And afterwards I > also found it in the docs. ;-) > > BTW, the docs state: > > ,----[ (info "(org)Handling links") ] > | `C-c l' > | Store a link to the current location. This is a _global_ > command > | which can be used in any buffer to create a link. > `---- > > Here, `C-c l' is neither bound in org files nor globally. I grepped > my > config files but I don't set/release that key somewhere. (And if it > was > bound I would complain that org shouldn't dictate global keys, > anyway. ;-)) Under "Activation", the manual also states: ,----- | Add the following lines to your `.emacs' file. The last three lines | define _global_ keys for the commands `org-store-link', `org-agenda', | and `org-iswitchb' - please choose suitable keys yourself. | | ;; The following lines are always needed. Choose your own keys. | (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) | (global-set-key "\C-cl" 'org-store-link) | (global-set-key "\C-ca" 'org-agenda) | (global-set-key "\C-cb" 'org-iswitchb) `----- I do not want to re-iterate this information each time I talk about one of the global commands. - Carsten > > > Bye, > Tassilo > > > > _______________________________________________ > 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
Carsten Dominik <dominik@science.uva.nl> writes:
Hi Carsten,
> Under "Activation", the manual also states:
>
> ,-----
> | Add the following lines to your `.emacs' file. The last three lines
> | define _global_ keys for the commands `org-store-link', `org-agenda',
> | and `org-iswitchb' - please choose suitable keys yourself.
> |
> | ;; The following lines are always needed. Choose your own keys.
> | (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
> | (global-set-key "\C-cl" 'org-store-link)
> | (global-set-key "\C-ca" 'org-agenda)
> | (global-set-key "\C-cb" 'org-iswitchb)
> `-----
>
> I do not want to re-iterate this information each time I talk about
> one of the global commands.
I see. But wouldn't it then be better to talk about the functions then,
not about global keys the manual suggests?
Bye,
Tassilo
--
TNT was originally developed by Chuck Norris to cure indigestion.
On Jan 18, 2009, at 10:26 AM, Tassilo Horn wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
> Hi Carsten,
>
>> Under "Activation", the manual also states:
>>
>> ,-----
>> | Add the following lines to your `.emacs' file. The last three
>> lines
>> | define _global_ keys for the commands `org-store-link', `org-
>> agenda',
>> | and `org-iswitchb' - please choose suitable keys yourself.
>> |
>> | ;; The following lines are always needed. Choose your own
>> keys.
>> | (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>> | (global-set-key "\C-cl" 'org-store-link)
>> | (global-set-key "\C-ca" 'org-agenda)
>> | (global-set-key "\C-cb" 'org-iswitchb)
>> `-----
>>
>> I do not want to re-iterate this information each time I talk about
>> one of the global commands.
>
> I see. But wouldn't it then be better to talk about the functions
> then,
> not about global keys the manual suggests?
Maybe it would, but the entire Org-mode documentation is based
on keys rather than function names. I find that the long function
names make Emacs documentation in written form less readable
for users who do not want to deal with Lisp themselves. Org's manual
is similar in this to the Emacs manual, and if you compare this
way o writing for example with the planner manual, it does read
a lot better for my taste.
So, OK, I will make another remark that this key binding is user
chosen, but I will keep it in the manual like this.
- Carsten
Could this [[file proj.org::*some heading]] syntax be documented? I attach a simple patch:
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2626,6 +2626,9 @@ file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
/home/dominik/images/jupiter.jpg @r{same as above}
file:papers/last.pdf @r{file, relative path}
./papers/last.pdf @r{same as above}
+file:projects.org @r{another org file}
+file:projects.org::some words @r{text search in org file}
+file:projects.org::*task title @r{heading search in org file}
news:comp.emacs @r{Usenet link}
mailto:adent@@galaxy.net @r{Mail link}
vm:folder @r{VM folder link}
Thanks,
Daniel
Daniel Clemente <n142857@gmail.com> writes:
> Ok, so it was [[file:proj.org::*some heading]] instead of [[file:proj.org#*some heading]], fine.
>
> Could it be documented as example in http://orgmode.org/manual/External-links.html#External-links
> This also refers to it: http://orgmode.org/manual/Publishing-links.html#Publishing-links
>
>
> Daniel
Fixed, thanks.
- Carsten
On Jan 19, 2009, at 4:36 PM, Daniel Clemente wrote:
>
> Could this [[file proj.org::*some heading]] syntax be documented? I
> attach a simple patch:
>
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -2626,6 +2626,9 @@ file:/home/dominik/images/jupiter.jpg
> @r{file, absolute path}
> /home/dominik/images/jupiter.jpg @r{same as above}
> file:papers/last.pdf @r{file, relative path}
> ./papers/last.pdf @r{same as above}
> +file:projects.org @r{another org file}
> +file:projects.org::some words @r{text search in org file}
> +file:projects.org::*task title @r{heading search in org
> file}
> news:comp.emacs @r{Usenet link}
> mailto:adent@@galaxy.net @r{Mail link}
> vm:folder @r{VM folder link}
>
>
>
> Thanks,
> Daniel
>
>
>
> Daniel Clemente <n142857@gmail.com> writes:
>
>> Ok, so it was [[file:proj.org::*some heading]] instead of
>> [[file:proj.org#*some heading]], fine.
>>
>> Could it be documented as example in http://orgmode.org/manual/External-links.html#External-links
>> This also refers to it: http://orgmode.org/manual/Publishing-links.html#Publishing-links
>>
>>
>> Daniel
>
>
> _______________________________________________
> 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