unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57148: 27.2; Problem with kill-new
@ 2022-08-11 23:59 Alain.Cochard
  2022-08-12  0:34 ` bug#57147: " Ihor Radchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Alain.Cochard @ 2022-08-11 23:59 UTC (permalink / raw)
  To: 57148; +Cc: Alain Cochard


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







^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: 27.2; Problem with kill-new
  2022-08-11 23:59 bug#57148: 27.2; Problem with kill-new Alain.Cochard
@ 2022-08-12  0:34 ` Ihor Radchenko
  2022-08-12 15:53   ` bug#57148: " Lars Ingebrigtsen
  0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2022-08-12  0:34 UTC (permalink / raw)
  To: alain.cochard; +Cc: 57147

Alain.Cochard@unistra.fr 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.

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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57148: 27.2; Problem with kill-new
  2022-08-12  0:34 ` bug#57147: " Ihor Radchenko
@ 2022-08-12 15:53   ` Lars Ingebrigtsen
  2022-08-13  1:59     ` bug#57147: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-12 15:53 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: po Po Lu, 57148, alain.cochard, 57147

Ihor Radchenko <yantar92@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.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-12 15:53   ` bug#57148: " Lars Ingebrigtsen
@ 2022-08-13  1:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-13  2:43       ` Alain.Cochard
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-13  1:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 57148, 57147, Ihor Radchenko, alain.cochard

Lars Ingebrigtsen <larsi@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?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13  1:59     ` bug#57147: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-13  2:43       ` Alain.Cochard
  2022-08-13  6:15         ` bug#57148: " Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Alain.Cochard @ 2022-08-13  2:43 UTC (permalink / raw)
  To: Po Lu; +Cc: Lars Ingebrigtsen, 57148, 57147, Ihor Radchenko, alain.cochard

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







^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13  2:43       ` Alain.Cochard
@ 2022-08-13  6:15         ` Eli Zaretskii
  2022-08-13  9:21           ` Ihor Radchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2022-08-13  6:15 UTC (permalink / raw)
  To: alain.cochard; +Cc: yantar92, 57147, luangruo, 57148, alain.cochard, larsi

> Cc: Lars Ingebrigtsen <larsi@gnus.org>, 57148@debbugs.gnu.org,
>  57147@debbugs.gnu.org, Ihor Radchenko <yantar92@gmail.com>,
>  alain.cochard@unistra.fr
> Date: Sat, 13 Aug 2022 04:43:17 +0200
> From: Alain.Cochard@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@localhost/).

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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13  6:15         ` bug#57148: " Eli Zaretskii
@ 2022-08-13  9:21           ` Ihor Radchenko
  2022-08-13  9:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2022-08-13  9:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, larsi, 57148, alain.cochard, 57147

Eli Zaretskii <eliz@gnu.org> writes:

>> But I can reproduce with Emacs 28.1 the problem I have with org-mode
>> (https://list.orgmode.org/87czd8e7wf.fsf@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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13  9:21           ` Ihor Radchenko
@ 2022-08-13  9:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-13  9:56               ` Ihor Radchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-13  9:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Eli Zaretskii, 57148, 57147, larsi, alain.cochard

Ihor Radchenko <yantar92@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?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13  9:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-13  9:56               ` Ihor Radchenko
  2022-08-13 11:54                 ` bug#57148: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2022-08-13  9:56 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 57148, 57147, larsi, alain.cochard

Po Lu <luangruo@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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13  9:56               ` Ihor Radchenko
@ 2022-08-13 11:54                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-13 12:20                   ` Ihor Radchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-13 11:54 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Eli Zaretskii, 57148, 57147, larsi, alain.cochard

Ihor Radchenko <yantar92@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13 11:54                 ` bug#57148: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-13 12:20                   ` Ihor Radchenko
  2022-08-13 12:28                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2022-08-13 12:20 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 57148, 57147, larsi, alain.cochard

Po Lu <luangruo@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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13 12:20                   ` Ihor Radchenko
@ 2022-08-13 12:28                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-13 12:32                       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-13 12:28 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Eli Zaretskii, 57148, 57147, larsi, alain.cochard

Ihor Radchenko <yantar92@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13 12:28                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-13 12:32                       ` Lars Ingebrigtsen
  2022-08-13 13:13                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-13 12:32 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 57148, 57147, Ihor Radchenko, alain.cochard

Po Lu <luangruo@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.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13 12:32                       ` Lars Ingebrigtsen
@ 2022-08-13 13:13                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-13 14:37                           ` Ihor Radchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-13 13:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Eli Zaretskii, 57148, 57147, Ihor Radchenko, alain.cochard

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13 13:13                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-13 14:37                           ` Ihor Radchenko
  2022-08-14  1:19                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Ihor Radchenko @ 2022-08-13 14:37 UTC (permalink / raw)
  To: Po Lu; +Cc: Lars Ingebrigtsen, 57148, 57147, Eli Zaretskii, alain.cochard

Po Lu <luangruo@yahoo.com> writes:

> Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#57147: bug#57148: 27.2; Problem with kill-new
  2022-08-13 14:37                           ` Ihor Radchenko
@ 2022-08-14  1:19                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-14  1:19 UTC (permalink / raw)
  To: Ihor Radchenko
  Cc: alain.cochard, Lars Ingebrigtsen, 57147-done, Eli Zaretskii,
	57148-done

Ihor Radchenko <yantar92@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.)





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-08-14  1:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11 23:59 bug#57148: 27.2; Problem with kill-new Alain.Cochard
2022-08-12  0:34 ` bug#57147: " Ihor Radchenko
2022-08-12 15:53   ` bug#57148: " Lars Ingebrigtsen
2022-08-13  1:59     ` bug#57147: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13  2:43       ` Alain.Cochard
2022-08-13  6:15         ` bug#57148: " Eli Zaretskii
2022-08-13  9:21           ` Ihor Radchenko
2022-08-13  9:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13  9:56               ` Ihor Radchenko
2022-08-13 11:54                 ` bug#57148: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 12:20                   ` Ihor Radchenko
2022-08-13 12:28                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 12:32                       ` Lars Ingebrigtsen
2022-08-13 13:13                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 14:37                           ` Ihor Radchenko
2022-08-14  1:19                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).