unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11242: 24.1.50; Switching to rmai view buffer
@ 2012-04-14  4:17 Richard Stallman
  2012-04-14 13:30 ` martin rudalics
  2012-04-14 18:31 ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Richard Stallman @ 2012-04-14  4:17 UTC (permalink / raw)
  To: 11242

I have found out more about the bug that switches to the
Rmail view buffer, named ` *message-viewer RMAIL*'.

It happened after I typed C-c C-c at the *mail* buffer.
It switched to ` *message-viewer RMAIL*'.spontaneously.
It has happened several times recently.

The buffers whose names start with space should never be
shown to the user unless expicitly requested.

I will continue investigating.


In GNU Emacs 24.1.50.1 (mips64el-unknown-linux-gnu, GTK+ Version 2.12.12)
 of 2012-04-10 on theobromine2
Bzr revision: 107831 larsi@gnus.org-20120410025139-hm28pdi28nbr8ybg
Configured using:
 `configure 'CFLAGS=-g -O0''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  display-battery-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-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
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
e r DEL DEL DEL d e r a t i o n . C-a ESC f ESC f ESC 
f , SPC d a n g e r o s SPC t h DEL DEL DEL DEL u s 
SPC a n d SPC h a r m f u l SPC a s SPC i t SPC i s 
ESC q C-n RET RET T h e SPC r e a l SPC o b s t a c 
l e SPC t o SPC t h i s SPC m a y SPC b e SPC f r o 
m SPC f r e e SPC e x p l o i t a t i o n SPC t r e 
a t i e s . C-o RET U r u g u a y SPC a n d SPC A u 
s t r a l i a SPC h a v e SPC C-l C-x 1 t r i e d SPC 
p a r t i a l SPC m e a s u r e s SPC a l o n g SPC 
t h e SPC s a m e SPC l i e DEL n e s ESC q SPC a n 
d ESC q SPC n DEL h a v e SPC b e e n SPC a t t a c 
k e d SPC f o r SPC i t SPC t h i s SPC w a y . C-d 
C-c C-c C-x b * s c TAB RET o DEL ESC > RET o l d - 
ESC TAB m a i ESC TAB C-j ESC x r e p o r t SPC e m 
a c s SPC b u g RET

Recent messages:
Auto-saving...done
Quit [2 times]
Auto-saving...done
Auto-saving...done
Auto-saving...done
Sending...
Wrote /home/rms/outgoing/out-55
Sending...done
Mark set
Making completion list...

Load-path shadows:
None found.

Features:
(shadow emacsbug conf-mode ind-util vc-bzr log-edit easy-mmode
pcvs-util add-log vc ediff-merg ediff-diff ediff-wind ediff-help
ediff-util ediff-mult ediff-init ediff vc-dispatcher parse-time vc-cvs
sgml-mode utf-7 dired-aux china-util etags dabbrev multi-isearch
rmailout ispell shell pcomplete grep compile comint ansi-color ring
quail help-mode view newcomment mailalias qp rmailmm message sendmail
format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired regexp-opt
t-mouse time-date battery paren cus-start cus-load tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe 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 files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)


--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14  4:17 bug#11242: 24.1.50; Switching to rmai view buffer Richard Stallman
@ 2012-04-14 13:30 ` martin rudalics
  2012-04-14 18:31 ` Richard Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: martin rudalics @ 2012-04-14 13:30 UTC (permalink / raw)
  To: rms; +Cc: 11242

 > It happened after I typed C-c C-c at the *mail* buffer.
 > It switched to ` *message-viewer RMAIL*'.spontaneously.
 > It has happened several times recently.
 >
 > The buffers whose names start with space should never be
 > shown to the user unless expicitly requested.
 >
 > I will continue investigating.

Could you try running your Emacs with something like

(defun wcch ()
   (when (get-buffer-window " *message-viewer RMAIL*" t)
     (backtrace)))

(add-hook 'window-configuration-change-hook 'wcch)

activated?

martin





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14  4:17 bug#11242: 24.1.50; Switching to rmai view buffer Richard Stallman
  2012-04-14 13:30 ` martin rudalics
@ 2012-04-14 18:31 ` Richard Stallman
  2012-04-14 18:52   ` martin rudalics
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2012-04-14 18:31 UTC (permalink / raw)
  To: rms; +Cc: 11242

The problem is that other-buffer sometimes returns
` *message-viewer RMAIL*'.

other-buffer must never return a buffer whose name starts
with space, except perhaps it was recently displayed.

Meanwhile, I sometimes find that C-c C-c in Mail mode does not switch
buffers at all; it stays in the Mail buffer.  That is a different
manifestation but I suspect it is the same bug.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14 18:31 ` Richard Stallman
@ 2012-04-14 18:52   ` martin rudalics
  2012-04-14 19:18     ` Eli Zaretskii
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: martin rudalics @ 2012-04-14 18:52 UTC (permalink / raw)
  To: rms; +Cc: 11242

 > The problem is that other-buffer sometimes returns
 > ` *message-viewer RMAIL*'.

If you look at the code of `other-buffer' that doesn't seem possible:
Both loops trigger iff

      (SREF (BVAR (XBUFFER (buf), name), 0) != ' ')

