From: "Antoine Levitt" <smeuuh@gmail.com>
To: "Miles Bader" <miles@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: [Patch] Resizing shells in shell-mode
Date: Sat, 24 May 2008 23:58:49 +0200 [thread overview]
Message-ID: <6fa54e4e0805241458k54294d58x65bf6655c2bc6f7f@mail.gmail.com> (raw)
In-Reply-To: <87zlqfe7zz.fsf@catnip.gol.com>
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
And I did it again, sorry. Here is the original message :
Aww, 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 <miles@gnu.org>:
> "Antoine Levitt" <smeuuh@gmail.com> 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
>
[-- Attachment #2: Type: text/html, Size: 2167 bytes --]
next prev parent reply other threads:[~2008-05-24 21:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-24 18:38 [Patch] Resizing shells in shell-mode Antoine Levitt
2008-05-24 19:04 ` Stefan Monnier
2008-05-24 20:23 ` Antoine Levitt
2008-05-24 20:47 ` Stefan Monnier
2008-05-24 20:56 ` Miles Bader
2008-05-24 21:58 ` Antoine Levitt [this message]
2008-05-25 8:20 ` Jan Djärv
2008-05-25 12:26 ` Antoine Levitt
2008-05-25 14:43 ` Miles Bader
2008-06-05 6:24 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fa54e4e0805241458k54294d58x65bf6655c2bc6f7f@mail.gmail.com \
--to=smeuuh@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.