[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
corrections to mailalias.el
From: |
Frederik Fouvry |
Subject: |
corrections to mailalias.el |
Date: |
Mon, 21 Mar 2005 16:54:10 +0100 (CET) |
Symptoms:
If mail-directory-requery is nil, then the argument of the function
mail-directory (and hence of the value of mail-directory-function) is
nil. The documentation of the variable `mail-directory-process'
should be mention this possibility (and dependency).
If mail-directory-function is 'mail-directory-process and the variable
mail-directory-process is nil, calling the function mail-get-names
will fail (via mail-directory, via mail-directory-process): the first
argument to call-process is nil, not a string. The patch below
silently returns nil. Perhaps a warning should be given in addition,
or a controlled error. The documentation of the variable
`mail-directory-process' should be updated to mark this requirement
more clearly.
In `mail-get-names', if mail-directory-names is t and
mail-directory-requery is non-nil, it can happen that
(append '(...) '(...) t)
is called, which will obviously fail.
These are all fixed in the patch below.
Index: lisp/mail/mailalias.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/mailalias.el,v
retrieving revision 1.51
diff -c -b -r1.51 mailalias.el
*** lisp/mail/mailalias.el 1 Sep 2003 15:45:30 -0000 1.51
--- lisp/mail/mailalias.el 21 Mar 2005 15:43:18 -0000
***************
*** 111,119 ****
This value is used when the value of `mail-directory-function'
is `mail-directory-process'. The value should be a list
of the form (COMMAND ARG ...), where each of the list elements
! is evaluated. When `mail-directory-requery' is non-nil, during
! evaluation of these elements, the variable `pattern' contains
! the partial input being completed.
The value might look like this:
--- 111,120 ----
This value is used when the value of `mail-directory-function'
is `mail-directory-process'. The value should be a list
of the form (COMMAND ARG ...), where each of the list elements
! is evaluated. COMMAND should evaluate to a string. When
! `mail-directory-requery' is non-nil, during evaluation of these
! elements, the variable `pattern' contains the partial input being
! completed. `pattern' is nil when `mail-directory-requery' is nil.
The value might look like this:
***************
*** 149,155 ****
"Alist of local users, aliases and directory entries as available.
Elements have the form (MAILNAME) or (MAILNAME . FULLNAME).
If the value means t, it means the real value should be calculated
! for the next use. this is used in `mail-complete'.")
(defvar mail-local-names t
"Alist of local users.
--- 150,156 ----
"Alist of local users, aliases and directory entries as available.
Elements have the form (MAILNAME) or (MAILNAME . FULLNAME).
If the value means t, it means the real value should be calculated
! for the next use. This is used in `mail-complete'.")
(defvar mail-local-names t
"Alist of local users.
***************
*** 469,475 ****
mail-aliases))
(if (consp mail-local-names)
mail-local-names)
! (or directory mail-directory-names))
(lambda (a b)
;; should cache downcased strings
(string< (downcase (car a))
--- 470,478 ----
mail-aliases))
(if (consp mail-local-names)
mail-local-names)
! (or directory
! (when (consp mail-directory-names)
! mail-directory-names)))
(lambda (a b)
;; should cache downcased strings
(string< (downcase (car a))
***************
*** 509,516 ****
(defun mail-directory-process (pattern)
"Run a shell command to output names in directory.
See `mail-directory-process'."
(apply 'call-process (eval (car mail-directory-process)) nil t nil
! (mapcar 'eval (cdr mail-directory-process))))
;; This should handle a dialog. Currently expects port to spit out names.
(defun mail-directory-stream (pattern)
--- 512,520 ----
(defun mail-directory-process (pattern)
"Run a shell command to output names in directory.
See `mail-directory-process'."
+ (when (consp mail-directory-process)
(apply 'call-process (eval (car mail-directory-process)) nil t nil
! (mapcar 'eval (cdr mail-directory-process)))))
;; This should handle a dialog. Currently expects port to spit out names.
(defun mail-directory-stream (pattern)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- corrections to mailalias.el,
Frederik Fouvry <=