emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Max Nikulin <manikulin@gmail.com>,  emacs-orgmode@gnu.org
Subject: Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree'
Date: Tue, 01 Nov 2022 01:45:15 +0000	[thread overview]
Message-ID: <87pme7ih1w.fsf@localhost> (raw)
In-Reply-To: <87illhxhc5.fsf@localhost>

Ihor Radchenko <yantar92@gmail.com> writes:

> Max Nikulin <manikulin@gmail.com> 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 in such case, so I do not see any point to spit suggestion 
>> to try simple yank instead.
>
>>> I agree that (and kill-ring ...) condition misses the system clipboard.
>>> The proper way to handle this issue is explicitly catching "Kill ring is
>>> empty" error thrown by `current-kill' (i.e. `condition-case').

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 improvements:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=33cbb11d5a522c82dfd9730a0e028a9c3df11518
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5dc8ea0abee10a787160456f74672da6ff3c3b40

-- 
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	other threads:[~2022-11-01  1:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 12:02 [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree' Max Nikulin
2022-09-17 11:07 ` Max Nikulin
2022-09-20 13:16 ` Ihor Radchenko
2022-09-20 17:11   ` Max Nikulin
2022-09-21  8:27     ` Ihor Radchenko
2022-11-01  1:45       ` Ihor Radchenko [this message]
2022-11-01 16:13         ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pme7ih1w.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).