Morgan Smith <morgan.j.sm...@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>