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: Fri, 06 Mar 2020 01:42:29 +0200 Organization: LINKOV.NET Message-ID: <875zfixuoy.fsf@mail.linkov.net> References: <87d09suras.fsf@web.de> <87tv33r8e2.fsf@mail.linkov.net> <87eeu6hpjf.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="12102"; 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: 39902@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 06 01:05:38 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 1jA0Uk-00033T-An for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Mar 2020 01:05:38 +0100 Original-Received: from localhost ([::1]:57818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jA0Uj-00089W-BN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Mar 2020 19:05:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37493) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jA0UC-0007Yl-S7 for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 19:05:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jA0UB-0000Df-J3 for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 19:05:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jA0UB-0000DW-FF for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 19:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jA0UB-0006xU-BL for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2020 19:05:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Mar 2020 00:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39902 X-GNU-PR-Package: emacs Original-Received: via spool by 39902-submit@debbugs.gnu.org id=B39902.158345308326680 (code B ref 39902); Fri, 06 Mar 2020 00:05:03 +0000 Original-Received: (at 39902) by debbugs.gnu.org; 6 Mar 2020 00:04:43 +0000 Original-Received: from localhost ([127.0.0.1]:43874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA0Tr-0006wF-IL for submit@debbugs.gnu.org; Thu, 05 Mar 2020 19:04:43 -0500 Original-Received: from brown.elm.relay.mailchannels.net ([23.83.212.23]:48405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jA0To-0006w6-PW for 39902@debbugs.gnu.org; Thu, 05 Mar 2020 19:04:42 -0500 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 4FF88341117; Fri, 6 Mar 2020 00:04:39 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a97.g.dreamhost.com (100-96-44-10.trex.outbound.svc.cluster.local [100.96.44.10]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BBDF03411BD; Fri, 6 Mar 2020 00:04:38 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a97.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.18.5); Fri, 06 Mar 2020 00:04:39 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Arithmetic-Lyrical: 51470ec15119a0a7_1583453079043_1515345291 X-MC-Loop-Signature: 1583453079043:1422799651 X-MC-Ingress-Time: 1583453079043 Original-Received: from pdx1-sub0-mail-a97.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a97.g.dreamhost.com (Postfix) with ESMTP id B7CAD7FFE7; Thu, 5 Mar 2020 16:04:35 -0800 (PST) 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=E05mVBF+Uu/3LESddOUdrCXPNSo=; b= 2zgfwZ3dahZpJmtEsGTU4Fq6HNIgg88+d6bfar7EszEehAMyuZu/xzvHCLoY86+W 4+M4UBSFNrsP1siJeVQ5rRFFX8688CAABIuCLzK5eI8aCI8ZxEXGMV9KAk2/66Oq pm6YEueYdJymq6SbW1Pk9QYoF3vRk89KxHaajEh53b8= Original-Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (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-a97.g.dreamhost.com (Postfix) with ESMTPSA id 30E1F7FFE5; Thu, 5 Mar 2020 16:04:33 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a97 In-Reply-To: <87eeu6hpjf.fsf@web.de> (Michael Heerdegen's message of "Thu, 05 Mar 2020 14:58:12 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudduuddgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepmhhitghhrggvlhgphhgvvghruggvghgvnhesfigvsgdruggv 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:176941 Archived-At: >> The peculiarity of dired mode is that it puts point in front of file >> name. So when the region doesn't cover the file name visually, it >> should not take the file name outside the region into consideration >> for marking. > > But this does not describe what we currently have: you can mark N > complete lines, from the beginning to the end of the lines. The file in > line N is always not marked. Currently region-based marking works consistently with argument-based marking, i.e. marking N files using an argument marks the same number of files as marked by region, for example: 1. when you want to mark next 2 files, you can type: C-u 2 m 2. doing the same using the region, you can type the same argument number: C-SPC C-u 2 n m Using the same number (2 in this case) marks the same number of files. >> Exactly like kill-region should not kill text outside of the active >> region, dired-mark should not mark files outside of the active region. >> >> Especially more dangerous command dired-flag-file-deletion >> should not delete files outside of the active region. > > This is a bit philosophical. You can find an argument like this for any > behavior. Personally, in my mind I identify the whole line as > associated to a certain file. Whatever choice we take we should > document how an an active region is interpreted since different kinds of > behavior might be natural for different users. What do you think about marking the file on the current line only when point is at the end of the line, so the file name is completely inside the region? >> > (2) Most of the time I rather want `dired-mark-files-regexp' to respect >> > an active region - but that isn't implemented (though it would not be >> > hard to do). I think that would be useful. >> >> The problem is that this feature should be implemented in the macro >> dired-mark-if, but then it will affect many other commands: >> >> dired-mark-files-containing-regexp >> dired-mark-symlinks >> dired-mark-directories >> dired-mark-executables >> dired-flag-auto-save-files >> dired-flag-backup-files >> dired-compare-directories >> dired-mark-unmarked-files >> dired-mark-sexp >> ... > > Yes. I think I would vote pro such a change. It could also be made > optional by introducing a new user option. Perhaps no option needed because it's easy just to deactivate the region. But what is important is to notify in the result message that the operation was performed on the active region.