GNU bug report logs - #57148
27.2; Problem with kill-new

Previous Next

Package: emacs;

Reported by: alain.cochard <at> unistra.fr

Date: Fri, 12 Aug 2022 03:32:01 UTC

Severity: normal

Merged with 57147

Found in version 27.2

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57148 in the body.
You can then email your comments to 57148 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Fri, 12 Aug 2022 03:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to alain.cochard <at> unistra.fr:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 12 Aug 2022 03:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alain.Cochard <at> unistra.fr
To: bug-gnu-emacs <at> gnu.org
Cc: Alain Cochard <Alain.Cochard <at> unistra.fr>
Subject: 27.2; Problem with kill-new
Date: Fri, 12 Aug 2022 01:59:22 +0200
Hello.

I have a problem with org-mode.  It has been suggested on the org-mode
mailing list by an org-mode contributor that the problem in fact
originates from kill-new.

The full context is here
https://list.orgmode.org/87czd8e7wf.fsf <at> localhost/ an excerpt of which
being the following steps to reproduce to hopefully help Emacs
developers debug the problem.  Regards.

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-<TAB>
5. M-x my/copy-const
6. C-y

Expected: "Constant string" is inserted
Observed: Selected region is inserted.

----------------------------------------------

In GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
 of 2021-08-07 built on buildvm-x86-29.iad2.fedoraproject.org
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora 34 (Xfce)

Recent messages:
Loading /usr/share/emacs/site-lisp/site-start.d/auctex.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/bbdb-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/htmlize-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/preview-latex.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/vm-mode-init.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz
 --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/cochard/.emacs.d/elpa/auctex-13.1.3/tex-site hides /usr/share/emacs/site-lisp/tex-site
