Subject: bug#34252: closed (Re: bug#34252: 27.0.50; rmail-get-new-mail fails)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 01 Feb 2019 09:19:02 +0000

Your bug report

#34252: 27.0.50; rmail-get-new-mail fails

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
34252: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34252
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Fri, 01 Feb 2019 11:18:14 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Thu, 31 Jan 2019 05:32:12 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > Date: Wed, 30 Jan 2019 20:29:29 +0000 (GMT)
> > From: john <[email-masked]>
> > cc: [email-masked], [email-masked]
> > 
> > Just changing lin 2075 it does not crash but after quite a time it says
> > 
> > Getting mail from /mnt/snout/home/jpff/mbox...
> > movemail: No locks available for /mnt/snout/home/jpff/mbox
> > (No new mail has arrived)
> > 0 new messages read
> > You can run the command ‘rmail-get-new-mail’ with g
> > 0 new messages read
> > 
> > and no mail is read
> > 
> > If I understand the message the problem relates to fie locking somewhee.
> 
> Maybe so, but that's an entirely different problem, I think.

I've now installed the change around line 2075, and I'm closing the
bug.

Thanks.

Subject: 27.0.50; rmail-get-new-mail fails
From: John <[email-masked]>
To: [email-masked]
Date: Tue, 29 Jan 2019 20:57:19 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

in case of reading a mail box on a nfs-mounted disk

There are two problems;  first there are a number of calls to
string-match and the like with argument proto which is nil.  This
crashes
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   string-match("^\\(imap\\|pop\\)s?$" nil nil)
   rmail-remote-proto-p(nil)
   rmail-insert-inbox-text(("/var/spool/mail/jpff" "/mnt/snout/home/jpff/mbox") t)
   rmail-get-new-mail-1(nil ("/var/spool/mail/jpff" "/mnt/snout/home/jpff/mbox") nil)
   rmail-get-new-mail(nil)
   funcall-interactively(rmail-get-new-mail nil)
   call-interactively(rmail-get-new-mail nil nil)
   command-execute(rmail-get-new-mail)

The patch below improves things

--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1902,7 +1902,7 @@ rmail-parse-url
            (host  (substring file (or (match-end 2)
                                       (+ 3 (match-end 1))))))
 
-       (if (rmail-remote-proto-p proto)
+       (if (and proto (rmail-remote-proto-p proto))
            (if (not pass)
                (when rmail-remote-password-required
                  (setq got-password (not (rmail-have-password)))
@@ -1913,7 +1913,7 @@ rmail-parse-url
              ;; does not really like it, in spite of the movemail spec.
              (setq file (concat proto "://" user "@" host))))
 
-       (if (rmail-movemail-variant-p 'emacs)
+       (if (and proto (rmail-movemail-variant-p 'emacs))
            (if (string-equal proto "pop")
                (list (concat "po:" user ":" host)
                      proto
@@ -2072,7 +2072,7 @@ rmail-insert-inbox-text
                   ;; If we just read the password, most likely it is
                   ;; wrong.  Otherwise, see if there is a specific
                   ;; reason to think that the problem is a wrong passwd.
-                  (if (and (rmail-remote-proto-p proto)
+                  (if (and proto (rmail-remote-proto-p proto)
                            (or got-password
                                (re-search-forward rmail-remote-password-error
                                                   nil t)))

but still fails.  It reports it is reading the mailbox and there is a
long delay before it returns with a blank buffer looking at RMAIL file
and not reading the mail

In GNU Emacs 27.0.50 (build 77, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
 of 2019-01-29 built on xenakis
Repository revision: 7a10db87a1ff9a36ff09fcda15cd32f3e719e1b3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: openSUSE Leap 15.0

Recent messages:
File RMAIL is large (86.8M), really open? (y)es or (n)o or (l)iterally y
Loading dired-add...done
Counting messages...done
Getting mail from /mnt/snout/home/jpff/mbox...
movemail: No locks available for /mnt/snout/home/jpff/mbox
(No new mail has arrived)
0 new messages read
You can run the command ‘rmail-get-new-mail’ with g
0 new messages read
Making completion list...

Configured using:
 'configure --without-gnutls'

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS GLIB NOTIFY INOTIFY LIBXML2
FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM THREADS
CANNOT_DUMP GMP

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

Major mode: RMAIL

Minor modes in effect:
  auto-image-file-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug mime-compose mail-alias-menu url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs json map
url-vars shr-color color shr text-property-search svg xml dom
browse-url qp rmailmm message rmc puny seq byte-opt gv bytecomp
byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec
password-cache epa derived epg epg-config gnus-util time-date
mm-decode mm-bodies mm-encode gmm-utils mailheader cl-loaddefs cl-lib
mail-parse rfc2231 rmail rmail-loaddefs mailabbrev flyspell mailalias
mailcrypt mail-extr comint ansi-color ring ispell sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils find-file misearch
multi-isearch elec-pair cal-julian delsel cus-start cus-load
image-file crypt crypt++ crypt+pgp-pub paren view cal-china cal-bahai
cal-islam cal-hebrew lunar solar cal-dst appt diary-lib diary-loaddefs
holidays hol-loaddefs cal-menu easymenu calendar cal-loaddefs time
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
threads inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 117963 9850)
 (symbols 48 10775 1)
 (strings 32 31121 1305)
 (string-bytes 1 1014103)
 (vectors 16 34578)
 (vector-slots 8 400927 23720)
 (floats 8 737 382)
 (intervals 56 841 0)
 (buffers 992 17))

==John ffitch