all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
@ 2012-12-03 13:43 Kenichi Handa
  2012-12-03 17:41 ` martin rudalics
  2013-01-02 14:09 ` Kenichi Handa
  0 siblings, 2 replies; 20+ messages in thread
From: Kenichi Handa @ 2012-12-03 13:43 UTC (permalink / raw)
  To: 13066

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@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)





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-03 13:43 bug#13066: 24.2.90; setting rmail-summary-window-size causes error Kenichi Handa
@ 2012-12-03 17:41 ` martin rudalics
  2012-12-03 19:41   ` Glenn Morris
  2013-01-02 14:09 ` Kenichi Handa
  1 sibling, 1 reply; 20+ messages in thread
From: martin rudalics @ 2012-12-03 17:41 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

 > 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





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-03 17:41 ` martin rudalics
@ 2012-12-03 19:41   ` Glenn Morris
  2012-12-04  2:18     ` Glenn Morris
  0 siblings, 1 reply; 20+ messages in thread
From: Glenn Morris @ 2012-12-03 19:41 UTC (permalink / raw)
  To: martin rudalics; +Cc: 13066

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)





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-03 19:41   ` Glenn Morris
@ 2012-12-04  2:18     ` Glenn Morris
  2012-12-04  8:36       ` martin rudalics
  2012-12-04 13:33       ` Kenichi Handa
  0 siblings, 2 replies; 20+ messages in thread
From: Glenn Morris @ 2012-12-04  2:18 UTC (permalink / raw)
  To: martin rudalics; +Cc: 13066


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")))






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-04  2:18     ` Glenn Morris
@ 2012-12-04  8:36       ` martin rudalics
  2012-12-04 13:33       ` Kenichi Handa
  1 sibling, 0 replies; 20+ messages in thread
From: martin rudalics @ 2012-12-04  8:36 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13066

 > 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






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-04  2:18     ` Glenn Morris
  2012-12-04  8:36       ` martin rudalics
@ 2012-12-04 13:33       ` Kenichi Handa
  2012-12-06 11:26         ` Kenichi Handa
  1 sibling, 1 reply; 20+ messages in thread
From: Kenichi Handa @ 2012-12-04 13:33 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13066

In article <lxr4n6ftlg.fsf@fencepost.gnu.org>, Glenn Morris <rgm@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@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")))










^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-04 13:33       ` Kenichi Handa
@ 2012-12-06 11:26         ` Kenichi Handa
  2012-12-06 20:55           ` Glenn Morris
  0 siblings, 1 reply; 20+ messages in thread
From: Kenichi Handa @ 2012-12-06 11:26 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

In article <87y5he0woa.fsf@gnu.org>, Kenichi Handa <handa@gnu.org> writes:

> In article <lxr4n6ftlg.fsf@fencepost.gnu.org>, Glenn Morris <rgm@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@gnu.org





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-06 11:26         ` Kenichi Handa
@ 2012-12-06 20:55           ` Glenn Morris
  2012-12-06 21:45             ` Glenn Morris
  0 siblings, 1 reply; 20+ messages in thread
From: Glenn Morris @ 2012-12-06 20:55 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

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*>





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-06 20:55           ` Glenn Morris
@ 2012-12-06 21:45             ` Glenn Morris
  2012-12-07 10:35               ` martin rudalics
  2012-12-07 12:36               ` Kenichi Handa
  0 siblings, 2 replies; 20+ messages in thread
From: Glenn Morris @ 2012-12-06 21:45 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

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.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-06 21:45             ` Glenn Morris
@ 2012-12-07 10:35               ` martin rudalics
  2012-12-07 12:36               ` Kenichi Handa
  1 sibling, 0 replies; 20+ messages in thread
From: martin rudalics @ 2012-12-07 10:35 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13066

 > 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





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-06 21:45             ` Glenn Morris
  2012-12-07 10:35               ` martin rudalics
@ 2012-12-07 12:36               ` Kenichi Handa
  2012-12-08 11:20                 ` martin rudalics
  2012-12-28 10:25                 ` martin rudalics
  1 sibling, 2 replies; 20+ messages in thread
From: Kenichi Handa @ 2012-12-07 12:36 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 13066

In article <y98v9ahn21.fsf@fencepost.gnu.org>, Glenn Morris <rgm@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@gnu.org





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-07 12:36               ` Kenichi Handa
@ 2012-12-08 11:20                 ` martin rudalics
  2012-12-28 10:25                 ` martin rudalics
  1 sibling, 0 replies; 20+ messages in thread
From: martin rudalics @ 2012-12-08 11:20 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

 > 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






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-07 12:36               ` Kenichi Handa
  2012-12-08 11:20                 ` martin rudalics
@ 2012-12-28 10:25                 ` martin rudalics
  2012-12-30  8:37                   ` Kenichi Handa
  1 sibling, 1 reply; 20+ messages in thread
From: martin rudalics @ 2012-12-28 10:25 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

> 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






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-28 10:25                 ` martin rudalics
@ 2012-12-30  8:37                   ` Kenichi Handa
  2012-12-30  9:28                     ` martin rudalics
  0 siblings, 1 reply; 20+ messages in thread
From: Kenichi Handa @ 2012-12-30  8:37 UTC (permalink / raw)
  To: martin rudalics; +Cc: 13066

In article <50DD73B5.2000602@gmx.at>, martin rudalics <rudalics@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@gnu.org





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-30  8:37                   ` Kenichi Handa
@ 2012-12-30  9:28                     ` martin rudalics
  2012-12-31 11:36                       ` martin rudalics
  0 siblings, 1 reply; 20+ messages in thread
From: martin rudalics @ 2012-12-30  9:28 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

 > 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





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-30  9:28                     ` martin rudalics
@ 2012-12-31 11:36                       ` martin rudalics
  0 siblings, 0 replies; 20+ messages in thread
From: martin rudalics @ 2012-12-31 11:36 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

> 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






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2012-12-03 13:43 bug#13066: 24.2.90; setting rmail-summary-window-size causes error Kenichi Handa
  2012-12-03 17:41 ` martin rudalics
@ 2013-01-02 14:09 ` Kenichi Handa
  2013-01-04  7:08   ` martin rudalics
  1 sibling, 1 reply; 20+ messages in thread
From: Kenichi Handa @ 2013-01-02 14:09 UTC (permalink / raw)
  To: rudalics; +Cc: 13066

[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]

In article <50E0094A.1010500@gmx.at>, martin rudalics <rudalics@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@gnu.org

[-- Attachment #2: Type: text/html, Size: 2205 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2013-01-02 14:09 ` Kenichi Handa
@ 2013-01-04  7:08   ` martin rudalics
  2013-01-06  6:04     ` Kenichi Handa
  0 siblings, 1 reply; 20+ messages in thread
From: martin rudalics @ 2013-01-04  7:08 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 13066

 > 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





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2013-01-04  7:08   ` martin rudalics
@ 2013-01-06  6:04     ` Kenichi Handa
  2013-01-07  7:43       ` martin rudalics
  0 siblings, 1 reply; 20+ messages in thread
From: Kenichi Handa @ 2013-01-06  6:04 UTC (permalink / raw)
  To: martin rudalics; +Cc: ken1handa, 13066

In article <50E67FD6.7060802@gmx.at>, martin rudalics <rudalics@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@gnu.org





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#13066: 24.2.90; setting rmail-summary-window-size causes error
  2013-01-06  6:04     ` Kenichi Handa
@ 2013-01-07  7:43       ` martin rudalics
  0 siblings, 0 replies; 20+ messages in thread
From: martin rudalics @ 2013-01-07  7:43 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: ken1handa, 13066

 >> 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





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-01-07  7:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 13:43 bug#13066: 24.2.90; setting rmail-summary-window-size causes error Kenichi Handa
2012-12-03 17:41 ` martin rudalics
2012-12-03 19:41   ` Glenn Morris
2012-12-04  2:18     ` Glenn Morris
2012-12-04  8:36       ` martin rudalics
2012-12-04 13:33       ` Kenichi Handa
2012-12-06 11:26         ` Kenichi Handa
2012-12-06 20:55           ` Glenn Morris
2012-12-06 21:45             ` Glenn Morris
2012-12-07 10:35               ` martin rudalics
2012-12-07 12:36               ` Kenichi Handa
2012-12-08 11:20                 ` martin rudalics
2012-12-28 10:25                 ` martin rudalics
2012-12-30  8:37                   ` Kenichi Handa
2012-12-30  9:28                     ` martin rudalics
2012-12-31 11:36                       ` martin rudalics
2013-01-02 14:09 ` Kenichi Handa
2013-01-04  7:08   ` martin rudalics
2013-01-06  6:04     ` Kenichi Handa
2013-01-07  7:43       ` martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.