From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mILKBrSB82JTxAAAbAwnHQ (envelope-from ) for ; Wed, 10 Aug 2022 12:00:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aNmoBrSB82KlfAAAauVa8A (envelope-from ) for ; Wed, 10 Aug 2022 12:00:20 +0200 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 A76E51034B for ; Wed, 10 Aug 2022 12:00:19 +0200 (CEST) Received: from localhost ([::1]:56600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLiVe-0003dZ-Pd for larch@yhetil.org; Wed, 10 Aug 2022 06:00:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLiTs-0003bL-Mi for emacs-orgmode@gnu.org; Wed, 10 Aug 2022 05:58:29 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:51880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLiTr-0008Ai-3t for emacs-orgmode@gnu.org; Wed, 10 Aug 2022 05:58:28 -0400 Received: by mail-pj1-x1029.google.com with SMTP id t22so14268107pjy.1 for ; Wed, 10 Aug 2022 02:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=lqNEmQAVYV8veFTdzUDp2lFZjdWcyubDpG9ykvEJNjQ=; b=ka/soWm3K63KvpffxqDOdEBKyfoUlcsxcAFMN13luSSRkcTs1NXDMjpSCI4giTcIGx r7zxKRSKUdYxQ1pKggYylhSFyIiBlLVdUwuZXcmNtP+k9LRY952MpGSRRqlKcz+zvYwy JxW3zjLqm5y6qFqs7g9uJtpuCwT8aCGZjbxTF/9jYGyrOJfieijIvwjFo2DyjGwnZrfh 1RqPSkRzg/TYWPSapjf0iQg1v4MXeygaSvav6lkDPo9WcZTyj1HNmOIrKay2yGwz0j6g u66rKcVeWEuo9x/1ZpvXhzy9Yoc9qqxwQb8QFqmznH7H3gljBczgEaRgzpOWoCx0IoXQ 6lgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=lqNEmQAVYV8veFTdzUDp2lFZjdWcyubDpG9ykvEJNjQ=; b=7gEJHbsoOQzrTaX2Hbz0EWYhe/1JB6R+2j1164WzMABPON+jEP9oVl+mrNuX9vYFQR LkmucyAQ780zzJKgXYDz4LsXu36XfZ102UhUmywKe8XDJmfr7ELf+k+ERKkudBI/SKl4 14c9mfzUce+nZ5GEInAvo3jNyAHrNMZ/ZgVm6mOTdjljYLadKfQUqDUVPebjfqZfQW5m DdJp61FMyDKj1iu7AubK3yuLC64V5TIXrUTMi0e2EVoxkL4pm73hp6j9c0PT0J22peR9 4b2zyAJn9BvjFGUNoo5ucOVO9+Sn1OVGYD/wllt1SECmtN/H4NAt0Gfv5GRYHpeVfrRV 9VHw== X-Gm-Message-State: ACgBeo30KfoFOEiE5jgR8IRTRs2zIr30wE6TU7eQaxHTB9hqItQRHOGp ncQslosjdjtXAZFP+KiFJRc= X-Google-Smtp-Source: AA6agR5W2hCBfU8nDqgFNfIgHPt3nfcsXPScEzqHG+g+RIO9WEfeA80lQJ9pVkkQ3T7mopQFYfvskw== X-Received: by 2002:a17:902:e748:b0:16f:8ae9:307f with SMTP id p8-20020a170902e74800b0016f8ae9307fmr25501484plf.135.1660125504598; Wed, 10 Aug 2022 02:58:24 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id p127-20020a622985000000b0052d98fbf8f3sm1518526pfp.56.2022.08.10.02.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 02:58:23 -0700 (PDT) From: Ihor Radchenko To: alain.cochard@unistra.fr Cc: Org Mode List Subject: Re: Toggling select-enable-clipboard & select-enable-primary prevents org-copy-visible to work In-Reply-To: <25331.25617.528381.574211@gargle.gargle.HOWL> References: <25331.25617.528381.574211@gargle.gargle.HOWL> Date: Wed, 10 Aug 2022 17:59:28 +0800 Message-ID: <87czd8e7wf.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660125619; 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=lqNEmQAVYV8veFTdzUDp2lFZjdWcyubDpG9ykvEJNjQ=; b=XcAmLCu8tpzxR3RJo44hzFjW+Oi9767asp3YMTr1ANft9QdODfXy/eVSSJgSv0JnfMZ5mN K4ofD8444Zd/KwMHbEJcR0zt2/t7CqzRyhKjbN+u/zVkWqi3FXuOhjXd/Gwl+G0SQF0laB BPlrpjvbtaldEQqfYr2kUH03Ld2kx1+QUnwsv3bzcmelzPROpOlIVz2yk5o5fV4q/pMzOh XaInRULMr0lLsaWCtu6J+fy2+rDmkHp0+2AdeYyz3WK6V4GYPevdbanglV8s4xqWkeyl3z DNp1QWy5oM36vobv38cye5WASuS8QGzFVEVURKpLAWUgNsNpd9Qsx1uCfXaUqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660125619; a=rsa-sha256; cv=none; b=sHRDJYOCwfiK3khSvtvce/RNdB32PQKijElZHsMwJN9tRDsL3P9F+csKxd/9atPQEykqZp xtAs5mCf93fjfOgsAvQQKwgMTFFCph6bE23WRT3hU4XJxzdskDI8iutCu1v7IlqrM1TLht pRJ0chyEr71gONrqyZqnFWGscy3fvHW/bIAf5bIfURMl0/M8GgILJ6cF0Itukf6kREhEp4 Pku+gH620M1M6+UZYH6LU8jZVx93kS9mb9wByhnshRslnOqwnsu7rPfekZXNSWOhEsKeiZ CVaduYqBf3GAxnebJn4W9nu3ep0UsLyEracO6MXLSTWiyjAqr06LyVFqw2hVtw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="ka/soWm3"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.39 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="ka/soWm3"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A76E51034B X-Spam-Score: -3.39 X-Migadu-Scanner: scn1.migadu.com X-TUID: ghAVwiysoWqf Alain.Cochard@unistra.fr writes: > When my .emacs contains only the following: > > (custom-set-variables > ;; custom-set-variables was added by Custom. > ;; If you edit it by hand, you could mess it up, so be careful. > ;; Your init file should contain only one such instance. > ;; If there is more than one, they won't work right. > '(select-enable-clipboard nil) > '(select-enable-primary t) > ) > > then org-copy-visible does not work properly: when yanking, whether it > be with 'yank' or 'org-yank', the invisible parts are also yanked. > > Is it normal? After all, the emacs manual says: This is not normal, and I can reproduce the issue. However, it does not look like Org is doing anything wrong. We call kill-new with the correct value containing only visible part of the buffer. I suggest you to file a bug report to Emacs itself using M-x report-emacs-bug In the report, you can cite this email. Below, I am also detailing steps to reproduce to help Emacs devs debug the problem: 1. Create bug.el with the following contents: ---- (custom-set-variables '(select-enable-clipboard nil) '(select-enable-primary t)) (defun my/copy-const (beg end) (interactive "r") (setq deactivate-mark t) (kill-new "Constant string")) ---- 2. Create bug.org with the following contents: ---- * headline Hidden text inside * another headline ---- 3. emacs -Q -l /path/to/bug.el /path/to/bug.org 4. S- 5. M-x my/copy-const 6. C-y Expected: "Constant string" is inserted Observed: Selected region is inserted. -- Ihor Radchenko, 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