GNU bug report logs - #13066
24.2.90; setting rmail-summary-window-size causes error

Previous Next

Package: emacs;

Reported by: Kenichi Handa <handa <at> gnu.org>

Date: Mon, 3 Dec 2012 13:49:01 UTC

Severity: normal

Found in version 24.2.90

Fixed in version 24.2.91

Done: Glenn Morris <rgm <at> gnu.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 13066 in the body.
You can then email your comments to 13066 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#13066; Package emacs. (Mon, 03 Dec 2012 13:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 03 Dec 2012 13:49:02 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <handa <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.90; setting rmail-summary-window-size causes error
Date: Mon, 03 Dec 2012 22:43:27 +0900
When I customize rmail-summary-window-size to some integer
value (e.g. 10), M-x rmail-summary signals this error:

	Wrong type argument: stringp, nil

This is with emacs-24 branch.  This doesn't happen with
Emacs 23, but I don't remember it happens with 24.1 and 24.2.

The precise recipe:
% emacs -Q
M-x rmail RET
M-x customize-variable RET rmail-summary-window-size
;; Then set it to 10, click [apply], type q, then type h

In GNU Emacs 24.2.90.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2012-11-28 on mongkok
Bzr revision: 108135 handa <at> gnu.org-20121128115844-3bprvblqksuw4xbg
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Linux Mint 13 Maya

Important settings:
  value of $LC_MONETARY: ja_JP.UTF-8
  value of $LC_NUMERIC: ja_JP.UTF-8
  value of $LC_TIME: ja_JP.UTF-8
  value of $LANG: ja_JP.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
M-x r m a i l <return> M-x c u s t o <tab> i <tab> 
- v a r <tab> <return> r m a i l - s u <tab> b u <tab> 
<backspace> <backspace> w i <tab> <return> <help-echo> 
<help-echo> <down-mouse-1> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-1> <backspace> <return> C-p 
C-e 1 o <backspace> 0 <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <help-echo> <mouse-1> <help-echo> q 
h C-x o C-x b * M e <tab> <return> C-a C-SPC C-e M-w 
M-x r e p o r t <tab> <return>

Recent messages:
Resetting customization items...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
Change the state of this item.
Computing summary lines...690
rmail-summary: Wrong type argument: stringp, nil
Mark set
Scanning for dabbrevs...done
user-error: No dynamic expansion for `rmail-summary-wi' found
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr dabbrev emacsbug qp
rmailkwd help-fns cus-edit cus-start cus-load wid-edit
rmailmm message format-spec rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader
mail-parse rfc2231 time sendmail rmail-spam-filter easymenu
rmailsum rmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils time-date japan-util tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame
cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table
epa-hook jka-cmpr-hook help simple abbrev minibuffer
loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable
backquote make-network-process dynamic-setting
system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Mon, 03 Dec 2012 17:45:03 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> gnu.org>
Cc: 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Mon, 03 Dec 2012 18:41:54 +0100
> When I customize rmail-summary-window-size to some integer
> value (e.g. 10), M-x rmail-summary signals this error:
>
> 	Wrong type argument: stringp, nil
>
> This is with emacs-24 branch.  This doesn't happen with
> Emacs 23, but I don't remember it happens with 24.1 and 24.2.
>
> The precise recipe:
> % emacs -Q
> M-x rmail RET
> M-x customize-variable RET rmail-summary-window-size
> ;; Then set it to 10, click [apply], type q, then type h

I can't reproduce that here.  Can you post a backtrace, please.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Mon, 03 Dec 2012 19:44:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Kenichi Handa <handa <at> gnu.org>, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Mon, 03 Dec 2012 14:41:20 -0500
martin rudalics wrote:

> I can't reproduce that here.  Can you post a backtrace, please.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  set-buffer(nil)
  (if was-in-summary nil (if (and (one-window-p) pop-up-windows (not pop-up-frames)) (progn (split-window (selected-window) rmail-summary-window-size) (select-window (next-window (frame-first-window))) (rmail-pop-to-buffer sumbuf) (if (not (eq sumbuf (window-buffer (frame-first-window)))) (delete-other-windows))) (rmail-pop-to-buffer sumbuf)) (set-buffer rmail-buffer) (let ((total rmail-total-messages)) (if (rmail-summary-displayed) (let ((window (selected-window))) (save-excursion (unwind-protect (progn (rmail-pop-to-buffer rmail-summary-buffer) (let ... nil)) (select-window window)))) (save-current-buffer (set-buffer rmail-summary-buffer) (let ((rmail-total-messages total)) nil))) (rmail-maybe-display-summary)) (set-buffer rmail-summary-buffer))
  (let (mesg was-in-summary sumbuf) (if (eq major-mode (quote rmail-summary-mode)) (setq was-in-summary t)) (save-current-buffer (set-buffer rmail-buffer) (setq rmail-summary-buffer (rmail-new-summary-1 desc redo func args) sumbuf rmail-summary-buffer mesg rmail-current-message)) (if was-in-summary nil (if (and (one-window-p) pop-up-windows (not pop-up-frames)) (progn (split-window (selected-window) rmail-summary-window-size) (select-window (next-window (frame-first-window))) (rmail-pop-to-buffer sumbuf) (if (not (eq sumbuf (window-buffer ...))) (delete-other-windows))) (rmail-pop-to-buffer sumbuf)) (set-buffer rmail-buffer) (let ((total rmail-total-messages)) (if (rmail-summary-displayed) (let ((window (selected-window))) (save-excursion (unwind-protect (progn ... ...) (select-window window)))) (save-current-buffer (set-buffer rmail-summary-buffer) (let ((rmail-total-messages total)) nil))) (rmail-maybe-display-summary)) (set-buffer rmail-summary-buffer)) (rmail-summary-goto-msg mesg t t) (rmail-summary-construct-io-menu) (message "Computing summary lines...done"))
  rmail-new-summary("All" (rmail-summary) nil)
  rmail-summary()
  call-interactively(rmail-summary nil nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Tue, 04 Dec 2012 02:21:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Mon, 03 Dec 2012 21:18:19 -0500
I think it's probably something to do with select-window selecting a
buffer when it didn't before. At least it looks to me like
the end of rmail-maybe-display-summary is changing buffer when in 24.2
it seems not to.

I think this makes the problem go away. Other uses are unaffected AFAICS.

*** lisp/mail/rmailsum.el	2012-10-12 01:01:50 +0000
--- lisp/mail/rmailsum.el	2012-12-04 02:10:21 +0000
***************
*** 428,434 ****
        ;; This is how rmail makes the summary buffer reappear.
        ;; We do this here to make the window the proper size.
        (rmail-select-summary nil)
!       (set-buffer rmail-summary-buffer))
      (rmail-summary-goto-msg mesg t t)
      (rmail-summary-construct-io-menu)
      (message "Computing summary lines...done")))
--- 428,434 ----
        ;; This is how rmail makes the summary buffer reappear.
        ;; We do this here to make the window the proper size.
        (rmail-select-summary nil)
!       (set-buffer sumbuf))
      (rmail-summary-goto-msg mesg t t)
      (rmail-summary-construct-io-menu)
      (message "Computing summary lines...done")))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Tue, 04 Dec 2012 13:38:01 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <handa <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: rudalics <at> gmx.at, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Tue, 04 Dec 2012 22:33:09 +0900
In article <lxr4n6ftlg.fsf <at> fencepost.gnu.org>, Glenn Morris <rgm <at> gnu.org> writes:

> I think it's probably something to do with select-window selecting a
> buffer when it didn't before. At least it looks to me like
> the end of rmail-maybe-display-summary is changing buffer when in 24.2
> it seems not to.

> I think this makes the problem go away. Other uses are unaffected AFAICS.

Thank you.  That patch surely solved the problem.

---
Kenichi Handa
handa <at> gnu.org


> *** lisp/mail/rmailsum.el	2012-10-12 01:01:50 +0000
> --- lisp/mail/rmailsum.el	2012-12-04 02:10:21 +0000
> ***************
> *** 428,434 ****
>         ;; This is how rmail makes the summary buffer reappear.
>         ;; We do this here to make the window the proper size.
>         (rmail-select-summary nil)
> !       (set-buffer rmail-summary-buffer))
>       (rmail-summary-goto-msg mesg t t)
>       (rmail-summary-construct-io-menu)
>       (message "Computing summary lines...done")))
> --- 428,434 ----
>         ;; This is how rmail makes the summary buffer reappear.
>         ;; We do this here to make the window the proper size.
>         (rmail-select-summary nil)
> !       (set-buffer sumbuf))
>       (rmail-summary-goto-msg mesg t t)
>       (rmail-summary-construct-io-menu)
>       (message "Computing summary lines...done")))









Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Tue, 04 Dec 2012 14:44:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Tue, 04 Dec 2012 09:36:10 +0100
> I think it's probably something to do with select-window selecting a
> buffer when it didn't before. At least it looks to me like
> the end of rmail-maybe-display-summary is changing buffer when in 24.2
> it seems not to.

`select-window' now always makes its window's buffer current.  Earlier
it didn't when the window was already selected.  Maybe we should put
this into NEWS as an incompatible change.

