Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-11-01 Thread Max Nikulin
On 01/11/2022 08:45, Ihor Radchenko wrote: Since I have no objections to the original patch, applied now. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=57abbd4b928752f2770898b09bbac8126b9d0eb3 I also reviewed the usage of (current-kill 0) in the code and applied two additional

Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-10-31 Thread Ihor Radchenko
Ihor Radchenko writes: > Max Nikulin writes: > >>> The main problem the old code solves is working around user error when >>> kill-ring is empty. We do not really want to err in such cases; just >>> handle empty kill ring specially. >> >> From my point of view "kill ring is empty" user error cl

Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-09-21 Thread Ihor Radchenko
Max Nikulin writes: >> The main problem the old code solves is working around user error when >> kill-ring is empty. We do not really want to err in such cases; just >> handle empty kill ring specially. > > From my point of view "kill ring is empty" user error clearly describes > what happens i

Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-09-20 Thread Max Nikulin
On 20/09/2022 20:16, Ihor Radchenko wrote: Max Nikulin writes: When REMOVE is non-nil, remove the subtree from the clipboard." (interactive "P") - (setq tree (or tree (and kill-ring (current-kill 0 + (setq tree (or tree (current-kill 0))) (unless (org-kill-is-subtree-p tree) T

Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-09-20 Thread Ihor Radchenko
Max Nikulin writes: > When REMOVE is non-nil, remove the subtree from the clipboard." >(interactive "P") > - (setq tree (or tree (and kill-ring (current-kill 0 > + (setq tree (or tree (current-kill 0))) >(unless (org-kill-is-subtree-p tree) The main problem the old code solves is

Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'

2022-09-17 Thread Max Nikulin
On 29/11/2021 19:02, Max Nikulin wrote: =C-c C-x C-y= ~org-paste-subtree~ fails just after Emacs start. Maybe there are more similar issues. - Start *new* instance of emacs.     printf '%b' '* Heading\n\nbody\n' |   xclip -in -selection clipborad >/dev/null - Try =C-c C-x C-y= or [[elisp: