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

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

Re: Surprising behaviour of 'append' with strings


From: Emanuel Berg
Subject: Re: Surprising behaviour of 'append' with strings
Date: Sun, 06 Nov 2022 13:32:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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




reply via email to

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