> I think this makes the problem go away. Other uses are unaffected AFAICS.

Please install this on the branch.  I neither use rmail nor understand
its treatment of windows.

martin





bug marked as fixed in version 24.2.91, send any further explanations to 13066 <at> debbugs.gnu.org and Kenichi Handa <handa <at> gnu.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 04 Dec 2012 18:12:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Thu, 06 Dec 2012 11:29:01 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <handa <at> gnu.org>
To: Kenichi Handa <handa <at> gnu.org>
Cc: rgm <at> gnu.org, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Thu, 06 Dec 2012 20:26:46 +0900
In article <87y5he0woa.fsf <at> gnu.org>, Kenichi Handa <handa <at> gnu.org> writes:

> In article <lxr4n6ftlg.fsf <at> fencepost.gnu.org>, Glenn Morris <rgm <at> gnu.org> writes:
> > I think it's probably something to do with select-window selecting a
> > buffer when it didn't before. At least it looks to me like
> > the end of rmail-maybe-display-summary is changing buffer when in 24.2
> > it seems not to.

> > I think this makes the problem go away. Other uses are unaffected AFAICS.

> Thank you.  That patch surely solved the problem.

Unfortunately, I found another similar problem.

% emacs -Q
M-x rmail RET
M-x customize-variable RET rmail-summary-window-size
;; Then set it to 10, click [apply], type q, then type h,
;; and then type g (rmail-summary-get-new-mail).

This causes the same error.  The backtrace is this:

Debugger entered--Lisp error: (wrong-type-argument numberp nil)
  zerop(nil)
  (or (zerop msg) (rmail-summary-goto-msg msg))
  (let (msg) (save-current-buffer (set-buffer rmail-buffer) (rmail-get-new-mail file-name) (setq msg rmail-current-message)) (or (zerop msg) (rmail-summary-goto-msg msg)))
  rmail-summary-get-new-mail(nil)
  call-interactively(rmail-summary-get-new-mail nil nil)

---
Kenichi Handa
handa <at> gnu.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Thu, 06 Dec 2012 20:56:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Kenichi Handa <handa <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Thu, 06 Dec 2012 15:55:07 -0500
Kenichi Handa wrote:

