Subject: bug#13630: 24.3.50; [REGRESSION] [Gnus] `mail-source-check-pop' uselessly called by `mail-source-start-idle-timer'

From: Luca Capello <[email-masked]>
Date: Mon, 04 Feb 2013 20:45:55 +0100

Hi there!

Since the upgrade to emacs-snapshot_2:20130122-1, I got the same error
about `mail-source-check-pop', still present in 2:20130130-1:

1) when starting Gnus

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  make-network-process(:name "POP" :buffer #<buffer  trace of POP session to > :host nil :service nil)
  network-stream-open-starttls("POP" #<buffer  trace of POP session to > nil nil (:type network :capability-command "CAPA\n" :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t :starttls-function #[(capabilities) "\301\302\"\205\303\207" [capabilities string-match "\\bSTLS\\b" "STLS\n"] 3]))
  open-protocol-stream("POP" #<buffer  trace of POP session to > nil nil :type network :capability-command "CAPA\n" :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t :starttls-function #[(capabilities) "\301\302\"\205\303\207" [capabilities string-match "\\bSTLS\\b" "STLS\n"] 3])
  pop3-open-server(nil nil)
  pop3-get-message-count()
  mail-source-check-pop(((file)))
  #[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2]()
  apply(#[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2] nil)
  byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 5 0 nil #[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2] nil idle 0])
--8<---------------cut here---------------end--------------->8---

2) the first time I wanted to move emails from INBOX 

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  make-network-process(:name "POP" :buffer #<buffer  trace of POP session to > :host nil :service nil)
  network-stream-open-starttls("POP" #<buffer  trace of POP session to > nil nil (:type network :capability-command "CAPA\n" :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t :starttls-function #[(capabilities) "\301\302\"\205\303\207" [capabilities string-match "\\bSTLS\\b" "STLS\n"] 3]))
  open-protocol-stream("POP" #<buffer  trace of POP session to > nil nil :type network :capability-command "CAPA\n" :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t :starttls-function #[(capabilities) "\301\302\"\205\303\207" [capabilities string-match "\\bSTLS\\b" "STLS\n"] 3])
  pop3-open-server(nil nil)
  pop3-get-message-count()
  mail-source-check-pop(((file)))
  #[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2]()
  apply(#[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2] nil)
  byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 5 0 nil #[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2] nil idle 0])
  read-from-minibuffer("Move these 2 articles to (default LAST_MAILBOX_USED): " "" (keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil gnus-group-history "LAST_MAILBOX_USED" nil)
  completing-read-default("Move these 2 articles to (default LAST_MAILBOX_USED): " (SOME_OF_MY_MAILBOXES ...) nil nil "" gnus-group-history "LAST_MAILBOX_USED" nil)
  completing-read("Move these 2 articles to (default LAST_MAILBOX_USED): " (SAME_MAILBOXES_AS_ABOVE ...) nil nil "" gnus-group-history "LAST_MAILBOX_USED")
  gnus-emacs-completing-read("Move these 2 articles to (default LAST_MAILBOX_USED): " (SAME_MAILBOXES_AS_ABOVE ...) nil "" gnus-group-history "LAST_MAILBOX_USED")
  gnus-completing-read("Move these 2 articles to" ("SAME_MAILBOXES_AS_ABOVE" ...) nil "" gnus-group-history "LAST_MAILBOX_USED")
  gnus-group-completing-read("Move these 2 articles to" (SAME_MAILBOXES_AS_ABOVE ...) nil "" nil "LAST_MAILBOX_USED")
  gnus-read-move-group-name("Move" "LAST_MAILBOX_USED" (721 723) "")
  gnus-summary-move-article(nil)
  call-interactively(gnus-summary-move-article nil nil)
--8<---------------cut here---------------end--------------->8---

3) recurrently, I would say at least every 5 minutes:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  make-network-process(:name "POP" :buffer #<buffer  trace of POP session to > :host nil :service nil)
  network-stream-open-starttls("POP" #<buffer  trace of POP session to > nil nil (:type network :capability-command "CAPA\n" :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t :starttls-function #[(capabilities) "\301\302\"\205\303\207" [capabilities string-match "\\bSTLS\\b" "STLS\n"] 3]))
  open-protocol-stream("POP" #<buffer  trace of POP session to > nil nil :type network :capability-command "CAPA\n" :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t :starttls-function #[(capabilities) "\301\302\"\205\303\207" [capabilities string-match "\\bSTLS\\b" "STLS\n"] 3])
  pop3-open-server(nil nil)
  pop3-get-message-count()
  mail-source-check-pop(((file)))
  #[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2]()
  apply(#[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2] nil)
  byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 5 0 nil #[nil "\301\216\302!)\207" [mail-source-primary-source ((byte-code "\301\211\207" [mail-source-report-new-mail-idle-timer nil] 2)) mail-source-check-pop] 2] nil idle 0])
--8<---------------cut here---------------end--------------->8---

My .emacs* does not contain any reference to POP and:

  (setq mail-sources '())

This is a regression, since I have not changed that part of my
configuration for ages.

Thx, bye,
Gismo / Luca

In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2013-01-22 on dex, modified by Debian
 (emacs-snapshot package, version 2:20130122-1)
System Description:	Debian GNU/Linux 7.0 (wheezy)

Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man
 --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --without-compress-info --with-crt-dir=/usr/lib/x86_64-linux-gnu/
 --with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes'

Important settings:
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: fr_CH.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gpm-mouse-mode: t
  display-time-mode: t
  show-paren-mode: t
  gnus-undo-mode: t
  TeX-PDF-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
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-c ESC f g ESC [ B ESC [ A ESC [ A ESC [ A ESC [ B 
ESC [ C ESC [ 4 ~ ESC [ B ESC [ 4 ~ ESC [ 1 ~ ESC [ 
A ESC [ A C-@ ESC [ B ESC [ B ESC [ B ESC [ B ESC [ 
B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC 
w q ESC x e m a c s - b u TAB TAB DEL DEL DEL DEL DEL 
DEL DEL DEL DEL DEL r e p o r t - e m a TAB b u TAB 
RET

Recent messages:
Opening nnfolder server on archive...done
No new newsgroups
Checking new news...
Reading active file via nndraft...done
Checking new news...done
Entering debugger...
Beginning of buffer
Mark set
Back to top level.
Making completion list...

Load-path shadows:
/usr/share/emacs/24.3.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
~/.emacs.d/elisp/fortune hides /usr/share/emacs/24.3.50/lisp/play/fortune
/usr/share/emacs-snapshot/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs-snapshot/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs-snapshot/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs
/usr/share/emacs-snapshot/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex
/usr/share/emacs-snapshot/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs-snapshot/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs-snapshot/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs-snapshot/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs-snapshot/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs-snapshot/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs-snapshot/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs-snapshot/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs-snapshot/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs-snapshot/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs-snapshot/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs-snapshot/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs-snapshot/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs-snapshot/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview
/usr/share/emacs-snapshot/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs-snapshot/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs-snapshot/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex

Features:
(shadow sort gnus-cite bbdb-hooks epa-mail footnote flyspell ispell
mail-extr emacsbug help-mode debug network-stream starttls tls pop3
gnus-topic nndraft nnmh nnfolder nnmaildir gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-cache ielm comint ansi-color
t-mouse server gismo-full-emacs ratpoison ratpoisonrc-mode generic
generic-x gismo-emacs gismo-modes battery time ido paren eldoc gismo-w3m
w3m-lnum w3m-search w3m-session gismo-term term disp-table ehelp
electric ring gismo-popup gismo-planner bbdb-anniv cl-macs gv timeclock
view mule-util cal-china lunar solar cal-dst cal-bahai cal-islam
cal-hebrew holidays hol-loaddefs appt icalendar diary-lib diary-loaddefs
cal-menu calendar cal-loaddefs gismo-keybindings nroff-mode under
dictionary link connection w3m browse-url doc-view jka-compr image-mode
w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util dired gismo-gnus gnus-demon nntp spam spam-stat
bbdb-com warnings cl cl-lib gnus-uu yenc gnus-msg gnus-art mm-uu mml2015
mm-view mml-smime smime dig mailcap gnus-sum nnoo gnus-group gnus-undo
nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message
sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader
mail-utils wid-edit gnus-BTS gismo-files gismo-eshell gismo-erc
erc-stamp erc-log erc-dcc erc-goodies erc erc-backend erc-compat
format-spec auth-source eieio byte-opt bytecomp byte-compile cconv
gnus-util time-date password-cache thingatpt pp gismo-easypg epa derived
epg epg-config gismo-dired gismo-debian debian-bug rfc2047 rfc2045
ietf-drums mm-util mail-prsvr gismo-broken gismo-bbdb bbdb timezone
gismo-auctex latex tex-style tex dbus xml nadvice advice help-fns
easymenu gismo-functions-insert gismo-functions unicode-helper edmacro
kmacro debian-el debian-el-loaddefs w3m-load emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el
dpkg-dev-el-loaddefs bbdb-autoloads preview-latex tex-site auto-loads
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 dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)