Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-01 Thread Nafiz Islam
> May you please describe what kind of feature you want to introduce and > explain why it is useful for other Org mode users? The feature I want to introduce is to allow the headline parameter to be a function for the `file+headline' target for the `org-capture-templates'. The function would take

Re: link can not be created in a line with another link.

2024-05-01 Thread Ihor Radchenko
Alexandros Prekates writes: > I give a couple of examples that i think highligth some foggy semantics > of links. > > In the example below . is the pointer and single quotes is for > recognized links and $ for the start of the line. > >$[[foo]]. >$'foo'. >$.'foo' // here while

Re: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get'

2024-05-01 Thread Ihor Radchenko
Morgan Smith writes: > The comment written just above `org-element-properties-map' says this: > > #+BEGIN_SRC elisp > ;; There is purposely no function like `org-element-properties' that > ;; returns a list of properties. Such function would tempt the users > ;; to (1) run it, creating a whole n

Re: link can not be created in a line with another link.

2024-05-01 Thread Alexandros Prekates
On Mon, 29 Apr 2024 13:19:15 + Ihor Radchenko wrote: > Alexandros Prekates writes: > > > The same behavior happens with emacs -Q. > > > > Having <> and <> anchors somewhere in an org file > > in a line a have an internal link : > > > > bla [[foo]] > > > > If i add : > > [[boo]] bla [[foo]]

Re: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get'

2024-05-01 Thread Morgan Smith
Ihor Radchenko writes: > Morgan Smith writes: >>> Also, with the old approach, if you observe slowdowns, you likely have >>> some property being calculated slowly (like BLOCKED in my case). Do you >>> happen to know which property is it for your setup? >> >> According to my profiler, I think it'

Re: [PATCH] Add support for shortdoc link type

2024-05-01 Thread Bruno Cardoso
On 2024-05-01, 17:55 +, Ihor Radchenko wrote: > Bruno Cardoso writes: > >> Thanks for your comments. See attached the updated patch. > > Thanks for the update! > >> +- =shortdoc= :: >> + >> + Link to short documentation summary for a function group. > > Might be useful to throw a link to E

Re: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get'

2024-05-01 Thread Ihor Radchenko
Morgan Smith writes: >> Also, with the old approach, if you observe slowdowns, you likely have >> some property being calculated slowly (like BLOCKED in my case). Do you >> happen to know which property is it for your setup? > > According to my profiler, I think it's using 30% of the CPU time duri

Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends

2024-05-01 Thread Ihor Radchenko
Matt writes: > I disagree with one aspect: we shouldn't use Worg as a source of > truth. The argument holds based on historical behavior of :cmdline. > AFAIU, Worg is a wiki which is open, more or less, to anyone. Worg > contents, AFAIU, have not always undergone review. The manual should > be th

Re: [PATCH] Add support for shortdoc link type

