all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Michalis V." <mvar.40k@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Michalis V." <mvar.40k@gmail.com>,
	okamsn@protonmail.com, 46913@debbugs.gnu.org
Subject: bug#46913: dired-do-compress doesn't work on files in inserted subdirectories
Date: Tue, 21 Sep 2021 12:36:07 +0300	[thread overview]
Message-ID: <871r5iqni0.fsf@cnu407c2zx.nsn-intra.net> (raw)
In-Reply-To: <83mto6z3ir.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Sep 2021 12:22:52 +0300")

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


hi Eli,

Eli Zaretskii <eliz@gnu.org> writes:
>> So another solution which is a bit more hackish is the following
>> (and also attached as a patch)
>
> Why not use file-relative-name instead?

i was totally, 100% oblivious that this existed. It simplifies the
solution even more.

> Btw, please don't use "path" for anything that is not PATH-style
> directory lists: the GNU Coding Standards frown on such uses.  We use
> "file name" or "absolute file name" or "leading directories" instead,
> as appropriate for the context.
>
> Thanks.

i'll do so, thank you!

Michalis


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

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index f2cb745ad4..023531038f 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1246,7 +1246,7 @@ dired-do-compress-to
                                   (?i . ,(mapconcat
                                           (lambda (in-file)
                                             (shell-quote-argument
-                                             (file-name-nondirectory in-file)))
+                                             (file-relative-name in-file)))
                                           in-files " "))))))
              (message (ngettext "Compressed %d file to %s"
 			        "Compressed %d files to %s"

  reply	other threads:[~2021-09-21  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  1:53 bug#46913: dired-do-compress doesn't work on files in inserted subdirectories Okam via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-21  8:35 ` Michalis V.
2021-09-21  9:22   ` Eli Zaretskii
2021-09-21  9:36     ` Michalis V. [this message]
2021-09-21 17:13       ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=871r5iqni0.fsf@cnu407c2zx.nsn-intra.net \
    --to=mvar.40k@gmail.com \
    --cc=46913@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=okamsn@protonmail.com \
    /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 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.