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