From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Surprising behaviour of 'append' with strings
Date: Sun, 06 Nov 2022 13:32:16 +0100 [thread overview]
Message-ID: <875yfse01b.fsf@dataswamp.org> (raw)
In-Reply-To: 6554cc02-2082-3dca-73cc-05fee1c6c4d0@yahoo.de
R. Diez wrote:
> However, I got into trouble with 'append'. Its documentation
> states:
>
> "Each argument may be a list, vector or string."
>
> I tested it like this:
>
> (append "1") -> "1"
> (append "1" "2") -> (49 . "2")
`append' is like that with strings (well, obviously), try it
with lists instead.
Also see `cl-concatenate', `push', and many other ways to
create and manipulate lists.
But I think you are on the wrong track here, you insert
a layer of complexity with this Elisp to semi-manually hammer
out shell commands, this will be very time-consuming and
error-prone, better to have all the shell stuff in shell
functions and scripts, those OTOH you can absolutely execute
from Emacs/Elisp and use their results - and that's a fine way
to do it.
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2022-11-06 12:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6554cc02-2082-3dca-73cc-05fee1c6c4d0.ref@yahoo.de>
2022-11-06 11:05 ` Surprising behaviour of 'append' with strings R. Diez
2022-11-06 12:13 ` Stephen Berman
2022-11-06 12:35 ` Emanuel Berg
2022-11-06 20:28 ` Michael Heerdegen
2022-11-06 20:57 ` Emanuel Berg
2022-11-06 12:19 ` Emanuel Berg
2022-11-06 12:32 ` Emanuel Berg [this message]
2022-11-06 12:37 ` Eli Zaretskii
2022-11-06 12:39 ` Jean Louis
2022-11-06 20:33 ` Michael Heerdegen
2022-11-06 21:45 ` [External] : " Drew Adams
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=875yfse01b.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=help-gnu-emacs@gnu.org \
/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.