* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
@ 2014-10-14 22:39 Bert Sutherland
2019-08-03 16:59 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Bert Sutherland @ 2014-10-14 22:39 UTC (permalink / raw)
To: 18727
1) emacs -Q <file.txt>
2) Copy some text to the Windows/Linux clipboard
e.g. if using Putty simply highlight some text
using the mouse
3) C-s to invoke isearch-repeat-forward
4) Pate text
e.g. using Putty use mouse to right-click
Expected result: isearch is performed for pasted text
Actual result: text is insterted into file buffer and
mini-buffer reports "Mark set"
Other: verified that I get the expected behavior in 24.3.1
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu)
of 2014-10-14 on berts-dp
System Description: Ubuntu 11.04
Configured using:
`configure --with-x-toolkit=no --with-gif=no --with-tiff=no
--with-xpm=no --without-makeinfo'
Configured features:
JPEG PNG SOUND GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT ZLIB
Important settings:
locale-coding-system: nil
Major mode: Change Log
Minor modes in effect:
bug-reference-mode: t
tooltip-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
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
ESC [ > 0 ; 1 3 6 ; 0 c ESC x r e p o r t RET
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
ChangeLog has auto save data; consider M-x recover-this-file
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils vc-git bug-reference
add-log xterm time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-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 cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process gfilenotify
dynamic-setting system-font-setting font-render-setting x multi-tty
emacs)
Memory information:
((conses 16 83068 5083)
(symbols 48 18223 0)
(miscs 40 49 125)
(strings 32 12052 4750)
(string-bytes 1 319125)
(vectors 16 7930)
(vector-slots 8 347432 27955)
(floats 8 70 188)
(intervals 56 262 104)
(buffers 976 12)
(heap 1024 26615 1170))
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2014-10-14 22:39 bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work Bert Sutherland
@ 2019-08-03 16:59 ` Lars Ingebrigtsen
2019-08-04 19:20 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-03 16:59 UTC (permalink / raw)
To: Bert Sutherland; +Cc: 18727
Bert Sutherland <berts@amazon.com> writes:
> 1) emacs -Q <file.txt>
> 2) Copy some text to the Windows/Linux clipboard
> e.g. if using Putty simply highlight some text
> using the mouse
> 3) C-s to invoke isearch-repeat-forward
> 4) Pate text
> e.g. using Putty use mouse to right-click
>
> Expected result: isearch is performed for pasted text
>
> Actual result: text is insterted into file buffer and
> mini-buffer reports "Mark set"
(I'm going through old bug reports that unfortunately have not received
any responses yet.)
I'm unable to reproduce this bug in Emacs 27, so I'm guessing that it's
been fixed in the intervening years, and I'm closing the bug report.
If you're still seeing this bug, please reopen this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-03 16:59 ` Lars Ingebrigtsen
@ 2019-08-04 19:20 ` Juri Linkov
2019-08-05 9:32 ` Lars Ingebrigtsen
2019-08-05 16:03 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Juri Linkov @ 2019-08-04 19:20 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 18727, Bert Sutherland
>> 1) emacs -Q <file.txt>
>> 2) Copy some text to the Windows/Linux clipboard
>> e.g. if using Putty simply highlight some text
>> using the mouse
>> 3) C-s to invoke isearch-repeat-forward
>> 4) Pate text
>> e.g. using Putty use mouse to right-click
>>
>> Expected result: isearch is performed for pasted text
>>
>> Actual result: text is insterted into file buffer and
>> mini-buffer reports "Mark set"
>
> I'm unable to reproduce this bug in Emacs 27, so I'm guessing that it's
> been fixed in the intervening years, and I'm closing the bug report.
> If you're still seeing this bug, please reopen this bug report.
After trying to reproduce the bug report, I see a slightly different problem:
0. Run in a terminal: emacs -Q -nw
1. C-s
2.1. either from the MATE Terminal context menu select "Paste"
2.2. or in xterm click the middle mouse button
(both calls the same command)
3. Emacs hangs and typing 'C-g' produces the backtrace:
Debugger entered--Lisp error: (quit)
apply(debug error (quit))
edebug(error (quit))
signal(quit nil)
edebug-signal(quit nil)
xterm--pasted-text()
backtrace-eval((xterm--pasted-text) 0 edebug-after)
edebug-eval((xterm--pasted-text))
edebug-eval-expression((xterm--pasted-text))
edebug-eval-last-sexp()
funcall-interactively(edebug-eval-last-sexp)
call-interactively(edebug-eval-last-sexp nil nil)
command-execute(edebug-eval-last-sexp)
recursive-edit()
edebug--recursive-edit(error)
edebug--display-1((quit) 1 error)
edebug--display((quit) 1 error)
edebug(error (quit))
signal(quit nil)
edebug-signal(quit nil)
xterm--pasted-text()
(edebug-after (edebug-before 1) 2 (xterm--pasted-text))
(isearch-yank-string (edebug-after (edebug-before 1) 2 (xterm--pasted-text)))
(edebug-after (edebug-before 0) 3 (isearch-yank-string (edebug-after (edebug$
(closure (minibuffer-history-symbol t) nil (edebug-after (edebug-before 0) 3$
edebug-default-enter(isearch-xterm-paste nil (closure (minibuffer-history-sy$
edebug-default-enter(isearch-xterm-paste nil (closure (minibuffer-history-sy$
edebug-enter(isearch-xterm-paste nil (closure (minibuffer-history-symbol t) $
isearch-xterm-paste()
funcall-interactively(isearch-xterm-paste)
call-interactively(isearch-xterm-paste nil nil)
command-execute(isearch-xterm-paste)
I don't know why isearch uses an internal function 'xterm--pasted-text',
but not the same body as 'xterm-paste'. There is no such problem when
pasting outside of isearch using 'xterm-paste'.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-04 19:20 ` Juri Linkov
@ 2019-08-05 9:32 ` Lars Ingebrigtsen
2019-08-05 19:54 ` Juri Linkov
2019-08-05 16:03 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-05 9:32 UTC (permalink / raw)
To: Juri Linkov; +Cc: 18727, Bert Sutherland
Juri Linkov <juri@linkov.net> writes:
> After trying to reproduce the bug report, I see a slightly different problem:
>
> 0. Run in a terminal: emacs -Q -nw
> 1. C-s
> 2.1. either from the MATE Terminal context menu select "Paste"
> 2.2. or in xterm click the middle mouse button
> (both calls the same command)
> 3. Emacs hangs and typing 'C-g' produces the backtrace:
>
> Debugger entered--Lisp error: (quit)
> apply(debug error (quit))
> edebug(error (quit))
> signal(quit nil)
> edebug-signal(quit nil)
> xterm--pasted-text()
> backtrace-eval((xterm--pasted-text) 0 edebug-after)
Hm. A surprising thing here is the edebug stuff... Did you instrument
the function before running?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-05 9:32 ` Lars Ingebrigtsen
@ 2019-08-05 19:54 ` Juri Linkov
0 siblings, 0 replies; 9+ messages in thread
From: Juri Linkov @ 2019-08-05 19:54 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 18727, Bert Sutherland
>> 0. Run in a terminal: emacs -Q -nw
>> 1. C-s
>> 2.1. either from the MATE Terminal context menu select "Paste"
>> 2.2. or in xterm click the middle mouse button
>> (both calls the same command)
>> 3. Emacs hangs and typing 'C-g' produces the backtrace:
>>
>> Debugger entered--Lisp error: (quit)
>> apply(debug error (quit))
>> edebug(error (quit))
>> signal(quit nil)
>> edebug-signal(quit nil)
>> xterm--pasted-text()
>> backtrace-eval((xterm--pasted-text) 0 edebug-after)
>
> Hm. A surprising thing here is the edebug stuff... Did you instrument
> the function before running?
Yes, I instrumented it to show where it hangs.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-04 19:20 ` Juri Linkov
2019-08-05 9:32 ` Lars Ingebrigtsen
@ 2019-08-05 16:03 ` Eli Zaretskii
2019-08-05 19:52 ` Juri Linkov
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2019-08-05 16:03 UTC (permalink / raw)
To: Juri Linkov; +Cc: 18727, berts, larsi
> From: Juri Linkov <juri@linkov.net>
> Date: Sun, 04 Aug 2019 22:20:31 +0300
> Cc: 18727@debbugs.gnu.org, Bert Sutherland <berts@amazon.com>
>
> >> 1) emacs -Q <file.txt>
> >> 2) Copy some text to the Windows/Linux clipboard
> >> e.g. if using Putty simply highlight some text
> >> using the mouse
> >> 3) C-s to invoke isearch-repeat-forward
> >> 4) Pate text
> >> e.g. using Putty use mouse to right-click
> >>
> >> Expected result: isearch is performed for pasted text
> >>
> >> Actual result: text is insterted into file buffer and
> >> mini-buffer reports "Mark set"
> >
> > I'm unable to reproduce this bug in Emacs 27, so I'm guessing that it's
> > been fixed in the intervening years, and I'm closing the bug report.
> > If you're still seeing this bug, please reopen this bug report.
>
> After trying to reproduce the bug report, I see a slightly different problem:
>
> 0. Run in a terminal: emacs -Q -nw
> 1. C-s
> 2.1. either from the MATE Terminal context menu select "Paste"
> 2.2. or in xterm click the middle mouse button
> (both calls the same command)
> 3. Emacs hangs and typing 'C-g' produces the backtrace:
Crystal ball says this is because of the xterm paste support. Can you
try after disabling that extension?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-05 16:03 ` Eli Zaretskii
@ 2019-08-05 19:52 ` Juri Linkov
2019-08-06 2:31 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2019-08-05 19:52 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 18727, berts, larsi
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
>> 0. Run in a terminal: emacs -Q -nw
>> 1. C-s
>> 2.1. either from the MATE Terminal context menu select "Paste"
>> 2.2. or in xterm click the middle mouse button
>> (both calls the same command)
>> 3. Emacs hangs and typing 'C-g' produces the backtrace:
>
> Crystal ball says this is because of the xterm paste support. Can you
> try after disabling that extension?
I don't know how to disable it. Pasting works fine via ‘xterm-paste’ event and
command with the same name. But hangs when evaluating ‘(xterm--pasted-text)’.
Since the ‘xterm-paste’ command works without problems, I just copied its body
to ‘isearch-xterm-paste’, and everything works fine with this patch:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isearch-xterm-paste.patch --]
[-- Type: text/x-diff, Size: 657 bytes --]
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 30f7fc7254..b7fd0b89ae 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2503,10 +2503,12 @@ isearch-mouse-2
(declare-function xterm--pasted-text "term/xterm" ())
-(defun isearch-xterm-paste ()
+(defun isearch-xterm-paste (event)
"Pull terminal paste into search string."
- (interactive)
- (isearch-yank-string (xterm--pasted-text)))
+ (interactive "e")
+ (when (eq (car-safe event) 'xterm-paste)
+ (let ((pasted-text (nth 1 event)))
+ (isearch-yank-string pasted-text))))
(defun isearch-yank-internal (jumpform)
"Pull the text from point to the point reached by JUMPFORM.
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-05 19:52 ` Juri Linkov
@ 2019-08-06 2:31 ` Eli Zaretskii
2019-08-06 22:19 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2019-08-06 2:31 UTC (permalink / raw)
To: Juri Linkov; +Cc: 18727, berts, larsi
> From: Juri Linkov <juri@linkov.net>
> Cc: larsi@gnus.org, 18727@debbugs.gnu.org, berts@amazon.com
> Date: Mon, 05 Aug 2019 22:52:46 +0300
>
> > Crystal ball says this is because of the xterm paste support. Can you
> > try after disabling that extension?
>
> I don't know how to disable it.
Set interprogram-paste-function to a value that would disable it on
TTY frames.
> -(defun isearch-xterm-paste ()
> +(defun isearch-xterm-paste (event)
> "Pull terminal paste into search string."
> - (interactive)
> - (isearch-yank-string (xterm--pasted-text)))
> + (interactive "e")
> + (when (eq (car-safe event) 'xterm-paste)
> + (let ((pasted-text (nth 1 event)))
> + (isearch-yank-string pasted-text))))
That's somewhat ugly, IMO. We should try making the xterm paste
facility play by the rules, like the GUI paste functionality does.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work
2019-08-06 2:31 ` Eli Zaretskii
@ 2019-08-06 22:19 ` Juri Linkov
0 siblings, 0 replies; 9+ messages in thread
From: Juri Linkov @ 2019-08-06 22:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 18727, berts, larsi
>> -(defun isearch-xterm-paste ()
>> +(defun isearch-xterm-paste (event)
>> "Pull terminal paste into search string."
>> - (interactive)
>> - (isearch-yank-string (xterm--pasted-text)))
>> + (interactive "e")
>> + (when (eq (car-safe event) 'xterm-paste)
>> + (let ((pasted-text (nth 1 event)))
>> + (isearch-yank-string pasted-text))))
>
> That's somewhat ugly, IMO. We should try making the xterm paste
> facility play by the rules, like the GUI paste functionality does.
Since this bug report was already closed, and there is no quick fix,
I created a new bug report bug#36950.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-08-06 22:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 22:39 bug#18727: 25.0.50; Paste to isearch-repeat-forward does not work Bert Sutherland
2019-08-03 16:59 ` Lars Ingebrigtsen
2019-08-04 19:20 ` Juri Linkov
2019-08-05 9:32 ` Lars Ingebrigtsen
2019-08-05 19:54 ` Juri Linkov
2019-08-05 16:03 ` Eli Zaretskii
2019-08-05 19:52 ` Juri Linkov
2019-08-06 2:31 ` Eli Zaretskii
2019-08-06 22:19 ` Juri Linkov
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).