From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to rename files to numbers in Eshell?
Date: Wed, 22 Sep 2021 16:46:28 +0200 [thread overview]
Message-ID: <87fstwllbv.fsf@zoho.eu> (raw)
In-Reply-To: YT5PGpeh3zfTokDC@protected.localdomain
Jean Louis wrote:
> (defun rcd-image-date-match (file)
> (string-match "[[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][_-]" file))
Badness 1632321754: use the postfix operator for repitition, \{n\}
> (defun sort-images (&optional prefix)
Badness 1632321536: unused lexical argument
> (dir (concat "/home/data1/protected/Media/Pictures/Pictures/Year-" year "/" month "/" year "-" month "-" day "/"))
> (destination (concat "/home/data1/protected/Media/Pictures/Pictures/Year-" year "/" month "/" year "-" month "-" day "/" file-base "." file-ext)))
Badness 1632321545: same data hard-coded twice (damn)
> (mkdir dir t)
> (message (concat "Copy file to: " destination))
Badness 1632321563: "destination" should be spelled "dst" to
line up with "src", also it is just too long and bulky even
for Lisp.
> (if (y-or-n-p (concat "Overwrite: " destination))
> (rename-file file destination t))
Badness 1632321690: `if' with only one branch should be
`when'.
Conclusion: Hey, no one said it's supposed to be easy ...
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2021-09-22 14:46 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-11 13:15 How to rename files to numbers in Eshell? Felix E. Klee
2021-09-11 13:40 ` Jean Louis
2021-09-12 8:44 ` Felix E. Klee
2021-09-12 19:03 ` Jean Louis
2021-09-13 9:28 ` Jean Louis
2021-09-13 11:52 ` tomas
2021-09-14 7:42 ` Felix E. Klee
2021-09-14 9:17 ` Jean Louis
2021-09-14 9:32 ` tomas
2021-09-14 11:11 ` Felix E. Klee
2021-09-14 13:37 ` Jean Louis
2021-09-14 15:48 ` Felix E. Klee
2021-09-16 22:37 ` Michael Heerdegen
2021-09-16 22:47 ` Michael Heerdegen
2021-09-17 7:27 ` Felix E. Klee
2021-09-24 7:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-25 13:43 ` Jean Louis
2021-09-26 2:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 6:38 ` Felix E. Klee
2021-09-30 7:37 ` Jean Louis
2021-09-30 7:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 13:17 ` Felix E. Klee
2021-09-30 15:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 21:42 ` Jean Louis
2021-10-01 0:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 20:51 ` Jean Louis
2021-10-01 21:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-02 7:53 ` Lack of integration in Emacs - it was " Jean Louis
2021-10-03 8:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-03 9:27 ` Jean Louis
2021-10-04 3:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-04 10:15 ` Jean Louis
2021-10-04 11:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-22 14:46 ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
2021-09-22 14:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-16 12:15 ` Felix E. Klee
2021-09-16 15:11 ` Nick Dokos
2021-09-16 16:07 ` Felix E. Klee
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=87fstwllbv.fsf@zoho.eu \
--to=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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.