Emacs: Lost functionality in buffer item in menu bar from 22 to 23...
Hello all,
I've been using Emacs 22.3.1 on Slackware64_13 for several months. I've been using Emacs since version 21.4 in 2005. I decided recently to try Emacs 23.1. I compiled and installed it correctly, but now there's a problem -- especially in text mode (e.g. emacs -nw). With Emacs 22, I can type "F10" and then "b" and I get the following in a window above the minibuffer: Code:
--------------------screenshot---------------------------------------------------- With Emacs 23, if I hit F10 and b I get this: Code:
--------------------screenshot---------------------------------------------------- C-x C-b C-x o <the letter of the buffer I want> C-x 1 There's simply no point in using the menu with Emacs 23. I much prefer F10 -> b -> <first letter>, like I do with Emacs 22. So here are a couple of questions: 1) Is this a bug? This is a serious question. If it is, I'll be happy to report it. 2) If not, how do I restore the functionality from Emacs 22's menu bar's buffer menu to Emacs 23's? Thank you, |
Anyone?
|
1 Attachment(s)
I don't use emacs23, I use emacs22, so I am not really familiar with your problem.
But apparently, the functions "f10" (x-menu-bar-open) and then "b" (tmm-shortcut) are working, right? Just not how you want them to. How about googling around for the differences between the files where those functions are defined (something like: "/usr/share/emacs/2X.X/lisp/term/x-win.el" for x-menu-bar-open, and "/usr/share/emacs/2X.X/lisp/tmm.el" for tmm-shortcut in my computer) for emacs22 and emacs23? That's of course if you still have emacs22 installed too, or at least have its elisp files. If those files are available in your computer, you could just try loading them (with M-x load-file) directly, and see if you get the desired behavior. If you don't have the files, then you just have to google around for them. If you have your lisp files byte-compiled, then you'll have to get the sources(in lisp) first anyway. Here is a link for tmm.el of emacs22 of Ubuntu (couldn't change that much). I also attached it here. I tried this file, and as default with emacs22, works as you apparently want it to. Try loading it and f10 b again. |
Thanks. That's the way I'm heading. I'll keep my Emacs 22 sources and try loading those files in Emacs 23.
I'll let you know how it works out. |
Okay, I've been hacking on this for a little bit, and here's what I found.
I renamed the menu-bar.el.gz, menu-bar.elc, tmm.el.gz, and tmm.elc files from emacs 23.1 and then copied the same files from emacs 22.3 to the 23.1 lisp directory. The end result was no change in the behavior of the buffer menu bar item in tmm-menubar. Pressing F10 then "b" gave me just the same four options, with no list of open buffers. There's something going on beyond the tmm and menu-bar files. I did a diff of the two versions of the tmm.el.gz files and found some differences, but I don't really know what they meant. This is a little frustrating because the Emacs 22 buffer item in tmm-menubar makes buffer switching very easy: Hit F10, b, and the first letter of the buffer I want. Then the menubar buffer goes away and the buffer I selected is up. Three key strokes which requires hitting only three keys. The other option of C-x-C-b requires me to the C-x-o into the buffer list. Then I select the buffer I want, and I'm left with a split screen, so then I need to hit C-x-1 to remove the split. Seven key strokes requiring hitting eleven keys. Does anyone know a way to get the previous functionality back? |
?
You could just have loaded the file I attached previously and see what happened, rather than copying all the files. In case the proper files are somewhere else, you might still give that a shot first.
Anyway, there are still other options. 1)Maybe it just has different default configurations. You could try doing Code:
M-x customize-group RET tmm RET 2)You could use a similar option. Have you tried the buffer-menu ? It's C-x C-b but with one window. It doesn't work with shortcuts like tmm's, but it lists all buffers in the current buffer window (doesn't split it), it lets you select/delete/etc the buffers, and once you select a buffer (press return on it) the buffer window changes, so you don't need to press C-x o C-1. You could put the following line in your .emacs file to bind it to C-x C-k b: Code:
(global-set-key (kbd "C-x C-k b") 'buffer-menu) |
Quote:
Quote:
Quote:
Quote:
Thanks for you help! |
1 Attachment(s)
Quote:
Quote:
At least emacs gets you the option to write the code by yourself if you have to. I'm attaching how my customize-group tmm buffer looks like, in case you want to try changing some variables by yourself. There might be some more variables (which you would have to read in the source code...) but these should do. You could try giving "customize-group tmm" another chance. |
rikijpn,
Thanks again. I'll work with your suggestions and see how far I get. :) In the meantime, one of the Emacs developers, Stefan Monnier, saw my post on gnu.emacs.help and admits this behavior is a bug. EDIT: which I hasten to add that I reported. It is now bug number 5726. :) I'll post back after I try your suggestions and the attached file. Regards, |
rikijpn,
I posted a variation of what follows on gnu.emacs.help, but I thought I'd post it here too as a follow-up: As for the different options for buffer switching, I've been playing a lot with buffer-menu [based on your suggestion, rikijpn] and ibuffer. I would almost be happy to simply bind ibuffer to F9 and call that when I need to switch buffers -- except there's one thing that the Emacs 22 tmm-menubar does that ibuffer does not. What I really like about the tmm-menubar is that it prompts for a one-key selection of menu and sub-menu items. Specifically, the buffer item of tmm-menubar lists specific buffers and provides a one-key shortcut to each of them. It would be wonderful if ibuffer offered that feature. (As an aside, the other think I like about Emacs 22's tmm-menubar is that it shows the keyboard shortcuts next to the menu items -- something that the Emasc 23 tmm-menubar does not seem to consistently do as the example in the first post shows.) As for why the bug is happening in Emacs 23, I'm no closer to an answer. Bearing in mind that I'm, at best, a _very_ poor Emacs lisp hacker, the best I can determine by looking at tmm.el is that tmm draws most of its variables from x-menu-bar. Perhaps there was a change in x-menu-bar in Emacs 23 that is causing the bug? Regards, |
I'm marking this as solved. The developers sent me a note saying that they fixed the bug for the next Emacs release. :)
|
Quote:
|
All times are GMT -5. The time now is 05:11 AM. |