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

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

Re: How to rename files to numbers in Eshell?


From: Emanuel Berg
Subject: Re: How to rename files to numbers in Eshell?
Date: Fri, 24 Sep 2021 09:21:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis wrote:

> That is definitely interesting, please correct me, as
> I don't get it how to apply it, as following is not working:
>
> (replace-regexp-in-string "ABC" "\#" "ABCM ABCI ABCJ ABCY ABC8")

Well, what are you trying to do?

>>> I don't use Bash any more for that, I use Emacs Lisp.
>>
>> I'm not convinced so far that Elisp provides any advantage
>> here. Elisp scripts look way more wordy.
>
> I have transcribed almost anything I used to do in Bash to
> Emacs Lisp. For example image resizing with external
> `mogrify'

Holy cow, lucky me I don't think like that as I have 100+ zsh
to (if so) translate into Elisp ... [1]

I don't think it is a matter of Elisp being less or more wordy
(but interestingly Elisp and Lisp in general is very wordy
while shell script languages and zsh in particular has
a syntax that is extremely compact and cryptic) - so while it
isn't about that (here), it is rather about where you are and
what you do. Elisp for editing files and inputting text and
shell languages for all work in/from the filesystem.

> Of course anything like that may be written in any
> programming language [...]

You can't, and even if it you could, it isn't a good idea
because different languages are intended for different types
of programming tasks.

So while you _can_ hammer a nail with the flip side of the axe
propose a dispose of hammers in any wood shop/carpentry with
this argument and ... no one will do it.

> Of course one could do anything with Bash as main
> environment, but just because it is appears so much easier,
> handy, simpler, more integrated, I like to do it with Emacs
> as main environment.

It isn't ...

> There are more functions available to Emacs Lisp than to
> Bash, re-usability in Emacs Lisp is so much higher.

You are aware that there are other shells than Bash?

Also, shell programming doesn't rely on functions half as much
as does well, functional programming like Lisp.

Shell programming is supposed to be just the glow and binaries
are supposed to do the main job. Nowadays little by little
they have added so much features so a lot more is now possible
with just the shell, but still.

[1] https://dataswamp.org/~incal/conf/.zsh/

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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