From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39902: 28.0.50; Marking in dired with active region Date: Tue, 24 Mar 2020 23:58:22 +0200 Organization: LINKOV.NET Message-ID: <87h7yds9dt.fsf@mail.linkov.net> References: <87d09suras.fsf@web.de> <87d09lb1ts.fsf@mail.linkov.net> <87a74n4vet.fsf@web.de> <87eetzah2s.fsf@mail.linkov.net> <87zhcn9229.fsf@mail.linkov.net> <6d82d04a-db94-4df4-82cc-3ea13a78a4dd@default> <877dzqidzn.fsf@mail.linkov.net> <1e37a524-80d3-445f-8f81-a18539105ac3@default> <87pndhhyvk.fsf@mail.linkov.net> <1ce62594-cc2a-4e95-b2b3-d022fa65decd@default> <87bloybivx.fsf@mail.linkov.net> <0066d43a-5f97-4c9d-a4b7-84c6b0ecf356@default> <87bloxgp9g.fsf@mail.linkov.net> <8736a7ajn5.fsf@web.de> <87fte52pbf.fsf@mail.linkov.net> <87o8sruchv.fsf@mail.linkov.net> <875zexf6l3.fsf@web.de> <4dd30e49-9a6a-4962-a6f2-1a68a41ce5e2@default> <87a747zyru.fsf@mail.linkov.net> <71b84061-b6c4-4fec-b12b-084b2df3c6c3@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="38306"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Michael Heerdegen , 39902@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 24 23:01:37 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGrc8-0009rQ-SG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Mar 2020 23:01:36 +0100 Original-Received: from localhost ([::1]:55844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGrc7-0007YV-U2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Mar 2020 18:01:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40736) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGrbe-00078q-EB for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2020 18:01:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGrbc-0005td-H2 for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2020 18:01:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGrba-0005sK-O4 for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2020 18:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGrba-0006tK-Lr for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2020 18:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Mar 2020 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39902 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 39902-submit@debbugs.gnu.org id=B39902.158508724826444 (code B ref 39902); Tue, 24 Mar 2020 22:01:02 +0000 Original-Received: (at 39902) by debbugs.gnu.org; 24 Mar 2020 22:00:48 +0000 Original-Received: from localhost ([127.0.0.1]:55691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGrbM-0006sS-Ap for submit@debbugs.gnu.org; Tue, 24 Mar 2020 18:00:48 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGrbK-0006ry-4m for 39902@debbugs.gnu.org; Tue, 24 Mar 2020 18:00:46 -0400 X-Originating-IP: 91.129.96.173 Original-Received: from mail.gandi.net (m91-129-96-173.cust.tele2.ee [91.129.96.173]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id A952E1C0006; Tue, 24 Mar 2020 22:00:38 +0000 (UTC) In-Reply-To: <71b84061-b6c4-4fec-b12b-084b2df3c6c3@default> (Drew Adams's message of "Mon, 23 Mar 2020 08:09:47 -0700 (PDT)") 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177689 Archived-At: > And it's easy to hit `C-SPC' without realizing that you've done so - > there's no good visual signal (just the "Mark activated" msg). Typing `C-x SPC' shows an indication as a thin vertical bar highlighted with the region face. But `C-SPC' doesn't have the same subtle indication. >> i.e. instead of >> >> (if (use-region-p) >> ... then mark files in the active region ... >> >> to use >> >> (if (let ((use-empty-active-region nil)) (use-region-p)) >> ... then mark files in the active region ... > > Yes, that's what I was hinting at: an empty > region should always be ignored, i.e., that case > should be treated as if the region were not > active. > > A better way to do it than binding that variable > (even if it were _not_ a user option) is to just > do what one would have done before `use-region-p' > was defined: > > (if (and (region-active-p) > (> (region-end) (region-beginning))) > ... > > Really, `use-region-p', although convenient, is > error prone. Few use cases really call for > being able to use an empty region (non-nil > `use-empty-active-region'), and code that deals > with the region is much clearer if it says > explicitly what it intends for an empty region. Thanks for the suggestion, now changed in master.