2024-05-01 Thread Ihor Radchenko
Bruno Cardoso writes: > Thanks for your comments. See attached the updated patch. Thanks for the update! > +- =shortdoc= :: > + > + Link to short documentation summary for a function group. Might be useful to throw a link to Emacs manual here - [[info:emacs#Name Help]] > +*** =ol.el=: Suppor

Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends

2024-05-01 Thread Matt
On Sat, 27 Apr 2024 12:53:25 +0200 Max Nikulin wrote --- > On 26/04/2024 20:09, Ihor Radchenko wrote: > > Max Nikulin writes: > > > >> However looking wider, I do not like that :cmdline for ob-shell has > >> different meaning than for other languages, see e.g. ob-sql. Only for > >>

Re: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-01 Thread Ihor Radchenko
Greg Minshall writes: > with such a fix, then if a language is not loaded that could accept a > :var, either an error would be thrown, or maybe the language would be > loaded? (i would vote for the error, but ...) The idea is to use something like `org-cite-try-load-processor', but for babel ba

Re: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-01 Thread Greg Minshall
Ihor, > > or some such to disable *that*? > > I do not recall many people asking for such a feature. no, i don't either. :) > It might be. But the real fix should be adding babel API to allow > backends declaring the list of supported features. > Such API is relatively easy to implement. with

Re: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get'

2024-05-01 Thread Morgan Smith
Ihor Radchenko writes: > > However, please move the obsolete function definition to org-compat > instead of removing it completely. We do it to avoid unexpected breakage > for people and libraries who happen to use this public function. Done. See attached > Also, with the old approach, if you o

Re: [PATCH] Add support for shortdoc link type

2024-05-01 Thread Bruno Cardoso
Hi Ihor, Thanks for your comments. See attached the updated patch. diff --git a/doc/org-manual.org b/doc/org-manual.org index d66d95a22..c9e307c94 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -3372,6 +3372,10 @@ Here is the full set of built-in link types: Execute a shell com

Re: Cant expand a heading with tab : Subtree (no children)

2024-05-01 Thread Alexandros Prekates
On Sun, 28 Apr 2024 12:37:38 + Ihor Radchenko wrote: > Alexandros Prekates writes: > > > Emacs: 29.1 > > > > It happens daily , not initially , but after some hour(s) of using > > an org file to try to expand a heading ,that i know that it has > > subheadings , and it wont expand and see in

Re: link can not be created in a line with another link.

2024-05-01 Thread Alexandros Prekates
On Wed, 1 May 2024 17:59:11 +0700 Max Nikulin wrote: > On 29/04/2024 19:45, Alexandros Prekates wrote: > > > > The same behavior happens with emacs -Q. > > > > bla [[foo]] > > > > If i add : > > [[boo]] bla [[foo]] > > org will create the two links. > > > > But if i add: > > [[boo][ bla [[fo

Re: [BUG] Attachments not resolved correctly from symlinked Org files

2024-05-01 Thread Karthik Chikmagalur
> I can see the problem. > But what would you expect to happen if there was no attachment in the > original directory? Should the attachment be created relative to the > original file? To the symlink? I don't know. I would expect the attachment to always be created relative to the original file,

Re: [BUG] ob-shell: internal representation of cmdline arguments the same

2024-05-01 Thread Ihor Radchenko
Max Nikulin writes: > I consider it as a kind of pitfall inconsistent with DWIM concept. An > idea of a kludge is below. > > #+begin_src sh :cmdline "1 2 3" :results verbatim >printf '%s\n' "$@" > #+end_src > ... > - (read cell)) > + (propertize (read cell) 'org-babel-value '

Re: [PATCH] org.el: Call EXT-enable for `org-modules' (was Re: [PATCH] org-ctags.el: Do not activate on load)

2024-05-01 Thread Ihor Radchenko
Max Nikulin writes: >>> However now I am in doubts why org-ctags is not a minor mode. >> >> What would be the benefit? > > Documented conventions how to enable or disable minor mode. I guess you can convert it into a global minor mode. I see no major downsides. So, patches welcome. -- Ihor Ra

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-01 Thread Ihor Radchenko
Nafiz Islam writes: >> Aside from those workarounds, would that be a feature worth implementing? > I'd imagine it could borrow some logic from `org-capture-expand-file' for > the headline argument, and the function (for the headline) would take > headlines as a parameter and return a string. May

Importing "quoted" strings in `org-babel-import-elisp-from-file' (was: [BUG] ob-shell: results missing leading quotes)

2024-05-01 Thread Ihor Radchenko
Max Nikulin writes: > On 29/04/2024 18:58, Ihor Radchenko wrote: >> >> The nested "..." are stripped on purpose via `org-babel-string-read'. >> Although this function dates back to R output processing and I do not >> fully understand why stripping nested quotes is useful for all possible >> babe

Re: [BUG] ob-shell: internal representation of cmdline arguments the same

2024-05-01 Thread Max Nikulin
On 29/04/2024 19:22, Ihor Radchenko wrote: Matt writes: #+begin_src bash :cmdline "1 2 3" [...] To force quotes in the :cmdline one can do #+begin_src bash :cmdline "\"1 2 3\"" echo "$1" #+end_src I consider it as a kind of pitfall inconsistent with DWIM concept. An idea of a kludge is be

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-01 Thread Nafiz Islam
> Aside from those workarounds, would that be a feature worth implementing? I'd imagine it could borrow some logic from `org-capture-expand-file' for the headline argument, and the function (for the headline) would take headlines as a parameter and return a string. Oops I forgot to CC the mailing

Re: [PATCH] org.el: Call EXT-enable for `org-modules' (was Re: [PATCH] org-ctags.el: Do not activate on load)

2024-05-01 Thread Max Nikulin
On 01/05/2024 17:21, Ihor Radchenko wrote: Max Nikulin writes: However now I am in doubts why org-ctags is not a minor mode. What would be the benefit? Documented conventions how to enable or disable minor mode.

Re: [FR] Support headline as a function for file+headline target for org-capture-templates

2024-05-01 Thread Ihor Radchenko
Nafiz Islam writes: > The problem with my implementation is that it modifies the org file before > prompting the user for item entry. As a result, if I cancel/abort my > org-capture, that modification will still be present. You can make use of `org-capture-put' and :hook capture property to mark

Re: [PATCH] ob-lua: Support all types and multiple values in results

2024-05-01 Thread Max Nikulin
On 30/04/2024 03:26, Rudolf Adamkovič wrote: +local value = result[1] +if string.find(value, '[%%(%%[{]') == 1 then + return quotes .. value .. quotes Am I wrong that quotes in value may cause issues? I expect some way of escaping " characters.

Re: link can not be created in a line with another link.

2024-05-01 Thread Max Nikulin
On 29/04/2024 19:45, Alexandros Prekates wrote: The same behavior happens with emacs -Q. bla [[foo]] If i add : [[boo]] bla [[foo]] org will create the two links. But if i add: [[boo][ bla [[foo]] with the intention to type: [[boo][description]] bla [[foo]] then what i will get is: a link t

Re: [PATCH] Add support for shortdoc link type

2024-05-01 Thread Ihor Radchenko
Bruno Cardoso writes: > This patch adds support for "shortdoc:" links. Thanks! > --- a/etc/ORG-NEWS > +++ b/etc/ORG-NEWS You also need to document the new built-in link type in the manual. > +(defun org-link--open-shortdoc (group _) > + "Open a \"shortdoc\" type link. > +GROUP is a symbol na

Re: [BUG] ob-shell: results missing leading quotes

2024-05-01 Thread Max Nikulin
On 29/04/2024 18:58, Ihor Radchenko wrote: The nested "..." are stripped on purpose via `org-babel-string-read'. Although this function dates back to R output processing and I do not fully understand why stripping nested quotes is useful for all possible babel backends. But that's a completely d

Re: [PATCH] org.el: Call EXT-enable for `org-modules' (was Re: [PATCH] org-ctags.el: Do not activate on load)

2024-05-01 Thread Ihor Radchenko
Max Nikulin writes: >> Applied, onto main. > > I was expecting that you would be against it since it is a breaking change. > > See a follow-up to > Ihor Radchenko. Re: Autoloading side effects > (was: Re: [BUG] org-mouse is activated without explicit require) > Mon, 12 Dec 2022 10:25:16 + > <