From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/34415 Path: main.gmane.org!not-for-mail From: "James H. Cloos Jr." Newsgroups: gmane.emacs.gnus.general Subject: Re: Error with function gnus-summary-pipe-output (Was htmlified mail) Date: 26 Jan 2001 16:32:15 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: References: <5b4rymgm35.fsf@avocet.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035170346 30306 80.91.224.250 (21 Oct 2002 03:19:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:19:06 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id 3570FD049D for ; Fri, 26 Jan 2001 17:33:19 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id QAC13824; Fri, 26 Jan 2001 16:32:39 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 26 Jan 2001 16:31:56 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id QAA15668 for ; Fri, 26 Jan 2001 16:31:46 -0600 (CST) Original-Received: from austin.jhcloos.com (austin.jhcloos.com [206.224.83.202]) by mailhost.sclp.com (Postfix) with ESMTP id 6A412D049D for ; Fri, 26 Jan 2001 17:32:15 -0500 (EST) Original-Received: by austin.jhcloos.com (Postfix, from userid 500) id 3E1CB2B200; Fri, 26 Jan 2001 22:32:15 +0000 (UTC) Original-To: ShengHuo ZHU In-Reply-To: <5b4rymgm35.fsf@avocet.cs.rochester.edu> Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 84 Xref: main.gmane.org gmane.emacs.gnus.general:34415 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:34415 >>>>> "ZSH" == ShengHuo ZHU 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" # 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(# 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. 1024D/ED7DAEA6 E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6