home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / emacs / help / 3701 < prev    next >
Encoding:
Text File  |  1992-08-12  |  2.6 KB  |  70 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!pipex!demon!edscom.demon.co.uk!kevin
  3. From: kevin@edscom.demon.co.uk (Kevin Broadey)
  4. Subject: Re: how to define list of filenames for rmail
  5. In-Reply-To: achilles@ira.uka.de's message of 11 Aug 92 12:11:11
  6. Message-ID: <KEVIN.92Aug12132540@buffalobill.edscom.demon.co.uk>
  7. Sender: kevin@edscom.demon.co.uk (Kevin Broadey)
  8. Organization: EDS-Scicon, Milton Keynes, UK
  9. References: <16816nINNouu@iraul1.ira.uka.de> <ACHILLES.92Aug11121111@i90s8.ira.uka.de>
  10. Date: Wed, 12 Aug 1992 13:25:40 GMT
  11. Lines: 57
  12.  
  13. In article <ACHILLES.92Aug11121111@i90s8.ira.uka.de> achilles@ira.uka.de (Alf-Christian Achilles) writes:
  14.  
  15.    >>>>> In article <16816nINNouu@iraul1.ira.uka.de>, mock@i41s18.ira.uka.de (Markus Mock) writes:
  16.    > NNTP-Posting-Host: i41s18.ira.uka.de
  17.  
  18.    > I want to do put something like that into the loaddefs.el file:
  19.  
  20.    > (defconst rmail-primary-inbox-list   '(\"~/mbox\" \"~/mailbox\") "\
  21.    > *List of files which are inboxes for user's primary mail file ~/RMAIL.
  22.    > `nil' means the default, which is (\"~/mbox\" \"/usr/spool/mail/$USER\")
  23.    > (the second name varies depending on the operating system).")
  24.  
  25.    > I can load it (load-file) but when I invoke rmail it says:
  26.  
  27.    > Wrong type argument: stringp, \"~/mbox\".
  28.  
  29.    > I fiddled about but to no avail.
  30.    > How's the correct syntax for a list of filenames then?
  31.  
  32.    > Thanks.
  33.  
  34.    >     -- Markus (mock@ira.uka.de)
  35.  
  36.    How about 
  37.  
  38.    (list (substitute-in-file-name "~/mbox" )
  39.      (substitute-in-file-name "~/mailbox" ))
  40.  
  41.    as a list of *complete* pathnames. Works like a charm for me.
  42.  
  43. ===
  44.  
  45. Using `substitute-in-file-name' is a red herring.  It has no effect here as it
  46. simply expands environment variables in the string.  The bit in the
  47. documentation about "~" and "/" means that "$FOO/$BAR/~/wibble" comes out as
  48. "~/wibble" (I just tried!).
  49.  
  50. Using `list' instead of a quote is a red herring too - they but give the same
  51. result.
  52.  
  53. The real problem is that you've escaped your string delimiter with a backslash,
  54. so instead of a string you got a symbol (\ " ~ / m b o x \ ").
  55.  
  56. What you need is:-
  57.  
  58. (defconst rmail-primary-inbox-list '("~/mbox" "~/mailbox")
  59. "*List of files which are inboxes for user's primary mail file ~/RMAIL.
  60. `nil' means the default, which is (\"~/mbox\" \"/usr/spool/mail/$USER\")
  61. \(the second name varies depending on the operating system).")
  62.  
  63. Note that the \" needs to be there within the documentation string to escape
  64. the quotes in it.
  65. -- 
  66. Kevin Broadey, EDS-Scicon
  67. Mail:    Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England
  68. E-mail: kbroadey@edscom.demon.co.uk
  69. Phone:    +44 908 284198 or +44 908 585858 ext 4198
  70.