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: Sat, 04 May 2024 12:31:39 +0000 Message-ID: <87o79lyd04.fsf@posteo.net> References: <871q6kkn5o.fsf@librehacker.com> <87plu38pf6.fsf@posteo.net> <86fruzjudh.fsf@gnu.org> <87fruzwetu.fsf@posteo.net> <86wmo9g5u7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19969"; mail-complaints-to="usenet@ciao.gmane.io" Cc: christopher@librehacker.com, 70725@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 14:31:15 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 1s3EXq-0004yw-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 14:31:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3EXW-0001V4-64; Sat, 04 May 2024 08:30:54 -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 1s3EXI-0001ND-N2 for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 08:30:48 -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 1s3EXI-0007ie-2E for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 08:30:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3EXe-00088L-Ho for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 08:31: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: Sat, 04 May 2024 12:31: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-submit@debbugs.gnu.org id=B70725.171482581631248 (code B ref 70725); Sat, 04 May 2024 12:31:02 +0000 Original-Received: (at 70725) by debbugs.gnu.org; 4 May 2024 12:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:53502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3EWt-00087w-Qc for submit@debbugs.gnu.org; Sat, 04 May 2024 08:30:16 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:48791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3EWq-00086e-D6 for 70725@debbugs.gnu.org; Sat, 04 May 2024 08:30:14 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C7021240028 for <70725@debbugs.gnu.org>; Sat, 4 May 2024 14:29:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714825783; bh=bkJ/5sNvaCoUy53GRfrch6bsoaCx7v0A/L3osfmlRJU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Autocrypt:OpenPGP:From; b=rCLh3B3pCXeskiHw/2EVhyRznq0anZzC3KIQQEJD/IxayL0xguaFWJq1dFK7Xd9XJ 3EwUb4IFam783w3YJIia+N9izkt88LVhoUqstxD0y0caebVeuce/S0LX7+GO64DYPg QlVUR5gUJQOEu0alZaRqNPuycIS0iWWug5aDMD0Aw3kgitGGOgy/hqPpTv/FxB9g3T o5ayKE4n3lwgDYMvX+WQ5gcl/KJ6K4bJjVjFloBhMzi3c+zcqnjdnI83bMMjIuRhni 1bGLqYN8LHbTotY8ZK/NyRFQ5bTsoPfOO+sCTRNSTltQp6mARnN/6R9RkzQKR0huSX /bbCJ6ojN613A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VWn6t6Gk6z9rxB; Sat, 4 May 2024 14:29:42 +0200 (CEST) In-Reply-To: <86wmo9g5u7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 May 2024 14:43:44 +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:284423 Archived-At: Eli Zaretskii writes: >> From: Thierry Volpiatto >> Cc: christopher@librehacker.com, 70725-done@debbugs.gnu.org >> Date: Fri, 03 May 2024 07:10:37 +0000 >> >> Eli Zaretskii writes: >> >> >> Cc: 70725@debbugs.gnu.org >> >> From: Thierry Volpiatto >> >> Date: Fri, 03 May 2024 04:55:41 +0000 >> >> >> >> Christopher Howard writes: >> >> >> >> > 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. >> >> >> >> "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 @@ >> - (format-time-string >> - "%Y%m%d%H%M.%S" >> - (file-attribute-modification-time >> - (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))))) > > Thanks, but can any of you two please show a recipe I could use to > look into this, without having to install Helm? Because the > underlying issue is not Helm-specific, is it? You don't have to install Helm, this is a dired (minor) issue. >From a dired buffer hit "T", the prompt show as default "now", now hit M-n and examine the timestamp, you will see it the file timestamp but not the "now timestamp". -- Thierry