all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [eddy@opera.com: Re: rmail passing movemail an option it doesn't like]
@ 2007-08-22  3:16 Richard Stallman
  2007-08-22  3:42 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2007-08-22  3:16 UTC (permalink / raw)
  To: emacs-devel

Can anyone figure out the bug from this information?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.1.0
To: rms@gnu.org
CC: bug-gnu-emacs@gnu.org
In-reply-to: <E1INV0F-0004jl-VI@fencepost.gnu.org> (message from Richard
	Stallman on Tue, 21 Aug 2007 10:46:43 -0400)
Subject: Re: rmail passing movemail an option it doesn't like
Reply-to: eddy@opera.com
From: Edward Welbourne <eddy@opera.com>
Date: Tue, 21 Aug 2007 17:26:14 +0200

> Can you use the debugger to determine precisely what options
> Emacs passes to movemail?  You could do debug-on-entry
> for call-process.

<buffer name="*Backtrace*">
Debugger entered--entering a function:
* call-process("/usr/bin/movemail" nil #<buffer  *temp*<2>> nil "--version")
  rmail-probe("/usr/bin/movemail")
  byte-code("Æ\b	\nC#Ç^[‰\x1cƒF
!„>
!ƒ>
!‰\x1e\x10ƒ=
\x16\x11ÎÏ\x0e\x10\"ˆ))\fA‰\x14„

  rmail-autodetect()
  rmail-movemail-variant-p(mailutils)
  rmail-insert-inbox-text(("/var/mail/eddy") t)
  rmail-get-new-mail()
  rmail()
  call-interactively(rmail)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)
</buffer>

When I invoke movemail --version manually, I get 
movemail (GNU Mailutils 1.1)

After a while I guessed to type c to make the debugger continue, which
seems to be what it did, and it hit the break-point again:

<buffer name="*Backtrace*">
Debugger entered--returning value: 0
  call-process("/usr/bin/movemail" nil #<buffer  *temp*<2>> nil "--version")
  rmail-probe("/usr/bin/movemail")
  byte-code("Æ\b	\nC#Ç^[‰\x1cƒF
!„>
!ƒ>
!‰\x1e\x10ƒ=
\x16\x11ÎÏ\x0e\x10\"ˆ))\fA‰\x14„

  rmail-autodetect()
  rmail-movemail-variant-p(mailutils)
  rmail-insert-inbox-text(("/var/mail/eddy") t)
  rmail-get-new-mail()
  rmail()
  call-interactively(rmail)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)
</buffer>

and then c again:

<buffer name="*Backtrace*">
Debugger entered--entering a function:
* call-process("/usr/lib/emacs/22.1/i486-linux-gnu/movemail" nil #<buffer  *temp*> nil "--emacs" "/var/mail/eddy" "/disk/home/eddy/.newmail-eddy")
  apply(call-process ("/usr/lib/emacs/22.1/i486-linux-gnu/movemail" nil #<buffer  *temp*> nil "--emacs" "/var/mail/eddy" "/disk/home/eddy/.newmail-eddy"))
  rmail-insert-inbox-text(("/var/mail/eddy") t)
  rmail-get-new-mail()
  rmail()
  call-interactively(rmail)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)
</buffer>

and again:

<buffer name="*Backtrace*">
Debugger entered--returning value: 1
  call-process("/usr/lib/emacs/22.1/i486-linux-gnu/movemail" nil #<buffer  *temp*> nil "--emacs" "/var/mail/eddy" "/disk/home/eddy/.newmail-eddy")
  apply(call-process ("/usr/lib/emacs/22.1/i486-linux-gnu/movemail" nil #<buffer  *temp*> nil "--emacs" "/var/mail/eddy" "/disk/home/eddy/.newmail-eddy"))
  rmail-insert-inbox-text(("/var/mail/eddy") t)
  rmail-get-new-mail()
  rmail()
  call-interactively(rmail)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)
</buffer>

after which I got the error,

<buffer name="*Messages*">
("emacs" "-q" "--no-site-file")
For information about the GNU Project and its goals, type C-h C-p.
Loading debug...done
Loading rmail...done
(New file)
Counting messages...done
Entering debugger...
Loading help-mode...done
Mark set [3 times]
Continuing.
Entering debugger...
Mark set
Continuing.
Entering debugger...
Mark set [2 times]
Continuing.
Entering debugger...
Mark set
Continuing.
movemail: /usr/lib/emacs/22.1/i486-linux-gnu/movemail: invalid option -- -
(No new mail has arrived)
</buffer>

	Eddy.
------- End of forwarded message -------

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

* Re: [eddy@opera.com: Re: rmail passing movemail an option it doesn't like]
  2007-08-22  3:16 [eddy@opera.com: Re: rmail passing movemail an option it doesn't like] Richard Stallman
@ 2007-08-22  3:42 ` Glenn Morris
       [not found]   ` <20070822051114.GA3403@saeurebad.de>
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2007-08-22  3:42 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman wrote:

> Can anyone figure out the bug from this information?

fixed.

(I wish you didn't have to start a third thread for this issue.)

> From: Edward Welbourne <eddy@opera.com>
> Subject: Re: rmail passing movemail an option it doesn't like
> To: rms@gnu.org
> CC: bug-gnu-emacs@gnu.org
> Date: Tue, 21 Aug 2007 17:26:14 +0200

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

* Re: [eddy@opera.com: Re: rmail passing movemail an option it doesn't like]
       [not found]   ` <20070822051114.GA3403@saeurebad.de>
@ 2007-08-23  3:54     ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2007-08-23  3:54 UTC (permalink / raw)
  To: Emacs developers; +Cc: Johannes Weiner


Replying to message received off-list. I don't have much of an opinion
here; other might.


Johannes Weiner wrote (on Wed, 22 Aug 2007 at 07:11 +0200):

> 1. If M-x rmail is *not* the only entry point, `rmail-insert-inbox-text'
>    should be safe for the worst case.

Personally, I think it's tidier to do initialization of global
variables near the top-level, rather than "hidden" away in a function,
even if it does work.

> 2. `rmail-autodetect' currently does not do what its comment says.

But it works, so this is just semantics IMO.

> I think I fixed both issues with the attached patch.  Please have a look at
> it.  HTH!
> 
> 	Hannes
> diff -Naur emacs.orig/lisp/mail/rmail.el emacs/lisp/mail/rmail.el
> --- emacs.orig/lisp/mail/rmail.el	2007-08-22 06:44:42.000000000 +0200
> +++ emacs/lisp/mail/rmail.el	2007-08-22 06:52:58.000000000 +0200
> @@ -203,24 +203,26 @@
>  	  ;; FIXME:
>  	  'emacs))))))
>  
> -(defun rmail-autodetect ()
> +(defun rmail-find-movemail-program ()
>    "Determine and return the file name of the `movemail' program.
>  If `rmail-movemail-program' is non-nil, use it.
>  Otherwise, look for `movemail' in the directories in
>  `rmail-movemail-search-path', those in `exec-path', and `exec-directory'."
> -  (if rmail-movemail-program
> -      (rmail-probe rmail-movemail-program)
> -    (catch 'scan
> -      (dolist (dir (append rmail-movemail-search-path exec-path
> -			   (list exec-directory)))
> -	(when (and dir (file-accessible-directory-p dir))
> -	  (let ((progname (expand-file-name "movemail" dir)))
> -	    (when (and (not (file-directory-p progname))
> -		       (file-executable-p progname))
> -	      (let ((x (rmail-probe progname)))
> -		(when x
> +  (or rmail-movemail-program
> +      (catch 'scan
> +	(dolist (dir (append rmail-movemail-search-path exec-path
> +			     (list exec-directory)))
> +	  (when (and dir (file-accessible-directory-p dir))
> +	    (let ((progname (expand-file-name "movemail" dir)))
> +	      (when (and (not (file-directory-p progname))
> +			 (file-executable-p progname))
> +		(when (rmail-probe progname)
>  		  (setq rmail-movemail-program progname)
> -		  (throw 'scan x))))))))))
> +		  (throw 'scan progname)))))))))
> +
> +(defun rmail-autodetect ()
> +  "Determine the flavor of the `movemail' program."
> +  (rmail-probe (rmail-find-movemail-program)))
>  
>  (defvar rmail-movemail-variant-in-use nil
>    "The movemail variant currently in use. Known variants are:
> @@ -1818,9 +1820,7 @@
>  		 (buffer-disable-undo errors)
>  		 (let ((args
>  			(append
> -			 (list (or rmail-movemail-program
> -				   (expand-file-name "movemail"
> -						     exec-directory))
> +			 (list (rmail-find-movemail-program)
>  			       nil errors nil)
>  			 (if rmail-preserve-inbox
>  			     (list "-p")

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

end of thread, other threads:[~2007-08-23  3:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22  3:16 [eddy@opera.com: Re: rmail passing movemail an option it doesn't like] Richard Stallman
2007-08-22  3:42 ` Glenn Morris
     [not found]   ` <20070822051114.GA3403@saeurebad.de>
2007-08-23  3:54     ` Glenn Morris

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.