> % emacs -Q
> M-x rmail RET
> M-x customize-variable RET rmail-summary-window-size
> ;; Then set it to 10, click [apply], type q, then type h,
> ;; and then type g (rmail-summary-get-new-mail).
>
> This causes the same error.  The backtrace is this:
>
> Debugger entered--Lisp error: (wrong-type-argument numberp nil)
>   zerop(nil)
>   (or (zerop msg) (rmail-summary-goto-msg msg))
>   (let (msg) (save-current-buffer (set-buffer rmail-buffer) (rmail-get-new-mail file-name) (setq msg rmail-current-message)) (or (zerop msg) (rmail-summary-goto-msg msg)))
>   rmail-summary-get-new-mail(nil)
>   call-interactively(rmail-summary-get-new-mail nil nil)

This is also because rmail-maybe-display-summary behaves differently to
how it used to.

When we enter rmail-maybe-display-summary:
  current-buffer = RMAIL
  selected-window = RMAIL summary


When we get to the end of this function:

(unwind-protect
    (progn
      ;; current-buffer = RMAIL
      (select-window window)  ; -> RMAIL summary
      ;; In 24.2, RMAIL buffer still current.
      ;; In 24.2.90, RMAIL summary buffer is now current.
      (enlarge-window (- rmail-summary-window-size (window-height))))
  (select-window selected)))))


I think we could summarize the difference between 24.2 and 24.2.90
by using emacs -Q, then evaluating the following in scratch:

(progn
 (message "1 : %s : %s" (current-buffer) (selected-window))
 (set-buffer "*Messages*")
 (message "2 : %s : %s" (current-buffer) (setq window
 (selected-window)))
 (select-window window)
 (message "3 : %s : %s" (current-buffer) (setq window (selected-window))))

With 24.2, the result is:

1 : *scratch* : #<window 3 on *scratch*>
2 : *Messages* : #<window 3 on *scratch*>
3 : *Messages* : #<window 3 on *scratch*>

With 24.2.90, it is:

1 : *scratch* : #<window 3 on *scratch*>
2 : *Messages* : #<window 3 on *scratch*>
3 : *scratch* : #<window 3 on *scratch*>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Thu, 06 Dec 2012 21:46:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Kenichi Handa <handa <at> gnu.org>
Cc: 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Thu, 06 Dec 2012 16:45:42 -0500
Glenn Morris wrote:

> This is also because rmail-maybe-display-summary behaves differently to
> how it used to.

I installed a fix for that to emacs-24.

> (progn
>  (message "1 : %s : %s" (current-buffer) (selected-window))
>  (set-buffer "*Messages*")
>  (message "2 : %s : %s" (current-buffer) (setq window
>  (selected-window)))
>  (select-window window)
>  (message "3 : %s : %s" (current-buffer) (setq window (selected-window))))
>
> With 24.2, the result is:
>
> 1 : *scratch* : #<window 3 on *scratch*>
> 2 : *Messages* : #<window 3 on *scratch*>
> 3 : *Messages* : #<window 3 on *scratch*>
>
> With 24.2.90, it is:
>
> 1 : *scratch* : #<window 3 on *scratch*>
> 2 : *Messages* : #<window 3 on *scratch*>
> 3 : *scratch* : #<window 3 on *scratch*>

I know select-window has always been documented to "make WINDOW's buffer
current", but I wouldn't be surprised if this change causes issues in
other places. So yes, maybe a NEWS entry might help a bit.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Fri, 07 Dec 2012 10:37:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Kenichi Handa <handa <at> gnu.org>, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Fri, 07 Dec 2012 11:35:51 +0100
> I know select-window has always been documented to "make WINDOW's buffer
> current", but I wouldn't be surprised if this change causes issues in
> other places.

I hoped any such issues would turn up earlier.

> So yes, maybe a NEWS entry might help a bit.

I added one.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Fri, 07 Dec 2012 12:39:02 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <handa <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Fri, 07 Dec 2012 21:36:26 +0900
In article <y98v9ahn21.fsf <at> fencepost.gnu.org>, Glenn Morris <rgm <at> gnu.org> writes:

> > This is also because rmail-maybe-display-summary behaves differently to
> > how it used to.

> I installed a fix for that to emacs-24.

Thank you.  I confirmed the fix.

