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

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

Re: Mysterious hidden end of line characters.


From: David
Subject: Re: Mysterious hidden end of line characters.
Date: Wed, 30 Jan 2008 16:04:48 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Thanks Pete for you reply.

> You could have used a *-dos or *-mac encoding, which have two  
> characters as line endings: line feed-carriage return or carriage  
> return-line feed. This might cause trouble. You can check this by  
> clicking with the mouse cursor onto the encoding marker in mode-line  
> ? at least in GNU Emacs 22. Otherwise there is describe-encoding.

In emacs 21 the equivelent is M-x describe-coding-system. Right now
this is defined as undecided-unix which is repressented as -- in the
mode-line. Perhaps for some reason this was not the case last week
when my colleague complained about -dos coding.
 
> But the *BIG* question is: why and for what do you need some
> external terminal application?!  In GNU Emacs you can imitate your
> behaviour by creating a *shell* buffer (M-x shell RET). In this
> *shell* buffer you have all that available what GNU Emacs can do,
> for example "flattening" your configure invocation.


Ha ha, I thought someone might spot this. After 2 years of emacs use I
still have one or two newbie feathers lerking in my plummage. I do use
*shell* buffers alot, but there is some terminal functionality which I
do not have.

Examples of commands in a *shell* buffer which for me don't work as in
a terminal include

1) shell_prompt:~$ man pwd ## (or any other command), this gives
something rather unfriendly in emacs. Only today did I discover M-x
man was the proper way to do this. Nice feature, but rather
non-evident to the newbie. Why is *shell* not totally equivelent to a
terminal?

2) shell_prompt:~$ grass ## Similarly to typing man at the prompt, the
lack of terminal functionality used to prevent me from passing the
terminal based setup page. I recently discoverred the solution (for
older versions of GRASS) was to add a flag specifying a GUI setup
page. Also updating to more recent versions appears to avoid this
problem. So now I am finally using GRASS in emacs (horrah!).

3) shell_prompt:~$ mutt ## Similarly, I cannot find a way to navigate
my mail boxes using mutt inside emacs. Emacs just isn't displaying
anything that would normally appear in the terminal apart from when I
hit q it asks if I really want to quit - of course I do, I can't see
anything! The best I can do is to run mutt in the terminal, pass to
emacs to write messages and pass back to the terminal to handle
attachments etc. What am I missing?

4) shell_prompt:~$ su ## I never like moving to super user in emacs
because the password appears on screen as I type it. So all
administration is terminal based for me. How to hide passwords as a
terminal would?



> It's possible too to use the *scratch* buffer to prepare such a long  
> and complicated line.
> 
> And finally, the top choice: use compile! M-x compile RET and remove  
> whatever you see in minibuffer, then paste (yank) the configure  
> invocation as one line. You're still able to edit this line, isearch,  
> whatever ? and remove that "2>&1 | tee config_log.txt" ballast! Press  
> RET. Isn't what you now see much nicer with the colourful faces? You  
> can save that buffer ? and you better kill it, that compile does not  
> overwrite it when you start to really compile the software!
> 
> GNU Emacs can even remember your compile commands (M-x compile RET UP  
> UP). IMO it's better not to rely on bash and explicitly use
> 
>       env <whichever environment settings> <the command>
> 
> 
> And there is one situation when it's rather useful to configure in  
> *compilation* buffer: when the line of input is too long for the  
> shell to handle interactively.

Wow, that sounds awesome. I'll bear it in mind for next time.
cheers
David




reply via email to

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