From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 12:36:19 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f646a1dc5a9d404b096a570 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKqAA-0003kE-Az for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 07:36:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKqA9-0001MX-7d for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 07:36:22 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:40862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKqA9-0001MK-5M for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 07:36:21 -0400 Received: by qadc11 with SMTP id c11so5732527qad.0 for ; Mon, 31 Oct 2011 04:36:19 -0700 (PDT) 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 --e89a8f646a1dc5a9d404b096a570 Content-Type: text/plain; charset=ISO-8859-1 Hello! When defining a link-abbreviation to an org-file with a headline search I manage to get it to work with the following syntax: #+LINK: foo file:/long/path/to/file/foo.org [[foo::::*heading inside foo]] I have to use four ":" to be able to search, instead of the three I would expect (expecting three since the first ":" is used to declare that I want to enter a tag and the following two are used inside the tag). Is this intended behaviour? Also, it only seems to work for headline-search. I cannot get the regular search to work. Can someone confirm this behaviour? /Gustav --e89a8f646a1dc5a9d404b096a570 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello!

When defining a link-abbreviation to an org-file = with a headline search I manage to get it to work with the following syntax= :

=A0 #+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org
=A0 [[foo::::*heading insi= de foo]]

I have to use four ":" to be able to search, = instead of the three I would expect (expecting three since the first "= :" is used to declare that I want to enter a tag and the following two= are used inside the tag). Is this intended behaviour?

Also, it only seems to work for headline-search. I cann= ot get the regular search to work. Can someone confirm this behaviour?

/Gustav
--e89a8f646a1dc5a9d404b096a570-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 13:10:18 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKqhO-0004Cx-W0 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 08:10:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKqhN-000256-0Y for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 08:10:42 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:41301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKqhM-00024I-Oh for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 08:10:40 -0400 Received: by bkbzv15 with SMTP id zv15so1286968bkb.0 for ; Mon, 31 Oct 2011 05:10:39 -0700 (PDT) In-Reply-To: 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: =?UTF-8?Q?Gustav_Wikstr=C3=B6m?= Cc: emacs-orgmode@gnu.org Hello Gustav, 2011/10/31 Gustav Wikstr=C3=B6m : > Hello! > When defining a link-abbreviation to an org-file with a headline search I > manage to get it to work with the following syntax: > =C2=A0 #+LINK: foo =C2=A0 =C2=A0 file:/long/path/to/file/foo.org AFAIK, this is not required. Support for linking to org headlines is already built in. > =C2=A0 [[foo::::*heading inside foo]] This should be something like this: [[file:/path/to/file.org::*][Description]] > I have to use four ":" to be able to search, instead of the three I would > expect (expecting three since the first ":" is used to declare that I wan= t > to enter a tag and the following two are used inside the tag). Is this > intended behaviour? I am not sure what you are talking about here. Could you give an example to illustrate? > Also, it only seems to work for headline-search. I cannot get the regular > search to work. Can someone confirm this behaviour? For the regular search, something like this should be sufficient: [[file:/path/to/file.org::][Description]] > /Gustav Hope this helps. PS: org-mode has amazing info documentation. Please check them out. All of these are well covered there. For tutorials, you can check the community site Worg. --=20 Suvayu Open source is the future. It sets us free. From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 13:33:31 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d044469b75021c604b09772d7 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKr3X-00081k-BO for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 08:33:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKr3V-0007RL-JN for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 08:33:35 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:58170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKr3V-0007RC-F5 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 08:33:33 -0400 Received: by vws16 with SMTP id 16so340129vws.0 for ; Mon, 31 Oct 2011 05:33:33 -0700 (PDT) In-Reply-To: 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: suvayu ali Cc: emacs-orgmode@gnu.org --f46d044469b75021c604b09772d7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Suvayu! I know about the normal links and the possibility to search with these. The thing is that I want to use an abbreviation (see sec. 4.6 in the manual) to not have to type the path for this particular link every time. Instead of typing (1) [[file:/path/to/file.org::*][Description]] I want to be able to add an abbreviation in the beginning of the file the link is in, with (2): #+LINK: foo file:/long/path/to/file/foo.org and then use this abbreviation later in the text with (3): [[foo][Description]] ,and also be able to use searches with this abbreviation. And it is this syntax that seems a bit cumbersome to use when adding headline-searching to it (requiring four ":") and does not work when trying to use regular search. Unless I'm doing something wrong. I also know that I could add the "::%s" to the link, giving (4): #+LINK: foo file:/long/path/to/file/foo.org::%s but this makes it unusable as a simple file link without search. I intend to use the link in multiple places inside my document both with and without searches, thus I'm still wondering about this syntax-issue and the non-headline search. Regards Gustav (PS. sorry for the double-mail Suvayu. ) 2011/10/31 suvayu ali > Hello Gustav, > > 2011/10/31 Gustav Wikstr=F6m : > > Hello! > > When defining a link-abbreviation to an org-file with a headline search= I > > manage to get it to work with the following syntax: > > #+LINK: foo file:/long/path/to/file/foo.org > > AFAIK, this is not required. Support for linking to org headlines is > already built in. > > > [[foo::::*heading inside foo]] > > This should be something like this: > > > [[file:/path/to/file.org::*][Description]] > > > I have to use four ":" to be able to search, instead of the three I wou= ld > > expect (expecting three since the first ":" is used to declare that I > want > > to enter a tag and the following two are used inside the tag). Is this > > intended behaviour? > > I am not sure what you are talking about here. Could you give an > example to illustrate? > > > Also, it only seems to work for headline-search. I cannot get the regul= ar > > search to work. Can someone confirm this behaviour? > > For the regular search, something like this should be sufficient: > > [[file:/path/to/file.org::][Description]] > > > /Gustav > > Hope this helps. > > PS: org-mode has amazing info documentation. Please check them out. All > of these are well covered there. For tutorials, you can check the > community site Worg. > > -- > Suvayu > > Open source is the future. It sets us free. > --f46d044469b75021c604b09772d7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Suvayu!

