emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] lisp/org-capture.el: Simplify 'org-capture-get-indirect-buff


From: Ihor Radchenko
Subject: Re: [PATCH] lisp/org-capture.el: Simplify 'org-capture-get-indirect-buffer'
Date: Mon, 01 Apr 2024 11:46:34 +0000

Morgan Smith <Morgan.J.Smith@outlook.com> writes:

> * lisp/org-capture.el (org-capture-get-indirect-buffer): Simplify by
> using 'generate-new-buffer-name'.
> ...
> -  (let ((n 1) (base (buffer-name buffer)) bname)
> -    (setq bname (concat prefix "-" base))
> -    (while (buffer-live-p (get-buffer bname))
> -      (setq bname (concat prefix "-" (number-to-string (cl-incf n)) "-" 
> base)))
> +  (let ((bname (generate-new-buffer-name (concat prefix "-" (buffer-name 
> buffer)))))

Thanks, but this is potentially backwards-incompatible.

`generate-new-buffer-name' following a different naming scheme compared
to the current implementation of `org-capture-get-indirect-buffer':
CAPTURE-<NUM>-foo.org vs. CAPTURE-foo.org<N>

Different naming scheme may potentially break user customization in
`display-buffer-alist'.

The change is not justified.
Canceled.

-- 
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]