From: "James H. Cloos Jr." <cloos@jhcloos.com>
Cc: ding@gnus.org
Subject: Re: Error with function gnus-summary-pipe-output (Was htmlified mail)
Date: 26 Jan 2001 16:32:15 -0600 [thread overview]
Message-ID: <m31ytqt05s.fsf@austin.jhcloos.com> (raw)
In-Reply-To: <5b4rymgm35.fsf@avocet.cs.rochester.edu>
>>>>> "ZSH" == ShengHuo ZHU <zsh@cs.rochester.edu> writes:
ZSH> gnus-default-article-saver is bound to gnus-summary-save-in-pipe
ZSH> when trying `|'. If Gnus changes the value after the command, it
ZSH> is because there was a bug in Gnus 5.8.7 and previous versions.
ZSH> A workaround is putting (require 'gnus-art) in ~/.gnus .
This has no effect on getting | to work. I still get 'default as the
last argument in the call to call-process-region.
The code (as of 5.8.8) looks like:
(defun gnus-summary-save-in-pipe (&optional command)
"Pipe this article to subprocess."
(setq command
(cond ((and (eq command 'default)
gnus-last-shell-command)
gnus-last-shell-command)
(command command)
(t (read-string
(format
"Shell command on %s: "
(if (and gnus-number-of-articles-to-be-saved
(> gnus-number-of-articles-to-be-saved 1))
(format "these %d articles"
gnus-number-of-articles-to-be-saved)
"this article"))
gnus-last-shell-command))))
(when (string-equal command "")
(setq command gnus-last-shell-command))
(gnus-eval-in-buffer-window gnus-article-buffer
(save-restriction
(widen)
(shell-command-on-region (point-min) (point-max) command nil)))
(setq gnus-last-shell-command command))
That 'default up there appears to get sent to shell-command-on-region.
Note that read-string is NOT called when the error occurs. Note that
default is not AFAICT defined. Anf this bug has existed in every
version of ding that I have tried. (I had to think about when I was
first hit with it for a while; it was indeed when I discovered ding
and upgraded from whatever version/capitalization of gnus I'd been using.
So. (eq command 'default) is presumably nil. gnus-last-shell-command
as well, so command is not setq to (gnus-last-shell-command). command
is not set AFAICT, so command is not setq to the old value of command
either. So read-string ought to be run. But it is not.
Just tested by manually calling (gnus-summary-save-in-pipe "ls").
The backtrace is now:
Signaling: (wrong-type-argument stringp default)
call-process-region(1 902 "/bin/bash" "/tmp/emacseha4Xw"
#<buffer *Shell Command Output*> nil "-c" default)
shell-command-on-region(1 902 default nil)
gnus-summary-save-in-pipe(default)
byte-code("**ELIDED**" [gnus-default-article-saver gnus-article-buffer
save-buffer gnus-save-article-buffer gnus-prompt-before-saving
file error "No default saver is defined" default always nil t
filename num gnus-number-of-articles-to-be-saved
gnus-article-current-summary] 2)
gnus-article-save(#<buffer *Gnus Save*> nil 1)
gnus-summary-save-article(nil t)
gnus-summary-pipe-output(nil)
call-interactively(gnus-summary-pipe-output)
gnus-article-read-summary-keys(nil)
* call-interactively(gnus-article-read-summary-keys)
as you can see, gnus-summary-save-in-pipe is still called with the arg default.
The bytecode shows that gnus-article-save's fragment:
(if (not gnus-default-article-saver)
(error "No default saver is defined")
indicates that (not gnus-default-article-saver) is returning t. The
variable is now set to gnus-summary-save-in-rmail (since I removed
the reference to it in ~/.emacs.el). Running a (setq gnus-default-
article-saver 'gnus-summary-save-in-file) does not change the backtrace.
-JimC
--
James H. Cloos, Jr. <http://jhcloos.com/public_key> 1024D/ED7DAEA6
<cloos@jhcloos.com> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
next prev parent reply other threads:[~2001-01-26 22:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-24 9:15 htmlified mail Joakim Hove
2001-01-24 11:38 ` Bill White
2001-01-24 14:06 ` Randal L. Schwartz
2001-01-24 15:03 ` Stainless Steel Rat
2001-01-24 15:22 ` Hannu Koivisto
2001-01-26 3:59 ` Error with function gnus-summary-pipe-output (Was htmlified mail) Mike Pullen
2001-01-26 8:17 ` Bill White
2001-01-26 13:20 ` ShengHuo ZHU
2001-01-28 20:44 ` James H. Cloos Jr.
2001-01-29 0:35 ` ShengHuo ZHU
2001-01-29 1:49 ` James H. Cloos Jr.
2001-02-06 6:51 ` ShengHuo ZHU
2001-01-26 19:01 ` James H. Cloos Jr.
2001-01-26 19:17 ` ShengHuo ZHU
2001-01-26 22:32 ` James H. Cloos Jr. [this message]
2001-01-26 23:00 ` ShengHuo ZHU
2001-01-27 21:17 ` James H. Cloos Jr.
2001-01-27 21:44 ` ShengHuo ZHU
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m31ytqt05s.fsf@austin.jhcloos.com \
--to=cloos@jhcloos.com \
--cc=ding@gnus.org \
/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 NNTP newsgroup(s).