Re: [FR] :noweb-wrap header arg

2024-12-10 Thread Suhail Singh
Ihor Radchenko writes: > Thinking about this more in the context of the past meetup discussion, > maybe we can just go with two header arguments? :noweb-start :noweb-end? > Or, alternatively, we can use a single string and a placeholder for the > noweb reference name. Something like :noweb-wrap "

Re: [FR] :noweb-wrap header arg

2024-12-08 Thread Ihor Radchenko
Ihor Radchenko writes: > Amy Grinn writes: > >>> I recommend the following: >>> >>> If the value starts from ", use Elisp's `read': >>>|"# <<" ">>" >>>(read (current-buffer)) ; => "# <<" >>>otherwise, consider read until the first whitespace. >>>|#<<; >>; >>>(re-search-forwa

Re: [FR] :noweb-wrap header arg

2024-07-01 Thread Ihor Radchenko
Ihor Radchenko writes: >> Let me know what you think! > > Consider cases like > ... It has been over a month since the last message in this thread. Amy, may I know if you are still working on the patch? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at

Re: [FR] :noweb-wrap header arg

2024-05-23 Thread Ihor Radchenko
Amy Grinn writes: >> I recommend the following: >> >> If the value starts from ", use Elisp's `read': >>|"# <<" ">>" >>(read (current-buffer)) ; => "# <<" >>otherwise, consider read until the first whitespace. >>|#<<; >>; >>(re-search-forward (rx (1+ (not whitespace >>

Re: [FR] :noweb-wrap header arg

2024-05-22 Thread Amy Grinn
Ihor Radchenko writes: > Amy Grinn writes: > >>> +1 >>> You may even use obsolete alias (add it to lisp/org-compat.el) >> >> Here's a patch to rename org-babel-noweb-wrap to >> org-babel-noweb-make-regexp. > > Thanks! > News entry is not necessary here - we are just renaming a function. > Otherw

Re: [FR] :noweb-wrap header arg

2024-05-12 Thread Ihor Radchenko
Amy Grinn writes: >> +1 >> You may even use obsolete alias (add it to lisp/org-compat.el) > > Here's a patch to rename org-babel-noweb-wrap to > org-babel-noweb-make-regexp. Thanks! News entry is not necessary here - we are just renaming a function. Otherwise, the patch looks good. I am not yet

Re: [FR] :noweb-wrap header arg

2024-05-11 Thread Amy Grinn
Ihor Radchenko writes: > Amy Grinn writes: > >> First of all, I would like to change (defalias) the function name >> org-babel-noweb-wrap to org-babel-noweb-make-regexp. I think this in >> more in line with other functions which create regular expressions. > > +1 > You may even use obsolete alia

Re: [FR] :noweb-wrap header arg

2024-04-13 Thread Ihor Radchenko
Amy Grinn writes: >>> +(while (< (point) (point-max)) >>> + (unless (looking-at " *\"\\([^\"]+\\)\" *") >>> +(looking-at " *\\([^ ]+\\)")) >> >> May you please explain the rationale behind this regexp? AFAIU, it >> implies that you want to allow whitespace characters

Re: [FR] :noweb-wrap header arg

2024-04-11 Thread Amy Grinn
Ihor Radchenko writes: > Amy Grinn writes: > >> +(insert raw) >> +(goto-char (point-min)) >> +(while (< (point) (point-max)) >> + (unless (looking-at " *\"\\([^\"]+\\)\" *") >> +(looking-at " *\\([^ ]+\\)")) > > May you please explain the rationale be

Re: [FR] :noweb-wrap header arg

2024-04-11 Thread Ihor Radchenko
Amy Grinn writes: > First of all, I would like to change (defalias) the function name > org-babel-noweb-wrap to org-babel-noweb-make-regexp. I think this in > more in line with other functions which create regular expressions. +1 You may even use obsolete alias (add it to lisp/org-compat.el) >

[FR] :noweb-wrap header arg

2024-04-08 Thread Amy Grinn
Hi! I'm working on the :noweb-wrap header argument which controls the syntax of noweb references in a babel src block. For example: #+name: foo #+begin_src elisp :foo #+end_src #+begin_src elisp :noweb yes :noweb-wrap <<< >>> <<>> #+end_src And I would like some feedback... First of all,