* snarf up text when at query-replace from: prompt @ 2003-01-02 22:55 Dan Jacobson [not found] ` <E18UYT9-0004yJ-00@fencepost.gnu.org> 0 siblings, 1 reply; 3+ messages in thread From: Dan Jacobson @ 2003-01-02 22:55 UTC (permalink / raw) ESC % runs the command query-replace which is an interactive compiled Lisp function in `replace'. (query-replace FROM-STRING TO-STRING &optional DELIMITED START END) Replace some occurrences of FROM-STRING with TO-STRING. As each match is found, the user must type a character saying what to do with it. For directions, type C-h at that time. I would like to have C-h tell me stuff right when I'm at the From: string prompt. To: also. In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of the buffer. If `query-replace-interactive' is non-nil, the last incremental search string is used as FROM-STRING--you don't have to specify it with the minibuffer. it would be nice if we could hit something to snarf up words from point when we are entering the from and to strings. -- http://jidanni.org/ Taiwan(04)25854780 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <E18UYT9-0004yJ-00@fencepost.gnu.org>]
* Re: snarf up text when at query-replace from: prompt [not found] ` <E18UYT9-0004yJ-00@fencepost.gnu.org> @ 2003-01-06 23:14 ` Dan Jacobson [not found] ` <E18WX79-0001b4-00@fencepost.gnu.org> 0 siblings, 1 reply; 3+ messages in thread From: Dan Jacobson @ 2003-01-06 23:14 UTC (permalink / raw) RMS> Could you be more specific? What do you propose that C-h should do RMS> when you are in the minibuffer entering the from-string?... to-string well actually lets talk about C-s. If one hit C-s C-h, wouldn't it be neat if it were like when one hit C-h k C-s? At least give some hints in the minibuffer about goodies like: 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. etc. this would appear as "C-s, C-w, C-y.... C-h for more info" in the minibuffer. Do something similar when one hits M-% C-h, of course offering the choices I propose below. > it would be nice if we could hit something to snarf up words from > point when we are entering the from and to strings. RMS> You can copy the text with M-w then do query-replace-interactive and then RMS> yank it with C-y. ah, but setting that variable back and forth is quite inconvenient. I say the from and to stings should be able to be vacuumed up with things like those 4 above... just like C-s... hmmm, true we are sitting in the minibuffer and not in the main window like with C-s. Anyway, a start would be if M-% C-w would copy the word we are on into the From string.. More C-w's would add more to it, like C-s.... Hmm, then there's the To string... well, we would have to reposition the cursor usually.... bla bla bla... anyways, C-s is quite high powered vs. M-%... -- http://jidanni.org/ Taiwan(04)25854780 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <E18WX79-0001b4-00@fencepost.gnu.org>]
* Re: snarf up text when at query-replace from: prompt [not found] ` <E18WX79-0001b4-00@fencepost.gnu.org> @ 2003-01-10 4:03 ` Dan Jacobson 0 siblings, 0 replies; 3+ messages in thread From: Dan Jacobson @ 2003-01-10 4:03 UTC (permalink / raw) >>>>> "RMS" == Richard Stallman <rms@gnu.org> writes: RMS> You can copy the text with M-w then do query-replace-interactive and then RMS> yank it with C-y. SMR> ah, but setting that variable back and forth is quite inconvenient. RMS> Sorry, I meant to type query-replace-regexp, not RMS> query-replace-interactive. (M-/ must have found RMS> query-replace-interactive.) RMS> Is it clear now? You can use C-y to yank into the minibuffer RMS> because it is an ordinary buffer and ordinary commands work. Ah, but after enjoying C-s C-w C-w... one thirsts for other smart commands that can snarf up text like that... that the cursor is in the minibuffer is probably just a technical distraction. The smart command would remember where the cursor used to be in the big buffer above and still snarf. The 'M-w first' method requires forethought where my so called smart method would be usable right there... compare {M-w plus old non interactive search}, vs. {isearch plus C-w}. -- http://jidanni.org/ Taiwan(04)25854780 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-10 4:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-01-02 22:55 snarf up text when at query-replace from: prompt Dan Jacobson [not found] ` <E18UYT9-0004yJ-00@fencepost.gnu.org> 2003-01-06 23:14 ` Dan Jacobson [not found] ` <E18WX79-0001b4-00@fencepost.gnu.org> 2003-01-10 4:03 ` Dan Jacobson
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).