unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* very mysterious behaviour from rmail-output-to-rmail-file
@ 2005-01-01 19:48 Florian von Savigny
  2005-01-04 19:16 ` Florian von Savigny
  2005-01-04 23:00 ` Kevin Rodgers
  0 siblings, 2 replies; 6+ messages in thread
From: Florian von Savigny @ 2005-01-01 19:48 UTC (permalink / raw)



I'm trying to debug a function I have written which is meant to be
called in rmail buffers and basically should sort a message
somewhere. The directory of that somewhere should be returned by
another function which works well on its own:

(defun rmail-output-to-afile ()
  (interactive)
  (rmail-output-to-rmail-file (concat 
			       (nth 1 (current-contract))
			       "/putmail")))

"(current-contract)" returns a two-element list, of a directory name
(without its path) and the full path of this directory - hence, "(nth
1 ..."  returns that full path. This works fine, and up till today I
thought that if an expression returns something, it returns
it. Somehow I seem to have hit upon a proof to the contrary - consider
yourself:

(nth 1 (current-contract)) 

by itself returns (as I explained)

"/home/uebersetzer/auftraege/20040203.hau45147ess"

If this literal value is substituted for (nth 1 (current-contract)) in
the function definition, rmail-output-to-afile outputs the current
message to "/home/uebersetzer/auftraege/20040203.hau45147ess/putmail",
first asking whether it should create the file if it isn't there. This
is what I expect the function to do.

But if the function definition is left as above, it will only go as
far as asking whether it should create the file (if it isn't already
there). Then, it will emit the error "Wrong type argument: stringp,
nil", and stop.

The backtrace says:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  rmail-output-to-rmail-file("/home/uebersetzer/auftraege/20040203.hau45147ess/putmail")
  rmail-output-to-afile()
* call-interactively(rmail-output-to-afile)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)


This is either a no-brainer, or a deep mystery. To me, it's the
latter. Can anybody help me?

Thanks a lot!

-- 


Florian v. Savigny

If you are going to reply in private, please be patient, as I only
check for mail something like once a week. - Si vous allez répondre
personellement, patientez s.v.p., car je ne lis les courriels
qu'environ une fois par semaine.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-07 20:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-01 19:48 very mysterious behaviour from rmail-output-to-rmail-file Florian von Savigny
2005-01-04 19:16 ` Florian von Savigny
2005-01-04 19:28   ` FCC
2005-01-04 19:32     ` FCC
2005-01-04 23:00 ` Kevin Rodgers
2005-01-07 20:42   ` Florian von Savigny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).