/home/cochard/.emacs.d/elpa/htmlize-20210825.2150/htmlize hides /usr/share/emacs/site-lisp/htmlize/htmlize
/home/cochard/.emacs.d/elpa/auctex-13.1.3/auctex hides /usr/share/emacs/site-lisp/site-start.d/auctex
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-mhe hides /usr/share/emacs/27.2/lisp/org/ol-mhe
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-mscgen hides /usr/share/emacs/27.2/lisp/org/ob-mscgen
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-ditaa hides /usr/share/emacs/27.2/lisp/org/ob-ditaa
/home/cochard/.emacs.d/elpa/org-9.5.4/org-src hides /usr/share/emacs/27.2/lisp/org/org-src
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-beamer hides /usr/share/emacs/27.2/lisp/org/ox-beamer
/home/cochard/.emacs.d/elpa/org-9.5.4/org-protocol hides /usr/share/emacs/27.2/lisp/org/org-protocol
/home/cochard/.emacs.d/elpa/org-9.5.4/org-mobile hides /usr/share/emacs/27.2/lisp/org/org-mobile
/home/cochard/.emacs.d/elpa/org-9.5.4/org-lint hides /usr/share/emacs/27.2/lisp/org/org-lint
/home/cochard/.emacs.d/elpa/org-9.5.4/org-table hides /usr/share/emacs/27.2/lisp/org/org-table
/home/cochard/.emacs.d/elpa/org-9.5.4/org-mouse hides /usr/share/emacs/27.2/lisp/org/org-mouse
/home/cochard/.emacs.d/elpa/org-9.5.4/org-list hides /usr/share/emacs/27.2/lisp/org/org-list
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-shen hides /usr/share/emacs/27.2/lisp/org/ob-shen
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-forth hides /usr/share/emacs/27.2/lisp/org/ob-forth
/home/cochard/.emacs.d/elpa/org-9.5.4/org-archive hides /usr/share/emacs/27.2/lisp/org/org-archive
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-lua hides /usr/share/emacs/27.2/lisp/org/ob-lua
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-haskell hides /usr/share/emacs/27.2/lisp/org/ob-haskell
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-matlab hides /usr/share/emacs/27.2/lisp/org/ob-matlab
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-publish hides /usr/share/emacs/27.2/lisp/org/ox-publish
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-abc hides /usr/share/emacs/27.2/lisp/org/ob-abc
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-clojure hides /usr/share/emacs/27.2/lisp/org/ob-clojure
/home/cochard/.emacs.d/elpa/org-9.5.4/org-pcomplete hides /usr/share/emacs/27.2/lisp/org/org-pcomplete
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-perl hides /usr/share/emacs/27.2/lisp/org/ob-perl
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-hledger hides /usr/share/emacs/27.2/lisp/org/ob-hledger
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-table hides /usr/share/emacs/27.2/lisp/org/ob-table
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-lob hides /usr/share/emacs/27.2/lisp/org/ob-lob
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-gnus hides /usr/share/emacs/27.2/lisp/org/ol-gnus
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-scheme hides /usr/share/emacs/27.2/lisp/org/ob-scheme
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-awk hides /usr/share/emacs/27.2/lisp/org/ob-awk
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-lilypond hides /usr/share/emacs/27.2/lisp/org/ob-lilypond
/home/cochard/.emacs.d/elpa/org-9.5.4/org-datetree hides /usr/share/emacs/27.2/lisp/org/org-datetree
/home/cochard/.emacs.d/elpa/org-9.5.4/org-element hides /usr/share/emacs/27.2/lisp/org/org-element
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-sqlite hides /usr/share/emacs/27.2/lisp/org/ob-sqlite
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-lisp hides /usr/share/emacs/27.2/lisp/org/ob-lisp
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-ebnf hides /usr/share/emacs/27.2/lisp/org/ob-ebnf
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-groovy hides /usr/share/emacs/27.2/lisp/org/ob-groovy
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-js hides /usr/share/emacs/27.2/lisp/org/ob-js
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-sed hides /usr/share/emacs/27.2/lisp/org/ob-sed
/home/cochard/.emacs.d/elpa/org-9.5.4/org-attach-git hides /usr/share/emacs/27.2/lisp/org/org-attach-git
/home/cochard/.emacs.d/elpa/org-9.5.4/org-plot hides /usr/share/emacs/27.2/lisp/org/org-plot
/home/cochard/.emacs.d/elpa/org-9.5.4/org-colview hides /usr/share/emacs/27.2/lisp/org/org-colview
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-exp hides /usr/share/emacs/27.2/lisp/org/ob-exp
/home/cochard/.emacs.d/elpa/org-9.5.4/org-tempo hides /usr/share/emacs/27.2/lisp/org/org-tempo
/home/cochard/.emacs.d/elpa/org-9.5.4/ol hides /usr/share/emacs/27.2/lisp/org/ol
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-eval hides /usr/share/emacs/27.2/lisp/org/ob-eval
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-core hides /usr/share/emacs/27.2/lisp/org/ob-core
/home/cochard/.emacs.d/elpa/org-9.5.4/org-loaddefs hides /usr/share/emacs/27.2/lisp/org/org-loaddefs
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-octave hides /usr/share/emacs/27.2/lisp/org/ob-octave
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-calc hides /usr/share/emacs/27.2/lisp/org/ob-calc
/home/cochard/.emacs.d/elpa/org-9.5.4/org-agenda hides /usr/share/emacs/27.2/lisp/org/org-agenda
/home/cochard/.emacs.d/elpa/org-9.5.4/org-entities hides /usr/share/emacs/27.2/lisp/org/org-entities
/home/cochard/.emacs.d/elpa/org-9.5.4/org-clock hides /usr/share/emacs/27.2/lisp/org/org-clock
/home/cochard/.emacs.d/elpa/org-9.5.4/org-keys hides /usr/share/emacs/27.2/lisp/org/org-keys
/home/cochard/.emacs.d/elpa/org-9.5.4/org-habit hides /usr/share/emacs/27.2/lisp/org/org-habit
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-eww hides /usr/share/emacs/27.2/lisp/org/ol-eww
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-java hides /usr/share/emacs/27.2/lisp/org/ob-java
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-md hides /usr/share/emacs/27.2/lisp/org/ox-md
/home/cochard/.emacs.d/elpa/org-9.5.4/org-num hides /usr/share/emacs/27.2/lisp/org/org-num
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-maxima hides /usr/share/emacs/27.2/lisp/org/ob-maxima
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-odt hides /usr/share/emacs/27.2/lisp/org/ox-odt
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-ascii hides /usr/share/emacs/27.2/lisp/org/ox-ascii
/home/cochard/.emacs.d/elpa/org-9.5.4/org hides /usr/share/emacs/27.2/lisp/org/org
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-python hides /usr/share/emacs/27.2/lisp/org/ob-python
/home/cochard/.emacs.d/elpa/org-9.5.4/org-goto hides /usr/share/emacs/27.2/lisp/org/org-goto
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-man hides /usr/share/emacs/27.2/lisp/org/ox-man
/home/cochard/.emacs.d/elpa/org-9.5.4/org-timer hides /usr/share/emacs/27.2/lisp/org/org-timer
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-picolisp hides /usr/share/emacs/27.2/lisp/org/ob-picolisp
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-processing hides /usr/share/emacs/27.2/lisp/org/ob-processing
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-io hides /usr/share/emacs/27.2/lisp/org/ob-io
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-html hides /usr/share/emacs/27.2/lisp/org/ox-html
/home/cochard/.emacs.d/elpa/org-9.5.4/org-attach hides /usr/share/emacs/27.2/lisp/org/org-attach
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-screen hides /usr/share/emacs/27.2/lisp/org/ob-screen
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-coq hides /usr/share/emacs/27.2/lisp/org/ob-coq
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-shell hides /usr/share/emacs/27.2/lisp/org/ob-shell
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-vala hides /usr/share/emacs/27.2/lisp/org/ob-vala
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-docview hides /usr/share/emacs/27.2/lisp/org/ol-docview
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-dot hides /usr/share/emacs/27.2/lisp/org/ob-dot
/home/cochard/.emacs.d/elpa/org-9.5.4/org-footnote hides /usr/share/emacs/27.2/lisp/org/org-footnote
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-sass hides /usr/share/emacs/27.2/lisp/org/ob-sass
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-ruby hides /usr/share/emacs/27.2/lisp/org/ob-ruby
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-gnuplot hides /usr/share/emacs/27.2/lisp/org/ob-gnuplot
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-asymptote hides /usr/share/emacs/27.2/lisp/org/ob-asymptote
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-org hides /usr/share/emacs/27.2/lisp/org/ox-org
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-eshell hides /usr/share/emacs/27.2/lisp/org/ob-eshell
/home/cochard/.emacs.d/elpa/org-9.5.4/org-indent hides /usr/share/emacs/27.2/lisp/org/org-indent
/home/cochard/.emacs.d/elpa/org-9.5.4/org-compat hides /usr/share/emacs/27.2/lisp/org/org-compat
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-org hides /usr/share/emacs/27.2/lisp/org/ob-org
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-info hides /usr/share/emacs/27.2/lisp/org/ol-info
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-w3m hides /usr/share/emacs/27.2/lisp/org/ol-w3m
/home/cochard/.emacs.d/elpa/org-9.5.4/ox hides /usr/share/emacs/27.2/lisp/org/ox
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-texinfo hides /usr/share/emacs/27.2/lisp/org/ox-texinfo
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-bibtex hides /usr/share/emacs/27.2/lisp/org/ol-bibtex
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-sql hides /usr/share/emacs/27.2/lisp/org/ob-sql
/home/cochard/.emacs.d/elpa/org-9.5.4/org-inlinetask hides /usr/share/emacs/27.2/lisp/org/org-inlinetask
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-J hides /usr/share/emacs/27.2/lisp/org/ob-J
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-makefile hides /usr/share/emacs/27.2/lisp/org/ob-makefile
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-fortran hides /usr/share/emacs/27.2/lisp/org/ob-fortran
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-bbdb hides /usr/share/emacs/27.2/lisp/org/ol-bbdb
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-rmail hides /usr/share/emacs/27.2/lisp/org/ol-rmail
/home/cochard/.emacs.d/elpa/org-9.5.4/org-crypt hides /usr/share/emacs/27.2/lisp/org/org-crypt
/home/cochard/.emacs.d/elpa/org-9.5.4/org-refile hides /usr/share/emacs/27.2/lisp/org/org-refile
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-latex hides /usr/share/emacs/27.2/lisp/org/ob-latex
/home/cochard/.emacs.d/elpa/org-9.5.4/org-capture hides /usr/share/emacs/27.2/lisp/org/org-capture
/home/cochard/.emacs.d/elpa/org-9.5.4/org-ctags hides /usr/share/emacs/27.2/lisp/org/org-ctags
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-eshell hides /usr/share/emacs/27.2/lisp/org/ol-eshell
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-plantuml hides /usr/share/emacs/27.2/lisp/org/ob-plantuml
/home/cochard/.emacs.d/elpa/org-9.5.4/org-macro hides /usr/share/emacs/27.2/lisp/org/org-macro
/home/cochard/.emacs.d/elpa/org-9.5.4/org-feed hides /usr/share/emacs/27.2/lisp/org/org-feed
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-css hides /usr/share/emacs/27.2/lisp/org/ob-css
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-ref hides /usr/share/emacs/27.2/lisp/org/ob-ref
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-emacs-lisp hides /usr/share/emacs/27.2/lisp/org/ob-emacs-lisp
/home/cochard/.emacs.d/elpa/org-9.5.4/ob hides /usr/share/emacs/27.2/lisp/org/ob
/home/cochard/.emacs.d/elpa/org-9.5.4/org-faces hides /usr/share/emacs/27.2/lisp/org/org-faces
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-tangle hides /usr/share/emacs/27.2/lisp/org/ob-tangle
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-ocaml hides /usr/share/emacs/27.2/lisp/org/ob-ocaml
/home/cochard/.emacs.d/elpa/org-9.5.4/org-duration hides /usr/share/emacs/27.2/lisp/org/org-duration
/home/cochard/.emacs.d/elpa/org-9.5.4/org-macs hides /usr/share/emacs/27.2/lisp/org/org-macs
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-latex hides /usr/share/emacs/27.2/lisp/org/ox-latex
/home/cochard/.emacs.d/elpa/org-9.5.4/org-version hides /usr/share/emacs/27.2/lisp/org/org-version
/home/cochard/.emacs.d/elpa/org-9.5.4/ol-irc hides /usr/share/emacs/27.2/lisp/org/ol-irc
/home/cochard/.emacs.d/elpa/org-contrib-0.4/ob-ledger hides /usr/share/emacs/27.2/lisp/org/ob-ledger
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-C hides /usr/share/emacs/27.2/lisp/org/ob-C
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-R hides /usr/share/emacs/27.2/lisp/org/ob-R
/home/cochard/.emacs.d/elpa/org-9.5.4/org-id hides /usr/share/emacs/27.2/lisp/org/org-id
/home/cochard/.emacs.d/elpa/org-9.5.4/ox-icalendar hides /usr/share/emacs/27.2/lisp/org/ox-icalendar
/home/cochard/.emacs.d/elpa/org-9.5.4/ob-comint hides /usr/share/emacs/27.2/lisp/org/ob-comint

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils advice
u-vm-color vm-autoloads vm-version vm-vars preview-latex bbdb-loaddefs
tex-site info package easymenu browse-url url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 91712 4895)
 (symbols 48 10331 1)
 (strings 32 30098 3041)
 (string-bytes 1 1174712)
 (vectors 16 14337)
 (vector-slots 8 191984 7810)
 (floats 8 25 20)
 (intervals 56 334 0)
 (buffers 1000 13))