I know about the normal links and the possibility to searc= h with these. The thing is that I want to use an abbreviation (see sec. 4.6= in the manual) to not have to type the path for this particular link every= time.

Instead of typing (1)
[[file:/pat= h/to/file.org::*<Heading_text>][Description]]

I want to be able to add an abbreviation in the beg= inning of the file the link is in, with (2):

#+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org

and then use this abbreviation later in the text with (3):

= [[foo][Description]]

,and also b= e able to use searches with this abbreviation. And it is this syntax that s= eems a bit cumbersome to use when adding headline-searching to it (requirin= g four ":") and does not work when trying to use regular search. = Unless I'm doing something wrong.

I also know= that I could add the "::%s" to the link, giving (4):

#+LINK: foo =A0 =A0 file:= /long/path/to/file/foo.org::%s

but this ma= kes it unusable as a simple file link without search. I intend to use the l= ink in multiple places inside my document both with and without searches, t= hus I'm still wondering about this syntax-issue and the non-headline se= arch.

Regards
Gustav
<= br>
(PS. sorry for the double-mail Suvayu. = )

2011/10/31 suvayu ali <fatkasuvayu+linux@g= mail.com>
Hello Gustav,

2011/10/31 Gustav Wikstr=F6m <g= ustav.erik@gmail.com>:
> Hello!
> When defining a link-abbreviation to an org-file with a headline searc= h I
> manage to get it to work with the following syntax:
> =A0 #+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org

AFAIK, this is not required. Support for linking to org headlines is<= br> already built in.

> =A0 [[foo::::*heading inside foo]]

This should be something like this:


[[file:/path/to/file.org::*<Heading_text>][Description]]

> I have to use four ":" to be able to search, instead of the = three I would
> expect (expecting three since the first ":" is used to decla= re that I want
> to enter a tag and the following two are used inside the tag). Is this=
> intended behaviour?

I am not sure what you are talking about here. Could you give an
example to illustrate?

> Also, it only seems to work for headline-search. I cannot get the regu= lar
> search to work. Can someone confirm this behaviour?

For the regular search, something like this should be sufficient:

[[file:/path/to/file.org::<search_phrase>][Description]]

> /Gustav

Hope this helps.

PS: org-mode has amazing info documentation. Please check them out. All
=A0 =A0of these are well covered there. For tutorials, you can check the =A0 =A0community site Worg.

--
Suvayu

Open source is the future. It sets us free.

