LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2010, 11:47 AM   #1
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
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----------------------------------------------------
Possible completions are:
c==>*Completions*  *%              s==>*scratch*
b==>*Buffer List*  %
e==>emacs-windows-reference.txt    --  .../emacs-reference/
E==>emacs-reference  %  --  .../emacs-reference/
h==>~  %  --  /home/drew/          m==>*Messages*  *
n==>Next Buffer  (C-x <C-right>)   p==>Previous Buffer  (C-x <C-left>)
S==>Select Named Buffer...  (C-x b)
l==>List All Buffers  (C-x C-b)
--------------------screenshot----------------------------------------------------
With that, I simply select the first letter of the buffer I want and Emacs switches to it and shows only the selected buffer.

With Emacs 23, if I hit F10 and b I get this:

Code:
--------------------screenshot----------------------------------------------------
Possible completions are:
n==>Next Buffer                        p==>Previous Buffer
s==>Select Named Buffer...             l==>List All Buffers
--------------------screenshot----------------------------------------------------
This is far less helpful. I then need to type l, which gives me the buffer list in the window. If I select a buffer, it switches to it, but leaves a split window. The non-menu equivalent is:

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,
 
Old 03-16-2010, 01:23 PM   #2
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Anyone?
 
Old 03-16-2010, 02:52 PM   #3
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
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.
Attached Files
File Type: txt tmm_emacs22.el.txt (21.6 KB, 13 views)
 
Old 03-16-2010, 05:59 PM   #4
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
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.
 
Old 03-21-2010, 05:27 PM   #5
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
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?
 
Old 03-21-2010, 09:13 PM   #6
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
?

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
and edit stuffs around until you get the right results.

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)
 
Old 03-22-2010, 10:23 AM   #7
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by rikijpn View Post
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.
I did load the file you provided and didn't get the effect I wanted so I went a step further and fully substituted those specific Emacs 22 files for the Emacs 23 files. It didn't change the behavior of the tmm-menubar buffer item.

Quote:
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
and edit stuffs around until you get the right results.
Yeah. That may be my next step, but then I'd like to find better documentation on what the different options mean. I've read through the manual, but it seems that tmm-menubar gets short shrift.

Quote:
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)
Hmm. That's not my experience. When I hit C-x C-b, I get the list of buffers in a new window (horizontal split) as I describe above:

Quote:
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.
I'll keep hacking at this and see what I can find. In the meantime, I'm perfectly happy with Emacs 22 and may simply give up on 23.

Thanks for you help!
 
Old 03-22-2010, 12:35 PM   #8
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
Quote:
Hmm. That's not my experience. When I hit C-x C-b, I get the list of buffers in a new window (horizontal split) as I describe above:
C-x C-b binds to the function list-buffers. While buffer-menu is the one I was telling you about. buffer-menu displays the buffer list in the current window, and gets hidden after selecting one.

Quote:
I'll keep hacking at this and see what I can find. In the meantime, I'm perfectly happy with Emacs 22 and may simply give up on 23.
It's annoying when we can't get things done our way^^. I like customizing stuffs a lot too, so I know how it feels.
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.
Attached Files
File Type: txt custom_tmm.el.txt (1.8 KB, 14 views)
 
Old 03-22-2010, 04:31 PM   #9
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
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,

Last edited by Lufbery; 03-28-2010 at 10:28 PM.
 
Old 03-28-2010, 10:27 PM   #10
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
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,
 
Old 03-30-2010, 09:27 AM   #11
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180

Original Poster
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
I'm marking this as solved. The developers sent me a note saying that they fixed the bug for the next Emacs release.
 
Old 03-30-2010, 07:05 PM   #12
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
Quote:
Originally Posted by Lufbery View Post
I'm marking this as solved. The developers sent me a note saying that they fixed the bug for the next Emacs release.
You gotta love free software^^.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost the menu bar from konqueror... Thaidog Linux - Software 3 04-07-2010 10:08 AM
Lost top menu bar on Ubuntu Eee Polanski Linux - Software 3 11-20-2008 10:38 PM
KDE4 lost menu bar Spearhead40 Linux - Desktop 6 09-21-2008 02:01 PM
Emacs Menu Bar Chryzmo Linux - Newbie 1 11-25-2005 11:22 AM
MDK 9.2/10.0 lost menu item -bug Crashcourse Linux - Software 4 05-27-2004 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration