From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: very mysterious behaviour from rmail-output-to-rmail-file
Date: Tue, 04 Jan 2005 16:00:38 -0700 [thread overview]
Message-ID: <340lgqF44rhsnU1@individual.net> (raw)
In-Reply-To: <m3hdm1exrj.fsf@yahoo.de>
Florian von Savigny wrote:
> 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")))
...
> 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?
,----[ C-h f rmail-output-to-rmail-file RET ]
| rmail-output-to-rmail-file is an interactive autoloaded Lisp function
in `rmailout'.
| [Arg list not available until function definition is loaded.]
|
| Append the current message to an Rmail file named FILE-NAME.
| If the file does not exist, ask if it should be created.
| If file is being visited, the message is appended to the Emacs
| buffer visiting that file.
| If the file exists and is not an Rmail file, the message is
| appended in inbox format, the same way `rmail-output' does it.
|
| The default file name comes from `rmail-default-rmail-file',
| which is updated to the name you use in this command.
Hmmm, perhaps that variable isn't set...
| A prefix argument N says to output N consecutive messages
| starting with the current one. Deleted messages are skipped and don't
count.
|
| If optional argument STAY is non-nil, then leave the last filed
| mesasge up instead of moving forward to the next non-deleted message.
`----
Then if you look at the source for rmail-output-to-rmail-file, it's
preceded by this comment:
;;; There are functions elsewhere in Emacs that use this function;
;;; look at them before you change the calling method.
I would try binding that variable, which is set by all the Emacs
commands that call rmail-output-to-rmail-file (via
rmail-output-read-rmail-file-name, C-h v):
(defun rmail-output-to-afile ()
"Append the current message to the \"putfile\" Rmail file
in the `current-contract' directory.
See `rmail-output-to-file'."
(interactive)
(let ((rmail-default-rmail-file
(expand-file-name "putmail" (nth 1 (current-contract)))))
(rmail-output-to-rmail-file rmail-default-rmail-file)))
--
Kevin Rodgers
next prev parent reply other threads:[~2005-01-04 23:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2005-01-07 20:42 ` Florian von Savigny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=340lgqF44rhsnU1@individual.net \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).