!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by !! Tonnere de Bres » Sat, 20 May 2000 04:00:00



I get the same error on linux and on MacOs.
On linux, I am using :

emacs-20.4-1mdk
emacs-el-20.4-1mdk
emacs-leim-20.4-1mdk
emacs-nox-20.4-1mdk
emacs-X11-20.4-1mdk
xemacs-21.1.4-4mdk
xemacs-el-21.1.4-4mdk
xemacs-extras-21.1.4-4mdk
xemacs-info-21.1.4-4mdk
xemacs-mule-21.1.4-4mdk
xemacs-noX-21.1.4-4mdk
xemacs-static-21.1.4-4mdk
xemacs-X11-21.1.4-4mdk

on the MacOs, I am using the version from
ftp://ftp.cs.cornell.edu/pub/parmet

To duplicate this error:
put something in the delete buffer, for example by doing C-k or Esc-d
then try to do a search  (C-s  or  Esc-C-s), at the search prompt, type
C-y , the contents of the delete buffer do NOT get typed out.

I know this feature used to work a couple of versions ago, as I have
used it. It is very useful in macros.

If there is a fix for it somewhere, please let me know.

Thank you very much.
If you have any questions, please don't hesitate to contact me.
 Thanks, Ghaouar Camij Toschian,

 http://www.domainmart.net/InternetAccess/buildings.htm
 http://www.istanbulexpress.com/oldsite/sweetener.html

Visualize that the smoke of cigarettes is unpleasant to other people.
Visualize that peoples' civic duties do NOT include having to breathe
the
smoke from cigarettes.
Visualize that astrologers, fortune tellers, tarot card readers,
psychics and
palm readers are Crooks, Fools or Both.
Visualize using the Metric System.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Xavier Decore » Sat, 20 May 2000 04:00:00



Quote:> To duplicate this error:
> put something in the delete buffer, for example by doing C-k or Esc-d
> then try to do a search  (C-s  or  Esc-C-s), at the search prompt, type
> C-y , the contents of the delete buffer do NOT get typed out.

It seems logical that you can't do it, incremental search is waiting for
an incremental " char by char" input.
You could probably hack the code to allow "yanking" increment, but....

Quote:> I know this feature used to work a couple of versions ago, as I have
> used it. It is very useful in macros.

...if you plan to use it for macros, it means that you know in advance
the word to search (the yanked word) so you don't need
incremental-search. Use M-x forward-search instead.

--
+------------------+--------------------------------------------------------+
| Xavier DECORET   | iMAGIS, Laboratoire GRAVIR/IMAG  (CNRS,INRIA,INPG,UJF) |
|                  | INRIA Rhone-Alpes, 655 Av de l'Europe, 38330 Montbonnot|
| Doctorant        | France. Tel: +33 4 76 61 54 58 - Fax: +33 4 76 61 54 40|
+------------------+--------+-----------------------------------------------+

+---------------------------+-----------------------------------------------+

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Kai Gro?joha » Sat, 20 May 2000 04:00:00



Quote:> put something in the delete buffer, for example by doing C-k or Esc-d
> then try to do a search  (C-s  or  Esc-C-s), at the search prompt, type
> C-y , the contents of the delete buffer do NOT get typed out.

This is normal, IIRC, C-y means yank-line in isearch.  I think M-y
does what you want.

kai
--
Beware of flying birch trees.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Clemens Katze » Sat, 20 May 2000 04:00:00


Moi!

Quote:

>This is normal, IIRC, C-y means yank-line in isearch.  I think M-y
>does what you want.

Indeed, this works. *surprise*

But why is it like that??

C-y works in search-forward, and M-y in i-search-forward.
Wouldn't it be more user-friendly (and reasonable) to be the
same in all cases?

By the way, on which key is "search-forward" (just curious,
I use i-search always) but when I wanted to try it right now,
I asked with C-h k for the key, and my Emacs answered
"search-forward is on find". aaaaaaa-ha. :-|

Where, the hell, is the "find" key on a Windows keyboard???
(or on Linux, same problem)   *ggg*

Have a nice day!

CLe.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Toby Speigh » Sat, 20 May 2000 04:00:00




Tonnere> To duplicate this error:
Tonnere>
Tonnere> put something in the delete buffer,

[Terminology - it's called the Kill-Ring]

Tonnere> for example by doing C-k or Esc-d then try to do a search (C-s
Tonnere> or Esc-C-s), at the search prompt, type C-y , the contents of
Tonnere> the delete buffer do NOT get typed out.

Perhaps you're thinking of M-y (C-y should add the rest of the current
line to the search).

C-h k C-s says:

#> C-s runs the command isearch-forward
#>    which is an interactive compiled Lisp function in `isearch'.
#> (isearch-forward &optional REGEXP-P NO-RECURSIVE-EDIT)
#>
#> [...]
#> Type C-s to search again forward, C-r to search again backward.
#> Type C-w to yank word from buffer onto end of search string and search for it.
#> Type C-y to yank rest of line onto end of search string and search for it.
#> Type M-y to yank last killed text onto end of search string and search for it.
#> Type C-q to quote control character to search for it.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Axel Reicher » Sat, 20 May 2000 04:00:00



> on which key is "search-forward"

C-s RET

Best regards
--
Axel Reichert -- http://www.axel-reichert.de

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Hrvoje Niksi » Sat, 20 May 2000 04:00:00



Quote:> To duplicate this error:
> put something in the delete buffer, for example by doing C-k or Esc-d
> then try to do a search  (C-s  or  Esc-C-s), at the search prompt, type
> C-y , the contents of the delete buffer do NOT get typed out.

