From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#70725: 29.3; dired-do-touch completion Date: Fri, 03 May 2024 07:10:37 +0000 Message-ID: <87fruzwetu.fsf@posteo.net> References: <871q6kkn5o.fsf@librehacker.com> <87plu38pf6.fsf@posteo.net> <86fruzjudh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5302"; mail-complaints-to="usenet@ciao.gmane.io" Cc: christopher@librehacker.com, 70725-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 03 09:10:01 2024 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 1s2n3R-00016L-Ig for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 May 2024 09:10:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2n3A-0004NQ-2I; Fri, 03 May 2024 03:09:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2n36-0004NC-HM for bug-gnu-emacs@gnu.org; Fri, 03 May 2024 03:09:41 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2n36-0007qR-90 for bug-gnu-emacs@gnu.org; Fri, 03 May 2024 03:09:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2n3S-0002yz-4T for bug-gnu-emacs@gnu.org; Fri, 03 May 2024 03:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 May 2024 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70725 X-GNU-PR-Package: emacs Original-Received: via spool by 70725-done@debbugs.gnu.org id=D70725.171472016011439 (code D ref 70725); Fri, 03 May 2024 07:10:02 +0000 Original-Received: (at 70725-done) by debbugs.gnu.org; 3 May 2024 07:09:20 +0000 Original-Received: from localhost ([127.0.0.1]:46188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2n2l-0002yR-UK for submit@debbugs.gnu.org; Fri, 03 May 2024 03:09:20 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:60549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2n2g-0002yG-Cw for 70725-done@debbugs.gnu.org; Fri, 03 May 2024 03:09:18 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9EE8124002A for <70725-done@debbugs.gnu.org>; Fri, 3 May 2024 09:08:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714720125; bh=UUXBo1b8BbDN5gCWNMQbezG7ao9SuWtM29oYELDUQvA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Autocrypt:OpenPGP:From; b=ZN58p1X4hsFTz1uwLUcIq8uXw5LBVCIHLAz0zBzJXGBfQa1iPIqWwbUSIayMxWhUp rsFvOSUOxuUKOHQ1gOJDqJaxdBb+ezIRqM4Uy+9jQdpEGeAOnxTTdS15izfRqHXTcD xNsdSIsxX6HNPLnrE18iSTmbTJgCzpqH+nwKozqlc6aVntuxWRJwe5Ms0eRrcKMPUt Afm2xDOOc9hNIkZ4woblvP4HbSqFOsb+7V9SfYIQ8+QrnI1g56jrhQQ/Vg50MjKSmX 9e70rsDMYqlGokbm7iEwu/zNKKSwF9GQinH2fcqePErfCOUso1nJTrdnBxJ0WKdcZX KsykmLz8IyHhw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VW2305Tpqz6tlh; Fri, 3 May 2024 09:08:44 +0200 (CEST) In-Reply-To: <86fruzjudh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 May 2024 09:13:14 +0300") Autocrypt: addr=thievol@posteo.net; prefer-encrypt=mutual; keydata=xsDNBF8ylcIBDADG+hy+zR6L4/vbdDDZuSaMmSrU3A5QZJpeBCvxTr7MpzzruZbhLPW1K3R6N2MA edi8Y+C8o27FVRIjpdbaKMGu9je7JV/TbUQYo3SOwCK1vM4LUn4V6ZLzSYkuiEt4eyMoiDdyvN0p kcK6P9x9DCetcEVszXzQg+yzCVrQ2hXWDXWT4M18EC3wtO7RHPouMqGiwBFhBAYErCqFWFxQHkfb tG/4yGyJ58rglb65O3qijjMWvYwcWZun9/7qm8Z4/4mHopmo2zgU+OrptnLSZfkZGz3Y7Uf452xQ GVq0Fv75NPvQru7y+DYVhuVXXyAmGxt+vf4rIiixMBbhKEPjcxEPAa2LTzex2IsTZR+QVG9uDnqC WcgaOEQ58fzXNvNhtwwF/Rgio2XWAJVdmFWS59/k9W58CIUSNKBMZh2XeGdEmtHvDtCxW3z6FJha 36RzOM3fMNNiAGdFZJA84gcdloJR+sHCDTTPT3784fjr+V8An7sI581NGFzkRQqPvEQCZbUAEQEA Ac0SdGhpZXZvbEBwb3N0ZW8ubmV0wsEOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA FiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmL3HCoACgkQDsVtFB0W75OVEAv/f6XxmtIFz08fUb8h Bp/zJP6IC4/rhhh+0GMRIRzLN8DK0jV8JCzYdFHiRJOy2lNIOpmrrCmjRRxferc2G42+ePFIsslx hU46VSz1Z83NwIG3mpdYNV5WUTUdgzxExHTNTFCd7NKv0nlHKQaA OpenPGP: url=https://posteo.de/keys/thievol@posteo.net.asc; preference=encrypt 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284366 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> Cc: 70725@debbugs.gnu.org >> From: Thierry Volpiatto >> Date: Fri, 03 May 2024 04:55:41 +0000 >>=20 >> Christopher Howard writes: >>=20 >> > 1. install helm >> > 2. emacs -q >> > 3. M-x helm-mode >> > 4. M-x dired (to some directory with files) >> > 5. M-x dired-do-touch (T) >> > >> > My problem is that, when I try to use this command in helm mode, helm >> > only gives me one completion option - the timestamp already on the >> > file. Helm tells me it is responding to a completing-read call. But >> > the dired-do-touch prompt says that the default action should be >> > "now", i.e., the current date and time. Maybe this is a helm issue, >> > but I was wondering if maybe something needs to be tweaked in >> > dired-do-touch so that it passes a correct completion list off to >> > completing-read. >>=20 >> "now" is not a valid answer for touch, it is just here in prompt to tell >> you what DEFAULT is, so what you see in Helm completion is what you have >> with vanilla Emacs if you press M-n. There is no issue here. >> That said you have better time using helm-find-files instead of dired >> for such operations on files. > > Thanks, Thierry. I'm therefore closing this bug. Hello Eli, I didn't check carefully and I see now that the prompt says "now" for DEFAULT but indeed the DEFAULT is the timestamp of the selected file and not `current-time`, so to reflect what the prompt says (now) we have to modify DEFAULT, maybe like this in `dired-do-chxxx`: @@ -437,4 +437,7 @@ =2D (format-time-string =2D "%Y%m%d%H%M.%S" =2D (file-attribute-modification-time =2D (file-attributes default-file)))) + (list + (format-time-string + "%Y%m%d%H%M.%S" (current-time)) + (format-time-string + "%Y%m%d%H%M.%S" + (file-attribute-modification-time + (file-attributes default-file))))) =2D-=20 Thierry --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmY0je4THHRoaWV2b2xA cG9zdGVvLm5ldAAKCRAOxW0UHRbvkznGC/9iHhMS/LGUjiL7fdHIBqME3HnuL1HD w5KJHxKABY9qcfq8gRtb3MpYhH8kq5DAo/fYti2t6Ai8hSRcI1r+SsHfqU45h8Bu wv6fH1y7bkjr/usLymDeiWc1MILb3Pud9HxjJ1Oeocf+QB+lYoSR94mt0RQoStrl 0w5UXutx83y3lsTLKNTh9uU2FicQ2x31G0DoCqeSvKF9iwB6bPunaiMkdRgqPKQ5 rBjrjlpINJ6p2z2EprlAg1UMJXlgiM1+xTWrhC3Ca8OdkPfsSldRTmdaVLon5KHk y8I7qPYsULzWmaQoKOGq8jlP+b6ttyOHT8DYrZYxc7t3V+BQ8F4eVOnhS1edCnT9 X3mfM1+l73R6O1PDhNpu5NMGQdW3KCjsv2Fz0MmvLZgvhmi7kcrPXpowPoRN1ax4 P8kMH7Fk1NqMnWldye4kK+Ry4/hNDnVfA2daJSbtfu0RD1xcNkC1lYS/SmB+POC5 iqSc1y9OF3U0796M6crabxctK0C6hnHeJE0= =VVFs -----END PGP SIGNATURE----- --=-=-=--