By the way, it seems that rmail-maybe-display-summary should
use window-resize instead of enlarge-window.  Then we don't
need the extra code for changing and restoring window and
buffer.

---
Kenichi Handa
handa <at> gnu.org




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

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Sat, 08 Dec 2012 12:20:48 +0100
> By the way, it seems that rmail-maybe-display-summary should
> use window-resize instead of enlarge-window.  Then we don't
> need the extra code for changing and restoring window and
> buffer.

Indeed.  `enlarge-window' should be used only interactively.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Fri, 28 Dec 2012 10:27:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Fri, 28 Dec 2012 11:25:57 +0100
> By the way, it seems that rmail-maybe-display-summary should
> use window-resize instead of enlarge-window.  Then we don't
> need the extra code for changing and restoring window and
> buffer.

Done in revision#111359 on trunk.  Please have a look.

Thanks, martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Sun, 30 Dec 2012 08:42:02 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <handa <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: rgm <at> gnu.org, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Sun, 30 Dec 2012 17:37:52 +0900
In article <50DD73B5.2000602 <at> gmx.at>, martin rudalics <rudalics <at> gmx.at> writes:

> > By the way, it seems that rmail-maybe-display-summary should
> > use window-resize instead of enlarge-window.  Then we don't
> > need the extra code for changing and restoring window and
> > buffer.

> Done in revision#111359 on trunk.  Please have a look.

It seems that the new code changed the logic.  Now
rmail-summary-window-size doesn't take effect.  As I didn't
customize rmail-redisplay-summary, its value is nil.  And
the new code handles rmail-summary-window-size only if its
value is non-nil.

    (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
	 rmail-redisplay-summary   ;; <--- !!!
	 (setq window
	       (display-buffer
		rmail-summary-buffer '(nil (reusable-frames . visible))))
	 rmail-summary-window-size
	 (setq size (- rmail-summary-window-size (window-height window)))
	 (window--resizable-p window size)
	 (window-resize window size))))

---
Kenichi Handa
handa <at> gnu.org




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

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> gnu.org>
Cc: rgm <at> gnu.org, 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Sun, 30 Dec 2012 10:28:42 +0100
> It seems that the new code changed the logic.  Now
> rmail-summary-window-size doesn't take effect.  As I didn't
> customize rmail-redisplay-summary, its value is nil.  And
> the new code handles rmail-summary-window-size only if its
> value is non-nil.
>
>     (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
> 	 rmail-redisplay-summary   ;; <--- !!!
> 	 (setq window
> 	       (display-buffer
> 		rmail-summary-buffer '(nil (reusable-frames . visible))))
> 	 rmail-summary-window-size
> 	 (setq size (- rmail-summary-window-size (window-height window)))
> 	 (window--resizable-p window size)
> 	 (window-resize window size))))

I obviously have no idea how this is supposed to work :-(

We could replace the condition

  (when (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
	     rmail-redisplay-summary)

in `rmail-maybe-display-summary' either by

  (when (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
	     (or rmail-redisplay-summary
		 (get-buffer-window rmail-summary-buffer 0)))

or by

  (when (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
	     (or rmail-redisplay-summary rmail-summary-window-size))

Both should work if the summary window was specially created for the
summary.  They won't work when the window got merely reused - but in
that case resizing the window doesn't strike me as a good idea in the
first place.  Can you try them?

If this doesn't help, can you please tell me when and why you want to
resize the summary window and why you want to do that with
`rmail-redisplay-summary' set to nil?  I can obviously restore the old
logic but would like to understand it first.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Mon, 31 Dec 2012 11:39:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> gnu.org>
Cc: 13066 <at> debbugs.gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Mon, 31 Dec 2012 12:36:41 +0100
> I can obviously restore the old
> logic but would like to understand it first.

I hopefully restored the old logic now.  Please have another try.

Thanks, martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Wed, 02 Jan 2013 18:47:03 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <ken1handa <at> gmail.com>
To: rudalics <at> gmx.at
Cc: rgm <at> gnu.org, 13066 <at> debbugs.gnu.org, handa <at> gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Wed, 2 Jan 2013 23:09:34 +0900
[Message part 1 (text/plain, inline)]
In article <50E0094A.1010500 <at> gmx.at>, martin rudalics <rudalics <at> gmx.at>
writes:

> I obviously have no idea how this is supposed to work :-(

> We could replace the condition

>    (when (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
>          rmail-redisplay-summary)

> in `rmail-maybe-display-summary' either by

>    (when (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
>          (or rmail-redisplay-summary
>          (get-buffer-window rmail-summary-buffer 0)))

> or by

>    (when (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
>          (or rmail-redisplay-summary rmail-summary-window-size))

> Both should work if the summary window was specially created for the
> summary.  They won't work when the window got merely reused - but in
> that case resizing the window doesn't strike me as a good idea in the
> first place.  Can you try them?

I've just updated my working tree of Emacs from trunk and
found that you have already committed a new patch.  So, I
tried it and confirmed that it worked well.  Thank you!!

> If this doesn't help, can you please tell me when and why you want to
> resize the summary window and why you want to do that with
> `rmail-redisplay-summary' set to nil?  I can obviously restore the old
> logic but would like to understand it first.

My understanding of rmail-redisplay-summary is that when it
is non-nil, rmail-summary-buffer is forced to be shown.  For
instance, when rmail-summary-buffer is buried and I change
the current message in RMAIL buffer by typing p,
rmail-summary-buffer pops up.  As I don't want that
behavior, I haven't customized rmail-redisplay-summary to t.

What I want is that rmail-summary-buffer is shown in some
window of the specified height when I type h in RMAIL
buffer.

---
Kenichi Handa
handa <at> gnu.org
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Fri, 04 Jan 2013 07:09:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <ken1handa <at> gmail.com>
Cc: rgm <at> gnu.org, 13066 <at> debbugs.gnu.org, handa <at> gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Fri, 04 Jan 2013 08:08:06 +0100
> My understanding of rmail-redisplay-summary is that when it
> is non-nil, rmail-summary-buffer is forced to be shown.  For
> instance, when rmail-summary-buffer is buried and I change
> the current message in RMAIL buffer by typing p,
> rmail-summary-buffer pops up.  As I don't want that
> behavior, I haven't customized rmail-redisplay-summary to t.
>
> What I want is that rmail-summary-buffer is shown in some
> window of the specified height when I type h in RMAIL
> buffer.

Do you sometimes type h to make sure that an already displayed summary
buffer's window has the "right" size?  Or do you use h always to make
the summary buffer reappear on screen?

martin




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

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

From: Kenichi Handa <handa <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: ken1handa <at> gmail.com, 13066 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Sun, 06 Jan 2013 15:04:30 +0900
In article <50E67FD6.7060802 <at> gmx.at>, martin rudalics <rudalics <at> gmx.at> writes:

>> What I want is that rmail-summary-buffer is shown in some
>> window of the specified height when I type h in RMAIL
>> buffer.

> Do you sometimes type h to make sure that an already displayed summary
> buffer's window has the "right" size?

I'm not sure.  I usually do not change the height of summary
buffer once shown.

> Or do you use h always to make the summary buffer reappear
> on screen?

Yes, that's my usual case of typing h.

---
Kenichi Handa
handa <at> gnu.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13066; Package emacs. (Mon, 07 Jan 2013 07:44:03 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> gnu.org>
Cc: ken1handa <at> gmail.com, 13066 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#13066: 24.2.90; setting rmail-summary-window-size causes error
Date: Mon, 07 Jan 2013 08:43:24 +0100
>> Or do you use h always to make the summary buffer reappear
>> on screen?
>
> Yes, that's my usual case of typing h.

Just in case you (or someone else) has an idea what `rmail-new-summary'
in rmailsum.el is about: Could you please try to fix its doc-string?
It's completely incomprehensible to me.

Thanks, martin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Feb 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 198 days ago.

Previous Next


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