all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
@ 2012-12-20 17:01 Christopher Schmidt
  2012-12-20 17:06 ` Andreas Schwab
  2012-12-20 17:08 ` Bastien
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Schmidt @ 2012-12-20 17:01 UTC (permalink / raw)
  To: 13242

The interactive form of dired-goto-file reads a file name using
read-file-name.  Arg MUSMATCH of this call is nil, though.  This does
not make sense to me.  I think this arg should be t.

        Christopher





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:01 bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH Christopher Schmidt
@ 2012-12-20 17:06 ` Andreas Schwab
  2012-12-20 17:10   ` Bastien
                     ` (2 more replies)
  2012-12-20 17:08 ` Bastien
  1 sibling, 3 replies; 8+ messages in thread
From: Andreas Schwab @ 2012-12-20 17:06 UTC (permalink / raw)
  To: 13242

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> The interactive form of dired-goto-file reads a file name using
> read-file-name.  Arg MUSMATCH of this call is nil, though.  This does
> not make sense to me.  I think this arg should be t.

The file may not exist any more, but still listed in the dired buffer.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:01 bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH Christopher Schmidt
  2012-12-20 17:06 ` Andreas Schwab
@ 2012-12-20 17:08 ` Bastien
  1 sibling, 0 replies; 8+ messages in thread
From: Bastien @ 2012-12-20 17:08 UTC (permalink / raw)
  To: 13242

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> The interactive form of dired-goto-file reads a file name using
> read-file-name.  Arg MUSMATCH of this call is nil, though.  This does
> not make sense to me.  I think this arg should be t.

Agreed.  This trivial patch does this.

This is not really a bug to me, so I'm not sure if this should go
to emacs-24 or to trunk.  I'll let another maintainer decide on this.

Thanks,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dired.el.patch --]
[-- Type: text/x-patch, Size: 460 bytes --]

=== modified file 'lisp/dired.el'
--- lisp/dired.el	2012-11-23 07:59:43 +0000
+++ lisp/dired.el	2012-12-20 17:07:30 +0000
@@ -2623,7 +2623,7 @@
    (prog1				; let push-mark display its message
        (list (expand-file-name
 	      (read-file-name "Goto file: "
-			      (dired-current-directory))))
+			      (dired-current-directory) nil t)))
      (push-mark)))
   (unless (file-name-absolute-p file)
     (error "File name `%s' is not absolute" file))


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:06 ` Andreas Schwab
@ 2012-12-20 17:10   ` Bastien
  2012-12-20 17:27     ` Andreas Schwab
  2012-12-20 17:15   ` Christopher Schmidt
  2020-08-25 12:00   ` Lars Ingebrigtsen
  2 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2012-12-20 17:10 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 13242

Andreas Schwab <schwab@linux-m68k.org> writes:

> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>
>> The interactive form of dired-goto-file reads a file name using
>> read-file-name.  Arg MUSMATCH of this call is nil, though.  This does
>> not make sense to me.  I think this arg should be t.
>
> The file may not exist any more, but still listed in the dired buffer.

Why would a user put the cursor on that file on this case?

-- 
 Bastien





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:06 ` Andreas Schwab
  2012-12-20 17:10   ` Bastien
@ 2012-12-20 17:15   ` Christopher Schmidt
  2020-08-25 12:00   ` Lars Ingebrigtsen
  2 siblings, 0 replies; 8+ messages in thread
From: Christopher Schmidt @ 2012-12-20 17:15 UTC (permalink / raw)
  To: 13242

Andreas Schwab <schwab@linux-m68k.org> writes:
> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>
>> The interactive form of dired-goto-file reads a file name using
>> read-file-name.  Arg MUSMATCH of this call is nil, though.  This does
>> not make sense to me.  I think this arg should be t.
>
> The file may not exist any more, but still listed in the dired buffer.

I see your point, although this is an odd corner case.

I am still in favour of changing the argument to t so one gets implicit
completion of incomplete filenames.  E.g. j in RET would jump to my
init.el if I am direding my .emacs.d.

Maybe completing-read could be used here, completing to all filenames in
the dired buffer?  That's seems like a useful idea considering
virtual-dired and find-dired.

        Christopher





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:10   ` Bastien
@ 2012-12-20 17:27     ` Andreas Schwab
  2012-12-20 17:36       ` Bastien
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2012-12-20 17:27 UTC (permalink / raw)
  To: Bastien; +Cc: 13242

Bastien <bzg@altern.org> writes:

> Why would a user put the cursor on that file on this case?

Why not?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:27     ` Andreas Schwab
@ 2012-12-20 17:36       ` Bastien
  0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2012-12-20 17:36 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 13242

Andreas Schwab <schwab@linux-m68k.org> writes:

> Bastien <bzg@altern.org> writes:
>
>> Why would a user put the cursor on that file on this case?
>
> Why not?

Someone offers to take you to a place, you accept, he takes
you to that place; you're entitled to think the place exists,
aren't you?

If `dired-goto-file' takes you to a file, you're led into
thinking this file exists, which is wrong.

In fact, perhaps dired could highlight non-existing files
on the fly.

-- 
 Bastien





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH
  2012-12-20 17:06 ` Andreas Schwab
  2012-12-20 17:10   ` Bastien
  2012-12-20 17:15   ` Christopher Schmidt
@ 2020-08-25 12:00   ` Lars Ingebrigtsen
  2 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-25 12:00 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 13242

Andreas Schwab <schwab@linux-m68k.org> writes:

> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>
>> The interactive form of dired-goto-file reads a file name using
>> read-file-name.  Arg MUSMATCH of this call is nil, though.  This does
>> not make sense to me.  I think this arg should be t.
>
> The file may not exist any more, but still listed in the dired buffer.

I think that's a good point, and the dired command should allow you to
jump there anyway.  So I don't think there's anything to fix here, and
I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-25 12:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 17:01 bug#13242: 24.2.91; dired-goto-file: read-file-name with nil MUSTMATCH Christopher Schmidt
2012-12-20 17:06 ` Andreas Schwab
2012-12-20 17:10   ` Bastien
2012-12-20 17:27     ` Andreas Schwab
2012-12-20 17:36       ` Bastien
2012-12-20 17:15   ` Christopher Schmidt
2020-08-25 12:00   ` Lars Ingebrigtsen
2012-12-20 17:08 ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.