emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Bug: inconsistent escaping of coderef regexp


From: Nicolas Goaziou
Subject: Re: Bug: inconsistent escaping of coderef regexp
Date: Sat, 10 Apr 2021 00:19:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello,

Tom Gillespie <tgbugs@gmail.com> writes:

>     I've included the simplest patch I could come up with for the
> divergence in behavior between org-babel-tangle-single-file and
> org-link-search.

Thank you. I applied it.

> https://code.orgmode.org/bzg/org-mode/src/2d78ea57cfad1ddc3e993c949daf117b76315170/lisp/org-src.el#L882
>
> That line defines a hardcoded regular expression for matching
> coderefs.

It is a reasonable one, however, since it just means "the coderef is the
last thing on the line".

> The codref prefix is the first =[ \t]*= and the coderef
> regexp is the equivalent to the fully formatted version of that format
> string. Neither of those can currently be specified by the user. 

[...]

> The coderef prefix is something that should probably be configurable
> by the user so that empty comments are not left in the file.

I'm not convinced this should be configurable, as I fail to see
a use-case for such a customization. Note that in the case you mention,
comment syntax should probably be part of the coderef label itself.

Regards,
-- 
Nicolas Goaziou



reply via email to

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