From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yC2MD0d6YGP1jQAAbAwnHQ (envelope-from ) for ; Tue, 01 Nov 2022 02:45:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EC6QDkd6YGOnDwEAG6o9tA (envelope-from ) for ; Tue, 01 Nov 2022 02:45:43 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C1AFD38585 for ; Tue, 1 Nov 2022 02:45:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opgKV-0004fG-Ic; Mon, 31 Oct 2022 21:44:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opgKU-0004f8-SY for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 21:44:38 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opgKS-00062e-ML for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 21:44:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D1A23240026 for ; Tue, 1 Nov 2022 02:44:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667267073; bh=QPD9lWoD98hXsQMdA4ZPF1fEr8wSpXj4AREtC+bemUQ=; h=From:To:Cc:Subject:Date:From; b=OMfttkR3O6C2QpBOa8I2KJYkwmhCQ/1uFhKM8eiD7Cj5wW1px67ks395TmYhwEAUo +WqCTcE8ExIJYedh5x4+mBU8QY85703B54wgxRWU0UdItFqNXfgRBWv8iPSpXqcoce EPbX/V68jorXbdh17SGP3cHkKa56G/HqhZewUjS1yXxZbV7VxYRjUK++Ja5j3lLcfg 1LYISQshFMYW/GS/i9Yuol6NHbrOAtmDZEVYUhp/KE9XKolgnNodAidu8pNEfWNDwB Q+F0vjeebexeNcVPRVnHduGQ0Y5jfuWbakeaw1codDM0m7uo6tGUSC1wK0dtRy2lHu eE0QboeNEE6gw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N1XrJ2bG4z6tn4; Tue, 1 Nov 2022 02:44:32 +0100 (CET) From: Ihor Radchenko To: Ihor Radchenko Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree' In-Reply-To: <87illhxhc5.fsf@localhost> References: <87illiyym0.fsf@localhost> <87illhxhc5.fsf@localhost> Date: Tue, 01 Nov 2022 01:45:15 +0000 Message-ID: <87pme7ih1w.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667267143; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OHfzgm62owZftg7rKmlTiHsnLWG4Avj5KvivR/LEdjg=; b=odL7S78awAwnCU/O1xior1CWW/BFbEk1RzGVDt5xzAOBGG53Rvnjs1ARHey4mVEi/Xsh9W IBX/fcIdlv5eiLTM3kqsar3nWaIQfVxeoR0XtADH94I3nVtMVW778LkulgHgLPuT5EboCO nGQiK4wmAMrUWHi9xcfiRD8c37POF0batc+oD0ZrfvORqha0koasx8MtAfBBhHIx1kNwUC L+dE3krcmbkdg7cc7o7l0qgoHwVqSPzWbQL8ZZqGh2U2LQPPCL+BJZ7Ftu6AeL0JjTkvt7 F+aGmxJzRWLP0PLKApBrIgE5Ktwv50J17WjQrCTdTyznz+SbFAhNZwpVgOevAg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667267143; a=rsa-sha256; cv=none; b=mJHfVTdAAvDnDyWovk5jBdif6tt//Q9L8f15TZcOM9bbpmmOoyoHimw1WYH3JqCUXO4HQe JJDScStaVmGppgzUzq4G3VTtJJ/JRntc1IhHnNW9ZOIx1fq975hL5pMaFbb+GITfC6hWls wuep2kDeucMuZbnjEtQ+8UfS1mWZn8nJR1R1c2VK7IFnjibytD79kxc99EyeufNtjQDEgF 3E2iZRaj8ki+mIN8004KzPY5oXk5boxp37itgKMbEfL/M11BE2smnlTFdgrP1xgxWFHYjP bz5E5SpNFc54Pg/LBAOWB66J2G5qzapAIn4OagTiwJNPn1qbQd1tvypqUK08Mw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OMfttkR3; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.17 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OMfttkR3; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C1AFD38585 X-Spam-Score: -2.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: GKNWxfu4ZsIM 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 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 . Support Org development at , or support my work at