--f46d044469b75021c604b09772d7-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 14:01:21 +0100 Message-ID: <20111031140121.3a8d02de@kuru.homelinux.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:52020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKrUa-0005w4-Ph for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 09:01:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKrUX-0006Qz-T1 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 09:01:32 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:64644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKrUX-0006QL-Nc for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 09:01:29 -0400 Received: by bkbzv15 with SMTP id zv15so1345510bkb.0 for ; Mon, 31 Oct 2011 06:01:28 -0700 (PDT) In-Reply-To: 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: Gustav =?UTF-8?B?V2lrc3Ryw7Zt?= Cc: emacs-orgmode@gnu.org On Mon, 31 Oct 2011 13:33:31 +0100 Gustav Wikstr=C3=B6m wrote: > Hi Suvayu! >=20 > I know about the normal links and the possibility to search with > these. The thing is that I want to use an abbreviation (see sec. 4.6 > in the manual) to not have to type the path for this particular link > every time. >=20 > Instead of typing (1) >=20 > [[file:/path/to/file.org::*][Description]] >=20 > I want to be able to add an abbreviation in the beginning of the file > the link is in, with (2): >=20 > #+LINK: foo file:/long/path/to/file/foo.org >=20 > and then use this abbreviation later in the text with (3): >=20 > [[foo][Description]] >=20 Okay now I follow you. I believe you are misunderstanding the syntax. It should be like this (copying from my test example): #+LINK: odir file:~/org/coding.org:: [[odir:Distributed%20analysis][Distributed analysis]] [[odir:#ganga][Ganga]] That said I had trouble getting the search to work with org files but I will admit I did not try hard enough. > ,and also be able to use searches with this abbreviation. And it is > this syntax that seems a bit cumbersome to use when adding > headline-searching to it (requiring four ":") and does not work when > trying to use regular search. Unless I'm doing something wrong. >=20 > I also know that I could add the "::%s" to the link, giving (4): >=20 > #+LINK: foo file:/long/path/to/file/foo.org::%s >=20 > but this makes it unusable as a simple file link without search. I > intend to use the link in multiple places inside my document both > with and without searches, thus I'm still wondering about this > syntax-issue and the non-headline search. >=20 How is it unusable? Shouldn't the following work with the above setting? [[foo:][Description]] [[foo:*][Description]] Of course I didn't have the time to test this variation, so indeed there could be a bug. :-p > Regards > Gustav >=20 > (PS. sorry for the double-mail Suvayu. ) >=20 No worries. Hope the above suggestions help. --=20 Suvayu Open source is the future. It sets us free. From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 14:55:27 +0100 Message-ID: References: <20111031140121.3a8d02de@kuru.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKsKs-0001B6-1X for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 09:55:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKsKm-000341-AK for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 09:55:34 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:36190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKsKm-00033p-6N for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 09:55:28 -0400 Received: by vws16 with SMTP id 16so440308vws.0 for ; Mon, 31 Oct 2011 06:55:27 -0700 (PDT) In-Reply-To: <20111031140121.3a8d02de@kuru.homelinux.net> 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: Suvayu Ali Cc: emacs-orgmode@gnu.org 2011/10/31 Suvayu Ali : ... >> I also know that I could add the "::%s" to the link, giving (4): >> >> #+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org::%s >> >> but this makes it unusable as a simple file link without search. I >> intend to use the link in multiple places inside my document both >> with and without searches, thus I'm still wondering about this >> syntax-issue and the non-headline search. >> > > How is it unusable? Shouldn't the following work with the above setting? > > [[foo:][Description]] > [[foo:*][Description]] > > Of course I didn't have the time to test this variation, so indeed there > could be a bug. :-p This works when adding "::" to the end of the link. But with this setting I cannot use the link as a simple file-link, eg. the following does not work: #+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org:: [[foo][Description]] When trying to follow this link I get an error saying that there is "no such file: /long/path/to/file/foo.org::" /Gustav From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 15:09:16 +0100 Message-ID: <20111031150916.6c385c44@kuru.homelinux.net> References: <20111031140121.3a8d02de@kuru.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKsYF-0006vP-VL for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 10:09:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKsYE-0006QP-50 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 10:09:23 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:63440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKsYE-0006QL-0W for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 10:09:22 -0400 Received: by faat2 with SMTP id t2so3799685faa.0 for ; Mon, 31 Oct 2011 07:09:21 -0700 (PDT) In-Reply-To: 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: Gustav =?UTF-8?B?V2lrc3Ryw7Zt?= Cc: emacs-orgmode@gnu.org Hi Gustav, On Mon, 31 Oct 2011 14:55:27 +0100 Gustav Wikstr=C3=B6m wrote: > This works when adding "::" to the end of the link. But with this > setting I cannot use the link as a simple file-link, eg. the following > does not work: >=20 > #+LINK: foo =C2=A0 =C2=A0 file:/long/path/to/file/foo.org:: > [[foo][Description]] >=20 > When trying to follow this link I get an error saying that there is > "no such file: /long/path/to/file/foo.org::" Of course that won't work! The resulting link is not a valid link syntax. Since you don't specify a tag, the final link looks like this: [[file:/path/to/file.org::]] which is incorrect. =46rom a test the following worked nicely. #+LINK: odir2 file:~/org/coding.org [[odir2][link to file]] So in conclusion, if you want to use both bare file/directory links as well as headline/search links, you would have to define two separate link shortcuts. Hope that helps. --=20 Suvayu Open source is the future. It sets us free. From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 18:50:47 +0100 Message-ID: References: <20111031140121.3a8d02de@kuru.homelinux.net> <20111031150916.6c385c44@kuru.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKw0Z-00009X-G7 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 13:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKw0Y-0001dA-3P for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 13:50:51 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:37227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKw0X-0001d0-TN for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 13:50:50 -0400 Received: by eye4 with SMTP id 4so6034474eye.0 for ; Mon, 31 Oct 2011 10:50:48 -0700 (PDT) In-Reply-To: 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: Suvayu Ali , emacs-orgmode@gnu.org 2011/10/31 Suvayu Ali : > Hi Gustav, > > On Mon, 31 Oct 2011 14:55:27 +0100 > Gustav Wikstr=F6m wrote: > >> This works when adding "::" to the end of the link. But with this >> setting I cannot use the link as a simple file-link, eg. the following >> does not work: >> >> #+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org:: >> [[foo][Description]] >> >> When trying to follow this link I get an error saying that there is >> "no such file: /long/path/to/file/foo.org::" > > Of course that won't work! The resulting link is not a valid link > syntax. Since you don't specify a tag, the final link looks like this: > > [[file:/path/to/file.org::]] > > which is incorrect. > > From a test the following worked nicely. > > #+LINK: odir2 file:~/org/coding.org > > [[odir2][link to file]] > > So in conclusion, if you want to use both bare file/directory links as > well as headline/search links, you would have to define two separate > link shortcuts. Yes, I'm aware of this. And this is the reason of my initial question. Should it really be necessary to specify two separate links to the same file when I want to both link to the file directly and link it with a search? Thus, this works: =A0#+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org =A0[[foo::::*]] but this does not: =A0#+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org =A0[[foo::::]] I find the use of four ":" a bit strange, but I guess this is only a limit of my understanding a.t.m. In my view the first colon should be stating the start of the "tag" and the rest of the string the tag itself. This leaves three colons for the tag which in my view is one to many. But it seems to work. And this is what I'm scratching my head about. I also suspect a bug hidden somewhere, since headlines can be searched for but not text inside the document. Anyone got any input on this? /Gustav From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Re: Link abbreviations, org-files with searches Date: Mon, 31 Oct 2011 22:00:56 +0100 Message-ID: References: <20111031140121.3a8d02de@kuru.homelinux.net> <20111031150916.6c385c44@kuru.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKyya-00015p-4l for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:01:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKyyY-0001uM-VX for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:01:00 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:45114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKyyY-0001uD-Lz for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:00:58 -0400 Received: by eye4 with SMTP id 4so6227343eye.0 for ; Mon, 31 Oct 2011 14:00:57 -0700 (PDT) In-Reply-To: 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: Suvayu Ali , emacs-orgmode@gnu.org I did some digging and ended at the function org-link-expand-abbrev. According to the org-documentation, abbreviations should be written with: [[linkword:tag]] however the regular expression doing the matching in the function also allows the following: [[linkword::tag]] The greed of the regular expression makes it a requirement to use four colons when using abbreviation and search. Also, all types of searching works, not only the headline-search as I stated earlier. Just wanted to clear this out /Gustav 2011/10/31 Gustav Wikstr=F6m : > 2011/10/31 Suvayu Ali : >> Hi Gustav, >> >> On Mon, 31 Oct 2011 14:55:27 +0100 >> Gustav Wikstr=F6m wrote: >> >>> This works when adding "::" to the end of the link. But with this >>> setting I cannot use the link as a simple file-link, eg. the following >>> does not work: >>> >>> #+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org:: >>> [[foo][Description]] >>> >>> When trying to follow this link I get an error saying that there is >>> "no such file: /long/path/to/file/foo.org::" >> >> Of course that won't work! The resulting link is not a valid link >> syntax. Since you don't specify a tag, the final link looks like this: >> >> [[file:/path/to/file.org::]] >> >> which is incorrect. >> >> From a test the following worked nicely. >> >> #+LINK: odir2 file:~/org/coding.org >> >> [[odir2][link to file]] >> >> So in conclusion, if you want to use both bare file/directory links as >> well as headline/search links, you would have to define two separate >> link shortcuts. > > Yes, I'm aware of this. And this is the reason of my initial question. > Should it really be necessary to specify two separate links to the > same file when I want to both link to the file directly and link it > with a search? > > Thus, this works: > > =A0=A0#+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org > =A0=A0[[foo::::*]] > > but this does not: > > =A0#+LINK: foo =A0 =A0 file:/long/path/to/file/foo.org > =A0[[foo::::]] > > I find the use of four ":" a bit strange, but I guess this is only a > limit of my understanding a.t.m. In my view the first colon should be > stating the start of the "tag" and the rest of the string the tag > itself. This leaves three colons for the tag which in my view is one > to many. But it seems to work. And this is what I'm scratching my head > about. > > I also suspect a bug hidden somewhere, since headlines can be searched > for but not text inside the document. > > Anyone got any input on this? > /Gustav >