* *Buffer List* column resizing for emacs >= 24.2.50.1
@ 2013-04-17 23:05 Tom Roche
2013-04-18 3:16 ` Drew Adams
[not found] ` <87fvynll0i.fsf@pobox.com>
0 siblings, 2 replies; 4+ messages in thread
From: Tom Roche @ 2013-04-17 23:05 UTC (permalink / raw)
To: help-gnu-emacs
How to get *Buffer List* column resizing on a recent GNU Emacs?
Why I ask:
I'm running
$ cat /etc/debian_version
> wheezy/sid
$ emacs-snapshot --version
> GNU Emacs 24.2.50.1
I work with versions of similarly-named files on several hosts
(thanks, Tramp!), using rename-buffer for sanity. This works, except
for the fixed-width *Buffer List* columns, which longer buffer names
overflow.
I tried installing Buffer Menu Plus
http://www.emacswiki.org/BufferMenuPlus
by
1. downloading buff-menu+.el from the above to a folder on my load-path
(~/.emacs.d/site-lisp/)
2. byte-compile-file'ing buff-menu+.el
3. putting
> (require 'buff-menu+)
in my ~/.emacs.d/init.el
4. byte-compile-file'ing init.el
5. restarting emacs
This failed with a long *Backtrace* which I unfortunately did not
record. I assumed this was due to incompatibility with later
buff-menu.el as discussed @ tail of
http://www.emacswiki.org/BufferMenuPlus
) which I attempted to solve as also discussed there: I downloaded the
buff-menu.el from emacs-23.4
$ URI=http://ftp.gnu.org/gnu/emacs/emacs-23.4.tar.bz2
$ DIR="/tmp/emacs-23.4"
$ FN="$(basename ${URI%%\?*})"
$ mkdir -p ${DIR}
$ FP="${DIR}/${FN}"
$ curl -C - -o "${FP}" "${URI}"
$ pushd ${DIR}/
$ tar xf emacs-23.4.tar.bz2
$ popd
$ pushd ${DIR}/emacs-23.4/
$ find -type f -name 'buff-menu*'
> ./lisp/buff-menu.elc
> ./lisp/buff-menu.el
$ mv ./lisp/buff-menu.el ~/.emacs.d/site-lisp/
and then byte-compile-file'd ~/.emacs.d/site-lisp/buff-menu.el and
~/.emacs.d/init.el , getting no errors. I then restarted emacs: no
change, same startup error in *Backtrace*.
I then tried
1. changing my init.el from
< (require 'buff-menu+)
to
> (load (concat LOCAL-EMACS-LISP-DIR "/buff-menu.elc"))
> (load (concat LOCAL-EMACS-LISP-DIR "/buff-menu+.elc"))
2. byte-compile-file'ing init.el
3. restarting emacs
This still fails, but with a shorter error :-)
*Backtrace*
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> list-buffers-noselect(nil)
> list-buffers(nil)
> call-interactively(list-buffers nil nil)
So I'm wondering: how can I get a *Buffer List* with resizeable columns?
TIA, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: *Buffer List* column resizing for emacs >= 24.2.50.1
2013-04-17 23:05 *Buffer List* column resizing for emacs >= 24.2.50.1 Tom Roche
@ 2013-04-18 3:16 ` Drew Adams
[not found] ` <87fvynll0i.fsf@pobox.com>
1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2013-04-18 3:16 UTC (permalink / raw)
To: help-gnu-emacs, 'Tom Roche'
> How to get *Buffer List* column resizing on a recent GNU Emacs?
> GNU Emacs 24.2.50.1
BTW, be aware that that is an old development snapshot, not a release. You are
likely better off with Emacs 24.2 or 24.3 - more stable.
> I tried installing Buffer Menu Plus
> http://www.emacswiki.org/BufferMenuPlus
> 4. byte-compile-file'ing init.el
(You probably do not need to byte-compile your init file, but that should be
irrelevant here. It is generally not recommended to byte-compile it - see
(emacs) `Init File'.)
> This failed... I assumed this was due to incompatibility
> with later buff-menu.el as discussed @ tail of
> http://www.emacswiki.org/BufferMenuPlus
Yes. Emacs Dev rewrote buff-menu.el in Emacs 24.2 to use tabulated list mode.
I have not yet updated buff-menu+.el (and might never get around to it) to adapt
to that change.
> I attempted to solve as also discussed there
...
> $ mv ./lisp/buff-menu.el ~/.emacs.d/site-lisp/
While that's not necessarily bad to do, you can also just put the Emacs 23
buff-menu.el in some other directory that is in your `load-path' - it need not
be site-lisp. The important thing is that wherever it is, it be in your
`load-path' before any other buff-menu.el[c].
> and then byte-compile-file'd ~/.emacs.d/site-lisp/buff-menu.el and
> ~/.emacs.d/init.el, getting no errors. I then restarted emacs: no
> change, same startup error in *Backtrace*.
What you describe should have worked. My guess is that the Emacs 24.2+
buff-menu.el[c] is being picked up, not the Emacs 23 buff-menu.el[c].
You can check whether that is the case using any of these commands:
`locate-library'
`list-load-path-shadows'
`find-library buff-menu'
Whichever buff-menu.el[c] is loaded first, based on your `load-path', will
prevent the other from ever being loaded and thus used.
If that is in fact the problem, then either change your `load-path' order or put
the Emacs 23 buff-menu.el[c] in the right directory, so it gets picked up first.
The simplest, and probably the best, approach is to put files that you gather
here and there in your own Lisp directory somewhere, and put that first in your
`load-path'.
E.g., put the Emacs 23 buff-menu.el and buff-menu+.el files in directory
/some/where/my-lisp/, and do this in your init file:
(add-to-list 'load-path "/some/where/my-lisp/")
(require 'buff-menu+)
That should be all you need. That `add-to-list' sexp puts your directory first.
> I then tried changing my init.el from (require 'buff-menu+)
> to (load (concat LOCAL-EMACS-LISP-DIR "/buff-menu.elc"))
> (load (concat LOCAL-EMACS-LISP-DIR "/buff-menu+.elc"))
Don't bother with absolute file names for this. Try to rely on `load-path' and
`require'. (Anyway, it is better to use `expand-file-name' than `concat' when
fiddling with file names.)
> This still fails, but with a shorter error :-)
> So I'm wondering: how can I get a *Buffer List* with
> resizeable columns?
See above. My guess is that you just have to help Emacs find the right
buff-menu.el[c]. And the answer to that is `load-path'.
You can follow up with me off list, if you like.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: *Buffer List* column resizing for emacs >= 24.2.50.1
[not found] ` <87a9ou4hw7.fsf@pobox.com>
@ 2013-04-19 17:53 ` Tom Roche
2013-04-19 20:17 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Tom Roche @ 2013-04-19 17:53 UTC (permalink / raw)
To: help-gnu-emacs
Thanks to Drew Adams' assistance, and after updating to emacs-24.3.50.1,
I now have the ability to resize column=Buffer in the *Buffer List* from
Buffer Menu Plus. The fix was:
1. Download an emacs-23 buff-menu.el to a directory on one's load-path.
I did
URI='http://ftp.gnu.org/gnu/emacs/emacs-23.4.tar.bz2'
DIR="/tmp/emacs-23.4"
FN="$(basename ${URI%%\?*})"
mkdir -p ${DIR}
FP="${DIR}/${FN}"
curl -C - -o "${FP}" "${URI}"
pushd ${DIR}/
tar xf emacs-23.4.tar.bz2
popd
pushd ${DIR}/emacs-23.4/
find -type f -name 'buff-menu*'
> ./lisp/buff-menu.elc
> ./lisp/buff-menu.el
mv ./lisp/buff-menu.el ~/.emacs.d/site-lisp/
2. Download the latest buff-menu+.el to a directory on one's load-path.
I did
URI='http://www.emacswiki.org/emacs-en/download/buff-menu%2b.el'
DIR="${HOME}/.emacs.d/site-lisp"
FN="$(basename ${URI%%\?*})"
FP="${DIR}/${FN}"
curl -C - -o "${FP}" "${URI}"
3. Start emacs, and do
M-x load-file ~/.emacs.d/site-lisp/buff-menu.el
M-x load-file ~/.emacs.d/site-lisp/buff-menu+.el
C-x C-b
4. If that gets Buffer Menu Plus, you can resize column=Buffer with
the '+' and '-' keys.
5. If that works, add the load lines to your init.el (directly or
indirectly), and restart emacs to retest.
HTHOP, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: *Buffer List* column resizing for emacs >= 24.2.50.1
2013-04-19 17:53 ` Tom Roche
@ 2013-04-19 20:17 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2013-04-19 20:17 UTC (permalink / raw)
To: help-gnu-emacs, 'Tom Roche'
Thanks, Tom.
- Drew
> Thanks to Drew Adams' assistance, and after updating to
> emacs-24.3.50.1, I now have the ability to resize
> column=Buffer in the *Buffer List* from
> Buffer Menu Plus. The fix was:
...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-19 20:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 23:05 *Buffer List* column resizing for emacs >= 24.2.50.1 Tom Roche
2013-04-18 3:16 ` Drew Adams
[not found] ` <87fvynll0i.fsf@pobox.com>
[not found] ` <87a9ou4hw7.fsf@pobox.com>
2013-04-19 17:53 ` Tom Roche
2013-04-19 20:17 ` Drew Adams
[not found] <7FA5BDE7E72147BC93F27AD6DFEDFC0A@us.oracle.com>
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).