This function makes a new named buffer that can run shell commands. But it only works properly when no argument is passed. When an argument is passed or set through the interactive clause, I would like that the buffer name takes the argument value for the name rather than the current (generate-new-buffer-name "foo")
.
(defun galaxy-shell (&optional bufrnm)
"TODO"
(interactive "s Buffer_name: ")
(let ( (bufrnm (generate-new-buffer-name "foo")) )
(shell bufrnm)))
or
part work? – Dilna Jul 24 '22 at 04:31or
say? – db48x Jul 24 '22 at 13:25bufrnm
if it is non-nill, else returnfoo
. Not much resemblance to alogical or
. – Dilna Jul 24 '22 at 14:16logor
should you ever need it. If you pay attention, you will notice that most languages make the same choice to separate them. C has||
for boolean or and|
for bitwise or, for example, but the one you use most often has more characters to type. – db48x Jul 24 '22 at 15:28