[gnu.emacs] [romero@csseq.tamu.edu

jr@CHIPS.BBN.COM (John Robinson) (05/08/89)

  Date:    Mon, 08 May 89 02:12:52 -0500 
  From:    romero@csseq.tamu.edu (Ron Romero)
  To:      jr@bbn.com
  Subject: bug in slowsplit.el 

    I've found one minor error with your slow-split.el package.  I've
  aliased C-x 1 to delete-other-windows-quietly.  However, when I bring
  up a help window, the mini-buffer gives me the helpful little message
  "press M-x delete-other-windows to remove help window."  How could I
  best get it to know that delete-other-windows-quietly does the same
  thing?


  ===========================================
  Ron Romero
  romero@csseq.tamu.edu
  - -------------------------------------------
  "It's all right we told you what to dream."
  ___________________________________________

Two possibilities:

1.  If you are happy with always using delete-other-windows-quietly in
all cases, modify the code so that it is named delete-other-windows.
Its definition will replace the default when you load the slow-split
package, and the help function (and any others that call it or look up
its binding) will be none the wiser.  Once you change the name in this
way, it won't be necessary to rebind C-X 1.  You might also want to
do the same with split-window-quietly vs. split-window-vertically.

2.  Add the following redefinition of the help function that posts the
helpful message about C-X 1 (when you use unmodified emacs) by adding
this defun to your slowsplit.el code (this redefines the emacs
version):

(defun print-help-return-message (&optional function)
  "Display or return message saying how to restore windows after help command.
Computes a message and applies the argument FUNCTION to it.
If FUNCTION is nil, applies `message' to it, thus printing it."
  (and (not (get-buffer-window standard-output))
       (funcall (or function 'message)
		(substitute-command-keys
		 (if (one-window-p t)
		     (if pop-up-windows
			 "Type \\[delete-other-windows-quietly] to remove help window."
		       "Type \\[switch-to-buffer] RET to remove help window.")
		   "Type \\[switch-to-buffer-other-window] RET to restore old contents of help window.")))))

What I had hoped to do was to merge my code into the distributed code
for split-window-vertically and delete-other-windows, and make it
conditional on a global customization variable, and perhaps also the
search-slow-speed variable.  I haven't gotten any further bug reports,
so maybe it is time to do this.  (Any other suggestions out there?)
--
/jr
jr@bbn.com or bbn!jr
C'mon big money!

tale@pawl.rpi.edu (David C Lawrence) (05/09/89)

In article <4139.610638315@chips> jr@CHIPS.BBN.COM (John Robinson) writes:
jr> What I had hoped to do was to merge my code into the distributed code
jr> for split-window-vertically and delete-other-windows, and make it
jr> conditional on a global customization variable, and perhaps also the
jr> search-slow-speed variable.  I haven't gotten any further bug reports,
jr> so maybe it is time to do this.  (Any other suggestions out there?)

Sure, and I'm posting rather than mailing because it brings up other
questions. 

I would say that delete-other-windows can be fset to delete-other=
windows-quietly without any problems; however, the same is not true of
split-window-vertically and split-window-quietly.  Some elisp
programmers rely on the behaviour of -vertically that _always_ puts
the point in the top window and _always_ leaves the value of point
alone.  The same is not true of -quietly which will make the selected
window either top or bottom and possibly move point if it was where
the new modeline is.  I like -quietly very much for interactive use,
but it is not a replacement for -vertically.  (As an example, try
(fset 'split-windows-vertically 'split-windows-quietly) and then
running GNUS.  The behaviour of selecting an article to be read starts
having major problems as soon as you get to a point where -quietly
wants to put you in the bottom window of the split.)

The other questions involved deal with how code that is generally
considered useful by Emacs users actually gets into the distribution.
18.54 saw the addition of a bunch of stuff for BBN equipment -- good,
even if I don't have any.  There are other things, though, like Dave
Gudeman's and Bruce Israel's minibuf.el for completion, three different
functions for filenamer completion anywhere in Emacs, two different
packages for browsing the kill ring, Kyle Jones' crypt.el, Joe Wells'
and Lynn Slater's significant improvements to apropos, and other
packages that I am sure are pretty widely found to be useful.  (I'd
still like to know which pascal-mode is better, too.)   So how do we
convince RMS to include some of this stuff in the distribution?  Just
ask?  (Somewhat novel idea for me; I haven't tried it.)  Petition?  
I, for one, would like to see it be included in the regular
distribution.  For some reason I feel a compelling need to have a
lengthy USAGE file in ~emacs/local that explains how to use all of the
non-distributed lisp and I really rather just like to see it
documented and added to ~emacs/lisp (I'll even do some documenting.) 
For example, it is the opinion of eveyone to whom I have showed
minibuf.el that it should be the default behaviour of Emacs.  I
haven't done it in site-load though because I like present Emacs as
sanctioned by Richard Stallman and let people know that the other
stuff isn't officially GNU. 

So the question remains: how do we get it sanctioned? 

Dave
--
      tale@rpitsmts.bitnet, tale%mts@itsgw.rpi.edu, tale@pawl.rpi.edu