so please try my recipe.

 > other-buffer must never return a buffer whose name starts
 > with space, except perhaps it was recently displayed.
 >
 > Meanwhile, I sometimes find that C-c C-c in Mail mode does not switch
 > buffers at all; it stays in the Mail buffer.  That is a different
 > manifestation but I suspect it is the same bug.

What command does C-c C-c run?

martin





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14 18:52   ` martin rudalics
@ 2012-04-14 19:18     ` Eli Zaretskii
  2012-04-15  8:14       ` martin rudalics
  2012-04-15  2:18     ` Richard Stallman
  2012-04-15  2:18     ` Richard Stallman
  2 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2012-04-14 19:18 UTC (permalink / raw)
  To: martin rudalics; +Cc: rms, 11242

> Date: Sat, 14 Apr 2012 20:52:00 +0200
> From: martin rudalics <rudalics@gmx.at>
> Cc: 11242@debbugs.gnu.org
> 
>  > Meanwhile, I sometimes find that C-c C-c in Mail mode does not switch
>  > buffers at all; it stays in the Mail buffer.  That is a different
>  > manifestation but I suspect it is the same bug.
> 
> What command does C-c C-c run?

It runs the command mail-send-and-exit.





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14 18:52   ` martin rudalics
  2012-04-14 19:18     ` Eli Zaretskii
@ 2012-04-15  2:18     ` Richard Stallman
  2012-04-15  8:14       ` martin rudalics
  2012-04-15  2:18     ` Richard Stallman
  2 siblings, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2012-04-15  2:18 UTC (permalink / raw)
  To: martin rudalics; +Cc: 11242

    If you look at the code of `other-buffer' that doesn't seem possible:
    Both loops trigger iff

	  (SREF (BVAR (XBUFFER (buf), name), 0) != ' ')

    so please try my recipe.

What recipe?

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14 18:52   ` martin rudalics
  2012-04-14 19:18     ` Eli Zaretskii
  2012-04-15  2:18     ` Richard Stallman
@ 2012-04-15  2:18     ` Richard Stallman
  2 siblings, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2012-04-15  2:18 UTC (permalink / raw)
  To: martin rudalics; +Cc: 11242

    What command does C-c C-c run?

mail-send-and-exit.
It calls mail-bury, which gets ` *message-viewer RMAIL'
as the value of newbuf.


--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-14 19:18     ` Eli Zaretskii
@ 2012-04-15  8:14       ` martin rudalics
  2012-04-15 20:12         ` Richard Stallman
  0 siblings, 1 reply; 13+ messages in thread
From: martin rudalics @ 2012-04-15  8:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rms, 11242

 > It runs the command mail-send-and-exit.

which calls `mail-bury' where we have two options to show a buffer whose
name starts with a space, namely

(defun mail-bury (&optional arg)
   ...
     (bury-buffer (current-buffer)) <---------- HERE
     ...
       (switch-to-buffer newbuf)))) <----------- OR HERE

and we'd have to find out which of these is responsible.

martin





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-15  2:18     ` Richard Stallman
@ 2012-04-15  8:14       ` martin rudalics
  0 siblings, 0 replies; 13+ messages in thread
From: martin rudalics @ 2012-04-15  8:14 UTC (permalink / raw)
  To: rms; +Cc: 11242

>     If you look at the code of `other-buffer' that doesn't seem possible:
>     Both loops trigger iff
> 
> 	  (SREF (BVAR (XBUFFER (buf), name), 0) != ' ')
> 
>     so please try my recipe.
> 
> What recipe?

Please put

(defun wcch ()
   (when (get-buffer-window " *message-viewer RMAIL*" t)
     (backtrace)))

(add-hook 'window-configuration-change-hook 'wcch)

in your .emacs and when it triggers post the backtrace here.

Thanks, martin






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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-15  8:14       ` martin rudalics
@ 2012-04-15 20:12         ` Richard Stallman
  2012-04-16  8:15           ` martin rudalics
  2012-04-16 10:18           ` Chong Yidong
  0 siblings, 2 replies; 13+ messages in thread
From: Richard Stallman @ 2012-04-15 20:12 UTC (permalink / raw)
  To: martin rudalics; +Cc: 11242

    which calls `mail-bury' where we have two options to show a buffer whose
    name starts with a space, namely

    (defun mail-bury (&optional arg)
       ...
	 (bury-buffer (current-buffer)) <---------- HERE
	 ...
	   (switch-to-buffer newbuf)))) <----------- OR HERE

