🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #87793

mh-e.el minor problem -- mh-inc-prog used inconsistently

#87793
From: Randy Styborski
Date: Thu, 01 Sep 1994 16:20
62 lines
2968 bytes
In GNU Emacs 19.25.2 of Mon Aug  8 1994 on hpsrdpw (m68k-hp-hpux9)

In 'mh-e.el', in the function 'mh-get-new-mail' the variable 'mh-inc-prog'
is used in one branch of an 'if' but not used in the other branch.  Assuming
'mh-e.el' is part of the standard distribution, could you please make this
change there so it will be propagated appropriately?

The following is the corrected form of the function with the incorrect line
left in comments.

(defun mh-get-new-mail (maildrop-name)
  ;; Read new mail from a maildrop into the current buffer.
  ;; Return in the current buffer.
  (let ((point-before-inc (point))
	(folder mh-current-folder)
	(new-mail-p nil))
    (with-mh-folder-updating (t)
      (message (if maildrop-name
		   (format "inc %s -file %s..." folder maildrop-name)
		   (format "inc %s..." folder)))
      (setq mh-next-direction 'forward)
      (goto-char (point-max))
      (let ((start-of-inc (point)))
	(if maildrop-name
	    (mh-exec-cmd-output mh-inc-prog nil folder
				"-file" (expand-file-name maildrop-name)
				"-width" (window-width)
				"-truncate")
	    (mh-exec-cmd-output mh-inc-prog nil

;;; INCORRECT VERSION HARDWIRES 'inc'
;;;	    (mh-exec-cmd-output "inc" nil

				"-width" (window-width)))
	(message
	 (if maildrop-name
	     (format "inc %s -file %s...done" folder maildrop-name)
	     (format "inc %s...done" folder)))
	(goto-char start-of-inc)
	(cond ((looking-at "inc: no mail")
	       (message "No new mail%s%s" (if maildrop-name " in " "")
			(if maildrop-name maildrop-name "")))
	      ((re-search-forward "^inc:" nil t) ; Error messages
	       (error "inc error"))
	      (t
	       ;; remove old cur notation (cf mh-goto-cur-msg code)
	       (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
		 (save-excursion
		   (and cur-msg
			(mh-goto-msg cur-msg t nil)
			(looking-at mh-cur-scan-msg-regexp)
			(mh-notate nil ?  mh-cmd-note))))
	       (setq new-mail-p t)))
	(keep-lines mh-valid-scan-line) ; Flush random scan lines
	(mh-delete-seq-locally 'cur)	; To pick up new one
	(setq mh-seq-list (mh-read-folder-sequences folder t))
	(mh-notate-user-sequences)
	(if new-mail-p
	    (progn
	      (mh-goto-cur-msg)
	      (mh-make-folder-mode-line))
	    (goto-char point-before-inc))))))
Technical Details
Message-ID: <9409011615.AA02430@hpspkaa.spk.hp.com>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!spool.mu.edu!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!spk.hp.COM!styborsk

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,2be39eeb2fda22b7,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-09-01 19:12:55 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!spool.mu.edu!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!spk.hp.COM!styborsk
From: styborsk@spk.hp.COM (Randy Styborski)
Newsgroups: gnu.emacs.bug
Subject: mh-e.el minor problem -- mh-inc-prog used inconsistently
Date: 1 Sep 1994 12:20:45 -0400
Organization: GNUs Not Usenet
Lines: 62
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9409011615.AA02430@hpspkaa.spk.hp.com>