unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Kan Sasaki <sasaki@fcc.ad.jp>
Cc: 39672-done@debbugs.gnu.org
Subject: bug#39672: 28.0.50; can't visit directory in Dired
Date: Wed, 19 Feb 2020 18:06:39 -0800	[thread overview]
Message-ID: <66ef80df-372d-c291-a9b8-41feb8eb9077@cs.ucla.edu> (raw)
In-Reply-To: <20200219.115255.268068588098001120.sasaki@fcc.ad.jp>

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

Thanks for reporting the bug. That is a regression in Emacs 27, and I 
reproduced the bug there, so I installed the attached patch (which is 
smaller and which I think is better) into the emacs-27 branch.

PS. Although I unfortunately mispelled your name in the attached file, I 
fixed the misspelling in the corresponding ChangeLog.3 file, which is 
what will be distributed in the next Emacs release. See:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-27&id=1d10885763287f03a5fb348ba27715e049bb48f8

[-- Attachment #2: 0001-Fix-bug-when-visiting-euc-jp-encoded-directories.patch --]
[-- Type: text/x-patch, Size: 988 bytes --]

From 62afbc513a4730c3352ffcee9f5cb9e1336c83e3 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 19 Feb 2020 17:21:16 -0800
Subject: [PATCH] Fix bug when visiting euc-jp-encoded directories

Problem reported by Ken Sasaki (Bug#39672).
* src/fileio.c (Ffile_directory_p):
Encode filename before giving it to file_directory_p.
This fixes a typo introduced in
2019-09-18T02:18:14Z!eggert@cs.ucla.edu.
---
 src/fileio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fileio.c b/src/fileio.c
index 34934dd6df..482f88627a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2911,7 +2911,7 @@ DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0,
   if (!NILP (handler))
     return call2 (handler, Qfile_directory_p, absname);
 
-  return file_directory_p (absname) ? Qt : Qnil;
+  return file_directory_p (ENCODE_FILE (absname)) ? Qt : Qnil;
 }
 
 /* Return true if FILE is a directory or a symlink to a directory.
-- 
2.24.1


      reply	other threads:[~2020-02-20  2:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  2:52 bug#39672: 28.0.50; can't visit directory in Dired Kan Sasaki
2020-02-20  2:06 ` Paul Eggert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66ef80df-372d-c291-a9b8-41feb8eb9077@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=39672-done@debbugs.gnu.org \
    --cc=sasaki@fcc.ad.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).