Bug: inconsistent escaping of coderef regexp

2021-01-04 Thread Tom Gillespie
It is not possible to strip coderefs when tangling and also search for those coderefs using org-link-search. This is because org-link-search uses org-src-coderef-regexp which calls regexp-quote on the regexp string while org-babel-tangle-single-block does not and uses the regexp string directly wit

Re: Bug: inconsistent escaping of coderef regexp

2021-04-07 Thread Nicolas Goaziou
Hello, Tom Gillespie writes: > We can decouple them, so not an issue. The attached patch implements > the header arg equivalents of -r and -l without making any changes to the > existing switch behavior. This is already conflating the two. I'd like to solve the issue at hand without having head

Re: Bug: inconsistent escaping of coderef regexp

2021-04-07 Thread Tom Gillespie
Hi Nicolas, 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. I think there are two new threads that I need to create. One is related to how to make it possible to specify what should be removed along w

Re: Bug: inconsistent escaping of coderef regexp

2021-04-09 Thread Nicolas Goaziou
Hello, Tom Gillespie 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/li

Re: Bug: inconsistent escaping of coderef regexp

2021-04-01 Thread Nicolas Goaziou
Hello, Tom Gillespie writes: > It is not possible to strip coderefs when tangling and also search for > those coderefs using org-link-search. This is because org-link-search > uses org-src-coderef-regexp which calls regexp-quote on the regexp > string while org-babel-tangle-single-block does not

Re: Bug: inconsistent escaping of coderef regexp

2021-04-01 Thread Timothy
Nicolas Goaziou writes: > Switches predate Babel and its header arguments. Also, they are > orthogonal to Babel. I don't know what a sound design would be here, > tho. Breaking backwards comparability is a tough call, but somehow I feel that it would be appropriate here. A number of reasons wh

Re: Bug: inconsistent escaping of coderef regexp

2021-04-04 Thread Tom Gillespie
Hi Nicolas, After a bit of investigation I understand the issue better now. There are two problems here. One is an easy single line change, the other is a deeper issue, which is that it is impossible for the user to specify their own coderef regexp that can be used in both cases. No matter what

Re: Bug: inconsistent escaping of coderef regexp

2021-04-04 Thread Nicolas Goaziou
Hello, Tom Gillespie writes: > After a bit of investigation I understand the issue better now. > There are two problems here. One is an easy single line change, > the other is a deeper issue, which is that it is impossible for the > user to specify their own coderef regexp that can be used i

Re: Bug: inconsistent escaping of coderef regexp

2021-04-04 Thread Tom Gillespie
Hi Nicolas, I've attached a patch with a first pass implementation that I think resolves most of the issues. It probably needs a few tests to go along with it, but I think it is the simplest way forward. I tried to make the changes without disrupting the org-babel info structure, but it comes wi

Re: Bug: inconsistent escaping of coderef regexp

2021-04-05 Thread Tom Gillespie
Missed removing a debug message. Here is the correct patch. Best, Tom On Sun, Apr 4, 2021 at 10:22 PM Tom Gillespie wrote: > > Hi Nicolas, >I've attached a patch with a first pass implementation that I think > resolves most of the issues. It probably needs a few tests to go along > with it, b