🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #87331

emacs 19.25 shell-mode

#87331
From: ben
Date: Sun, 02 Oct 1994 15:45
28 lines
1800 bytes
I encountered the following problem with emacs 19.25 on goldman.gnu.ai.mit.edu.

When I link a shell history file, like ~/.bash_history, to /dev/null,
and then do M-x shell, I get an error indicating that my history file
is not a regular file, and the *shell* buffer, while it starts, is not
visible.

The problem appears to be in the function shell-mode in shell.el. There
is code like this to test the history file to see if it is /dev/null:

    (setq comint-input-ring-file-name
	  (or (getenv "HISTFILE")
	      (cond ((string-equal shell "bash") "~/.bash_history")
		    ((string-equal shell "ksh") "~/.sh_history")
		    (t "~/.history"))))
    (if (equal comint-input-ring-file-name "/dev/null")
	(setq comint-input-ring-file-name nil))

I think that something like this will work better:

    (setq comint-input-ring-file-name
	  (or (getenv "HISTFILE")
	      (cond ((string-equal shell "bash") "~/.bash_history")
		    ((string-equal shell "ksh") "~/.sh_history")
		    (t "~/.history"))))
    (if (equal (file-truename (expand-file-name
			       comint-input-ring-file-name)) "/dev/null")
	(setq comint-input-ring-file-name nil))
Technical Details
Message-ID: <9410021540.AA12462@goldman.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!ben

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,30c760b8325382a5,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-10-02 08:52:23 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!ben
From: ben@gnu.ai.mit.edu
Newsgroups: gnu.emacs.bug
Subject: emacs 19.25 shell-mode
Date: 2 Oct 1994 11:45:00 -0400
Organization: GNUs Not Usenet
Lines: 28
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9410021540.AA12462@goldman.gnu.ai.mit.edu>