emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [feature] Macros can't contain accents
@ 2012-06-22 19:51 Sebastien Vauban
  2012-06-22 19:57 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Vauban @ 2012-06-22 19:51 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

The following macro won't work:

--8<---------------cut here---------------start------------->8---
#+MACRO: max-déductible-remboursement-capital 2120.00

For 2011, the maximum is *{{{max-déductible-remboursement-capital}}} \EUR*.
--8<---------------cut here---------------end--------------->8---

When replacing `é' by `e', it does work.

I don't know if it's a bug, neither if corrective action needs to be taken.
Just signalling it...

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [feature] Macros can't contain accents
  2012-06-22 19:51 [feature] Macros can't contain accents Sebastien Vauban
@ 2012-06-22 19:57 ` Nicolas Goaziou
       [not found]   ` <4FE55CCB.2000102@christianmoe.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-06-22 19:57 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> Hello,
>
> The following macro won't work:
>
> #+MACRO: max-déductible-remboursement-capital 2120.00
>
> For 2011, the maximum is *{{{max-déductible-remboursement-capital}}} \EUR*.
>
> When replacing `é' by `e', it does work.
>
> I don't know if it's a bug, neither if corrective action needs to be taken.
> Just signalling it...

Here is the regexp for a macro:

"{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\(([ \t\n]*\\([^\000]*?\\))\\)?}}}"

Its name must start with a letter and can only contain letter, numbers,
hyphens and underscores.  There is the same kind of limitation for
target names and probably other references (custom-id maybe).


Regards,

-- 
Nicolas Goaziou

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

* Re: [feature] Macros can't contain accents
       [not found]   ` <4FE55CCB.2000102@christianmoe.com>
@ 2012-06-23  8:58     ` Nicolas Goaziou
  2012-06-24  7:56       ` Christian Moe
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-06-23  8:58 UTC (permalink / raw)
  To: mail; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sebastien Vauban



Hello,

Christian Moe <mail@christianmoe.com> writes:

> Accented and a variety of other non-ascii characters do work in
> targets, IDs and CUSTOM_IDs, in my experience.

Right.

> Org-target-regexp is simply "<<\\([^<>]+\\)>>", so it's not
> picky. Perhaps the same could be done for macros (replacing angle
> brackets with curly braces), without screwing anything up...?

I'd rather do the opposite and restrict them all: this kind of regexp is
slow to parse and there is little gain to allow any character in targets
since they are all invisible now.


Regards,

-- 
Nicolas Goaziou

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

* Re: [feature] Macros can't contain accents
  2012-06-23  8:58     ` Nicolas Goaziou
@ 2012-06-24  7:56       ` Christian Moe
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Moe @ 2012-06-24  7:56 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sebastien Vauban



On 6/23/12 10:58 AM, Nicolas Goaziou wrote:

>> Accented and a variety of other non-ascii characters do work in
>> targets, IDs and CUSTOM_IDs, in my experience.
>
> Right.
>
>> Org-target-regexp is simply "<<\\([^<>]+\\)>>", so it's not
>> picky. Perhaps the same could be done for macros (replacing angle
>> brackets with curly braces), without screwing anything up...?
>
> I'd rather do the opposite and restrict them all: this kind of regexp is
> slow to parse and there is little gain to allow any character in targets
> since they are all invisible now.

My user perspective differs: I'm happy to be able to use my 
language(s) freely in Org, even in the invisible bits, and would not 
trade it in for a speedup.

That said, I don't particularly mind the status quo on macros. They're 
code-like, and we're used to ascii restrictions on computer code.

Yours,
Christian

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

end of thread, other threads:[~2012-06-24  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 19:51 [feature] Macros can't contain accents Sebastien Vauban
2012-06-22 19:57 ` Nicolas Goaziou
     [not found]   ` <4FE55CCB.2000102@christianmoe.com>
2012-06-23  8:58     ` Nicolas Goaziou
2012-06-24  7:56       ` Christian Moe

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