emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH v2] org-id: allow using parent's existing id in links to head


From: Ihor Radchenko
Subject: Re: [PATCH v2] org-id: allow using parent's existing id in links to headlines
Date: Wed, 03 Jan 2024 14:17:25 +0000

"Rick Lupton" <mail@ricklupton.name> writes:

> Thanks for the comments. On this point, I'd like to modify 
> `org-insert-heading' to allow for choosing the level of the newly inserted 
> heading, but first wanted to check if you have a preference for how to change 
> it.
>
>
> I think it would be simplest to change the current:
>
> (defun org-insert-heading (&optional arg invisible-ok top)
>   "...When optional argument TOP is non-nil, insert a level 1 heading, 
> unconditionally."
>
> to:
>
> (defun org-insert-heading (&optional arg invisible-ok level)
>   "...When optional argument LEVEL is a number, insert a heading at that 
> level.  For backwards compatibility, when LEVEL is non-nil but not a number, 
> insert a level-1 heading."
>
> but that is not totally backwards compatible -- is that ok?

I think that it is OK. I very much doubt that anyone at all uses
numerical value for TOP in the existing `org-insert-heading' calls from
Elisp. And adding yet another extra optional argument is not justified
in this particular case.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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