unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54086: Occur should offer more interactive input options
@ 2022-02-21 10:36 emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-02-21 14:14 ` Lars Ingebrigtsen
  2022-02-21 17:13 ` bug#54086: [External] : " Drew Adams
  0 siblings, 2 replies; 3+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-21 10:36 UTC (permalink / raw)
  To: 54086

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-21 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 10:36 bug#54086: Occur should offer more interactive input options emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-21 14:14 ` Lars Ingebrigtsen
2022-02-21 17:13 ` bug#54086: [External] : " Drew Adams

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).