emacs-devel
[Top][All Lists]
Advanced

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

Re: [Patch] Resizing shells in shell-mode


From: Antoine Levitt
Subject: Re: [Patch] Resizing shells in shell-mode
Date: Sat, 24 May 2008 23:58:49 +0200

And I did it again, sorry. Here is the original message :
A
ww, I can't believe I haven't thought about this earlier. You're right, of course. I'm sorry for not thinking this through
(this problem also occurs with shell-copy-environment-variable, but I don't know how this is used so it may actually not be a problem)
Hmm, so, a solution would be to check for a prompt (there's already a regexp to do just that) and only change columns when there's one on the line (so it also matches prompts with a partially typed command) (bad, might be noticeable under certain (rare) circumstances), or otherwise change the value of $COLUMNS (better). I'm gonna check how gnome-terminal and such things handle this.
Sorry again
Antoine


I think I have found the solution, which is to send a TIOCSWINSZ ioctl to the tty. I'm not sure how to do that in elisp, and not sure how portable that will be.
Antoine
2008/5/24 Miles Bader <address@hidden>:
"Antoine Levitt" <address@hidden> writes:
> It's more serious when you take into account the fact
> that some other process (not a shell) might be running at that moment.
> Have you try M-x term instead of M-x shell?  It's a different tradeoff,
> but it should be able to accomodate window-size changes.
>
> Me:
> Well, that's the reason why the patch is to shell, not comint. Isn't shell
> the specialized mode for dealing with shells only ?

Shells are often running other programs...

Sending shell commands without an explicit user action is a bad idea,
don't do it.

-Miles

--
`To alcohol!  The cause of, and solution to,
 all of life's problems' --Homer J. Simpson


reply via email to

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