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 string


From: R. Diez
Subject: Re: Surprising behaviour of 'append' with string
Date: Sun, 6 Nov 2022 17:02:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2


then flatten-tree should do the job.  To also check that the elements
are either a string or a list of strings, you could use this:
[...]

Thanks for your help. Your routine fits the bill perfectly.


It appears you didn't appreciate the preceding line of the doc string:
[...]

Well, yes. Like I said, I am no Lisp expert and I get easily mislead.

Don't you think that 'append' and its documentation are not really user 
friendly? Its behaviour is not what you would normally expect. It doesn't make 
sense to join list elements with the first characters of strings. At least some 
example and/or warning about it would prevent unwary users like me from wasting 
time and feeding the general sentiment that Emacs and Lisp are not user 
friendly. I'm only saying this as a hint to improve the situation for other 
users (to improve Emacs). I am now fine myself with regards to 'append', thanks 
to your code.


Isn't it better to use a shell script language then?

Whether shell is better than Lisp is debatable. But say I want to write the 
logic in shell. Then I would need to pass the information (flags and config 
settings) down from Emacs (where they live now), in form of command-line 
arguments, and that's the kind of routine I am looking for in order to help me 
do that, isn't it?


Regards,
  rdiez


reply via email to

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