Forcibly Merged 57147 57148. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 12 Aug 2022 15:16:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Fri, 12 Aug 2022 15:55:02 GMT) Full text and rfc822 format available.

Message #10 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: po Po Lu <luangruo <at> yahoo.com>, 57148 <at> debbugs.gnu.org,
 alain.cochard <at> unistra.fr, 57147 <at> debbugs.gnu.org
Subject: Re: bug#57148: 27.2; Problem with kill-new
Date: Fri, 12 Aug 2022 17:53:57 +0200
Ihor Radchenko <yantar92 <at> gmail.com> writes:

>> 3. emacs -Q -l /path/to/bug.el /path/to/bug.org
>> 4. S-<TAB>
>> 5. M-x my/copy-const
>> 6. C-y
>>
>> Expected: "Constant string" is inserted
>> Observed: Selected region is inserted.
>
> An amendment to the recipe:
>
> 4.5. Move point to bob, activate mark, and select down to the eob
>
> The whole Org buffer should be selected.

I have not tried to debug this, but if I remember correctly, there's
been some changes in the selection ownership code lately, so I'm adding
Po Lu to the CCs.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 02:00:02 GMT) Full text and rfc822 format available.

Message #13 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 Ihor Radchenko <yantar92 <at> gmail.com>, alain.cochard <at> unistra.fr
Subject: Re: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 09:59:21 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I have not tried to debug this, but if I remember correctly, there's
> been some changes in the selection ownership code lately, so I'm adding
> Po Lu to the CCs.