It's neither one.  It's done by this code.

    ;; If there is an Rmail buffer, return to it nicely
    ;; even if this message was not started by an Rmail command.
    (unless return-action
      (dolist (buffer (buffer-list))
	(if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
	    (setq return-action `(rmail-mail-return ,newbuf)))))

When the bug occurs, NEWBUF is the message view buffer.
It was returned by other-buffer.

    (defun wcch ()
       (when (get-buffer-window " *message-viewer RMAIL*" t)
	 (backtrace)))

    (add-hook 'window-configuration-change-hook 'wcch)

    in your .emacs and when it triggers post the backtrace here.

There is no need.  I already said how that buffer gets selected:
later in mail-bury, where it handles return-action.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-15 20:12         ` Richard Stallman
@ 2012-04-16  8:15           ` martin rudalics
  2012-04-16 10:18           ` Chong Yidong
  1 sibling, 0 replies; 13+ messages in thread
From: martin rudalics @ 2012-04-16  8:15 UTC (permalink / raw)
  To: rms; +Cc: 11242

 >     which calls `mail-bury' where we have two options to show a buffer whose
 >     name starts with a space, namely
 >
 >     (defun mail-bury (&optional arg)
 >        ...
 > 	 (bury-buffer (current-buffer)) <---------- HERE
 > 	 ...
 > 	   (switch-to-buffer newbuf)))) <----------- OR HERE
 >
 > It's neither one.  It's done by this code.
 >
 >     ;; If there is an Rmail buffer, return to it nicely
 >     ;; even if this message was not started by an Rmail command.
 >     (unless return-action
 >       (dolist (buffer (buffer-list))
 > 	(if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
 > 	    (setq return-action `(rmail-mail-return ,newbuf)))))

Maybe.  But how can you be sure that `bury-buffer' has no effect?  Do
you have a buffer in rmail-mode at that time?  Is `rmail-mail-return'
definitely called?  Is NEWBUF really a buffer starting with a space?

martin





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-15 20:12         ` Richard Stallman
  2012-04-16  8:15           ` martin rudalics
@ 2012-04-16 10:18           ` Chong Yidong
  2012-04-16 22:01             ` Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Chong Yidong @ 2012-04-16 10:18 UTC (permalink / raw)
  To: rms; +Cc: 11242

Richard Stallman <rms@gnu.org> writes:

> It's neither one.  It's done by this code.
>
>     ;; If there is an Rmail buffer, return to it nicely
>     ;; even if this message was not started by an Rmail command.
>     (unless return-action
>       (dolist (buffer (buffer-list))
> 	(if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
> 	    (setq return-action `(rmail-mail-return ,newbuf)))))

This code is wrong; the NEWBUF should not be passed to
rmail-mail-return, it should be the BUFFER variable in the loop.  I've
committed a fix.


BTW, having code in mail-bury to specially handle Rmail buffers is kinda
ugly.  This probably needs to be folded into the quit-window mechanism,
somehow.  In the first place, I'm not even sure it's appropriate to
redirect the user to an Rmail buffer if the mail command was not started
from Rmail.





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

* bug#11242: 24.1.50; Switching to rmai view buffer
  2012-04-16 10:18           ` Chong Yidong
@ 2012-04-16 22:01             ` Richard Stallman
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2012-04-16 22:01 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 11242

    This code is wrong; the NEWBUF should not be passed to
    rmail-mail-return, it should be the BUFFER variable in the loop.  I've
    committed a fix.

I think you're right.

However, it is nonetheless true that other-buffer should not return
buffers whose names start with space.

    BTW, having code in mail-bury to specially handle Rmail buffers is kinda
    ugly.  This probably needs to be folded into the quit-window mechanism,
    somehow.  In the first place, I'm not even sure it's appropriate to
    redirect the user to an Rmail buffer if the mail command was not started
    from Rmail.

Yes it is appropriate.  I put it in because the lack of it was a
nuisance.

But if that feature were removed, look what would happen:

    (if (and (null arg) return-action)
	(apply (car return-action) (cdr return-action))
      (switch-to-buffer newbuf))))

It would switch to NEWBUF, the same bug as was just happening.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call





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

end of thread, other threads:[~2012-04-16 22:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14  4:17 bug#11242: 24.1.50; Switching to rmai view buffer Richard Stallman
2012-04-14 13:30 ` martin rudalics
2012-04-14 18:31 ` Richard Stallman
2012-04-14 18:52   ` martin rudalics
2012-04-14 19:18     ` Eli Zaretskii
2012-04-15  8:14       ` martin rudalics
2012-04-15 20:12         ` Richard Stallman
2012-04-16  8:15           ` martin rudalics
2012-04-16 10:18           ` Chong Yidong
2012-04-16 22:01             ` Richard Stallman
2012-04-15  2:18     ` Richard Stallman
2012-04-15  8:14       ` martin rudalics
2012-04-15  2:18     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).