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

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

Re: Autogen in Emacs Shell


From: Eli Zaretskii
Subject: Re: Autogen in Emacs Shell
Date: Sat, 02 May 2015 09:31:06 +0300

> Date: Fri, 1 May 2015 21:46:53 +0200
> From: Alexander Shukaev <haroogan@gmail.com>
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
>     > Those 3 newlines were really typed into the shell. How come?
>     
>     Now that we know that the contents of this file are sent as an input
>     string to the shell when it starts, what did you expect? The shell
>     gets 3 lines, each one of which is a comment, so it does nothing, but
>     displays the newline. What is surprising here?
>     
> 
> ​The point then is that this file actually does not serve its purpose. It does
> not behave as, for example, ".bashrc" does. In other words, one cannot simply
> write multiline shell code in there without experiencing this ugly side 
> effect.

I think you can, just with little more creativity (see below), but why
would you want to?  You already have .bashrc, and can easily test that
you are running under Emacs, if that's the issue.  AFAIU, the
emacs_bash.sh file is supported for some very specialized situations,
and probably for Posix platforms, so I have hard time imagining why it
would be needed on Windows.

> I understand the problem here, but why not, for instance, concatenate lines
> with " ; " ​in order to make one line out of them​ before sending them to 
> 'bash'?

For that, the code needs to be much smarter and understand the
semantics of the string it sends.  E.g., what if a line ends with a
backslash, or some other special character?

But you can do that yourself -- make only one line out of several.




reply via email to

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