bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9532: 24.0.50; `special-display-regexps' is no longer respected


From: Drew Adams
Subject: bug#9532: 24.0.50; `special-display-regexps' is no longer respected
Date: Mon, 7 Nov 2011 22:47:08 -0800

OK, I downloaded the latest (non-pretest) Windows binary that Christophe just
published (dated 11/07).  I started Emacs with my setup, as usual, and ran into
a straightforward problem at startup - one I can easily take care of, but I
would like to know first whether I should (confirmation).

I redefine `switch-to-buffer' in my code so that it autofits the frame to the
buffer content.  My redefinition (so far) keeps the original (Emacs 20...23)
signature, however: (switch-to-buffer BUFFER &optional NORECORD)

The latest Emacs binary has a new version of `find-file' that calls the new
`switch-to-buffer', passing 3 args.  Obviously that barfs with my redef.

This is the backtrace (from byte-compiled code, but it seems clear enough) at
startup:

---------8<----------------
Debugger entered--Lisp error: (wrong-number-of-arguments #[(buffer &optional
norecord) "..." [buffer orig-buf norecord autofit-frames-flag get-buffer-create
other-buffer window-dedicated-p selected-window switch-to-buffer-other-window
old-switch-to-buffer one-window-p t fit-frame] 3 "Select buffer BUFFER in
current window, unless the window is dedicated.
If current window is dedicated (`window-dedicated-p'), then another window
is used.

BUFFER may be a buffer, a string (a buffer name), or nil.  If BUFFER
is a string that does not identify an existing buffer, then a new
buffer with that name is created.  If BUFFER is nil, then function
`other-buffer' is used to choose a buffer.

Optional second arg NORECORD non-nil means do not put BUFFER at the
front of the list of recently selected buffers.

The buffer switched to is returned.

*WARNING*: This is NOT the way to work on another buffer temporarily
within a Lisp program!  Use `set-buffer' instead, to avoid messing
with correspondences between windows and buffers.

Resize frame to fit sole window if `autofit-frames-flag'
(unless BUFFER is already the `current-buffer')."

(list (read-buffer "Switch to buffer: " (if (fboundp (quote another-buffer))
(another-buffer nil t) (other-buffer (current-buffer)))))] 3)
  switch-to-buffer(#<buffer drews-lisp-20> nil force-same-window)
  find-file("c:/drews-lisp-20")
  command-line-1(("C:\\drews-lisp-20"))
  command-line()
  normal-top-level()
---------8<----------------

This is how I start Emacs (which explains the `find-file' call):
C:\emacs\...\bin\runemacs.exe --debug-init "C:\drews-lisp-20"

Is this really the way things will be?  If so, I will add an Emacs 24+ version
of my redefinition of `switch-to-buffer'.

But it's worth asking first, since until now Emacs 24 has seemed to work OK
without that, and the development of 24 seems to be volatile still.  It's hard
to know what is here to stay and what is tentative, what is a feature and what
is a bug.  Even the latest pretest, from a week ago (10/31) has a single-arg
call to `switch-to-buffer' in `find-file'.

---

BTW, I see that you keep `pop-up-windows', and use it in
`switch-to-buffer-other-window', but you eliminated the parallel construction,
using `pop-up-frames', for `switch-to-buffer-other-frame'.  Not very elegant, is
it?  What used to be simple and symmetric is now quite kludgy, no?  Why is
`pop-up-windows' still blessed but `pop-up-frames' verboten?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]