GNU bug report logs - #5320
yank-pop does not work in table mode

Previous Next

Package: emacs;

Reported by: harven <harven <at> free.fr>

Date: Tue, 5 Jan 2010 19:53:04 UTC

Severity: normal

Tags: confirmed

Found in version 25.0.95

To reply to this bug, email your comments to 5320 AT debbugs.gnu.org.

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

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


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5320; Package emacs. (Tue, 05 Jan 2010 19:53:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to harven <harven <at> free.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 05 Jan 2010 19:53:05 GMT) Full text and rfc822 format available.

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

From: harven <harven <at> free.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: yank-pop does not work in table mode
Date: Tue, 05 Jan 2010 18:18:25 +0100
Yank-pop does not work when the cursor is in a cell of a table created
with table mode.

Starting with emacs -Q, create a table (default 3x3)

M-x table-insert RET RET RET RET RET

Then put the cursor in some cell, write a word, kill it, write another word,
kill it again.

word1 M-b C-k word2 M-b C-k

Then try to yank-pop to retrieve the first word

C-y M-y

I get in the minibuffer

Wrong type argument: number-or-marker-p, nil

yank-pop works if the cursor is not in a cell. If I come back in a cell
after yanking outside the table, and try to yank-pop in the cell, no error
is reported but the table is messed up, all cells after the cursor are
destroyed.

In GNU Emacs 22.1.1 (i386-apple-darwin8.10.1, X toolkit)
Also tested in GNU Emacs 23.1 under Debian gnu/linux.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5320; Package emacs. (Wed, 06 Jul 2016 23:47:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: harven <harven <at> free.fr>
Cc: 5320 <at> debbugs.gnu.org
Subject: Re: bug#5320: yank-pop does not work in table mode
Date: Wed, 06 Jul 2016 19:47:00 -0400
found 5320 25.0.95
tags 5320 confirmed
quit

Problem seems to be that the mark ends up in the table cache buffer instead of the main one.

Adding yank-pop as one of the specially handles sort of helps a bit, but
even with that it's still broken: yank-pop doesn't throw error, but
previously yanked text is not removed.  I think correct solution would
involve using after-change-functions rather trying to wrap each command
individually.

diff --git i/lisp/textmodes/table.el w/lisp/textmodes/table.el
index 653db83..2e4dd6d 100644
--- i/lisp/textmodes/table.el
+++ w/lisp/textmodes/table.el
@@ -1395,5 +1395,5 @@ (dolist (command
 ;; Pasting Group
 (dolist (command
-         '(yank
+         '(yank yank-pop ; <-- this doesn't quite work
            clipboard-yank
            yank-clipboard-selection




bug Marked as found in versions 25.0.95. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 06 Jul 2016 23:47:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 06 Jul 2016 23:47:02 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 342 days ago.

Previous Next


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