emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Girard <nicolas.girard@nerim.net>
To: emacs-orgmode@gnu.org
Subject: [patch] Link abbreviations : left-trim the tag
Date: Fri, 19 Jun 2009 23:56:36 +0200	[thread overview]
Message-ID: <51b0095d0906191456j5fbd9be4l8e17ea9c26bd29d7@mail.gmail.com> (raw)

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

             reply	other threads:[~2009-06-19 21:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 21:56 Nicolas Girard [this message]
2009-06-20 19:22 ` [patch] Link abbreviations : left-trim the tag Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51b0095d0906191456j5fbd9be4l8e17ea9c26bd29d7@mail.gmail.com \
    --to=nicolas.girard@nerim.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).