DD
--
Please reply to the newsgroup. If you are sending direct email,
include 22489775 somewhere in the subject or leave this sig intact.
I'm not sure I understand the problem: are you talking about
auto-compression mode? If so, it already supports bzip2.
If that doesn't help, please tell what commands force you to use gzip.
TIA.
Dired's Z command can uncompress .bz2 files, but it only compresses with
gzip, AFAICS. Feel free to submit a change that makes the program a
defcustom, or ask for that on gnu.emacs.bug.
If he only wants to use bzip2, I guess he could just change the
invocation of gzip for bzip2 in dired-aux.el and change the file
extensions to be attached to the file compressed.
In emacs-20.7 this only implies something like:
;; (condition-case nil
;; (if (not (dired-check-process (concat "Compressing " file)
;; "gzip" "-f" file))
;; (let ((out-name
;; (if (file-exists-p (concat file ".gz"))
;; (concat file ".gz")
;; (concat file ".z"))))
(condition-case nil
(if (not (dired-check-process (concat "Compressing " file)
"bzip2" "-f" file))
(let ((out-name
(if (file-exists-p (concat file ".bz2"))
(concat file ".bz2")
(concat file ".bz2"))))
Cheers.
Dominic.
> If he only wants to use bzip2, I guess he could just change the
> invocation of gzip for bzip2 in dired-aux.el and change the file
> extensions to be attached to the file compressed.
>
> In emacs-20.7 this only implies something like:
Thanks a lot. I hope this does not change anything else. I tested it out and
it works.
> If he only wants to use bzip2, I guess he could just change the
> invocation of gzip for bzip2 in dired-aux.el and change the file
> extensions to be attached to the file compressed.
But then, next time he upgrades Emacs, he has to remember all such
customizations he made, and make them again. So Eli's suggestion is a
better long-term solution.
> > Dired's Z command can uncompress .bz2 files, but it only
> > compresses with gzip, AFAICS. Feel free to submit a change that
> > makes the program a defcustom, or ask for that on gnu.emacs.bug.
--
Jason Rumney
I am not by any mean a lisp programmer so I think it is not too
hard.
Cheers.
Dominic.
Dominic> He then just has to go in dired mode and
Dominic> do C-h b to find out that Z is binded to
............................................^^^^^^
Dominic> dired-do-compress
Much quicker: go in dired mode and C-h k Z
C-h k is very very useful in such circumstances! :)
Dominic> I am not by any mean a lisp programmer so I think it is
.............................^^^^
Dominic> not too hard.
Isn't "means" also the singular form?
And BTW, isn't the past participle of "bind" "bound"?
--
Lee Sau Dan 李守敦(Big5) ~{@nJX6X~}(HZ)
E-mail: dan...@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
> Much quicker: go in dired mode and C-h k Z
>
> C-h k is very very useful in such circumstances! :)
I did all this a while ago, but I wasn't sure what else I would break
if I changed it. Anyway, I think dired mode is one where a lot of
stuff could be added to make it more useful as a file manager.
Lee Sau Dan <dan...@informatik.uni-freiburg.de> writes:
> >>>>> "Dominic" == Dominic Mitchell <dom...@videotron.ca> writes:
>
> Dominic> He then just has to go in dired mode and
> Dominic> do C-h b to find out that Z is binded to
> ............................................^^^^^^
> Dominic> dired-do-compress
>
> Much quicker: go in dired mode and C-h k Z
>
> C-h k is very very useful in such circumstances! :)
Yes, I learn new details everyday.
>
>
>
> Dominic> I am not by any mean a lisp programmer so I think it is
> .............................^^^^
> Dominic> not too hard.
>
> Isn't "means" also the singular form?
> And BTW, isn't the past participle of "bind" "bound"?
Thanks for your english pointers ... As you can guess I am not an
english native.
Cheers.
Dominic.
Dominic> I am not by any mean a lisp programmer so I think it is
>> ......................^^^^
Dominic> not too hard.
>> Isn't "means" also the singular form? And BTW, isn't the past
>> participle of "bind" "bound"?
Dominic> Thanks for your english pointers ... As you can guess I
Dominic> am not an english native.
Don't worry. Neither am I. :)
>> C-h k is very very useful in such circumstances! :)
Deepak> I did all this a while ago, but I wasn't sure what else I
Deepak> would break if I changed it.
If you don't try, how could you know?
Deepak> Anyway, I think dired mode is
Deepak> one where a lot of stuff could be added to make it more
Deepak> useful as a file manager.
I want an easier way (API) for me to add new functions to dired-mode.
The source code isn't very helpful (perhaps because I didn't have the
patience to study it when I'm needing a feature urgently). For
example, I want to easily get the list of tagged files, so that I can
write my own LISP functions to process these files. Then, I can bind
these new functions to those "unused" keys for quick access. The
function should be there already.
Yes, it is; see dired-map-over-marks. (I only needed 20 seconds of
patience to find it by grepping dired.el for "marked".)
Eli> Lee Sau Dan wrote:
>> For example, I want to easily get the list of tagged files, so
>> that I can write my own LISP functions to process these files.
>> Then, I can bind these new functions to those "unused" keys for
>> quick access. The function should be there already.
Eli> Yes, it is; see dired-map-over-marks. (I only needed 20
Eli> seconds of patience to find it by grepping dired.el for
Eli> "marked".)
Oh! How come I could not find it in my last few attempts (at
intervals of several months)? :P