Isn't this report for Emacs 27.2, before any changes were made to the
selection code?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 02:44:03 GMT) Full text and rfc822 format available.

Message #16 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Alain.Cochard <at> unistra.fr
To: Po Lu <luangruo <at> yahoo.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 57148 <at> debbugs.gnu.org,
 57147 <at> debbugs.gnu.org, Ihor Radchenko <yantar92 <at> gmail.com>,
 alain.cochard <at> unistra.fr
Subject: Re: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 04:43:17 +0200
Po Lu writes on Sat 13 Aug 2022 09:59:

 > Isn't this report for Emacs 27.2, before any changes were made to
 > the selection code?

But I can reproduce with Emacs 28.1 the problem I have with org-mode
(https://list.orgmode.org/87czd8e7wf.fsf <at> localhost/).

GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30,
cairo version 1.17.4) of 2022-07-12






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 06:16:02 GMT) Full text and rfc822 format available.

Message #19 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: alain.cochard <at> unistra.fr
Cc: yantar92 <at> gmail.com, 57147 <at> debbugs.gnu.org, luangruo <at> yahoo.com,
 57148 <at> debbugs.gnu.org, alain.cochard <at> unistra.fr, larsi <at> gnus.org
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 09:15:12 +0300
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 57148 <at> debbugs.gnu.org,
>  57147 <at> debbugs.gnu.org, Ihor Radchenko <yantar92 <at> gmail.com>,
>  alain.cochard <at> unistra.fr
> Date: Sat, 13 Aug 2022 04:43:17 +0200
> From: Alain.Cochard <at> unistra.fr
> 
> Po Lu writes on Sat 13 Aug 2022 09:59:
> 
>  > Isn't this report for Emacs 27.2, before any changes were made to
>  > the selection code?
> 
> But I can reproduce with Emacs 28.1 the problem I have with org-mode
> (https://list.orgmode.org/87czd8e7wf.fsf <at> localhost/).

The changes Po Lu mentions were done in Emacs 29, so please try that
if you can.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 09:21:02 GMT) Full text and rfc822 format available.

