[comp.emacs] find-file-read-only-other-window

john@xanth.UUCP (John Owens) (07/01/87)

The most frustrating lack of orthogonality in GNU Emacs for me has been the
lack of a combination of find-file-read-only and find-file-other window.
So - a simple elisp function to share with you all:

  (defun find-file-read-only-other-window (filename)
    "Like find-file-read-only, but does it in another window."
    (interactive "FFind file read-only in other window: ")
    (switch-to-buffer-other-window (find-file-noselect filename))
    (setq buffer-read-only t))

  (global-set-key "\^x4\^r" 'find-file-read-only-other-window)

-- 
John Owens		Old Dominion University - Norfolk, Virginia, USA
john@ODU.EDU		old arpa: john%odu.edu@RELAY.CS.NET
+1 804 440 4529		old uucp: {seismo,harvard,sun,hoptoad}!xanth!john

rbj@ICST-CMR.ARPA (Root Boy Jim) (07/06/87)

? The most frustrating lack of orthogonality in GNU Emacs for me has been the
? lack of a combination of find-file-read-only and find-file-other window.
? So - a simple elisp function to share with you all:

Given the `view' package, why would you want to do a
`find-file-read-only-ANYWHERE'?

I would restate your case as `I want "view-file-other-window"'.

Now might be a good time to complain about a few misfeatures to view.
First, the help is limited. I often have to switch windows to describe
variables and functions. Also, ^A, ^B, ^E, and ^F don't work. Why?
They seem like reasonably innocuous things to do.

Further, some integration of the movement commands should be made in
the view/dired/buffer-menu/edit-options/whatever modes. Most are
relatively consistent, but why doesn't `p' map to ^P and `n' map to ^N
in buffer menu mode? 
 
? -- 
? John Owens		Old Dominion University - Norfolk, Virginia, USA
? john@ODU.EDU		old arpa: john%odu.edu@RELAY.CS.NET
? +1 804 440 4529		old uucp: {seismo,harvard,sun,hoptoad}!xanth!john
? 

	(Root Boy) Jim Cottrell	<rbj@icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
I want to kill everyone here with a cute colorful Hydrogen Bomb!!