Article View: gnu.emacs.bug
Article #87708Need a switch-buffer-hook
From: Joe Reiss
Date: Sat, 03 Sep 1994 01:06
Date: Sat, 03 Sep 1994 01:06
30 lines
2353 bytes
2353 bytes
In GNU Emacs 19.25.1 of Wed Aug 31 1994 on opus (mab-next-ns3)
This isn't really a bug, but a feature that would aid in a great many
things. There needs to be a hook that gets called anytime the
currently selected buffer changes. Why? Well, I have two reasons.
1) I'm running the NeXTSTEP port of Emacs 19, and it has the ability
to change the icon that a frame displays when miniaturized. The
frame's icon is one of the frame-parameters. The problem is
that, though the icons match a variety of file extensions,
there's no way to change the icon when the currently active
buffer changes. A switch-buffer-hook would provide this.
2) When selecting a region, it can be awfully confusing. The cursor
(at least on this setup) looks identical to the region, thus
making it appear that the region is one character larger or
smaller than it actually is. Now I can change the cursor in the
activate-mark-hook and deactivate-mark-hook so that it either
disappears or changes appearance, but then when I switch buffers
without deactivating the mark, the cursor is still in its altered
state. With a switch-buffer-hook, I could determine when I
needed to return the cursor to its original appearance.
These are just the two examples I've come up with. I'm sure there are
many more (allowing users to change the title of a frame to match the
buffer name even when there's only one frame is another possibility).
This doesn't seem like it would be too difficult to implement, either.
What say you guys? Here's hopin'...
Joe
Technical Details
Message-ID:
<9409030104.AA00778@opus.ohio-state.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!solaris.cc.vt.edu!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!opus.ohio-state.EDU!joeShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,33cec3845895425e,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-02 19:50:52 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!solaris.cc.vt.edu!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!opus.ohio-state.EDU!joe From: joe@opus.ohio-state.EDU (Joe Reiss) Newsgroups: gnu.emacs.bug Subject: Need a switch-buffer-hook Date: 2 Sep 1994 21:06:09 -0400 Organization: GNUs Not Usenet Lines: 30 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409030104.AA00778@opus.ohio-state.edu>