From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#48456: Revert Dired after copy/rename Date: Mon, 24 May 2021 12:04:14 +0100 Message-ID: <87fsycmlzl.fsf@tcd.ie> References: <87v97j1xih.fsf@mail.linkov.net> <87v97en1tm.fsf@mail.linkov.net> <87cztkuede.fsf@mail.linkov.net> <87r1hz3l4u.fsf@tcd.ie> <87v97amq2s.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48456@debbugs.gnu.org, Tino Calancha To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 24 13:05:19 2021 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 1ll8Ob-000Abk-ES for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 13:05:17 +0200 Original-Received: from localhost ([::1]:57136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll8Oa-00031O-Ge for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 07:05:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll8OP-00031D-Nz for bug-gnu-emacs@gnu.org; Mon, 24 May 2021 07:05:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ll8OL-0000kR-Tx for bug-gnu-emacs@gnu.org; Mon, 24 May 2021 07:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ll8OL-0005Xh-OT for bug-gnu-emacs@gnu.org; Mon, 24 May 2021 07:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 May 2021 11:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48456 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 48456-submit@debbugs.gnu.org id=B48456.162185426621257 (code B ref 48456); Mon, 24 May 2021 11:05:01 +0000 Original-Received: (at 48456) by debbugs.gnu.org; 24 May 2021 11:04:26 +0000 Original-Received: from localhost ([127.0.0.1]:42489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll8Nm-0005Wn-Hq for submit@debbugs.gnu.org; Mon, 24 May 2021 07:04:26 -0400 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:44789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll8Nj-0005WY-Sw for 48456@debbugs.gnu.org; Mon, 24 May 2021 07:04:25 -0400 Original-Received: by mail-wr1-f43.google.com with SMTP id i17so28082315wrq.11 for <48456@debbugs.gnu.org>; Mon, 24 May 2021 04:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=LTc+tJejADmThG5w/OQpE6Ykhgz9PLHJE6ESNN5POdk=; b=g2gCVjh2f4uR35fTTfdNs0mEfPTN3bBfrwkxP6fnSp5VCCW4XN0MEbA5u5eK4e8WOs BgpI+mNGVjcKsG7aZaUmkcNDoIYVMz2OOf2nhnLEzQa0xEOlPTb57JRYzffN3cMn4GzF cIeG5Ko2m6hqgHooax2A36kGA2xowpl5z++Z2geW7NOoDSuRsc589YZbUu9RFBiAJHRF uovYJazf5HSkie0E0Bh9IGLEM3q7tWiAvqCv6vqijz2ucGJtg4ITkiFnaDi8Nj+MOWVh S+fWrEg5GPRAQ/Ej48eA2W8L9MZjqWRocQjoQDDKn5o6sguEmI+bnXKYe1vnpaOKjECO nceg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=LTc+tJejADmThG5w/OQpE6Ykhgz9PLHJE6ESNN5POdk=; b=uOX5INAhrEKJ4X7WFVeoiSmBhWAGVZLz/RHi+yr0h0wlS/FL0PeO77RfgTDuPl63YW wxRmel/5ZxgjrAsYKG9exZoWMbJtD61JRrifPQgxvRkYVvWvET2ibHdEwOoC0xzn1WrJ DyOBhp4Va4JJ2yha7zg8lfs27MG7veASo/e++WA+6zgSVhDd+ugR2bb13Yg+SA6oBW4T kXbwe6pV3mQ944hgH5laVNJeklfDhQp7WWU/WkB2w9Iy1ZiZbW3cDg3Imn+FpvuFDzUI JpdLkKaBs31Vaqz4MtAKMY7ZnssdOBrJoaT5+5TL99Mj3zDsx97JjI2HyC7KrjK98Yev wrJQ== X-Gm-Message-State: AOAM532a5f42+hspgG4ueUMebGrvfVtF2A9dunCq76R7IRTc1aZqJvxw Bbq4bknOZd5q0BZpmdOVpoe/XA== X-Google-Smtp-Source: ABdhPJyGSLqXDBiyZoLH3PzBhWOB/rpJF94DEAOm4enIm5YoGgzd7pOOHPFjpZ4Z2zB27RBbNuERKg== X-Received: by 2002:a05:6000:154c:: with SMTP id 12mr22252596wry.14.1621854257993; Mon, 24 May 2021 04:04:17 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id z12sm9252786wmc.5.2021.05.24.04.04.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 04:04:17 -0700 (PDT) In-Reply-To: <87v97amq2s.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 23 May 2021 00:06:23 +0300") 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:207122 Archived-At: Juri Linkov writes: >> Test dired-test-bug30624 condition: >> (ert-test-failed >> ((should >> (dired-do-create-files 'copy 'dired-copy-file "Copy" nil)) >> :form >> (dired-do-create-files copy dired-copy-file "Copy" nil) >> :value nil)) >> >> Should the 'should' be removed? AFAICT the return value of >> dired-do-create-files is unspecified (and unused). > > It's hard to guess how important the return value was. > It seems the return value of dired-do-create-files > via dired-create-files and via dired-move-to-filename > was the position of the beginning of the filename, > or nil if none found. > > If it should be preserved, then dired-do-create-files > could be changed to something like this: > > (prog1 (dired-create-files > ... > (when (or (eq dired-do-revert-buffer t) > ... > > Otherwise, the 'should' should be replaced with > > diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el > index 7f1743f88d..1fd14e72aa 100644 > --- a/test/lisp/dired-aux-tests.el > +++ b/test/lisp/dired-aux-tests.el > @@ -109,7 +109,8 @@ dired-test-bug30624 > (progn > (dired-revert) > (dired-mark-files-regexp "bug30624_file") > - (should (dired-do-create-files 'copy 'dired-copy-file "Copy" nil))) > + (dired-do-create-files 'copy 'dired-copy-file "Copy" nil) > + (should (dired-move-to-filename))) > (delete-directory target-dir 'recursive) > (mapc #'delete-file `(,file1 ,file2)) > (kill-buffer buf))))) Either (as well as ignoring the unspecified return value) sounds fine to me. CCing Tino for comment. Thanks, -- Basil