emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: bug in template expansion in org-fill-template


From: Ihor Radchenko
Subject: Re: Patch: bug in template expansion in org-fill-template
Date: Sat, 30 Apr 2022 17:49:34 +0800

Andrew Arensburger <arensb@ooblick.com> writes:

> There appears to be a bug in `org-fill-template' (in lisp/org-macs.el): 
> keys to be expanded are sorted by increasing length, so that "noweb" is 
> processed before "noweb-ref". As a result, if a template includes 
> "%noweb-ref", `org-fill-template' will expand it as "%{noweb}-ref" 
> rather than "%{noweb-ref}".
>
> As far as I can tell, this bug has existed since `org-fill-template' was 
> added, in e8ef16306ca56af2dceb9e2be0b57c930e9b5584 . I tried to trace it 
> as back as I could, to see whether there was a good reason for sorting 
> keys this way, but couldn't find one.
>
> I'm including a patch with a test to find buggy behavior, and another to 
> fix it.

Thanks!
Applied to main as 82a09ba0a and 4a30e8cc0 with some amendments to the
commit messages: Fixed "." in the commit summary and added "  " between
sentences; (2) Added TINYCHANGE cookies as you do not appear to have
copyright assignment.

Note that you may need to do copyright paperwork if you decide to
contribute in future. See
https://orgmode.org/worg/org-contribute.html#copyright

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]