bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug/sloppy coding in smtpmail.el


From: Jeffrey J. Kosowsky
Subject: Bug/sloppy coding in smtpmail.el
Date: Tue, 01 Jan 2008 23:54:36 -0500

  smtpmail.el uses defvar to define one user variable
(smtpmail-queue-index) in terms of two other  user-defined variable
(smtpmail-queue-dir and smtpmail-queue-index-file).

Particularly, given the naming convention, most users would
rationally think that defining the directory (named logically as
smtpmail-queue-dir) and the index file (named logically
smtpmail-queue-index-file) would be sufficient.

However, this is not true, one would also need to independently set
smtpmail-queue-index which is not even named very specifically and is
highly non-obvious. 

I had to go through the elisp source code to figure out why
smtpmail kept crashing with the following error even though it seemed
that I had defined everything properly:
Debugger entered--Lisp error: (file-error "Opening input file" "no such file or 
directory" "/home/myhome/Mail/queued-mail/index")


Basically, 3 defvars are being uses to specify only 2 independent bits
of information -- the base directory and EITHER the relative path to
the index within it (smtpmail-queue-index-file) OR the absolute path
to the index file (smtpmail-queue-index).

A *BETTER* way would be to just pick 2 out of the 3 as independent
variables.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]