unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25902: 25.1; yank mangles whitespace
@ 2017-02-28 20:48 Norbert Kiesel
  2017-03-01  3:34 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Kiesel @ 2017-02-28 20:48 UTC (permalink / raw)
  To: 25902

[-- Attachment #1: Type: text/plain, Size: 7126 bytes --]

 Hi,

since a couple of days I have a really annoying behavior in Emacs that a
`kill-line` followed by a `yank` often (but not always) does not
re-insert the whitespace of the killed line.  This also happens when
running `emacs -Q`.  Here is my test case

1. Start emacs using `emacs -Q`
2. Switch to buffer `b.txt` [C-x b]
3. Insert the following text

bla
   first
   second
   third

4. Move cursor up to second line containing "first" (I use cursor keys for
that)
5. Typing [C-k] followed by [C-y] results in

bla
first   second
   third

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.5)
of 2016-12-31, modified by Debian built on binet
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
System Description: Debian GNU/Linux 9.0 (stretch)

Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/
share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-
lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/
share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-
lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --with-x=yes --with-x-toolkit=gtk3
--with-toolkit-scroll-bars 'CFLAGS=-g -O2
-fdebug-prefix-map=/build/emacs25-4Gc0bO/emacs25-25.1+1=.
-fstack-protector-strong
-Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Fundamental

Minor modes in effect:
  show-paren-mode: t
  savehist-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  gradle-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-fill-mode: t

Recent messages:
Loading /etc/emacs/site-start.d/50el-get.el (source)...done
Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...done
Loading /etc/emacs/site-start.d/50golang-mode.el (source)...done
Loading /etc/emacs/site-start.d/50pylint.el (source)...done
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done
Loading savehist...done
Loading paren...done
Turning on magit-auto-revert-mode...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
/home/nkiesel/.emacs.d/elpa/editorconfig-20170221.739/editorconfig-core-handle
hides /home/nkiesel/.emacs.d/elpa/editorconfig-core-20160212.106/editorconfig-core-handle

/home/nkiesel/.emacs.d/elpa/editorconfig-20170221.739/editorconfig-core
hides /home/nkiesel/.emacs.d/elpa/editorconfig-core-20160212.106/editorconfig-core

/home/nkiesel/.emacs.d/elpa/editorconfig-20170221.739/editorconfig-fnmatch
hides /home/nkiesel/.emacs.d/elpa/editorconfig-fnmatch-20160212.106/editorconfig-fnmatch

~/.emacs.d/lisp/codesearch hides /home/nkiesel/.emacs.d/elpa/
codesearch-20160806.57/codesearch
/usr/share/emacs/25.1/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides
/usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.1/lisp/textmodes/rst

~/.emacs.d/lisp/cc-cmds hides /usr/share/emacs/25.1/lisp/progmodes/cc-cmds
/home/nkiesel/.emacs.d/elpa/let-alist-1.0.5/let-alist hides
/usr/share/emacs/25.1/lisp/emacs-lisp/let-alist
/home/nkiesel/.emacs.d/elpa/seq-2.19/seq hides
/usr/share/emacs/25.1/lisp/emacs-lisp/seq


Features:
(shadow sort mail-extr emacsbug sendmail minibuffer-complete-cycle paren
savehist cus-start cus-load rigid-tabs magit-obsolete magit-blame
magit-stash magit-bisect magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-branch magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
magit-diff smerge-mode diff-mode magit-core magit-autorevert autorevert
filenotify magit-process magit-margin magit-mode magit-git crm
magit-section magit-popup git-commit magit-utils log-edit message rfc822
mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util
add-log with-editor async-bytecomp async tramp-sh tramp tramp-compat
auth-source cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns
mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete
format-spec dash server ruby-mode smie web-mode disp-table yaml-mode
zeal-at-point bookmark+ bookmark+-key derived dired-x dired bookmark+-1
bookmark+-bmu bookmark+-lit bookmark pp js sgml-mode json map imenu
thingatpt cc-mode cc-fonts cc-guess cc-menus cc-styles cc-align
java-mode-indent-annotations gradle-mode s ucs-normalize compile comint
ansi-color ring cc-nkiesel cc-cmds advice cc-engine cc-bytecomp cc-vars
cc-defs filladapt git-find-file edmacro kmacro finder-inf info package
epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode
easymenu cconv cl-loaddefs pcase cl-lib go-mode-autoloads
emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer 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 dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 415723 30421)
(symbols 48 38399 0)
(miscs 40 107 274)
(strings 32 83121 10158)
(string-bytes 1 2728809)
(vectors 16 55110)
(vector-slots 8 923702 12032)
(floats 8 303 57)
(intervals 56 365 0)
(buffers 976 19))