Message #22 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, larsi <at> gnus.org, 57148 <at> debbugs.gnu.org,
 alain.cochard <at> unistra.fr, 57147 <at> debbugs.gnu.org
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 17:21:21 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> But I can reproduce with Emacs 28.1 the problem I have with org-mode
>> (https://list.orgmode.org/87czd8e7wf.fsf <at> localhost/).
>
> The changes Po Lu mentions were done in Emacs 29, so please try that
> if you can.

I can reproduce using Emacs 29:

GNU Emacs 29.0.50
Development version e2ccd358c9d5 on master branch; build date 2022-07-17.

-- 
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 09:42:02 GMT) Full text and rfc822 format available.

Message #25 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 larsi <at> gnus.org, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 17:40:58 +0800
Ihor Radchenko <yantar92 <at> gmail.com> writes:

> I can reproduce using Emacs 29:
>
> GNU Emacs 29.0.50
> Development version e2ccd358c9d5 on master branch; build date 2022-07-17.

Thanks.  I can't find the rest of this bug report inside
"gnus-read-ephemeral-bug-group", so could you please explain what the
problem is and how to reproduce it?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 09:56:02 GMT) Full text and rfc822 format available.

Message #28 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 larsi <at> gnus.org, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 17:56:20 +0800
Po Lu <luangruo <at> yahoo.com> writes:

