help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [works on the comman line]


From: Uwe Brauer
Subject: Re: [works on the comman line]
Date: Sun, 20 Feb 2022 16:41:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> * Uwe Brauer <oub@mat.ucm.es> [2022-02-20 16:44]:

> dired-compress-file-alist is a variable defined in ‘dired-aux.el’.

> Where it says:

> Within CMD, %i denotes the input file(s), and %o denotes the
> output file.  %i path(s) are relative, while %o is absolute.

Ok, I was looking for the %i and %o explanation.

> Maybe that is limitation.

> You can do it in single function here:

> (defun rcd-zip-file ()
>   "ZIP single file within Dired."
>   (interactive)
>   (let* ((file (car (dired-get-marked-files t)))
>        (zip-file (concat file ".zip")))
>     (when file
>       (start-process "ZIP" "ZIP" "zip" "-9" zip-file file)
>       (revert-buffer))))

Thanks but his does not work in the sense that it also add one
additional directory.


I tried to use 

(defun rcd-zip-file ()
  "ZIP single file within Dired."
  (interactive)
  (let* ((file (car (dired-get-marked-files t)))
         (zip-file (concat file ".zip")))
    (when file
      (start-process "ZIP" "ZIP" "zip" "-9j" zip-file file)
      (revert-buffer))))
 

Or


(defun rcd-zip-file ()
  "ZIP single file within Dired."
  (interactive)
  (let* ((file (car (dired-get-marked-files t)))
         (zip-file (concat file ".zip")))
    (when file
      (start-process "ZIP" "ZIP" "zip" "-9" "-j" zip-file file)
      (revert-buffer))))

But not worked. This seems to be cursed!

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]