🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98511

Suggestions: search-fw/bw-regexp, view-buffer-other-window.

#98511
From: Martin Maechler
Date: Wed, 03 Jul 1991 12:50
54 lines
2863 bytes
I have a few suggestions (for emacs 18.5? or 19 (?)):

1) This is so easy and useful: It maybe really should be considered by FSF:

   The other day, I was desperately looking for search-forward-regexp,
   until after a REAL long time (using TAGS and what not), I found
   re-search-forward. Apropos 'regexp' did not even help!
   The "re-" pre-position is really somewhat funny.
   At least the proposed names are much more natural in the context of the
   other Emacs Lisp functions and commands.
   Currently, I do

	(fset 'search-forward-regexp (symbol-function 're-search-forward))
	(fset 'search-backward-regexp (symbol-function 're-search-backward))

   But a future version maybe should even go the other way round, providing
   re-... only for upward-compatibility reasons.

   ---> All arguments welcome <---

2) view-buffer-other-window / view-file-other-window  "missing":

  I just needed the 1st one (to put into a function),
  but I was missing the latter (...file.. ) several times before.

  And when we are at it: Why not assign function keys
	C-x v 	  to "old"  		 view-file
	C-x 4 v	  to "not yet existing"  view-file-other-window


  Here is my version of  view-buffer-other-window:

(defun view-buffer-other-window (buffer-name not-return)
  "View BUFFER in View mode in another window,
returning to original buffer when done  ONLY if 
prefix argument not-return is nil (as by default).
  The usual Emacs commands are not available; instead,
a special set of commands (mostly letters and punctuation)
are defined for moving around in the buffer.
Space scrolls forward, Delete scrolls backward.
For list of all View commands, type ? or h while viewing.

Calls the value of  view-hook  if that is non-nil."

  (interactive "bView buffer:\nP")
  (if not-return
      (progn
	(switch-to-buffer-other-window buffer-name)
	(view-mode nil)))
  (view-mode (prog1 (current-buffer) 
	       (switch-to-buffer-other-window buffer-name))))

;Martin Maechler, Bellcore 2M-343, 445 South St., Morristown, NJ 07962-1910, USA
;maechler@bellcore.com, Tel: (201) 829-4837(w)  993-0944(h), Fax (201) 829-4391.
Technical Details
Message-ID: <9107032050.AA02393@crypto.bellcore.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!crypto.bellcore.com!maechler

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,3000ff18aa27feed,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-07-03 21:37:16 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!crypto.bellcore.com!maechler
From: maechler@crypto.bellcore.com (Martin Maechler)
Newsgroups: gnu.emacs.bug
Subject: Suggestions: search-fw/bw-regexp,  view-buffer-other-window.
Message-ID: <9107032050.AA02393@crypto.bellcore.com>
Date: 3 Jul 91 12:50:32 GMT
Sender: gnulists@ai.mit.edu
Reply-To: maechler@bellcore.com (Martin Maechler)
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 54
Approved: bug-gnu-emacs@prep.ai.mit.edu