From: emacsq via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 54086@debbugs.gnu.org
Subject: bug#54086: Occur should offer more interactive input options
Date: Mon, 21 Feb 2022 10:36:02 +0000 [thread overview]
Message-ID: <OAYaCVHoyaN0nLXgdG00QDzBqZ4lTK7bLRSBsP_qsBcQ883kNVN1kxHGS5yjKD5Arp-ZSx0TT7DcUftFfwRDc5E59U8R3mSa5BZwOx26dzA=@protonmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
In my experience it is often that I search for something under the cursor, so it
makes sense for occur to pick up the word at point and offer that for search.
Also, if a region is selected occur could offer this as input.
I did these for myself long ago and it's a pretty useful hack which could improve
built in occur too.
So something like this for initial input :
(if (use-region-p)
(buffer-substring (region-beginning) (region-end))
(thing-at-point 'symbol))))))
[-- Attachment #2: Type: text/html, Size: 1327 bytes --]
next reply other threads:[~2022-02-21 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 10:36 emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-02-21 14:14 ` bug#54086: Occur should offer more interactive input options Lars Ingebrigtsen
2022-02-21 17:13 ` bug#54086: [External] : " Drew Adams
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='OAYaCVHoyaN0nLXgdG00QDzBqZ4lTK7bLRSBsP_qsBcQ883kNVN1kxHGS5yjKD5Arp-ZSx0TT7DcUftFfwRDc5E59U8R3mSa5BZwOx26dzA=@protonmail.com' \
--to=bug-gnu-emacs@gnu.org \
--cc=54086@debbugs.gnu.org \
--cc=laszlomail@protonmail.com \
/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.