unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 18697@debbugs.gnu.org, Dima Kogan <dima@secretsauce.net>
Subject: 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	[thread overview]
Message-ID: <87ef3asskj.fsf@mail.linkov.net> (raw)
In-Reply-To: <m3d0iwzojd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 29 Jun 2019 12:14:30 +0200")

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





  reply	other threads:[~2019-06-30 20:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 22:35 bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Dima Kogan
2014-10-12 23:01 ` Drew Adams
2014-10-14 19:32   ` Juri Linkov
2014-10-14 19:48     ` Drew Adams
2014-10-14 20:04       ` Juri Linkov
2014-10-14 20:25         ` Drew Adams
2014-10-14 21:45           ` Drew Adams
2014-10-13 11:12 ` Ivan Shmakov
2014-10-14 18:51   ` Stefan Monnier
2019-06-25 21:29 ` Lars Ingebrigtsen
2019-06-28 19:09   ` Juri Linkov
2019-06-29 10:14     ` Lars Ingebrigtsen
2019-06-30 20:58       ` Juri Linkov [this message]
2019-07-02 12:41         ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ef3asskj.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=18697@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    --cc=larsi@gnus.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 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).