From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new Date: Sat, 13 Aug 2022 20:20:48 +0800 Message-ID: <87lers5o7z.fsf@localhost> References: <25333.38874.190001.846318@gargle.gargle.HOWL> <87tu6i8fkv.fsf@localhost> <87lertmp9m.fsf_-_@gnus.org> <87lersvr7q.fsf@yahoo.com> <25335.4037.212955.551896@gargle.gargle.HOWL> <83lersmzyn.fsf@gnu.org> <87zgg85wj2.fsf@localhost> <877d3cv5ud.fsf@yahoo.com> <87wnbc5uwr.fsf@localhost> <8735e0uzny.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2822"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 57148@debbugs.gnu.org, 57147@debbugs.gnu.org, larsi@gnus.org, alain.cochard@unistra.fr To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 13 14:20:50 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oMq8I-0000ZE-CN for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 14:20:50 +0200 Original-Received: from localhost ([::1]:42424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMq8G-0006XN-Qe for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 08:20:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMq7c-0006Tm-8l for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 08:20:13 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMq7X-000258-Pi for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 08:20:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMq7X-0002gc-LH for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 08:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Aug 2022 12:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57148 X-GNU-PR-Package: emacs Original-Received: via spool by 57148-submit@debbugs.gnu.org id=B57148.166039319510271 (code B ref 57148); Sat, 13 Aug 2022 12:20:03 +0000 Original-Received: (at 57148) by debbugs.gnu.org; 13 Aug 2022 12:19:55 +0000 Original-Received: from localhost ([127.0.0.1]:59945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMq7P-0002fa-9z for submit@debbugs.gnu.org; Sat, 13 Aug 2022 08:19:55 -0400 Original-Received: from mail-pj1-f45.google.com ([209.85.216.45]:51128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMq7N-0002f6-CV; Sat, 13 Aug 2022 08:19:53 -0400 Original-Received: by mail-pj1-f45.google.com with SMTP id gj1so3227729pjb.0; Sat, 13 Aug 2022 05:19:53 -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=eVk3S7cvGHN9lFG+mti2L0ZgP0dI7JRYiQcA3K0S/to=; b=pyt01J7xDe8tf04iB+b42PD8V0S6un6KKvAv3yHL4efyC+Lb0B1ZR8EWWUDl6Wq3gb pZPxP9Dma4xprD4aZKcUKZPofn/6bmbFIXykffHXhzTp6tTPESfxnlfi8b06c9WSfza0 oE6iUoSyCfDORDF2hb6naDD6ovhp7ENh0ooYA+SZiERB7Kn+az6m7Xk687WChmQvJSul eeRYHYQhBC8ZEZDKdStfIo5q35Fb0TwiiAoGYcCwEEK98zqYMImFfqnbPMyX5j5FX58R DYI1eo6HjoO+HyVSSY+svKxBTqhAaZXsDykSa4cRzHQswHxGNz2w+J1hkZHGk/gWQk0X 4OzQ== 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=eVk3S7cvGHN9lFG+mti2L0ZgP0dI7JRYiQcA3K0S/to=; b=KjyNzWItErD7WSTRO99ZJr/wiyjSbmsnPiBCgKHCbozY91YgLggjuyQyh96ZdmKLoK 04ygXeDzLvM58XRR0/RwcpSzFfHkHpQbWJWXiqVKudTDOlWLlidga6sUQObv7K8H4Bk5 ATXn/Jh39VjJ8H+P/eTN6FzRSbMfcFc7N6Ai7DOrOIrTGv40DntFL8NPoP4YbV7ptOcS s+CDjfdGENz289nVHKxG4NjoCofnW5D5HiSTuSgdpTEHCBny0/TV8UOFlxubc1Jmgw2c +qMT/rjr6dCdsHUoiTY00U9+KNDDdoVJfnM/C/mNInEK5byQAOmMmiKIQvrWAUk8QECE SAMw== X-Gm-Message-State: ACgBeo0ozxAWhKH1aalcCNuLpB3y+D+Yq4WKpoKpbhDYG8hVqHx/GVuq 0+9X2ngbVomIKDD5kccEajM= X-Google-Smtp-Source: AA6agR6u57tAd7lUwesdQl+wDJlqRHPivnoqbGUN/d4uRTB9HgNHKCYI2QC2nOOwy7RdA/XAOd+QwA== X-Received: by 2002:a17:90b:1a8f:b0:1f4:fb36:a9b3 with SMTP id ng15-20020a17090b1a8f00b001f4fb36a9b3mr8886175pjb.186.1660393187545; Sat, 13 Aug 2022 05:19:47 -0700 (PDT) Original-Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id 63-20020a620542000000b0052d50e14f1dsm3417063pff.78.2022.08.13.05.19.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 05:19:46 -0700 (PDT) In-Reply-To: <8735e0uzny.fsf@yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:239522 Archived-At: Po Lu writes: >> Expected: "Constant string" is inserted >> Observed: Selected region is inserted. > > This is intended behavior. Deactivating the mark will always assert > ownership over the primary selection with the contents of the region. > > See the doc string of `deactivate-mark' for more details. Can this behaviour be disabled then? It is clearly not the user intention here when the user calls a function that is supposed to push some filtered text to `kill-ring' right before deactivating the region. I am thinking about workaround like ;; Prevent Emacs from adding full selected text to `kill-ring' ;; when `select-enable-primary' is non-nil. (setq-local filter-buffer-substring-function `(lambda (&rest _) (setq-local filter-buffer-substring-function ',filter-buffer-substring-function) nil)) which seems to work, but looks like a hack. -- 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