From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: How to rename files to numbers in Eshell? Date: Fri, 24 Sep 2021 09:21:01 +0200 Message-ID: <87wnn6h21u.fsf@zoho.eu> References: <87tuirckxp.fsf@inka.de> <87ee9u2neh.fsf@inka.de> Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39137"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:8i83sGuXplGfg9+aLD7eYgHTo6s= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 09:22:07 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTfX4-0009vg-BL for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 09:22:06 +0200 Original-Received: from localhost ([::1]:45060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTfX2-00083w-3n for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 03:22:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTfWX-00083n-6O for help-gnu-emacs@gnu.org; Fri, 24 Sep 2021 03:21:33 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:50182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTfWF-0005Zd-Dt for help-gnu-emacs@gnu.org; Fri, 24 Sep 2021 03:21:32 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mTfWC-0008oP-UP for help-gnu-emacs@gnu.org; Fri, 24 Sep 2021 09:21:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133204 Archived-At: 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