> Thanks.  I can't find the rest of this bug report inside
> "gnus-read-ephemeral-bug-group", so could you please explain what the
> problem is and how to reproduce it?

I think that's because I accidentally replied to the report before it
got registered by debbugs.

Anyway, here is the recipe:

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-<TAB>
5. Move point to bob, activate mark, and select down to the eob
6. M-x my/copy-const
7. 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 11:55:02 GMT) Full text and rfc822 format available.

Message #31 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 larsi <at> gnus.org, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 19:54:25 +0800
Ihor Radchenko <yantar92 <at> gmail.com> writes:

> I think that's because I accidentally replied to the report before it
> got registered by debbugs.
>
> Anyway, here is the recipe:
>
> 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-<TAB>
> 5. Move point to bob, activate mark, and select down to the eob
> 6. M-x my/copy-const
> 7. C-y
>
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 12:20:03 GMT) Full text and rfc822 format available.

Message #34 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 larsi <at> gnus.org, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 20:20:48 +0800
Po Lu <luangruo <at> yahoo.com> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 12:29:02 GMT) Full text and rfc822 format available.

Message #37 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 larsi <at> gnus.org, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 20:28:08 +0800
Ihor Radchenko <yantar92 <at> gmail.com> writes:

> Can this behaviour be disabled then?

Sure, we could add a flag that tells deactivate-mark not to save the
region.  But others might object, so I'd rather wait a while before
doing that.

> 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 agree.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 12:33:02 GMT) Full text and rfc822 format available.

Message #40 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 Ihor Radchenko <yantar92 <at> gmail.com>, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 14:32:12 +0200
Po Lu <luangruo <at> yahoo.com> writes:

>> Can this behaviour be disabled then?
>
> Sure, we could add a flag that tells deactivate-mark not to save the
> region.  But others might object, so I'd rather wait a while before
> doing that.

The variable is currently:

---
deactivate-mark is a variable defined in src/keyboard.c.

[...]

If an editing command sets this to t, deactivate the mark afterward.
---

So adding a new value like `no-save' should be safe.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 13:14:02 GMT) Full text and rfc822 format available.

Message #43 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 57148 <at> debbugs.gnu.org, 57147 <at> debbugs.gnu.org,
 Ihor Radchenko <yantar92 <at> gmail.com>, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 21:13:43 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> So adding a new value like `no-save' should be safe.

Now done (though I named it dont-save instead).  Ihor, can you see if
using that value solves the problem for you as well?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sat, 13 Aug 2022 14:38:02 GMT) Full text and rfc822 format available.

Message #46 received at 57148 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 57148 <at> debbugs.gnu.org,
 57147 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, alain.cochard <at> unistra.fr
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 22:37:59 +0800
Po Lu <luangruo <at> yahoo.com> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> So adding a new value like `no-save' should be safe.
>
> Now done (though I named it dont-save instead).  Ihor, can you see if
> using that value solves the problem for you as well?

Yep. I just tested modifying the recipe to use 'dont-save instead of t
and the text is yanked as expected. Same for the original issue with
org-copy-visible.

Thanks!

-- 
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57148; Package emacs. (Sun, 14 Aug 2022 01:20:02 GMT) Full text and rfc822 format available.

Message #49 received at 57148-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: alain.cochard <at> unistra.fr, Lars Ingebrigtsen <larsi <at> gnus.org>,
 57147-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 57148-done <at> debbugs.gnu.org
Subject: Re: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sun, 14 Aug 2022 09:19:11 +0800
Ihor Radchenko <yantar92 <at> gmail.com> writes:

> Yep. I just tested modifying the recipe to use 'dont-save instead of t
> and the text is yanked as expected. Same for the original issue with
> org-copy-visible.

Thanks for testing, closing.

(I hope I'm doing this correctly, there are two debbugs addresses in Cc.)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 11 Sep 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.