They're not supposed to.  The key to do this is in isearch M-y, not
C-y.  It's always been weird to me too, but that's how it is.  C-y in
isearch yanks the line into the search.

If you want to change it to be C-y, you can do something like:

    (define-key map "\C-y" 'isearch-yank-kill)

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Hrvoje Niksi » Sat, 20 May 2000 04:00:00



> Indeed, this works. *surprise*

> But why is it like that??

Historical reasons, most likely.  For instance, it might be the case
that the line-yanking feature was invented first, and bound to C-y for
"convenience".  So when the "kill-ring-yank" feature was added to
isearch, M-y was already taken.  But that's only a hunch, I don't know
that for a fact.

Changing it now bears the danger of pissing off people who have used
the existing bindings for _years_.  But maybe it would be justified in
this case.  You might want to present your case to GNU Emacs and


Quote:> By the way, on which key is "search-forward" (just curious, I use
> i-search always) but when I wanted to try it right now, I asked with
> C-h k for the key, and my Emacs answered "search-forward is on
> find". aaaaaaa-ha. :-|

That's not a joke -- there really are keyboards with a "find" key, and
on such keywords hitting that key invokes `search-forward'.

Otherwise, you can use `global-set-key' to bind search-forward to any
key you like.  Or you can use `M-x search-forward'.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Kai Gro?joha » Sun, 21 May 2000 04:00:00



> But why is it like that??

> C-y works in search-forward, and M-y in i-search-forward.
> Wouldn't it be more user-friendly (and reasonable) to be the
> same in all cases?

I suspect that it is for hysterical raisins.  Not sure, though.

But your suggestion makes sense.  Hm.  It would be an incompatible
change, which is a problem.  But it would make the key bindings more
sane.

Would you like to file a bug report to see what happens?

Quote:> By the way, on which key is "search-forward" (just curious,
> I use i-search always) but when I wanted to try it right now,
> I asked with C-h k for the key, and my Emacs answered
> "search-forward is on find". aaaaaaa-ha. :-|

> Where, the hell, is the "find" key on a Windows keyboard???

I think these keyboards don't have a find key by default.  But you can
choose any key you like and call it find by using xmodmap.  Suppose
you have chosen key number 42, then the following will do it:

xmodmap -e 'keycode 42 = SunFind'

Err.  This was the only likely keysym I found in my
lib/X11/XKeysymDB.  But maybe it is named differently?

You can also use C-s C-m for a non-incrememental search.

kai
--
Beware of flying birch trees.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Clemens Katze » Tue, 23 May 2000 04:00:00


Hi!

Quote:> I suspect that it is for hysterical raisins.  Not sure, though.

                                     *ggggggg*

Quote:>But your suggestion makes sense.  Hm.  It would be an incompatible
>change, which is a problem.  But it would make the key bindings more
>sane.
>Would you like to file a bug report to see what happens?

?h. not really....
I think I can live with how it is, it would make work, I don't know
how to do (I never did), would break with history, and at all....

(basically, I never used it at all... just when asked about it here...;-)

This made me curious, and I wanted to know the reasons.
Now I know. *g*

Quote:>> Where, the hell, is the "find" key on a Windows keyboard???

well, I was more kidding...

Quote:>I think these keyboards don't have a find key by default.  But you can
>choose any key you like and call it find by using xmodmap.  Suppose
>you have chosen key number 42, then the following will do it:

>xmodmap -e 'keycode 42 = SunFind'

*g*

I think there are not many keys left on a windows keyboard I can
or want to reassign... (and there is no prog like xmodmap on
NT either, but who cares ;-)))

Quote:

>Err.  This was the only likely keysym I found in my
>lib/X11/XKeysymDB.  But maybe it is named differently?

>You can also use C-s C-m for a non-incrememental search.

This is indeed a very good information. Why is _this_ not mentioned
in the documentation of incremental-search? ( at least I did not find it.)

Thanks anyway!

Have fun.

CLe.

 
 
 

!!!emacs bug:yank (C-y)not working inside a search (C-s Esc-C-s)

Post by Toby Speigh » Thu, 25 May 2000 04:00:00




Hrvoje> If you want to change it to be C-y, you can do something like:
Hrvoje>
Hrvoje>     (define-key map "\C-y" 'isearch-yank-kill)

Where "map" is to be replaced with "isearch-mode-map", of course....

 
 
 

1. C-Y inside isearch-forward-regexp

M.O.:
Looking for another instance of previous word.

Scenario:
backward-kill-word
isearch-forward-remember yank

Results:
Mini-buffer displays remainder of line as the search target, and cursor is at EOL.

Environment:
SparcII/SunOS4.1.1/emacs18.57

Is this expected behaviour?
--
Rob Sargent                      s-mail: Dept. of Human Genetics    

                                         Eccles Genetics Bldg
                                         Salt Lake City, Utah  84112

2. Connecting Windows 95 Clients to Windows 2000 Server in a domain

3. 'indent-for-comment' does not work well with 'comment' inside string.

4. need a color target

5. ESC key in viper not working anymore

6. 57700 throughput on 19200 serial port?

7. HELP: ESC down works but M-down does not

8. Units of Measurement in the Database Model

9. Bug 19.12: C-y on tty stops XEmacs on HP 700

10. Pty searching does not work for Sequents in GNU Emacs 18.50

11. Open a window for string search feature (C-s)

12. searching and yanking help in emacs-lisp

13. Should C-s (incremental search) set the mark?