emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: UTF-8 characters in #+LINK does not work [7.4]
@ 2011-01-19  8:00 Gustav Wikström
  2011-01-29 15:04 ` Matt Lundin
  0 siblings, 1 reply; 4+ messages in thread
From: Gustav Wikström @ 2011-01-19  8:00 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 411 bytes --]

Using characters such as å,ä,ö does not work when using #+LINK

example:

`#+LINK: Färdmedel file:~/färdmedel.org <http://xn--frdmedel-0za.org>'

this does not work, however the following does:

`#+LINK: Fardmedel file:~/färdmedel.org <http://xn--frdmedel-0za.org>'

Is there an easy fix?

Emacs  : GNU Emacs 23.2.1 (i386-mingw-nt6.1.7600)
 of 2010-05-08 on G41R2F1
Package: Org-mode version 7.4

[-- Attachment #1.2: Type: text/html, Size: 623 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: UTF-8 characters in #+LINK does not work [7.4]
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Lundin @ 2011-01-29 15:04 UTC (permalink / raw)
  To: Gustav Wikström; +Cc: emacs-orgmode

Gustav Wikström <gustav.erik@gmail.com> writes:

> Using characters such as å,ä,ö does not work when using #+LINK
>
> example:
>
> `#+LINK: Färdmedel file:~/färdmedel.org'
>
> this does not work, however the following does:
>
> `#+LINK: Fardmedel file:~/färdmedel.org'
>
> Is there an easy fix?
>

I can confirm this. 

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

Best,
Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: Bug: UTF-8 characters in #+LINK does not work [7.4]
  2011-01-29 15:04 ` Matt Lundin
@ 2011-01-31 20:20   ` Julien Danjou
  2011-01-31 20:36     ` [Accepted] " Bastien Guerry
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Danjou @ 2011-01-31 20:20 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Gustav Wikström, emacs-orgmode


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Accepted] Re: Bug: UTF-8 characters in #+LINK does not work [7.4]
  2011-01-31 20:20   ` Julien Danjou
@ 2011-01-31 20:36     ` Bastien Guerry
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien Guerry @ 2011-01-31 20:36 UTC (permalink / raw)
  To: emacs-orgmode

Patch 568 (http://patchwork.newartisans.com/patch/568/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87d3nchlkj.fsf%40keller.adm.naquadah.org%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Re: Bug: UTF-8 characters in #+LINK does not work [7.4]
> Date: Tue, 01 Feb 2011 01:20:28 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 568
> Message-Id: <87d3nchlkj.fsf@keller.adm.naquadah.org>
> To: Matt Lundin <mdl@imapmail.org>
> Cc: Gustav =?utf-8?Q?Wikstr=C3=B6m?= <gustav.erik@gmail.com>,
> 	emacs-orgmode@gnu.org
> 
> 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.
> 
> 
> >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
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-31 20:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-01-31 20:36     ` [Accepted] " Bastien Guerry

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