From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 12 18:36:20 2014 Received: (at submit) by debbugs.gnu.org; 12 Oct 2014 22:36:20 +0000 Received: from localhost ([127.0.0.1]:42222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XdRkR-00077P-Iu for submit@debbugs.gnu.org; Sun, 12 Oct 2014 18:36:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55440) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XdRkP-00077H-NV for submit@debbugs.gnu.org; Sun, 12 Oct 2014 18:36:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdRkI-00026T-KG for submit@debbugs.gnu.org; Sun, 12 Oct 2014 18:36:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdRkI-00026N-HL for submit@debbugs.gnu.org; Sun, 12 Oct 2014 18:36:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdRkC-0007AA-Dc for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2014 18:36:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdRk6-00023w-Ja for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2014 18:36:04 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdRk6-00023P-7b for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2014 18:35:58 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by gateway2.nyi.internal (Postfix) with ESMTP id BAC3E2058B for ; Sun, 12 Oct 2014 18:35:56 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 12 Oct 2014 18:35:56 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=Tn6KWgM4dZT4sz5AMhRuVHOO83c=; b=cory ZDIQ9DhwnKDxo3hYx4nJ0OU9xH/XHbyF2OoRlTCa4Ev0JggylxLTGxUsvekH5HIO Ubp0MnXJjkxzcyAPizXAxSbDGByfCydUZgV1zkfyMJo0mpGCNLpTIa1mox197LTA eBrXndKB89DvP7Usf+Fu2NMof7bsFzjIdDdaAbY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=Tn6KWgM4dZT 4sz5AMhRuVHOO83c=; b=YeP3FcAaZ3LBghlI0BfTBNI0XPgSGaviwOhlZfRNEZw NAcDD+GfYm652HIhn78DnPc5n+h5FQGFUIR3NGoqEqJ8IgzeD5ppRAyW+LK8PB9o dxN0zd1lYiHS2kbk3NgFiJFoeTKTZQkqGT5W8hNs5fhpQ90WC3LhZRywDjFgUXt0 = X-Sasl-enc: ET6uCK8+XzH1cxPUF16lwKSRcVvWt2QihXCSPoWE5MkD 1413153356 Received: from shorty.local (unknown [23.243.192.221]) by mail.messagingengine.com (Postfix) with ESMTPA id 72C32C00014 for ; Sun, 12 Oct 2014 18:35:56 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty.local) by shorty.local with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XdRk3-0006ek-91 for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2014 15:35:55 -0700 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Date: Sun, 12 Oct 2014 15:35:55 -0700 Message-ID: <87zjd0digk.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain Hi. Attached is a small feature patch. Currently when a hi-lock.el function is called interactively, the default offered by (read-regexp) is the last value. With the patch, the behavior is the same if no active region is available; if an active region IS available, the default is the contents of the region. Perhaps something like this should be added to (read-regexp), but that's a bigger proposal than this small patch. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-hi-lock-interactive-functions-now-default-to-the-act.patch >From ccf892b48f8bb93c6352f611b4256cb401222668 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sun, 12 Oct 2014 15:32:02 -0700 Subject: [PATCH] hi-lock interactive functions now default to the active region, if there is one --- lisp/hi-lock.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 98a26dd..6b06d08 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -419,7 +419,10 @@ highlighting will not update as you type." (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight line" 'regexp-history-last)) + (read-regexp "Regexp to highlight line" + (if mark-active + (buffer-substring-no-properties (point) (mark)) + 'regexp-history-last))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -443,7 +446,10 @@ highlighting will not update as you type." (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight" 'regexp-history-last)) + (read-regexp "Regexp to highlight" + (if mark-active + (buffer-substring-no-properties (point) (mark)) + 'regexp-history-last))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -468,7 +474,10 @@ highlighting will not update as you type." (list (hi-lock-regexp-okay (hi-lock-process-phrase - (read-regexp "Phrase to highlight" 'regexp-history-last))) + (read-regexp "Phrase to highlight" + (if mark-active + (buffer-substring-no-properties (point) (mark)) + 'regexp-history-last)))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) -- 2.0.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 12 19:02:03 2014 Received: (at 18697) by debbugs.gnu.org; 12 Oct 2014 23:02:04 +0000 Received: from localhost ([127.0.0.1]:42253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XdS9L-0007ru-DP for submit@debbugs.gnu.org; Sun, 12 Oct 2014 19:02:03 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:40330) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XdS9J-0007rK-Ou for 18697@debbugs.gnu.org; Sun, 12 Oct 2014 19:02:02 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9CN1xqd030403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 12 Oct 2014 23:02:00 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9CN1wW8006333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 12 Oct 2014 23:01:59 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9CN1wsk027448; Sun, 12 Oct 2014 23:01:58 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 12 Oct 2014 16:01:58 -0700 (PDT) From: Drew Adams To: Dima Kogan , 18697@debbugs.gnu.org Subject: RE: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> In-Reply-To: <87zjd0digk.fsf@secretsauce.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18697 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > the behavior is the same if no active region is > available; if an active region IS available, the default is the > contents of the region. >=20 > Perhaps something like this should be added to (read-regexp), > but that's a bigger proposal than this small patch. I don't care what you do to hi-lock. However, wrt `read-regexp': I certainly hope not. That would make that function useless for any command that wants to act on the active region (e.g., vs the buffer if inactive). From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 13 07:12:45 2014 Received: (at 18697) by debbugs.gnu.org; 13 Oct 2014 11:12:45 +0000 Received: from localhost ([127.0.0.1]:42472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XddYS-0003z9-D6 for submit@debbugs.gnu.org; Mon, 13 Oct 2014 07:12:45 -0400 Received: from fely.am-1.org ([78.47.74.50]:36061) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XddYP-0003yy-DM for 18697@debbugs.gnu.org; Mon, 13 Oct 2014 07:12:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=u/P5jPa0kGvEamikJ9AchMln7aPPUmepDMCSXj91ny8=; b=IJMz1Tn99yto+HPoS0OaHUlPh+4P1tSJ8BEgO20VtjdCpUbyT756YrmxaCqMeZf3PM8UNUyDFZPQIv9afpuCjfTxjoOfsCcKLQlm88Iwwch3aQEhqLVekyZctX9FEML+rzlpbtZxSmrOSI2RaubC7rqt5TxYBTi4POpHj7pXTSA=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XddYO-0000x1-4m for 18697@debbugs.gnu.org; Mon, 13 Oct 2014 11:12:40 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XddYG-0007Sv-Cy for 18697@debbugs.gnu.org; Mon, 13 Oct 2014 18:12:32 +0700 From: Ivan Shmakov To: 18697@debbugs.gnu.org Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> Date: Mon, 13 Oct 2014 11:12:31 +0000 In-Reply-To: <87zjd0digk.fsf@secretsauce.net> (Dima Kogan's message of "Sun, 12 Oct 2014 15:35:55 -0700") Message-ID: <87vbnoz0io.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18697 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Dima Kogan writes: > Attached is a small feature patch. Currently when a hi-lock.el > function is called interactively, the default offered by > (read-regexp) is the last value. > With the patch, the behavior is the same if no active region is > available; if an active region IS available, the default is the > contents of the region. [=E2=80=A6] > --- a/lisp/hi-lock.el > +++ b/lisp/hi-lock.el > @@ -419,7 +419,10 @@ highlighting will not update as you type." > (interactive > (list > (hi-lock-regexp-okay > - (read-regexp "Regexp to highlight line" 'regexp-history-last)) > + (read-regexp "Regexp to highlight line" > + (if mark-active > + (buffer-substring-no-properties (point) (mark)) > + 'regexp-history-last))) > (hi-lock-read-face-name))) > (or (facep face) (setq face 'hi-yellow)) > (unless hi-lock-mode (hi-lock-mode 1)) I don=E2=80=99t seem to understand; is mark-active ever supposed to become nil when /not/ in the transient-mark-mode? Personally, I find the latter distracting enough not to ever turn it on. So, I guess that the above would mean that I=E2=80=99d always be getting anything I have for the region (which may easily be a substantial portion of the buffer) for the default. Thus, at the very least, the above should probably use (and transient-mark-mode mark-active) as the condition, or something like that. [=E2=80=A6] --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 14:51:59 2014 Received: (at 18697) by debbugs.gnu.org; 14 Oct 2014 18:51:59 +0000 Received: from localhost ([127.0.0.1]:43496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe7CQ-0006QD-Ox for submit@debbugs.gnu.org; Tue, 14 Oct 2014 14:51:58 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:54424) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe7CP-0006Q3-Hy for 18697@debbugs.gnu.org; Tue, 14 Oct 2014 14:51:57 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s9EIpudM007770; Tue, 14 Oct 2014 14:51:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 9E27666089; Tue, 14 Oct 2014 14:51:51 -0400 (EDT) From: Stefan Monnier To: Ivan Shmakov Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Message-ID: References: <87zjd0digk.fsf@secretsauce.net> <87vbnoz0io.fsf@violet.siamics.net> Date: Tue, 14 Oct 2014 14:51:51 -0400 In-Reply-To: <87vbnoz0io.fsf@violet.siamics.net> (Ivan Shmakov's message of "Mon, 13 Oct 2014 11:12:31 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV5094=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5094> : inlines <1396> : streams <1316780> : uri <1824901> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> + (if mark-active Thanks for catching it, Ivan. Indeed testing `mark-active' (or transient-mark-mode) is basically never a good idea. Please use `use-region-p' instead. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 15:33:34 2014 Received: (at 18697) by debbugs.gnu.org; 14 Oct 2014 19:33:34 +0000 Received: from localhost ([127.0.0.1]:43515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe7qf-00088n-Qn for submit@debbugs.gnu.org; Tue, 14 Oct 2014 15:33:34 -0400 Received: from ps18281.dreamhost.com ([69.163.222.226]:57583 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe7qd-00088b-7W for 18697@debbugs.gnu.org; Tue, 14 Oct 2014 15:33:32 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id C36B6313196C0A; Tue, 14 Oct 2014 12:33:27 -0700 (PDT) From: Juri Linkov To: Drew Adams Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Organization: JURTA References: <87zjd0digk.fsf@secretsauce.net> Date: Tue, 14 Oct 2014 22:32:23 +0300 In-Reply-To: (Drew Adams's message of "Sun, 12 Oct 2014 16:01:58 -0700 (PDT)") Message-ID: <87bnpe4fco.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> Perhaps something like this should be added to (read-regexp), >> but that's a bigger proposal than this small patch. > > I don't care what you do to hi-lock. However, wrt `read-regexp': > I certainly hope not. That would make that function useless for > any command that wants to act on the active region (e.g., vs > the buffer if inactive). There is no problem in using the active region in `read-regexp' as we discussed it in http://thread.gmane.org/gmane.emacs.devel/168564 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 15:49:04 2014 Received: (at 18697) by debbugs.gnu.org; 14 Oct 2014 19:49:04 +0000 Received: from localhost ([127.0.0.1]:43522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe85f-0000JU-Kx for submit@debbugs.gnu.org; Tue, 14 Oct 2014 15:49:04 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:27901) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe85d-0000Iz-EW for 18697@debbugs.gnu.org; Tue, 14 Oct 2014 15:49:02 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9EJmxOK013837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Oct 2014 19:49:00 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s9EJmvHG010360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 14 Oct 2014 19:48:58 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9EJmvSB003250; Tue, 14 Oct 2014 19:48:57 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 14 Oct 2014 12:48:56 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> <87bnpe4fco.fsf@mail.jurta.org> In-Reply-To: <87bnpe4fco.fsf@mail.jurta.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > I don't care what you do to hi-lock. However, wrt `read-regexp': > > I certainly hope not. That would make that function useless for > > any command that wants to act on the active region (e.g., vs > > the buffer if inactive). >=20 > There is no problem in using the active region in `read-regexp' as > we discussed it in http://thread.gmane.org/gmane.emacs.devel/168564 Huh? There is NO discussion of `read-regexp' in that thread. Zero. And that thread certainly does not come to the conclusion that the active region should always be taken as the default value (of whatever). You yourself acknowledge in that thread that using the active region to limit the scope of a command is sometimes more useful than using it to come up with a default string value. `read-regexp' is not a command. It is a utility function, which can be used in all kinds of commands, all kinds of contexts. We should not fix its default value in a way that limits the use of `read-regexp' by some command/context of the active region for something else. What IS pointed out in that thread is that there are other ways to pick up text at point, besides using the active region. And that gives you much more flexibility than hard-wiring the region content as the default value. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 16:05:04 2014 Received: (at 18697) by debbugs.gnu.org; 14 Oct 2014 20:05:04 +0000 Received: from localhost ([127.0.0.1]:43530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe8L9-0000yM-W3 for submit@debbugs.gnu.org; Tue, 14 Oct 2014 16:05:04 -0400 Received: from ps18281.dreamhost.com ([69.163.222.226]:48110 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe8L7-0000xy-Kb for 18697@debbugs.gnu.org; Tue, 14 Oct 2014 16:05:02 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2E069369DDB3AB; Tue, 14 Oct 2014 13:04:58 -0700 (PDT) From: Juri Linkov To: Drew Adams Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Organization: JURTA References: <87zjd0digk.fsf@secretsauce.net> <87bnpe4fco.fsf@mail.jurta.org> Date: Tue, 14 Oct 2014 23:04:29 +0300 In-Reply-To: (Drew Adams's message of "Tue, 14 Oct 2014 12:48:56 -0700 (PDT)") Message-ID: <87iojm1kqa.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > What IS pointed out in that thread is that there are other ways > to pick up text at point, besides using the active region. And > that gives you much more flexibility than hard-wiring the region > content as the default value. Not *THE* default value, but a list of several default values where the active region is its second default value (coming after the symbol at point in that list). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 16:26:04 2014 Received: (at 18697) by debbugs.gnu.org; 14 Oct 2014 20:26:04 +0000 Received: from localhost ([127.0.0.1]:43558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe8fT-0001pc-DG for submit@debbugs.gnu.org; Tue, 14 Oct 2014 16:26:03 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49414) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe8fQ-0001p4-CN for 18697@debbugs.gnu.org; Tue, 14 Oct 2014 16:26:00 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9EKPtEL027816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Oct 2014 20:25:56 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9EKPqSj025568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 14 Oct 2014 20:25:53 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9EKPqOo025559; Tue, 14 Oct 2014 20:25:52 GMT MIME-Version: 1.0 Message-ID: <31b31698-be0a-4886-bf24-33e93fc5b611@default> Date: Tue, 14 Oct 2014 13:25:50 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> <87bnpe4fco.fsf@mail.jurta.org> <87iojm1kqa.fsf@mail.jurta.org> In-Reply-To: <87iojm1kqa.fsf@mail.jurta.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > What IS pointed out in that thread is that there are other ways > > to pick up text at point, besides using the active region. And > > that gives you much more flexibility than hard-wiring the region > > content as the default value. >=20 > Not *THE* default value, but a list of several default values > where the active region is its second default value > (coming after the symbol at point in that list). Ah, OK, if that's what you meant. Yes, a user should be able to choose that, by cycling - at least in some contexts (see below). No, in general it should not be the _default_ default value. ;-) That is, it should not be the first in the list. Even so, it would be good for a command for which the active region defines the command scope to be able to easily exclude that value from the defaults list, as it makes no sense in that context. IOW, my argument still holds: It is not always the case that it makes sense for a default value for `read-regexp' to be the content of the active region. Sometimes it makes a lot of sense. Sometimes it makes _no_ sense. And sometimes it can make a little sense - a nice-to-have-available choice. What `read-regexp' is used for depends on the context. That context (e.g. a particular command) determines whether and how much it makes sense for the active region to be used as a default value. Again, `read-regexp' is a utility function. Its use cases are many and varied. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 14 17:45:28 2014 Received: (at 18697) by debbugs.gnu.org; 14 Oct 2014 21:45:28 +0000 Received: from localhost ([127.0.0.1]:43592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe9uI-0006SS-DJ for submit@debbugs.gnu.org; Tue, 14 Oct 2014 17:45:26 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:29557) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xe9uG-0006SE-5I for 18697@debbugs.gnu.org; Tue, 14 Oct 2014 17:45:24 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9ELjLRV031563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Oct 2014 21:45:22 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9ELjJsc006411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Oct 2014 21:45:21 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s9ELjHm1024630; Tue, 14 Oct 2014 21:45:18 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 14 Oct 2014 14:45:16 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> <87bnpe4fco.fsf@mail.jurta.org> <87iojm1kqa.fsf@mail.jurta.org> <31b31698-be0a-4886-bf24-33e93fc5b611@default> In-Reply-To: <31b31698-be0a-4886-bf24-33e93fc5b611@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Also, discussion about changing `read-regexp' should be in a different bug = thread or emacs-devel discussion. It is not especially related to "hi-lock= interactive functions" defaulting. It's not right to entertain patches to= `read-regexp' in this limited context. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 17:29:07 2019 Received: (at 18697) by debbugs.gnu.org; 25 Jun 2019 21:29:07 +0000 Received: from localhost ([127.0.0.1]:33713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfszz-00085i-DE for submit@debbugs.gnu.org; Tue, 25 Jun 2019 17:29:07 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfszx-00085Z-Id for 18697@debbugs.gnu.org; Tue, 25 Jun 2019 17:29:05 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfszt-0004aD-I2; Tue, 25 Jun 2019 23:29:03 +0200 From: Lars Ingebrigtsen To: Dima Kogan Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> Date: Tue, 25 Jun 2019 23:29:01 +0200 In-Reply-To: <87zjd0digk.fsf@secretsauce.net> (Dima Kogan's message of "Sun, 12 Oct 2014 15:35:55 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dima Kogan writes: > Attached is a small feature patch. Currently when a hi-lock.el function > is called interactively, the default offered by (read-regexp) is the > last value. > > With the patch, the behavior is the s [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dima Kogan writes: > Attached is a small feature patch. Currently when a hi-lock.el function > is called interactively, the default offered by (read-regexp) is the > last value. > > With the patch, the behavior is the same if no active region is > available; if an active region IS available, the default is the contents > of the region. 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? So I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 17:29:10 2019 Received: (at control) by debbugs.gnu.org; 25 Jun 2019 21:29:11 +0000 Received: from localhost ([127.0.0.1]:33716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hft02-00085y-Ny for submit@debbugs.gnu.org; Tue, 25 Jun 2019 17:29:10 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hft01-00085r-58 for control@debbugs.gnu.org; Tue, 25 Jun 2019 17:29:09 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfszy-0004aQ-KF for control@debbugs.gnu.org; Tue, 25 Jun 2019 23:29:08 +0200 Date: Tue, 25 Jun 2019 23:29:06 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18697 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 18697 wontfix close 18697 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 18697 wontfix close 18697 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 15:18:58 2019 Received: (at 18697) by debbugs.gnu.org; 28 Jun 2019 19:18:58 +0000 Received: from localhost ([127.0.0.1]:43024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgwOf-0007OD-VC for submit@debbugs.gnu.org; Fri, 28 Jun 2019 15:18:58 -0400 Received: from chocolate.birch.relay.mailchannels.net ([23.83.209.35]:57918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgwOc-0007O3-Nd for 18697@debbugs.gnu.org; Fri, 28 Jun 2019 15:18:56 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 868CA5E1860; Fri, 28 Jun 2019 19:18:53 +0000 (UTC) Received: from pdx1-sub0-mail-a62.g.dreamhost.com (100-96-87-96.trex.outbound.svc.cluster.local [100.96.87.96]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E40CF5E2183; Fri, 28 Jun 2019 19:18:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a62.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); Fri, 28 Jun 2019 19:18:53 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Wide-Eyed-Relation: 6f477ed83bb1ec44_1561749533292_2733199011 X-MC-Loop-Signature: 1561749533292:2317248851 X-MC-Ingress-Time: 1561749533291 Received: from pdx1-sub0-mail-a62.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a62.g.dreamhost.com (Postfix) with ESMTP id C0338836DF; Fri, 28 Jun 2019 12:18:48 -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=TiQedbTzd0ZeFp6PVxfewsVPT/g=; b= iZGEBLD3E7UWqmL5AG6tzUHP0Ghymw0yNM5I69GjraBecXkanSYDlKXUjBxkYGq0 M6YQ7XU8QMKsmzmUb9tbbv/FmAcmectDAisVrkusnOe3ifk3gAmQn3PuJLBnrmZB Vh9kopzFVgvcSlDG4Sh+nEYsBx2SOQE8wn4rcxWUTIk= 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-a62.g.dreamhost.com (Postfix) with ESMTPSA id 62A93836F7; Fri, 28 Jun 2019 12:18:45 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a62 From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Organization: LINKOV.NET References: <87zjd0digk.fsf@secretsauce.net> Date: Fri, 28 Jun 2019 22:09:31 +0300 In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 25 Jun 2019 23:29:01 +0200") Message-ID: <87h889bq00.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrvddtgddufeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdelrdeitdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdeitddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehlrghrshhisehgnhhushdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Attached is a small feature patch. Currently when a hi-lock.el function >> is called interactively, the default offered by (read-regexp) is the >> last value. >> >> With the patch, the behavior is the same if no active region is >> available; if an active region IS available, the default is the contents >> of the region. > > 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: diff --git a/lisp/replace.el b/lisp/replace.el index 9d1b7bf747..15309a6a22 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -775,6 +775,8 @@ read-regexp-suggestions 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) From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 06:14:38 2019 Received: (at 18697) by debbugs.gnu.org; 29 Jun 2019 10:14:38 +0000 Received: from localhost ([127.0.0.1]:43488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhANR-0007AH-Op for submit@debbugs.gnu.org; Sat, 29 Jun 2019 06:14:38 -0400 Received: from quimby.gnus.org ([80.91.231.51]:49332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhANP-0007A9-Ex for 18697@debbugs.gnu.org; Sat, 29 Jun 2019 06:14:35 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hhANL-0006vG-25; Sat, 29 Jun 2019 12:14:33 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> <87h889bq00.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXoDwD+XQD+VQD+QwD+ lwT+TAD+OAD+awKIWcxFAAACcklEQVQ4jW1TQW4bMQzkKXeqNXQWDcHnLiG9wEDOlsD4GlSwet5i AX2/o7XbpEkEY9fgkBpyOEvb+b/zvI41uNh/0of44BCLHHt7B2zjeQx2tbaU+43eJY8VcbHc23Fe 9SBB2DmOtWrvTXHVeIRxS5RoyAeQUTG2f4CJmOZZYOkHjeftDNYVrFrtZRZ01XKlMTaEVw4c0Yvu QH65ehr7+c3sijZT1Z61uNNGvM58Fo+rdKmaVRP7dSPh4RgIc+yKCsC34DdU8GBxIQRXkdy09ZzC GGcS71EiwQmGSwr2qtcdCH4VJxc8akqIt6wntAoAt0OiVSr61zrn8+iTXCxewCASNZnOCRNCg4LI 2LsKUrVY1taSMHsqIbAbcmD5ltErxNW2SPQELfyKLbiAdkuFurlLcifi4udwBSutfdllT1IPngy9 CrtDMFMzqxnIYrKRLSVWzIcmLLkdKRbDRjHPHla/8upO7DHRUiATgHq9K49dDT+fkJUhYtICpSAJ SynCK56gRUUyWCDEiytiJgU9WBHnz2QJAdMSIIlOjcvBPBxCqQi81FKxpHZBsnOBJ9Bsegb6Wa0L 5ImGeWE2UiuxwRgZu0iogAar3wFNsefW5071EgTU2BMAaH2cnmy/5HCcvsZvmhMAcqfJNNUENcF+ 2SsMyFwnbrtVLzDMzn2mCAkN2dOEcprxMXagwZAYEF7r2YQDPpI7kG+p1NzAg69lqiXhDvQb5kNT oO9wCbqVOwfMlLU/Dng0Fd4H7G/n8b+lOeFfgOiJiPrrjmAtG71F6fF6hRXjdyTRx/PUlL/T5zg9 dazqc3hSlZP/GrDrIP0SWbY/XrkPcDa+1HsAAAAASUVORK5CYII= Date: Sat, 29 Jun 2019 12:14:30 +0200 In-Reply-To: <87h889bq00.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 28 Jun 2019 22:09:31 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> 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 pat [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: >> 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 30 18:15:46 2019 Received: (at 18697) by debbugs.gnu.org; 30 Jun 2019 22:15:46 +0000 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 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 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) 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 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 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= 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 From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one Organization: LINKOV.NET References: <87zjd0digk.fsf@secretsauce.net> <87h889bq00.fsf@mail.linkov.net> Date: Sun, 30 Jun 2019 23:58:01 +0300 In-Reply-To: (Lars Ingebrigtsen's message of "Sat, 29 Jun 2019 12:14:30 +0200") Message-ID: <87ef3asskj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrvdehgddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledriedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledriedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 02 08:41:06 2019 Received: (at 18697) by debbugs.gnu.org; 2 Jul 2019 12:41:07 +0000 Received: from localhost ([127.0.0.1]:46646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiI5q-0003vP-MH for submit@debbugs.gnu.org; Tue, 02 Jul 2019 08:41:06 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiI5o-0003vG-GZ for 18697@debbugs.gnu.org; Tue, 02 Jul 2019 08:41:04 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hiI5l-0000N3-2u; Tue, 02 Jul 2019 14:41:03 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one References: <87zjd0digk.fsf@secretsauce.net> <87h889bq00.fsf@mail.linkov.net> <87ef3asskj.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAKlBMVEUBCg2OfX0ABwUdIiQA BAdWSEEABQMHDxAABgUCDA0WGxoACQc3MTMcIB+uUZPPAAACUklEQVQ4jW2SsavbMBDGNRiCoYsH b5k0GIJHkXZxwNBAaLfw0OYuHrxkCV1CSufOnhrE2/sgvCweAsFTMKZQ9KbwOuhV/0vvTnacIRcI sn767rs7ia039+Lblq2FtQe7x7+LMNZaA2tja1YKMYNPRBdamIPZGxOzrcC4AL3ohgiIzT5GhZiO EbZSZlbYSxiCPgaPLhIZhPLFSaxBkOgmk62YLoMg/PKv1RkozQRAm8ESQADx8CopzGlI5UCfisB5 GUrhUj3Y1yCQ4QuBadCGciySJZm/yqUMZqZGxTQ8h325oDgHAG48RNL2DYIHVjW7ImHtYL65wNlM 67ZtsQGZtcsO3A/wgB/zvHnqjQ7mqYCICh7FEwfmEAsN8aGgiDgBD/fnzwj0LwfymG0A4f5n2te/ nQQAJGIoeaehQambDkwIUKYWZhVkLldUxFeQnHG6Ur/H85wPQGucbuaAqgD4ox6MexCrCjxG/o1C N3+LgvPqdOpTpYlGj6xxjRQIfCr3GRVQ7k/0IOArknzUGmar/3QzQXOXa+E83lx/kSuX3L+3QdjM jg5AH9seLBKtZ1+LLhCUbljzT/uno5tH7kAvgfhRDIp1Wd4DKwBqANGtwlegwTsHcOy2aez+FnMx AlXuAM8JKL/LltacX/tYs5Fi5QAieiR4H0xdK2Z1XVGmiHPoQ6kOpD2Iq5xT5yXzlZf2IC9Wj1EO YIf1MgCsByhhmxLKAnt4vswDkNPUoY+NKne7LV0jY491xR1YMTiO5gBSAlguwAkBmArzkKo6wnfL o/z0H7ggtDxlbJSrAAAAAElFTkSuQmCC Date: Tue, 02 Jul 2019 14:41:00 +0200 In-Reply-To: <87ef3asskj.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 30 Jun 2019 23:58:01 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Then maybe to add a new command to pull the contents of the active region > into the minibuffer. That sounds like a good idea to me. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18697 Cc: 18697@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Then maybe to add a new command to pull the contents of the active region > into the minibuffer. That sounds like a good idea to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Thu Aug 14 18:39:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 31 Jul 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator