From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [patch] Link abbreviations : left-trim the tag Date: Sat, 20 Jun 2009 21:22:40 +0200 Message-ID: <44E53444-9384-421F-B3DB-D6A1AF8CD416@gmail.com> References: <51b0095d0906191456j5fbd9be4l8e17ea9c26bd29d7@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MI69J-0007Sk-Mq for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 15:22:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MI69E-0007E9-I8 for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 15:22:48 -0400 Received: from [199.232.76.173] (port=34952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MI69E-0007Dt-Ck for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 15:22:44 -0400 Received: from mail-ew0-f220.google.com ([209.85.219.220]:62755) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MI69E-0005bV-21 for emacs-orgmode@gnu.org; Sat, 20 Jun 2009 15:22:44 -0400 Received: by ewy20 with SMTP id 20so340929ewy.42 for ; Sat, 20 Jun 2009 12:22:43 -0700 (PDT) In-Reply-To: <51b0095d0906191456j5fbd9be4l8e17ea9c26bd29d7@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Girard Cc: emacs-orgmode@gnu.org Hmmm, this is inconsistent with all the other link syntax, like http: or news: or whatever.... - Carsten On Jun 19, 2009, at 11:56 PM, Nicolas Girard wrote: > Hi, > the following patch left-trims the tag in a link abbreviation ; this > allows to write > [[google: org-mode]] > for better readability. > > -- > Nicolas > > > diff --git a/lisp/org.el b/lisp/org.el > index 07d790f..8aef3c7 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -6830,7 +6830,7 @@ call CMD." > > (defun org-link-expand-abbrev (link) > "Apply replacements as defined in `org-link-abbrev-alist." > - (if (string-match "^\\([a-zA-Z][-_a-zA-Z0-9]*\\)\\(::?\\(.*\\)\\)? > $" link) > + (if (string-match "^\\([a-zA-Z][-_a-zA-Z0-9]*\\)\\(::?[ > \t]*\\(.*\\)\\)?$" link) > (let* ((key (match-string 1 link)) > (as (or (assoc key org-link-abbrev-alist-local) > (assoc key org-link-abbrev-alist))) > > > _______________________________________________ > 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