GNU bug report logs - #18697
25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Sun, 12 Oct 2014 22:37:02 UTC

Severity: wishlist

Tags: patch, wontfix

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #45 received at 18697 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18697 <at> debbugs.gnu.org, Dima Kogan <dima <at> secretsauce.net>
Subject: Re: bug#18697: 25.0.50;
 [PATCH] hi-lock interactive functions now default to the active
 region, if there is one
Date: Sun, 30 Jun 2019 23:58:01 +0300
>>> Hm...  I think this sounds kinda unusual?  We don't have any other
>>> prompting functions that default to using the contents of the region (if
>>> it's active), I think?
>>
>> Wouldn't the following patch satisfy the request by allowing to use
>> M-n M-n to fetch the active region in the hi-lock command prompt:
>
> [...]
>
>>  appends the list returned by this function to the end of values available
>>  via \\<minibuffer-local-map>\\[next-history-element]."
>>    (list
>> +   (when (use-region-p)
>> +     (buffer-substring-no-properties (region-beginning) (region-end)))
>>     (find-tag-default-as-regexp)
>>     (find-tag-default-as-symbol-regexp)
>>     (car regexp-search-ring)
>
> That's still a rather unusual way for a command to work, I think.

Then maybe to add a new command to pull the contents of the active region
into the minibuffer.




This bug report was last modified 6 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.