From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#27801: 26.0.50; Dired: Use relative file names when DIR-OR-LIST is a cons Date: Mon, 24 Jul 2017 13:16:40 +0900 (JST) Message-ID: References: <87o9sacy1f.fsf@calancha-pc> <30959d8c-d19a-457a-93e3-c77f45a3d587@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1500869835 27129 195.159.176.226 (24 Jul 2017 04:17:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Jul 2017 04:17:15 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 27801@debbugs.gnu.org, Tino Calancha To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 24 06:17:08 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 1dZUnq-0006cD-N5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Jul 2017 06:17:06 +0200 Original-Received: from localhost ([::1]:52822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZUnw-0001wN-BL for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Jul 2017 00:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZUnp-0001w7-BL for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2017 00:17:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZUnm-0005FE-6g for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2017 00:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZUnm-0005FA-2J for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2017 00:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dZUnl-0006ww-PV for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2017 00:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jul 2017 04:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27801-submit@debbugs.gnu.org id=B27801.150086981026694 (code B ref 27801); Mon, 24 Jul 2017 04:17:01 +0000 Original-Received: (at 27801) by debbugs.gnu.org; 24 Jul 2017 04:16:50 +0000 Original-Received: from localhost ([127.0.0.1]:53735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZUna-0006wU-KJ for submit@debbugs.gnu.org; Mon, 24 Jul 2017 00:16:50 -0400 Original-Received: from mail-pf0-f194.google.com ([209.85.192.194]:37750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZUnZ-0006wI-HT for 27801@debbugs.gnu.org; Mon, 24 Jul 2017 00:16:49 -0400 Original-Received: by mail-pf0-f194.google.com with SMTP id y25so2132656pfk.4 for <27801@debbugs.gnu.org>; Sun, 23 Jul 2017 21:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=DAdYRbD/v6iIgZcwYgiPwO0ft8XDgn2jSCgU8iB4Dj8=; b=A66V1eUxU8uci80MaK8+xiaJxdybhIRtou//iwpWJexMj57lVrkmbNFJrYKjpfBTYB QEvsZ6dys+w7OnvjiC4xQAe+NVnh8CSs60s7/RZ7LOGgo6kpzEoiNCl0Vqm0DotlWKCs 2ySDMzdH1bNWKq8qfuEBZFKBMmVBesNdSSJi+gbo3jnaB0oLsLovGMuAJQxekIVT6OTv 3R17NjeGRg5ALJNa8qXSf8ST/5j54mMGcTnfREeCXkIVQnunAxsGGpa3WsFfdwS56Tqn nVizlU5CNRbhNIWaukBoPzgAwjl53qREyqbV2O+zF2a1VRB/e1bi7czNXr6+QwMVZWVO z7AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=DAdYRbD/v6iIgZcwYgiPwO0ft8XDgn2jSCgU8iB4Dj8=; b=jTH8oM29QWJpSSR2I7CxK3ZYUUTUkcBII1LP81YkjZpfSYr8CGjz92565pmDWHPdOX t4YLHSz2z1zx66Aap86KJxvdyjF67qvO1ULieEA/0YBYsYIkEYG7+HwaLB4T9LLhzi1o T1ctwyvAnOOpJMaqfzQJW+0lkhnws41BCaaEzlphMHCG1QH55S8/EDgTfJISHHEIhzlT tTBwUIvsUYl+1Wb+NbNwRnsmStTFxw8yzmdNV9pu5clHojiPSmMcR6cn9Wqp5h+xhjXt eeHUXiJkvouiZXt2EKNg361TsK9g+XQicsjwFRuZKcprIwngDofbWxaR+FC8BjySyP+C bmoQ== X-Gm-Message-State: AIVw112KACdI/Q/U0LxjWXnDlXPHrAmTY4KAYoQ4j6XxKQKaNsJm05MQ cZKpfUF8/SKXNg== X-Received: by 10.99.100.132 with SMTP id y126mr14726587pgb.8.1500869803785; Sun, 23 Jul 2017 21:16:43 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id t70sm19562963pfk.111.2017.07.23.21.16.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jul 2017 21:16:43 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <30959d8c-d19a-457a-93e3-c77f45a3d587@default> 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:134901 Archived-At: On Sun, 23 Jul 2017, Drew Adams wrote: >> ;; Following form shows the full file name in the Dired buffer. >> (let* ((dir source-directory) >> (file1 (expand-file-name "lisp/subr.el" dir)) >> (file2 (expand-file-name "src/data.c" dir))) >> (dired (list dir file1 file2))) >> >> ;; Usually, Dired just shows the relative file name to >> ;; 'default-directory'. That is more clear, specially for >> ;; long file names. > > Sorry, but I've only read this bug report quickly - no time now. > > If you are suggesting that when DIR-OR-LIST is a cons the > file names shown should be relative then I think I disagree > strongly. > > The typical use case for a cons DIR-OR-LIST is a list > of files from anywhere, in which case absolute file > names are appropriate. I am OK with adding a new variable `foo' so that i can get this behavior if i locally bind `foo' to a non-nil value. This idea comes while i am trying to implement Bug#27631; to have this feature working with 'ls-lisp' my implementation do something like: 1) Collect all matches with `find-lisp' in a variable FILES. (This is just a first approach to the problem; for large number of matches would be better to not store the matches in a list). 2) [Suppose DIR is the default-directory i the Dired buffer] Then call: (dired (list DIR FILES)) ;; My implementation works as with GNU ls; the only difference is ;; that 2) shows full file names in the Dired buffer. I rather ;; prefer is the output has same format regarless on if the user ;; use `ls-lisp' or not. With the var `foo' mentioned above, we could change 2) with: 3) (let ((foo t)) (dired (list DIR FILES)))