[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Use text in emacs buffer to populate command window

From: Drew Adams
Subject: RE: Use text in emacs buffer to populate command window
Date: Mon, 18 Feb 2013 10:41:46 -0800

> If I run a search in emacs I can C-s then c-w repeatedly to 
> search for text under the current cursor position.  But if I use
> a diffierent command I can't always use C-w.  eg I use m-x
> highlight-regexp I want to also grab the text under the cursor.
> How do I do that?  

If the command itself doesn't provide something at point as a default value
(retrievable using `M-n') then you're out of luck at that point.


1. You can of course select the text you want to inser first, before invoking
the command that reads input, then use `C-y' when the command prompts you for

2. If you use Icicles, then you can _always_ grab text at or near the cursor and
insert it in the minibuffer, using `M-.'.

You can configure what `M-.' does, including what kinds of things it can insert
and whether successive `M-.' should insert successive things of the same kind
(like `C-w' does for Isearch) or cycle among different kinds of thing.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]