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--