comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Emacs and long file names
Date: Mon, 24 May 2010 22:36:10 -0400
Date: 2010-05-24T22:36:10-04:00	[thread overview]
Message-ID: <8239xgaesl.fsf@stephe-leake.org> (raw)
In-Reply-To: 755de929-67b4-4de6-8982-a0bfc43effc0@z15g2000prh.googlegroups.com

Adam Beneschan <adam@irvine.com> writes:

> This isn't really about Ada, but I figure it probably affects readers
> of this newsgroup more than many others.

we spend a lot of time talking about Ada tools, so this is fine.

> I've been using GNU Emacs for my Ada sources for a long time.
> Recently, I needed it on a new machine, so I installed a recent
> version of GNU Emacs.  A major annoyance is that the Electric Buffer
> List now truncates file names to 20-22 characters; older versions
> would try to display the whole file name but truncate some of the
> other information.  (I like using an 80-character width.)  This may
> not be a problem for a typical C user, but many of the publicly
> available Ada packages use file names built from all the ancestor and
> child package names, with an .ads or .adb extension (spec/body).  If I
> go to the Electric Buffer List to select a buffer, and I've already
> loaded both the .ads and .adb files, I can't tell from the list which
> is which, and I have to try to guess whether I'm selecting the .ads or
> the .adb file.

I've never used an Electric Buffer List; what command do I invoke to get
it?

I find iswitchb to be very productive. It gives you a list of all
buffers in the mini-buffer area, then does partial name matching on what
you type. Here's the relevant part of my .emacs:

(require 'iswitchb)
(setq iswitchb-default-method 'samewindow)
(add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
(add-hook 'iswitchb-define-mode-map-hook
          (lambda ()
            (define-key iswitchb-mode-map [right] 'iswitchb-next-match)
            (define-key iswitchb-mode-map [left] 'iswitchb-prev-match)
            (define-key iswitchb-mode-map [f12] 'iswitchb-find-file)))

(define-key global-map [f11] 'iswitchb-buffer)

> I asked the Emacs newsgroup whether there was a solution.  There seem
> to be some possible lame solutions, which I haven't looked into, but I
> also recall someone commenting that I should just switch to using
> shorter file names like the rest of the world.  

Nonsense!

Although you should use a wider screen; 80 columns is just too limiting :).

-- 
-- Stephe



      parent reply	other threads:[~2010-05-25  2:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 21:24 Emacs and long file names Adam Beneschan
2010-05-24 22:04 ` Simon Wright
2010-05-25  2:44   ` Stephen Leake
2010-05-25 16:42     ` Adam Beneschan
2010-05-25 17:23       ` Ludovic Brenta
2010-05-25 19:33         ` Warren
2010-05-26  7:42           ` Stephen Leake
2010-05-27 16:55             ` Warren
2010-05-25 19:07       ` Simon Wright
2010-05-26  7:35       ` Stephen Leake
2010-05-26 15:17         ` Adam Beneschan
2010-05-26 15:42           ` Jeffrey R. Carter
2010-05-26 21:39             ` Peter C. Chapin
2010-05-27 17:00             ` Warren
2010-05-28 12:52               ` Stephen Leake
2010-05-28 15:18                 ` Warren
2010-05-29 17:15                   ` Stephen Leake
2010-05-26 12:42       ` Peter C. Chapin
2010-05-26 14:26         ` Jeffrey R. Carter
2010-05-26 21:24           ` Simon Wright
2010-05-26 23:30             ` Jeffrey R. Carter
2010-05-27  5:43               ` Simon Wright
2010-05-25  2:36 ` Stephen Leake [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox