GNU bug report logs - #32720
term-mode ignores certain window size changes

Previous Next

Package: emacs;

Reported by: Gary Fredericks <fredericksgary <at> gmail.com>

Date: Wed, 12 Sep 2018 15:24:01 UTC

Severity: minor

Fixed in version 26.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32720 in the body.
You can then email your comments to 32720 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Wed, 12 Sep 2018 15:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gary Fredericks <fredericksgary <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Sep 2018 15:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: term-mode ignores certain window size changes
Date: Wed, 12 Sep 2018 07:09:45 -0500
[Message part 1 (text/plain, inline)]
*Affects*: version 26 (git-bisected to commit 8e7712c7afc)

Note: I have only tried this on --without-x emacs

*Steps to reproduce*

   1. start emacs
   2. start a term buffer with M-x term
   3. run `seq 1000` at the bash prompt to fill the screen
   4. enlarge the terminal window that emacs is running in, so that the
   window size changes as well
   5. run `seq 1000` again, and observe that the new space at the bottom of
   the buffer is not being used

*Analysis notes*

term-mode *does* pick up changes after more explicit window configurations,
like splits; my workaround for months has been to split and join the
terminal window whenever I've resized it.

As best I can tell, term-mode subscribes to window size changes by adding
advice to the window-adjust-process-window-size-function variable, and the
8e7712c7afc reduced the set of situations in which that function is called.

I've developed a more automated workaround with a term-load-hook of this
form:

(add-hook 'window-size-change-functions (lambda (_frame)
(window--adjust-process-windows)))

It might be that adding this line to the term-mode setup steps would be
sufficient, but I'm not familiar enough with the window.el code to have a
guess whether that's actually a good approach.

Gary Fredericks
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Thu, 13 Sep 2018 08:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Thu, 13 Sep 2018 10:07:06 +0200
> *Affects*: version 26 (git-bisected to commit 8e7712c7afc)
>
> Note: I have only tried this on --without-x emacs
>
> *Steps to reproduce*
>
>     1. start emacs
>     2. start a term buffer with M-x term
>     3. run `seq 1000` at the bash prompt to fill the screen
>     4. enlarge the terminal window that emacs is running in, so that the
>     window size changes as well
>     5. run `seq 1000` again, and observe that the new space at the bottom of
>     the buffer is not being used
>
> *Analysis notes*
>
> term-mode *does* pick up changes after more explicit window configurations,
> like splits; my workaround for months has been to split and join the
> terminal window whenever I've resized it.
>
> As best I can tell, term-mode subscribes to window size changes by adding
> advice to the window-adjust-process-window-size-function variable, and the
> 8e7712c7afc reduced the set of situations in which that function is called.
>
> I've developed a more automated workaround with a term-load-hook of this
> form:
>
> (add-hook 'window-size-change-functions (lambda (_frame)
> (window--adjust-process-windows)))
>
> It might be that adding this line to the term-mode setup steps would be
> sufficient, but I'm not familiar enough with the window.el code to have a
> guess whether that's actually a good approach.

Emacs no more runs 'window-configuration-change-hook' when the frame
size changes so your workaround should indeed work around that case.
But you should see a similar problem before commit 8e7712c7afc with a
frame containing a window showing process output and that window's
size gets changed.

In its current form, 'window--adjust-process-windows' is a gross hack.
Putting a function by default on 'window-configuration-change-hook'
(or 'window-size-change-functions') is a bad idea IMO.  There should
be no place for such functions in window.el - a special mode should
take care of them.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Thu, 13 Sep 2018 14:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Thu, 13 Sep 2018 17:06:35 +0300
> Date: Thu, 13 Sep 2018 10:07:06 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> 
> In its current form, 'window--adjust-process-windows' is a gross hack.
> Putting a function by default on 'window-configuration-change-hook'
> (or 'window-size-change-functions') is a bad idea IMO.

Can you elaborate on why do you think these are bad ideas?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Fri, 14 Sep 2018 08:34:02 GMT) Full text and rfc822 format available.

Message #14 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 14 Sep 2018 10:32:48 +0200
>> In its current form, 'window--adjust-process-windows' is a gross hack.
>> Putting a function by default on 'window-configuration-change-hook'
>> (or 'window-size-change-functions') is a bad idea IMO.
>
> Can you elaborate on why do you think these are bad ideas?

(1) Preempting a hook is like preempting an option.  And options
should be pristine when starting Emacs.  Users who never run any
processes should not be obliged to remove anything from a hook to
obtain a clean run.  Even if we say that it does not matter much in
the case at hand, this code sets a precedent which others may follow.

(2) I don't know what a "logical" window size is.  Reading the
doc-string of 'window-adjust-process-window-size-function', I
understand that the function this variable is set to should pass the
size of some window showing output of a process to that process.  If
this interpretation is correct, then not hooking into
'window-size-change-functions' will fail to capture explicit resizing
of any such window - usually the most prominent case when a window
size changes.  So what's the aim of 'window--adjust-process-windows'?

In either case, it should not be the task of window.el to find process
windows.  It does not find "Man" or "Info" windows either and calls a
hook in a hook when resizing them although someone might find that
convenient - compare Bug#32536.  Window groups are the most prominent
other example of code that usurpated window.el.  I never understood
why code which pertains to 'follow-mode' was added to window.el.
Adding such code makes the already largest code file in the Lisp
directory more and more difficult to navigate.

BTW, the info text "When windows that display buffers associated with
process change their dimensions, the affected processes should be told
about these changes" seems to lack an "a" before "process".

And the text "If the process has the `adjust-window-size-function'
property (*note Process Information::), its value overrides the global
and buffer-local values of
`window-adjust-process-window-size-function'." is misleading.  Section
38.6 Process Information does not mention any such property and I have
no idea what it's supposed to accomplish.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 04 Nov 2018 09:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 04 Nov 2018 10:56:13 +0100
[Message part 1 (text/plain, inline)]
> *Affects*: version 26 (git-bisected to commit 8e7712c7afc)
>
> Note: I have only tried this on --without-x emacs
>
> *Steps to reproduce*
>
>     1. start emacs
>     2. start a term buffer with M-x term
>     3. run `seq 1000` at the bash prompt to fill the screen
>     4. enlarge the terminal window that emacs is running in, so that the
>     window size changes as well
>     5. run `seq 1000` again, and observe that the new space at the bottom of
>     the buffer is not being used
>
> *Analysis notes*
>
> term-mode *does* pick up changes after more explicit window configurations,
> like splits; my workaround for months has been to split and join the
> terminal window whenever I've resized it.
>
> As best I can tell, term-mode subscribes to window size changes by adding
> advice to the window-adjust-process-window-size-function variable, and the
> 8e7712c7afc reduced the set of situations in which that function is called.
>
> I've developed a more automated workaround with a term-load-hook of this
> form:
>
> (add-hook 'window-size-change-functions (lambda (_frame)
> (window--adjust-process-windows)))
>
> It might be that adding this line to the term-mode setup steps would be
> sufficient, but I'm not familiar enough with the window.el code to have a
> guess whether that's actually a good approach.

While all you write above is correct and I agree with the fix you
propose, I tend to restore the old behavior as with the attached
patch.  The reason is that I have no idea in how many more yet
unrevealed occasions my commit had adverse effects so I'd rather be on
the safe side for Emacs 26.2.  Please try the patch and tell me
whether it indeed restores the old behavior.

Thanks, martin
[run-window-configuration-change.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Fri, 16 Nov 2018 12:17:01 GMT) Full text and rfc822 format available.

Message #20 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: rudalics <at> gmx.at
Cc: 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 16 Nov 2018 06:15:56 -0600
[Message part 1 (text/plain, inline)]
Yep, it seems to work with the patch applied.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Sun, Nov 4, 2018 at 3:56 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > *Affects*: version 26 (git-bisected to commit 8e7712c7afc)
>  >
>  > Note: I have only tried this on --without-x emacs
>  >
>  > *Steps to reproduce*
>  >
>  >     1. start emacs
>  >     2. start a term buffer with M-x term
>  >     3. run `seq 1000` at the bash prompt to fill the screen
>  >     4. enlarge the terminal window that emacs is running in, so that the
>  >     window size changes as well
>  >     5. run `seq 1000` again, and observe that the new space at the
> bottom of
>  >     the buffer is not being used
>  >
>  > *Analysis notes*
>  >
>  > term-mode *does* pick up changes after more explicit window
> configurations,
>  > like splits; my workaround for months has been to split and join the
>  > terminal window whenever I've resized it.
>  >
>  > As best I can tell, term-mode subscribes to window size changes by
> adding
>  > advice to the window-adjust-process-window-size-function variable, and
> the
>  > 8e7712c7afc reduced the set of situations in which that function is
> called.
>  >
>  > I've developed a more automated workaround with a term-load-hook of this
>  > form:
>  >
>  > (add-hook 'window-size-change-functions (lambda (_frame)
>  > (window--adjust-process-windows)))
>  >
>  > It might be that adding this line to the term-mode setup steps would be
>  > sufficient, but I'm not familiar enough with the window.el code to have
> a
>  > guess whether that's actually a good approach.
>
> While all you write above is correct and I agree with the fix you
> propose, I tend to restore the old behavior as with the attached
> patch.  The reason is that I have no idea in how many more yet
> unrevealed occasions my commit had adverse effects so I'd rather be on
> the safe side for Emacs 26.2.  Please try the patch and tell me
> whether it indeed restores the old behavior.
>
> Thanks, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Fri, 16 Nov 2018 12:59:02 GMT) Full text and rfc822 format available.

Message #23 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: "eliz <at> gnu.org" <eliz <at> gnu.org>, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 16 Nov 2018 13:57:51 +0100
> Yep, it seems to work with the patch applied.

Thanks for the feedback.  But after more carefully looking into the
'window-adjust-process-windows' code I am now almost convinced that
your original proposal is the way to go.  That is, I nowhere found in
that code anything that depends on the change of the window
configuration.  The only thing that code is interested in is tracing
window size changes which 'window-configuration-change-hook' does not
handle particularly well.

So if you already have run Emacs for some time with your

(add-hook
 'window-size-change-functions
 (lambda (_frame) (window--adjust-process-windows)))

and did not see any adversary effects I am inclined to install that
for Emacs 26.2.  For Emacs 27 I would then (after the release of Emacs
26.2) remove the

(add-hook 'window-configuration-change-hook 'window--adjust-process-windows)

call.

Eli would that be OK with you as well?  I'd still have to amend the
doc of 'window-configuration-change-hook' but the net change would be
considerably smaller than the one I proposed in the other thread.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Fri, 16 Nov 2018 13:16:02 GMT) Full text and rfc822 format available.

Message #26 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: rudalics <at> gmx.at
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 16 Nov 2018 07:15:14 -0600
[Message part 1 (text/plain, inline)]
Confirmed that I've been using that add-hook call for a while (ever since I
originally reported this) and haven't noticed any adverse effects.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Fri, Nov 16, 2018 at 6:58 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > Yep, it seems to work with the patch applied.
>
> Thanks for the feedback.  But after more carefully looking into the
> 'window-adjust-process-windows' code I am now almost convinced that
> your original proposal is the way to go.  That is, I nowhere found in
> that code anything that depends on the change of the window
> configuration.  The only thing that code is interested in is tracing
> window size changes which 'window-configuration-change-hook' does not
> handle particularly well.
>
> So if you already have run Emacs for some time with your
>
> (add-hook
>   'window-size-change-functions
>   (lambda (_frame) (window--adjust-process-windows)))
>
> and did not see any adversary effects I am inclined to install that
> for Emacs 26.2.  For Emacs 27 I would then (after the release of Emacs
> 26.2) remove the
>
> (add-hook 'window-configuration-change-hook
> 'window--adjust-process-windows)
>
> call.
>
> Eli would that be OK with you as well?  I'd still have to amend the
> doc of 'window-configuration-change-hook' but the net change would be
> considerably smaller than the one I proposed in the other thread.
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Fri, 16 Nov 2018 14:46:02 GMT) Full text and rfc822 format available.

Message #29 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 16 Nov 2018 16:45:38 +0200
> Date: Fri, 16 Nov 2018 13:57:51 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 32720 <at> debbugs.gnu.org, "eliz <at> gnu.org" <eliz <at> gnu.org>
> 
> So if you already have run Emacs for some time with your
> 
> (add-hook
>   'window-size-change-functions
>   (lambda (_frame) (window--adjust-process-windows)))
> 
> and did not see any adversary effects I am inclined to install that
> for Emacs 26.2.  For Emacs 27 I would then (after the release of Emacs
> 26.2) remove the
> 
> (add-hook 'window-configuration-change-hook 'window--adjust-process-windows)
> 
> call.
> 
> Eli would that be OK with you as well?

I don't think I have a clear idea of what is being proposed for
emacs-26.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 17 Nov 2018 09:22:02 GMT) Full text and rfc822 format available.

Message #32 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 17 Nov 2018 10:20:55 +0100
[Message part 1 (text/plain, inline)]
> I don't think I have a clear idea of what is being proposed for
> emacs-26.

I propose the attached changes.

martin
[window-configuration-change-hook.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 17 Nov 2018 09:44:02 GMT) Full text and rfc822 format available.

Message #35 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 17 Nov 2018 11:43:05 +0200
> Date: Sat, 17 Nov 2018 10:20:55 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
> 
>  > I don't think I have a clear idea of what is being proposed for
>  > emacs-26.
> 
> I propose the attached changes.

OK (although I don't like putting functions on hooks in the core).

> +;; Remove the following call in Emacs 27, running
> +;; 'window-size-change-functions' should suffice.
>  (add-hook 'window-configuration-change-hook 'window--adjust-process-windows)

Why not do that now?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 17 Nov 2018 18:41:01 GMT) Full text and rfc822 format available.

Message #38 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 17 Nov 2018 19:40:01 +0100
> OK (although I don't like putting functions on hooks in the core).

Neither do I.

>> +;; Remove the following call in Emacs 27, running
>> +;; 'window-size-change-functions' should suffice.
>>   (add-hook 'window-configuration-change-hook 'window--adjust-process-windows)
>
> Why not do that now?

Because Gary has not tested it ;-)

More seriously: I have no idea how 'adjust-window-size-function' and
the function specified by 'window-adjust-process-window-size-function'
work in practice.  If they rely on anything beyond a window's
dimensions (for example, on which other buffers are displayed on a
frame), then not calling 'window--adjust-process-windows' for
'window-configuration-change-hook' might miss something.  I'd rather
reserve such subtleties for Emacs 27.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 18 Nov 2018 03:31:02 GMT) Full text and rfc822 format available.

Message #41 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 18 Nov 2018 05:30:42 +0200
> Date: Sat, 17 Nov 2018 19:40:01 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
> 
>  >> +;; Remove the following call in Emacs 27, running
>  >> +;; 'window-size-change-functions' should suffice.
>  >>   (add-hook 'window-configuration-change-hook 'window--adjust-process-windows)
>  >
>  > Why not do that now?
> 
> Because Gary has not tested it ;-)
> 
> More seriously: I have no idea how 'adjust-window-size-function' and
> the function specified by 'window-adjust-process-window-size-function'
> work in practice.  If they rely on anything beyond a window's
> dimensions (for example, on which other buffers are displayed on a
> frame), then not calling 'window--adjust-process-windows' for
> 'window-configuration-change-hook' might miss something.  I'd rather
> reserve such subtleties for Emacs 27.

I agree with doing this for Emacs 27, I'm asking why not do this now
on master?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 18 Nov 2018 09:23:01 GMT) Full text and rfc822 format available.

Message #44 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 18 Nov 2018 10:22:06 +0100
fixed 32720 26.2

> Confirmed that I've been using that add-hook call for a while (ever since I
> originally reported this) and haven't noticed any adverse effects.

I pushed your fix now to the release branch as commit
88762b4063a42a69234bda74b1626b646734715a.  If you are interested in
the further development of this, please run Emacs with the line

(add-hook 'window-configuration-change-hook 'window--adjust-process-windows)

removed and tell us whether it causes any problems.

Closing this bug (hopefully).

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 18 Nov 2018 09:23:02 GMT) Full text and rfc822 format available.

Message #47 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 18 Nov 2018 10:22:40 +0100
> I agree with doing this for Emacs 27, I'm asking why not do this now
> on master?

Because most people run master and I'm interested in testing whether
the interaction between 'window-configuration-change-hook' and
'window-size-change-functions' could cause any problems.  As soon as
Emacs 26.2 is released (and if Gary doesn't see any problems in the
meantime) I make the change on master.

martin




bug Marked as fixed in versions 26.2. Request was from martin rudalics <rudalics <at> gmx.at> to control <at> debbugs.gnu.org. (Sun, 18 Nov 2018 09:23:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 18 Nov 2018 15:22:01 GMT) Full text and rfc822 format available.

Message #52 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 18 Nov 2018 17:21:29 +0200
> Date: Sun, 18 Nov 2018 10:22:40 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
> 
>  > I agree with doing this for Emacs 27, I'm asking why not do this now
>  > on master?
> 
> Because most people run master and I'm interested in testing whether
> the interaction between 'window-configuration-change-hook' and
> 'window-size-change-functions' could cause any problems.

Indeed, doing this on master now will allow us to collect testing
experience sooner, so I think it's a win.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 18 Nov 2018 19:38:01 GMT) Full text and rfc822 format available.

Message #55 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 18 Nov 2018 20:37:07 +0100
>> Because most people run master and I'm interested in testing whether
>> the interaction between 'window-configuration-change-hook' and
>> 'window-size-change-functions' could cause any problems.
>
> Indeed, doing this on master now will allow us to collect testing
> experience sooner, so I think it's a win.

You mean doing what on master?  Remove 'window--adjust-process-windows'
from 'window-configuration-change-hook'?  But then nobody will test
the way we do that on the release branch now.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 18 Nov 2018 20:11:01 GMT) Full text and rfc822 format available.

Message #58 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 18 Nov 2018 22:10:47 +0200
> Date: Sun, 18 Nov 2018 20:37:07 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
> 
>  >> Because most people run master and I'm interested in testing whether
>  >> the interaction between 'window-configuration-change-hook' and
>  >> 'window-size-change-functions' could cause any problems.
>  >
>  > Indeed, doing this on master now will allow us to collect testing
>  > experience sooner, so I think it's a win.
> 
> You mean doing what on master?  Remove 'window--adjust-process-windows'
> from 'window-configuration-change-hook'?

Yes.

> But then nobody will test the way we do that on the release branch
> now.

Those who use Emacs 26 will.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 19 Nov 2018 09:42:02 GMT) Full text and rfc822 format available.

Message #61 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: fredericksgary <at> gmail.com, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 19 Nov 2018 10:41:12 +0100
>> You mean doing what on master?  Remove 'window--adjust-process-windows'
>> from 'window-configuration-change-hook'?
>
> Yes.

OK.  I'll do it in a week or so.  Maybe Gary can test it till then.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 19 Nov 2018 15:05:01 GMT) Full text and rfc822 format available.

Message #64 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 19 Nov 2018 09:04:19 -0600
[Message part 1 (text/plain, inline)]
What should I be testing exactly?

On Mon, Nov 19, 2018, 03:41 martin rudalics <rudalics <at> gmx.at wrote:

>  >> You mean doing what on master?  Remove 'window--adjust-process-windows'
>  >> from 'window-configuration-change-hook'?
>  >
>  > Yes.
>
> OK.  I'll do it in a week or so.  Maybe Gary can test it till then.
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 19 Nov 2018 15:16:02 GMT) Full text and rfc822 format available.

Message #67 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 19 Nov 2018 16:14:49 +0100
[Message part 1 (text/plain, inline)]
> What should I be testing exactly?

In window.el remove the

;; Remove the following call in Emacs 27, running
;; 'window-size-change-functions' should suffice.
(add-hook 'window-configuration-change-hook 'window--adjust-process-windows)

lines as in the attached patch.

martin
[use-size-change-functions-only.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 22 Dec 2018 22:55:01 GMT) Full text and rfc822 format available.

Message #70 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 22 Dec 2018 16:53:57 -0600
[Message part 1 (text/plain, inline)]
My apologies, I only started testing this patch today.

Seems to work fine so far.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Mon, Nov 19, 2018 at 9:14 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > What should I be testing exactly?
>
> In window.el remove the
>
> ;; Remove the following call in Emacs 27, running
> ;; 'window-size-change-functions' should suffice.
> (add-hook 'window-configuration-change-hook
> 'window--adjust-process-windows)
>
> lines as in the attached patch.
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 23 Dec 2018 09:39:02 GMT) Full text and rfc822 format available.

Message #73 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 23 Dec 2018 10:38:45 +0100
> My apologies, I only started testing this patch today.
>
> Seems to work fine so far.

Did you rebuild Emacs?  It might have problems when you show a process
buffer in an existing window whose size you never change thereafter.

Anyway, don't bother too much about it.  I'm currently trying to
redesign window change hooks completely in a way this issue will be
hopefully not relevant afterwards.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 23 Dec 2018 13:18:02 GMT) Full text and rfc822 format available.

Message #76 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 23 Dec 2018 07:16:55 -0600
[Message part 1 (text/plain, inline)]
I did rebuild emacs (which I don't normally do, which is why it took me a
while) -- it didn't build until I did "make bootstrap".

I don't quite understand "It might have problems when you show a process
buffer in an existing window whose size you never change thereafter."

If you'd like me to try something, please be a bit more explicit.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Sun, Dec 23, 2018 at 3:38 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > My apologies, I only started testing this patch today.
>  >
>  > Seems to work fine so far.
>
> Did you rebuild Emacs?  It might have problems when you show a process
> buffer in an existing window whose size you never change thereafter.
>
> Anyway, don't bother too much about it.  I'm currently trying to
> redesign window change hooks completely in a way this issue will be
> hopefully not relevant afterwards.
>
> Thanks, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 23 Dec 2018 13:41:01 GMT) Full text and rfc822 format available.

Message #79 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 23 Dec 2018 14:40:08 +0100
> I don't quite understand "It might have problems when you show a process
> buffer in an existing window whose size you never change thereafter."

I've been only guessing.  'window-size-change-functions' triggers only
after a window is created or changed size.  It doesn't trigger when a
window gets another buffer.  So for example the following scenario
should fail:

(1) Show process output in a window.

(2) Display another buffer in that window.

(3) Change the width of the window.

(4) Show the process output again in that window.

I suppose (4) fails to communicate the new window width to the
process.  If you now do

(5) Change the window width again.

everything should be OK.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 23 Dec 2018 13:48:01 GMT) Full text and rfc822 format available.

Message #82 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 23 Dec 2018 07:47:23 -0600
[Message part 1 (text/plain, inline)]
Yes, that does seem to fail.

You're anticipating this will be fixed by the broader changes you alluded
to earlier?

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Sun, Dec 23, 2018 at 7:40 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > I don't quite understand "It might have problems when you show a process
>  > buffer in an existing window whose size you never change thereafter."
>
> I've been only guessing.  'window-size-change-functions' triggers only
> after a window is created or changed size.  It doesn't trigger when a
> window gets another buffer.  So for example the following scenario
> should fail:
>
> (1) Show process output in a window.
>
> (2) Display another buffer in that window.
>
> (3) Change the width of the window.
>
> (4) Show the process output again in that window.
>
> I suppose (4) fails to communicate the new window width to the
> process.  If you now do
>
> (5) Change the window width again.
>
> everything should be OK.
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 23 Dec 2018 18:04:01 GMT) Full text and rfc822 format available.

Message #85 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 23 Dec 2018 19:02:56 +0100
> Yes, that does seem to fail.
>
> You're anticipating this will be fixed by the broader changes you alluded
> to earlier?

Yes.  So please remove that one-line change from Emacs 26.  I'll post
the new patch here in a few days, against Emacs 27.  Maybe you can
upgrade then.

Thanks for testing, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 23 Dec 2018 18:55:02 GMT) Full text and rfc822 format available.

Message #88 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 23 Dec 2018 12:54:37 -0600
[Message part 1 (text/plain, inline)]
Now that you mention it, I was probably testing against emacs27 -- I just
applied the change to the master branch.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Sun, Dec 23, 2018 at 12:03 PM martin rudalics <rudalics <at> gmx.at> wrote:

>  > Yes, that does seem to fail.
>  >
>  > You're anticipating this will be fixed by the broader changes you
> alluded
>  > to earlier?
>
> Yes.  So please remove that one-line change from Emacs 26.  I'll post
> the new patch here in a few days, against Emacs 27.  Maybe you can
> upgrade then.
>
> Thanks for testing, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Tue, 25 Dec 2018 09:52:02 GMT) Full text and rfc822 format available.

Message #91 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Tue, 25 Dec 2018 10:51:16 +0100
> Now that you mention it, I was probably testing against emacs27 -- I just
> applied the change to the master branch.

I now posted a patch for running window change hooks on emacs-devel.
See

http://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00430.html

Please try the patch and report any problems.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 29 Dec 2018 23:24:01 GMT) Full text and rfc822 format available.

Message #94 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 29 Dec 2018 17:23:03 -0600
[Message part 1 (text/plain, inline)]
How am I supposed to apply the patch? I get this:

$ git apply txtC00XwS8xFx.txt
error: corrupt patch at line 9

I think I had that same issue with your earlier patch, but it was small
enough that I could edit by hand.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Tue, Dec 25, 2018 at 3:51 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > Now that you mention it, I was probably testing against emacs27 -- I
> just
>  > applied the change to the master branch.
>
> I now posted a patch for running window change hooks on emacs-devel.
> See
>
> http://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00430.html
>
> Please try the patch and report any problems.
>
> Thanks, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 30 Dec 2018 09:54:01 GMT) Full text and rfc822 format available.

Message #97 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 30 Dec 2018 10:53:06 +0100
> How am I supposed to apply the patch? I get this:
>
> $ git apply txtC00XwS8xFx.txt
> error: corrupt patch at line 9

Which operating system?  What does

git apply txtC00XwS8xFx.txt --verbose

give?

> I think I had that same issue with your earlier patch, but it was small
> enough that I could edit by hand.

Are you sure you are on master?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 31 Dec 2018 12:46:02 GMT) Full text and rfc822 format available.

Message #100 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 31 Dec 2018 06:45:23 -0600
[Message part 1 (text/plain, inline)]
Yes, on master, using an ubuntu of some sort:

$ git show | head -1
commit 792dc36e691b1e4b7735c75d2d402d1b9a8801ce

$ git apply txtC00XwS8xFx.txt --verbose
error: corrupt patch at line 9

$ md5sum txtC00XwS8xFx.txt
0d958ef0f85eef10f0de8e963044278f txtC00XwS8xFx.txt

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Sun, Dec 30, 2018 at 3:53 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > How am I supposed to apply the patch? I get this:
>  >
>  > $ git apply txtC00XwS8xFx.txt
>  > error: corrupt patch at line 9
>
> Which operating system?  What does
>
> git apply txtC00XwS8xFx.txt --verbose
>
> give?
>
>  > I think I had that same issue with your earlier patch, but it was small
>  > enough that I could edit by hand.
>
> Are you sure you are on master?
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 31 Dec 2018 14:17:02 GMT) Full text and rfc822 format available.

Message #103 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 31 Dec 2018 15:16:10 +0100
[Message part 1 (text/plain, inline)]
> $ git show | head -1
> commit 792dc36e691b1e4b7735c75d2d402d1b9a8801ce
>
> $ git apply txtC00XwS8xFx.txt --verbose
> error: corrupt patch at line 9
>
> $ md5sum txtC00XwS8xFx.txt
> 0d958ef0f85eef10f0de8e963044278f txtC00XwS8xFx.txt

No idea what happened.  I attach the latest version against today's
master (the same commit you mentioned).

git show | head -1
commit 792dc36e691b1e4b7735c75d2d402d1b9a8801ce

md5sum window-change-functions.diff
619d18ffa7106e21c07992d2b6df302a *window-change-functions.diff

martin
[window-change-functions.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Tue, 01 Jan 2019 15:38:02 GMT) Full text and rfc822 format available.

Message #106 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Tue, 1 Jan 2019 09:37:02 -0600
[Message part 1 (text/plain, inline)]
That one worked -- thanks.

I started running the patched version and immediately ran into trouble with
switching away from term-mode buffers, but I suspect it's related to some
custom code I have:

https://github.com/gfredericks/dotfiles/blob/6a6497dd747e92b034549f3aee05d4dc6f0640d5/base/.emacs.d/user/gfredericks-terminals.el.symlink#L63

In particular C-x b doesn't work like it used to; it ends up doing
something weird where it creates a buffer named after the minibuffer buffer
selection text.

I confirmed that I don't have the same issue when using unpatched master.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Mon, Dec 31, 2018 at 8:16 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > $ git show | head -1
>  > commit 792dc36e691b1e4b7735c75d2d402d1b9a8801ce
>  >
>  > $ git apply txtC00XwS8xFx.txt --verbose
>  > error: corrupt patch at line 9
>  >
>  > $ md5sum txtC00XwS8xFx.txt
>  > 0d958ef0f85eef10f0de8e963044278f txtC00XwS8xFx.txt
>
> No idea what happened.  I attach the latest version against today's
> master (the same commit you mentioned).
>
> git show | head -1
> commit 792dc36e691b1e4b7735c75d2d402d1b9a8801ce
>
> md5sum window-change-functions.diff
> 619d18ffa7106e21c07992d2b6df302a *window-change-functions.diff
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Tue, 01 Jan 2019 17:26:02 GMT) Full text and rfc822 format available.

Message #109 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Tue, 01 Jan 2019 18:25:39 +0100
> I started running the patched version and immediately ran into trouble with
> switching away from term-mode buffers, but I suspect it's related to some
> custom code I have:
>
> https://github.com/gfredericks/dotfiles/blob/6a6497dd747e92b034549f3aee05d4dc6f0640d5/base/.emacs.d/user/gfredericks-terminals.el.symlink#L63

The only things related to my patch should be

(defun window-size-change-function-for-bug-32720 (_frame)
  (window--adjust-process-windows))

and its activation in 'term-load-hook'.  Would removing these change
something in the behavior you observe?

> In particular C-x b doesn't work like it used to; it ends up doing
> something weird where it creates a buffer named after the minibuffer buffer
> selection text.

Shouldn't C-x b create such a buffer if it does not exist yet?  What
precisely did you want it to do?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Tue, 01 Jan 2019 17:32:01 GMT) Full text and rfc822 format available.

Message #112 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Tue, 1 Jan 2019 11:31:35 -0600
[Message part 1 (text/plain, inline)]
I'm sorry, I forgot that code was there -- I had already disabled in when I
ran these tests, so you can disregard it.

C-x b for me starts an ido buffer selector. I forgot that wasn't a default
either.

So the buffer selector did not work -- it would show me a list of other
buffers (in the minibuffer), but I couldn't select one with RET -- it would
end up just creating a new buffer whose (very long) name was the list of
buffer names that ido showed.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Tue, Jan 1, 2019 at 11:25 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > I started running the patched version and immediately ran into trouble
> with
>  > switching away from term-mode buffers, but I suspect it's related to
> some
>  > custom code I have:
>  >
>  >
> https://github.com/gfredericks/dotfiles/blob/6a6497dd747e92b034549f3aee05d4dc6f0640d5/base/.emacs.d/user/gfredericks-terminals.el.symlink#L63
>
> The only things related to my patch should be
>
> (defun window-size-change-function-for-bug-32720 (_frame)
>    (window--adjust-process-windows))
>
> and its activation in 'term-load-hook'.  Would removing these change
> something in the behavior you observe?
>
>  > In particular C-x b doesn't work like it used to; it ends up doing
>  > something weird where it creates a buffer named after the minibuffer
> buffer
>  > selection text.
>
> Shouldn't C-x b create such a buffer if it does not exist yet?  What
> precisely did you want it to do?
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Tue, 01 Jan 2019 17:57:01 GMT) Full text and rfc822 format available.

Message #115 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Tue, 01 Jan 2019 18:55:49 +0100
> C-x b for me starts an ido buffer selector. I forgot that wasn't a default
> either.
>
> So the buffer selector did not work -- it would show me a list of other
> buffers (in the minibuffer), but I couldn't select one with RET -- it would
> end up just creating a new buffer whose (very long) name was the list of
> buffer names that ido showed.

Does the problem occur with emacs -Q if you just activate 'ido-mode'?
In either case you would have to debug 'ido-buffer-internal' and look
where the strange value for 'buf' comes from.  If it comes from
'ido-read-internal' you would have to look into that one too.  Here I
cannot trigger any problems with 'ido-mode'.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sun, 06 Jan 2019 22:52:02 GMT) Full text and rfc822 format available.

Message #118 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sun, 6 Jan 2019 16:51:02 -0600
[Message part 1 (text/plain, inline)]
Now that I'm trying harder to isolate the bug, I can't reproduce it anymore.

Perhaps it was a symptom of a dirty build process, as I had switched to a
clean checkout. I thought `make clean; make bootstrap` was sufficient to
clean everything up, but perhaps not.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Tue, Jan 1, 2019 at 11:55 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > C-x b for me starts an ido buffer selector. I forgot that wasn't a
> default
>  > either.
>  >
>  > So the buffer selector did not work -- it would show me a list of other
>  > buffers (in the minibuffer), but I couldn't select one with RET -- it
> would
>  > end up just creating a new buffer whose (very long) name was the list of
>  > buffer names that ido showed.
>
> Does the problem occur with emacs -Q if you just activate 'ido-mode'?
> In either case you would have to debug 'ido-buffer-internal' and look
> where the strange value for 'buf' comes from.  If it comes from
> 'ido-read-internal' you would have to look into that one too.  Here I
> cannot trigger any problems with 'ido-mode'.
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 07 Jan 2019 12:31:01 GMT) Full text and rfc822 format available.

Message #121 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 7 Jan 2019 06:29:56 -0600
[Message part 1 (text/plain, inline)]
Actually I think I *have* run into the problem again, but this time it
seems to be related to my use of this plugin:
https://github.com/tlh/workgroups.el (in particular, C-x C-f from the
scratch buffer works before setting up a workgroup, but not after -- after
it complains about the minibuffer being active).

I'm going to try not using it for a few days to see if there are any other
issues.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Sun, Jan 6, 2019 at 4:51 PM Gary Fredericks <fredericksgary <at> gmail.com>
wrote:

> Now that I'm trying harder to isolate the bug, I can't reproduce it
> anymore.
>
> Perhaps it was a symptom of a dirty build process, as I had switched to a
> clean checkout. I thought `make clean; make bootstrap` was sufficient to
> clean everything up, but perhaps not.
>
> Gary Fredericks
> (803)-295-0195
> fredericksgary <at> gmail.com
> gfredericks.com
>
>
> On Tue, Jan 1, 2019 at 11:55 AM martin rudalics <rudalics <at> gmx.at> wrote:
>
>>  > C-x b for me starts an ido buffer selector. I forgot that wasn't a
>> default
>>  > either.
>>  >
>>  > So the buffer selector did not work -- it would show me a list of other
>>  > buffers (in the minibuffer), but I couldn't select one with RET -- it
>> would
>>  > end up just creating a new buffer whose (very long) name was the list
>> of
>>  > buffer names that ido showed.
>>
>> Does the problem occur with emacs -Q if you just activate 'ido-mode'?
>> In either case you would have to debug 'ido-buffer-internal' and look
>> where the strange value for 'buf' comes from.  If it comes from
>> 'ido-read-internal' you would have to look into that one too.  Here I
>> cannot trigger any problems with 'ido-mode'.
>>
>> martin
>>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Mon, 07 Jan 2019 16:12:01 GMT) Full text and rfc822 format available.

Message #124 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Mon, 07 Jan 2019 17:11:22 +0100
> Actually I think I *have* run into the problem again, but this time it
> seems to be related to my use of this plugin:
> https://github.com/tlh/workgroups.el (in particular, C-x C-f from the
> scratch buffer works before setting up a workgroup, but not after -- after
> it complains about the minibuffer being active).

AFAICT workgroups.el doesn't care about window changes.  Playing
around with C-z C-f and C-z C-b I did not encounter any problems.  And
C-x C-f runs the usual 'find-file', unrelated to workgroups' bindings.

> I'm going to try not using it for a few days to see if there are any other
> issues.

Maybe you can try to distill a minimum setup needed to produce the
problem.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Fri, 11 Jan 2019 09:25:01 GMT) Full text and rfc822 format available.

Message #127 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 11 Jan 2019 10:24:24 +0100
> Actually I think I *have* run into the problem again, but this time it
> seems to be related to my use of this plugin:
> https://github.com/tlh/workgroups.el (in particular, C-x C-f from the
> scratch buffer works before setting up a workgroup, but not after -- after
> it complains about the minibuffer being active).
>
> I'm going to try not using it for a few days to see if there are any other
> issues.

The changes are on master now so please remove yours before pulling
from master the next time.

And obviously please report any findings you have ASAP.

Thank you, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Wed, 16 Jan 2019 14:08:02 GMT) Full text and rfc822 format available.

Message #130 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Wed, 16 Jan 2019 08:07:38 -0600
[Message part 1 (text/plain, inline)]
I tracked down my issue to this line in my configuration:

https://github.com/gfredericks/dotfiles/blob/48c503319046517fc1767735d09fbb232ace12ba/base/.emacs.d/user/gfredericks-longrunning.el.symlink#L34

I can see how it's related, since it's adding a
window-configuration-change-hook, but I can't tell at a glance what's wrong
with it. It's a function that tries to save the current window
configuration to a variable each time it changes.

I'm going to use the new emacs[1] for a while with this line commented out
to see if there are any other issues.

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com

[1] Actually running b0b483d714 because I couldn't get master (655badc33e)
to compile


On Fri, Jan 11, 2019 at 3:24 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > Actually I think I *have* run into the problem again, but this time it
>  > seems to be related to my use of this plugin:
>  > https://github.com/tlh/workgroups.el (in particular, C-x C-f from the
>  > scratch buffer works before setting up a workgroup, but not after --
> after
>  > it complains about the minibuffer being active).
>  >
>  > I'm going to try not using it for a few days to see if there are any
> other
>  > issues.
>
> The changes are on master now so please remove yours before pulling
> from master the next time.
>
> And obviously please report any findings you have ASAP.
>
> Thank you, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Wed, 16 Jan 2019 17:31:01 GMT) Full text and rfc822 format available.

Message #133 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Wed, 16 Jan 2019 18:30:09 +0100
> I tracked down my issue to this line in my configuration:
>
> https://github.com/gfredericks/dotfiles/blob/48c503319046517fc1767735d09fbb232ace12ba/base/.emacs.d/user/gfredericks-longrunning.el.symlink#L34
>
> I can see how it's related, since it's adding a
> window-configuration-change-hook, but I can't tell at a glance what's wrong
> with it. It's a function that tries to save the current window
> configuration to a variable each time it changes.

...

>>   > it complains about the minibuffer being active).

The error seems to come from this wg function:

(defun wg-error-on-active-minibuffer ()
  "Throw an error when the minibuffer is active."
  (when (active-minibuffer-window)
    (error "Workgroup operations aren't permitted while the \
minibuffer is active.")))

'window-configuration-change-hook' now conceptually runs after any
resize operation which includes states where the minibuffer window is
active.  FWIW the call sequence you encounter is

stash-my-working-config -> wg-make-wconfig -> wg-ewtree->wtree ->
wg-error-on-active-minibuffer

so maybe you should not stash your working configuration when the
minibuffer is active.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Wed, 16 Jan 2019 17:45:02 GMT) Full text and rfc822 format available.

Message #136 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Wed, 16 Jan 2019 11:44:06 -0600
[Message part 1 (text/plain, inline)]
That sounds plausible, I'll try that out.

Thanks!

Gary Fredericks
(803)-295-0195
fredericksgary <at> gmail.com
gfredericks.com


On Wed, Jan 16, 2019 at 11:30 AM martin rudalics <rudalics <at> gmx.at> wrote:

>  > I tracked down my issue to this line in my configuration:
>  >
>  >
> https://github.com/gfredericks/dotfiles/blob/48c503319046517fc1767735d09fbb232ace12ba/base/.emacs.d/user/gfredericks-longrunning.el.symlink#L34
>  >
>  > I can see how it's related, since it's adding a
>  > window-configuration-change-hook, but I can't tell at a glance what's
> wrong
>  > with it. It's a function that tries to save the current window
>  > configuration to a variable each time it changes.
>
> ...
>
>  >>   > it complains about the minibuffer being active).
>
> The error seems to come from this wg function:
>
> (defun wg-error-on-active-minibuffer ()
>    "Throw an error when the minibuffer is active."
>    (when (active-minibuffer-window)
>      (error "Workgroup operations aren't permitted while the \
> minibuffer is active.")))
>
> 'window-configuration-change-hook' now conceptually runs after any
> resize operation which includes states where the minibuffer window is
> active.  FWIW the call sequence you encounter is
>
> stash-my-working-config -> wg-make-wconfig -> wg-ewtree->wtree ->
> wg-error-on-active-minibuffer
>
> so maybe you should not stash your working configuration when the
> minibuffer is active.
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 22 Aug 2020 15:01:01 GMT) Full text and rfc822 format available.

Message #139 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gary Fredericks <fredericksgary <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 22 Aug 2020 16:59:56 +0200
Gary Fredericks <fredericksgary <at> gmail.com> writes:

> That sounds plausible, I'll try that out.

I've just skimmed the bug report, but it seems like the bug in question
was fixed, and the rest was a local configuration issue?  So I'm closing
this bug report.  If there's more to be done here, please respond to the
debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 32720 <at> debbugs.gnu.org and Gary Fredericks <fredericksgary <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 22 Aug 2020 15:01:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32720; Package emacs. (Sat, 22 Aug 2020 16:58:01 GMT) Full text and rfc822 format available.

Message #144 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: Gary Fredericks <fredericksgary <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: martin rudalics <rudalics <at> gmx.at>, eliz <at> gnu.org, 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Sat, 22 Aug 2020 11:57:35 -0500
[Message part 1 (text/plain, inline)]
I agree -- I don't think I've experienced the issue since.

Thanks!

Gary Fredericks


On Sat, Aug 22, 2020 at 10:00 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Gary Fredericks <fredericksgary <at> gmail.com> writes:
>
> > That sounds plausible, I'll try that out.
>
> I've just skimmed the bug report, but it seems like the bug in question
> was fixed, and the rest was a local configuration issue?  So I'm closing
> this bug report.  If there's more to be done here, please respond to the
> debbugs address and we'll reopen.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Sep 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.