From: Leo <sdl.web@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 6232@debbugs.gnu.org
Subject: bug#6232: Suggestion for isearch: in backward search yank to front of search string
Date: Fri, 21 May 2010 10:54:36 +0100 [thread overview]
Message-ID: <xbaifx1l7f6r.fsf@cam.ac.uk> (raw)
In-Reply-To: <m38w7dirrj.fsf@hase.home> (Andreas Schwab's message of "Fri, 21 May 2010 10:27:28 +0200")
On 2010-05-21 09:27 +0100, Andreas Schwab wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> Yanking to the end of the search string in isearh (i.e. C-w etc.) is
>> very practical. However I miss yanking to the front of the search
>> string.
>>
>> My suggestion is to change the semantics a bit and yank to the front
>> of the search string when searching backwards. What do you think?
>
> Such a feature should definitely be on a separate key.
>
> Andreas.
C-y is almost useless to me so I have done something like this:
(define-key isearch-mode-map [remap isearch-yank-line] 'isearch-yank-sexp)
(defun isearch-yank-sexp ()
"Pull the sexp at point into search string."
(interactive)
(if (and isearch-just-started (bounds-of-thing-at-point 'sexp))
(progn (goto-char (car (bounds-of-thing-at-point 'sexp)))
(isearch-yank-string (thing-at-point 'sexp)))
(isearch-yank-internal
(lambda () (ignore-errors (forward-sexp 1)) (point)))))
Leo
prev parent reply other threads:[~2010-05-21 9:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 16:09 bug#6232: Suggestion for isearch: in backward search yank to front of search string Lennart Borgman
2010-05-21 0:09 ` Juri Linkov
2010-05-21 1:18 ` Lennart Borgman
2010-05-21 8:34 ` Andreas Schwab
2010-05-21 18:31 ` Lennart Borgman
2012-02-22 2:40 ` Glenn Morris
2010-05-21 21:09 ` Richard Stallman
2010-05-21 21:19 ` Lennart Borgman
2010-05-21 8:27 ` Andreas Schwab
2010-05-21 9:54 ` Leo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xbaifx1l7f6r.fsf@cam.ac.uk \
--to=sdl.web@gmail.com \
--cc=6232@debbugs.gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.