emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: Matt Lundin <mdl@imapmail.org>
Cc: "Gustav Wikström" <gustav.erik@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Re: Bug: UTF-8 characters in #+LINK does not work [7.4]
Date: Mon, 31 Jan 2011 21:20:28 +0100	[thread overview]
Message-ID: <87d3nchlkj.fsf@keller.adm.naquadah.org> (raw)
In-Reply-To: <87d3nfagzo.fsf@fastmail.fm> (Matt Lundin's message of "Sat, 29 Jan 2011 10:04:27 -0500")


[-- Attachment #1.1.1: Type: text/plain, Size: 257 bytes --]

On Sat, Jan 29 2011, Matt Lundin wrote:

> The regexp in org-link-expand-abbrev does not allow for accented
> characters in the link abbreviation. I am not sure whether this is an
> intended limitation or a bug. :)

I don't see any reason. Patch attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-Allow-more-char-type-in-link-abbrev.patch --]
[-- Type: text/x-diff, Size: 974 bytes --]

From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 31 Jan 2011 21:19:07 +0100
Subject: [PATCH] Allow more char type in link abbrev

* org.el (org-link-expand-abbrev): Allow any type of character
in link expand.

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/org.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 808c9ed..044d2ac 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8185,7 +8185,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 "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link)
       (let* ((key (match-string 1 link))
 	     (as (or (assoc key org-link-abbrev-alist-local)
 		     (assoc key org-link-abbrev-alist)))
-- 
1.7.2.3


[-- Attachment #1.1.3: Type: text/plain, Size: 53 bytes --]


-- 
Julien Danjou
❱ http://julien.danjou.info

[-- Attachment #1.2: Type: application/pgp-signature, Size: 835 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2011-01-31 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19  8:00 Bug: UTF-8 characters in #+LINK does not work [7.4] Gustav Wikström
2011-01-29 15:04 ` Matt Lundin
2011-01-31 20:20   ` Julien Danjou [this message]
2011-01-31 20:36     ` [Accepted] " Bastien Guerry

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=87d3nchlkj.fsf@keller.adm.naquadah.org \
    --to=julien@danjou.info \
    --cc=emacs-orgmode@gnu.org \
    --cc=gustav.erik@gmail.com \
    --cc=mdl@imapmail.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).