[-- Attachment #2: Type: text/html, Size: 8574 bytes --]

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

* bug#25902: 25.1; yank mangles whitespace
  2017-02-28 20:48 bug#25902: 25.1; yank mangles whitespace Norbert Kiesel
@ 2017-03-01  3:34 ` Eli Zaretskii
  2017-03-01  4:48   ` Norbert Kiesel
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-03-01  3:34 UTC (permalink / raw)
  To: Norbert Kiesel; +Cc: 25902

> From: Norbert Kiesel <nkiesel@gmail.com>
> Date: Tue, 28 Feb 2017 12:48:01 -0800
> 
> since a couple of days I have a really annoying behavior in Emacs that a 
> `kill-line` followed by a `yank` often (but not always) does not 
> re-insert the whitespace of the killed line. This also happens when 
> running `emacs -Q`. Here is my test case 
> 
> 1. Start emacs using `emacs -Q` 
> 2. Switch to buffer `b.txt` [C-x b]
> 3. Insert the following text 
> 
> bla 
> first 
> second 
> third 
> 
> 4. Move cursor up to second line containing "first" (I use cursor keys for that) 
> 5. Typing [C-k] followed by [C-y] results in 
> 
> bla 
> first second 
> third 

Not reproducible here.





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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-01  3:34 ` Eli Zaretskii
@ 2017-03-01  4:48   ` Norbert Kiesel
  2017-03-01 23:40     ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Kiesel @ 2017-03-01  4:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25902

Seems to happen more often when running as X app and when typing fast.
Any suggestion what I could do to track this down?

On Tue, Feb 28, 2017 at 7:34 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Norbert Kiesel <nkiesel@gmail.com>
>> Date: Tue, 28 Feb 2017 12:48:01 -0800
>>
>> since a couple of days I have a really annoying behavior in Emacs that a
>> `kill-line` followed by a `yank` often (but not always) does not
>> re-insert the whitespace of the killed line. This also happens when
>> running `emacs -Q`. Here is my test case
>>
>> 1. Start emacs using `emacs -Q`
>> 2. Switch to buffer `b.txt` [C-x b]
>> 3. Insert the following text
>>
>> bla
>> first
>> second
>> third
>>
>> 4. Move cursor up to second line containing "first" (I use cursor keys for that)
>> 5. Typing [C-k] followed by [C-y] results in
>>
>> bla
>> first second
>> third
>
> Not reproducible here.





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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-01  4:48   ` Norbert Kiesel
@ 2017-03-01 23:40     ` Glenn Morris
  2017-03-03 23:46       ` Norbert Kiesel
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2017-03-01 23:40 UTC (permalink / raw)
  To: Norbert Kiesel; +Cc: 25902

Norbert Kiesel wrote:

> Seems to happen more often when running as X app and when typing fast.
> Any suggestion what I could do to track this down?

When it happens, you might look at M-x view-lossage to see if you
actually typed what you thought you did. (I can't reproduce it either.)






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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-01 23:40     ` Glenn Morris
@ 2017-03-03 23:46       ` Norbert Kiesel
  2017-03-04  0:13         ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Kiesel @ 2017-03-03 23:46 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 25902

I'm using Emacs since 30 years as my primary editor (with a couple of
years in-between where I went to the dark side otherwise known as
XEmacs) but this drives me so crazy that I'm about to jump ships.
Pretty sure it's something that is specific to my setup (Debian
unstable on amd64) and likely my own stupidity but I just can't find a
handle on how to trace this down.

view-lossage does not show anything either.  So I guess last chance is
to try to debug the C code.  Any ideas where to start and what to look
for?

On Wed, Mar 1, 2017 at 3:40 PM, Glenn Morris <rgm@gnu.org> wrote:
> Norbert Kiesel wrote:
>
>> Seems to happen more often when running as X app and when typing fast.
>> Any suggestion what I could do to track this down?
>
> When it happens, you might look at M-x view-lossage to see if you
> actually typed what you thought you did. (I can't reproduce it either.)
>





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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-03 23:46       ` Norbert Kiesel
@ 2017-03-04  0:13         ` Andreas Schwab
  2017-03-04  1:48           ` Norbert Kiesel
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2017-03-04  0:13 UTC (permalink / raw)
  To: Norbert Kiesel; +Cc: 25902

Do you use a clipboard manager?  What happens if you set
interprogram-paste-function to nil?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-04  0:13         ` Andreas Schwab
@ 2017-03-04  1:48           ` Norbert Kiesel
  2017-03-04  1:54             ` Norbert Kiesel
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Kiesel @ 2017-03-04  1:48 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 25902

On Fri, Mar 3, 2017 at 4:13 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Do you use a clipboard manager?  What happens if you set
> interprogram-paste-function to nil?

Whenever you are in the bay area I'm offering you an evening of free
beer!!!  Only tried for a few minutes but seems that was it.

Some background info: I used the Diodon clipboard manager for quite
some time, but recently started to see if I like GPaste better.  Right
now I have both enabled for comparison, and either GPaste (or my
configuration of it) is the problem or running two clipboard managers
at the same time.





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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-04  1:48           ` Norbert Kiesel
@ 2017-03-04  1:54             ` Norbert Kiesel
  2017-03-04  9:19               ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Kiesel @ 2017-03-04  1:54 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 25902

GPaste has a setting called "trim items" that was set to "ON".
Setting it to OFF fixes the behavior, even w/o setting
interprogram-past-function to nil.

Thanks again for your help, all is well again in my world.

On Fri, Mar 3, 2017 at 5:48 PM, Norbert Kiesel <nkiesel@gmail.com> wrote:
> On Fri, Mar 3, 2017 at 4:13 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Do you use a clipboard manager?  What happens if you set
>> interprogram-paste-function to nil?
>
> Whenever you are in the bay area I'm offering you an evening of free
> beer!!!  Only tried for a few minutes but seems that was it.
>
> Some background info: I used the Diodon clipboard manager for quite
> some time, but recently started to see if I like GPaste better.  Right
> now I have both enabled for comparison, and either GPaste (or my
> configuration of it) is the problem or running two clipboard managers
> at the same time.





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

* bug#25902: 25.1; yank mangles whitespace
  2017-03-04  1:54             ` Norbert Kiesel
@ 2017-03-04  9:19               ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2017-03-04  9:19 UTC (permalink / raw)
  To: Norbert Kiesel; +Cc: schwab, 25902-done

> From: Norbert Kiesel <nkiesel@gmail.com>
> Date: Fri, 3 Mar 2017 17:54:14 -0800
> Cc: 25902@debbugs.gnu.org
> 
> GPaste has a setting called "trim items" that was set to "ON".
> Setting it to OFF fixes the behavior, even w/o setting
> interprogram-past-function to nil.

Thanks, I added this recipe to PROBLEMS, and I'm closing the bug
report.





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

end of thread, other threads:[~2017-03-04  9:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 20:48 bug#25902: 25.1; yank mangles whitespace Norbert Kiesel
2017-03-01  3:34 ` Eli Zaretskii
2017-03-01  4:48   ` Norbert Kiesel
2017-03-01 23:40     ` Glenn Morris
2017-03-03 23:46       ` Norbert Kiesel
2017-03-04  0:13         ` Andreas Schwab
2017-03-04  1:48           ` Norbert Kiesel
2017-03-04  1:54             ` Norbert Kiesel
2017-03-04  9:19               ` Eli Zaretskii

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