From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29423: 27.0.50; ls-lisp does not handle -F switch properly Date: Sat, 25 Nov 2017 10:12:53 +0200 Message-ID: <83fu9293p6.fsf@gnu.org> References: <87fu93yhdy.fsf@gmx.de> <83fu93ajc9.fsf@gnu.org> <87d147ssj6.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1511597663 5346 195.159.176.226 (25 Nov 2017 08:14:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Nov 2017 08:14:23 +0000 (UTC) Cc: 29423@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 25 09:14:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIVbD-0000Mj-SE for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Nov 2017 09:14:07 +0100 Original-Received: from localhost ([::1]:52344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIVbL-0006kS-09 for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Nov 2017 03:14:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIVbD-0006k4-ED for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2017 03:14:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIVb8-00081g-P0 for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2017 03:14:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIVb8-00081b-LT for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2017 03:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eIVb8-0005mk-FP for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2017 03:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Nov 2017 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 29423-submit@debbugs.gnu.org id=B29423.151159760222170 (code B ref 29423); Sat, 25 Nov 2017 08:14:02 +0000 Original-Received: (at 29423) by debbugs.gnu.org; 25 Nov 2017 08:13:22 +0000 Original-Received: from localhost ([127.0.0.1]:56696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIVaU-0005lW-1D for submit@debbugs.gnu.org; Sat, 25 Nov 2017 03:13:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIVaS-0005lD-RO for 29423@debbugs.gnu.org; Sat, 25 Nov 2017 03:13:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIVaJ-0007sT-4U for 29423@debbugs.gnu.org; Sat, 25 Nov 2017 03:13:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIVaJ-0007sO-0u; Sat, 25 Nov 2017 03:13:11 -0500 Original-Received: from [176.228.60.248] (port=3752 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIVaI-0000Zk-EL; Sat, 25 Nov 2017 03:13:10 -0500 In-reply-to: <87d147ssj6.fsf@gmx.de> (message from Michael Albinus on Fri, 24 Nov 2017 14:41:33 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140350 Archived-At: > From: Michael Albinus > Cc: 29423@debbugs.gnu.org > Date: Fri, 24 Nov 2017 14:41:33 +0100 > > Eli Zaretskii writes: > > > How come ls-lisp-classify doesn't propertize the file name in this > > case? > > Because it wasn't called. ls-lisp-classify-file was called only, if I'm > not mistaken. Right, and so the correct fix is below, I think. Do you agree? We can install this on the release branch, unless the original problem with Tramp exists only on master. Let me know. Thanks. diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index caddc7f..cf3bff5 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -713,23 +713,26 @@ ls-lisp-handle-switches (defun ls-lisp-classify-file (filename fattr) "Append a character to FILENAME indicating the file type. +This function puts the `dired-filename' property on FILENAME, but +not on the character indicator it appends. FATTR is the file attributes returned by `file-attributes' for the file. The file type indicators are `/' for directories, `@' for symbolic links, `|' for FIFOs, `=' for sockets, `*' for regular files that are executable, and nothing for other types of files." (let* ((type (car fattr)) (modestr (nth 8 fattr)) - (typestr (substring modestr 0 1))) + (typestr (substring modestr 0 1)) + (file-name (propertize filename 'dired-filename t))) (cond (type - (concat filename (if (eq type t) "/" "@"))) + (concat file-name (if (eq type t) "/" "@"))) ((string-match "x" modestr) - (concat filename "*")) + (concat file-name "*")) ((string= "p" typestr) - (concat filename "|")) + (concat file-name "|")) ((string= "s" typestr) - (concat filename "=")) - (t filename)))) + (concat file-name "=")) + (t file-name)))) (defun ls-lisp-classify (filedata) "Append a character to file name in FILEDATA indicating the file type. @@ -742,7 +745,6 @@ ls-lisp-classify are executable, and nothing for other types of files." (let ((file-name (car filedata)) (fattr (cdr filedata))) - (setq file-name (propertize file-name 'dired-filename t)) (cons (ls-lisp-classify-file file-name fattr) fattr))) (defun ls-lisp-extension (filename)