🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #822

Comments on comint

#822
From: Brian M Kennedy
Date: Mon, 05 Oct 1992 10:19
66 lines
3430 bytes
(I forwarded this to bug-gnu-emacs because I have been told that
comint will be standard in v19.)

Olin,

I have a few suggestions on comint mode that I would like to make.
If I get around to writing them myself, I will certainly forward them
to you.

1) The msearch-input and related commands have been commented out,
   with claims that the previous-input and related history commands
   are better.  For history-ring usage, I agree.  However, I *love*
   these commands for a different usage -- I often want to back up
   and see the ouput of a previous command.  Since these commands
   outputs are often verbose, and it is fatiguing to use my eyes to
   search for a prompt while pressing M-v, I just use msearch.
   I have them bound:
	(define-key comint-mode-map "\M-\C-p"  'comint-msearch-input)
	(define-key comint-mode-map "\M-\C-n"  'comint-psearch-input)
	(define-key comint-mode-map "\M-\C-s"  'comint-msearch-input-matching)

2) I previously used a version of shell with extensions for history,
   completion, and directory-tracking.  One command I miss is M-o,
   which does a RETURN (send-input) but without resetting the state
   of the ring.  Thus, you can M-p back to the first in a series of
   commands, and then M-o to execute it.  Then M-n gets the next in
   that series of commands, M-o to execute it, and so on.  This can
   be extremely handy at times.

   For what its worth, here is the function from the old shell
   version:
	(defun shell-send-input-preserve-yank ()
	  "Do shell-send-input (as if you hit return), but rotate history so that
	   the next history yank will be the next one."
	  (interactive)
	  (if (not (eq last-command 'shell-yank))
	      (shell-send-input)
	    (let ((old-ptr shell-history-pointer))
	      (shell-send-input)
	      (push-mark (point))
	      (setq shell-history-pointer old-ptr)
	      (setq this-command 'shell-yank)
	      )
	    )
	  )
   It was unclear to me if conversion of this to comint mode would
   simply require changing the shell- prefixed symbols to the comint-
   prefixed equivalents, or whether more would be required.  Comments
   or suggestions are welcome.

3) Our filename completion has a nice feature -- if you press TAB and
   it is complete but not unique, then it cuts the current window in
   half and puts the completion list in one half.  Then a return or
   different history command will restore the window.  We have found
   this to work very nicely, but is best supported by comint rather 
   than added on the outside (since some of the other commands need to
   restore the window, eliminating the completions list).


Incidentally, I am using comint-version 2.03.  Is there a newer
version?  And has anyone written a comint-based dbx mode?

Thanks for listening,

== Brian M Kennedy <kennedy@intellection.com> ==
== Intellection, Inc.  =========================
Technical Details
Message-ID: <9210052019.AA23937@nak.intellection.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!art.INTellection.COM!kennedy

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!art.INTellection.COM!kennedy
From: kennedy@art.INTellection.COM (Brian M Kennedy)
Subject: Comments on comint
Message-ID: <9210052019.AA23937@nak.intellection.com>
Sender: gnulists@ai.mit.edu
Reply-To: Brian M Kennedy <kennedy@intellection.com>
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 5 Oct 1992 10:19:22 GMT
Approved: bug-gnu-emacs@prep.ai.mit.edu
Lines: 68