From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <87ef3asskj.fsf@mail.linkov.net> References: <87zjd0digk.fsf@secretsauce.net> <87h889bq00.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215721"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 18697@debbugs.gnu.org, Dima Kogan To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 01 00:16:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hhi7O-000tvL-75 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jul 2019 00:16:18 +0200 Original-Received: from localhost ([::1]:46760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhi7N-0000bx-60 for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Jun 2019 18:16:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52174) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhi7D-0000be-2n for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhi79-0002ay-N0 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhi79-0002ae-J1 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hhi79-00040O-Dg for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2019 18:16:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2019 22:16:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18697 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix patch Original-Received: via spool by 18697-submit@debbugs.gnu.org id=B18697.156193294615330 (code B ref 18697); Sun, 30 Jun 2019 22:16:03 +0000 Original-Received: (at 18697) by debbugs.gnu.org; 30 Jun 2019 22:15:46 +0000 Original-Received: from localhost ([127.0.0.1]:47439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhi6r-0003zC-Oc for submit@debbugs.gnu.org; Sun, 30 Jun 2019 18:15:45 -0400 Original-Received: from fossa.birch.relay.mailchannels.net ([23.83.209.62]:28756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhi6q-0003z4-1T for 18697@debbugs.gnu.org; Sun, 30 Jun 2019 18:15:44 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DCA228C1606; Sun, 30 Jun 2019 22:15:42 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (100-96-88-48.trex.outbound.svc.cluster.local [100.96.88.48]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 546228C144F; Sun, 30 Jun 2019 22:15:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Sun, 30 Jun 2019 22:15:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Arithmetic-Slimy: 6d98841e3a44b40a_1561932942703_3722256616 X-MC-Loop-Signature: 1561932942703:1372485444 X-MC-Ingress-Time: 1561932942703 Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTP id 1FD6083DF6; Sun, 30 Jun 2019 15:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=fMIMsIue4fBnfW36siDh+phYjOI=; b= zsqVUwxb4Npq2jlY+Q3axMiFe++0ZGBkvrBMbNhu0RiQeVz3ktzKM2qOFBI4wHsW H5DXlFWO9D7DInDXxZ/tIvnms5eK9VsTvo2PX/tCjh6TOFD1vhCpBm7J64KBwfBy g81DYnIea6C9VDvXM86TveAvn1EOq+R6aAM/Pm/QCRY= Original-Received: from mail.jurta.org (m91-129-109-60.cust.tele2.ee [91.129.109.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTPSA id D8CD683DF8; Sun, 30 Jun 2019 15:15:34 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a17 In-Reply-To: (Lars Ingebrigtsen's message of "Sat, 29 Jun 2019 12:14:30 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrvdehgddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledriedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledriedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgepud X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161915 Archived-At: >>> 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 \\\\[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.