From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#58256: Possible mistake in recent `dired-do-flagged-delete' change Date: Sun, 2 Oct 2022 20:42:17 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18873"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stephen Berman To: 58256@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 02 20:44:03 2022 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 1of3wY-0004nb-OB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 20:44:02 +0200 Original-Received: from localhost ([::1]:45570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of3wX-0005bP-QV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 14:44:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of3va-0004o2-6t for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 14:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of3vZ-00085h-Ve for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 14:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of3vZ-0006bL-O0; Sun, 02 Oct 2022 14:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: stephen.berman@gmx.net, bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Oct 2022 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58256 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stephen Berman Original-Received: via spool by submit@debbugs.gnu.org id=B.166473614325323 (code B ref -1); Sun, 02 Oct 2022 18:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Oct 2022 18:42:23 +0000 Original-Received: from localhost ([127.0.0.1]:48049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of3ux-0006aN-4L for submit@debbugs.gnu.org; Sun, 02 Oct 2022 14:42:23 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of3uv-0006aE-Gk for submit@debbugs.gnu.org; Sun, 02 Oct 2022 14:42:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of3uv-00048w-CF for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 14:42:21 -0400 Original-Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:37381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of3ut-00081z-Iz for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 14:42:20 -0400 Original-Received: by mail-oi1-x233.google.com with SMTP id s125so9630156oie.4 for ; Sun, 02 Oct 2022 11:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date; bh=s5j02i7rPjRX6DcwMiqXvuldPE3ueoOn9pkc2NwHSrQ=; b=OICac6HfUP30dNcmZaQlRUFISf57bNGKaMemTIxgGwYIJ7UTqQ95MaoceEbTlZmiZv fXn1C+X8XbApieTT22/SCXcQ4ZSoeMcrzKQDcTa9iEEOzxDBttliarY5j+j7Neg64jh/ VKUKi3K/CGBgxbbZ/5vOiVNBZ6aTPrquJDs+elndvobAcn7Ocmlqbu5yuwnBURXmH+fJ vUDde4S9J3eKB13rWV5GCpi3gslDAF/yEPe/rEgb1aPITy8VScgVftWBw9/kDH9qQBKK WvRXWuwCQpEsccNiDWl3GAFfYF+vc9v4o0u5QmkYiYwkNxDKKpEkycK3mXuCsaqOWEuy M50g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date; bh=s5j02i7rPjRX6DcwMiqXvuldPE3ueoOn9pkc2NwHSrQ=; b=xBgs8tr0IDz5F+P+6d+H/58vf2AJoXrhty0th5yZYG4b25pjg5ppgZQ6wzSM/KBlHh f5Rg+tfMKSNn/ufRotzzpssKq3IyZV7XpvLdOU328KjVdvwFvrMEa17ExnvUnyq4u3SK gXy7hPKyQsOXNBSIA80PzEVZZXygZJtfpjjJP4ixJpjhAYZN1RcmPGSH6xJtIcfRIDz3 3S0eAxCCfO2kBJ5pKmazdzGxvAluOwBVwzMKt4LyiubHHqFIRkVR8AyBdB9Xeh9n9Rxy 8jkmRsHvbCmK/jm21iFDrYUW0UAK6XZG4ABqQ2Yf6mKfsLJkurkk/Ija5KYlOpZA6fju YpCA== X-Gm-Message-State: ACrzQf3aen+QUtCcMd9xVhVQH0Y2nqeE+WKSTx4qr+Hr5DK3f8OVWRbU +mimIK3c7Wby/y6aqPf/2iRdh62L9KxQdVE6mpQq2S29 X-Google-Smtp-Source: AMsMyM7ANEtJsT97V1o62nxcP2KKbdiM1rRMpj9i7nkP9LsuXXgYPMolsL3YzjJQs72QYZanakZIMkQ11Y6eQ1FTefc= X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id j6-20020a056808118600b00353b77aa481mr502963oil.199.1664736138124; Sun, 02 Oct 2022 11:42:18 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 2 Oct 2022 20:42:17 +0200 X-Hashcash: 1:20:221002:bug-gnu-emacs@gnu.org::zI0a9ZHAnBj7xVSY:3j/C Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=stefankangas@gmail.com; helo=mail-oi1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:244252 Archived-At: It seems like there might be a mistake in the `dired-do-flagged-delete' of this commit: commit 194d54a929a83fede75d618b104acd1b544feb10 Author: Stephen Berman Date: Fri Jun 4 12:01:41 2021 +0200 Fix placement of point in Dired deletion operations It seems like there is a `dolist' that will always run on the empty list. Was perhaps the below the intended change? If so, I wonder how this code would have worked without that `dolist' so far, and if that line could just be removed instead? diff --git a/lisp/dired.el b/lisp/dired.el index b9e89292e2..358e815c88 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3664,16 +3664,17 @@ dired-do-flagged-delete case-fold-search markers) (if (save-excursion (goto-char (point-min)) (re-search-forward regexp nil t)) - (dired-internal-do-deletions - (nreverse - ;; this can't move point since ARG is nil - (dired-map-over-marks (cons (dired-get-filename) - (let ((m (point-marker))) - (push m markers) - m)) - nil)) - nil t) - (dolist (m markers) (set-marker m nil)) + (progn + (dired-internal-do-deletions + (nreverse + ;; this can't move point since ARG is nil + (dired-map-over-marks (cons (dired-get-filename) + (let ((m (point-marker))) + (push m markers) + m)) + nil)) + nil t) + (dolist (m markers) (set-marker m nil))) (or nomessage (message "(No deletions requested)")))))