comp.lang.ada
 help / color / mirror / Atom feed
* Emacs and long file names
@ 2010-05-24 21:24 Adam Beneschan
  2010-05-24 22:04 ` Simon Wright
  2010-05-25  2:36 ` Stephen Leake
  0 siblings, 2 replies; 23+ messages in thread
From: Adam Beneschan @ 2010-05-24 21:24 UTC (permalink / raw)


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

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 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.  Pretty inane, not just
the idea that I should redo all my own file naming conventions to suit
the editor, but they didn't even consider that I might be using
someone else's package of files and don't have control over the
naming.  Anyway, (1) I figured I'd get more sympathy for my whining on
this newsgroup, plus (2) I thought maybe some other Ada user who had
run into a similar problem had a solution.  If so, I'd appreciate any
thoughts.

                               -- thanks, Adam



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  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  2:36 ` Stephen Leake
  1 sibling, 1 reply; 23+ messages in thread
From: Simon Wright @ 2010-05-24 22:04 UTC (permalink / raw)


I hadn't come across electric-buffer-list before; I use
mouse-buffer-menu, bound (not by me) to C-down-mouse-1.

Customised mouse-buffer-menu-mode-mult to 1.



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-24 21:24 Emacs and long file names Adam Beneschan
  2010-05-24 22:04 ` Simon Wright
@ 2010-05-25  2:36 ` Stephen Leake
  1 sibling, 0 replies; 23+ messages in thread
From: Stephen Leake @ 2010-05-25  2:36 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-24 22:04 ` Simon Wright
@ 2010-05-25  2:44   ` Stephen Leake
  2010-05-25 16:42     ` Adam Beneschan
  0 siblings, 1 reply; 23+ messages in thread
From: Stephen Leake @ 2010-05-25  2:44 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> I hadn't come across electric-buffer-list before; I use
> mouse-buffer-menu, bound (not by me) to C-down-mouse-1.

Ah; invoke electric-buffer-list.

A little poking with the elisp debugger, and I found this variable:

Buffer-menu-buffer+size-width is a variable defined in `buff-menu.el'.
Its value is 26

Documentation:
How wide to jointly make the buffer name and size columns.

You can customize this variable.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25  2:44   ` Stephen Leake
@ 2010-05-25 16:42     ` Adam Beneschan
  2010-05-25 17:23       ` Ludovic Brenta
                         ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Adam Beneschan @ 2010-05-25 16:42 UTC (permalink / raw)


On May 24, 7:44 pm, Stephen Leake <stephen_le...@stephe-leake.org>
wrote:
> Simon Wright <si...@pushface.org> writes:
> > I hadn't come across electric-buffer-list before; I use
> > mouse-buffer-menu, bound (not by me) to C-down-mouse-1.
>
> Ah; invoke electric-buffer-list.
>
> A little poking with the elisp debugger, and I found this variable:
>
> Buffer-menu-buffer+size-width is a variable defined in `buff-menu.el'.
> Its value is 26
>
> Documentation:
> How wide to jointly make the buffer name and size columns.
>
> You can customize this variable.

Thanks, that's very helpful.  I'll play around with it a bit more to
see if I can really make this work the way I'd like (ideally, setting
up a key binding that would let me switch this value back and forth if
needed), but I think this is the main answer.

I'll also think about your suggestion to allow myself a wider screen.
I think my reluctance has been a throwback to the old days when a lot
of printouts were only allowed 80 columns, which is itself a throwback
to the number of characters on a Hollerith card.  Here it's 2010 and
my life still revolves around Hollerith cards.  Sigh.......  (Then
again, I'm using a language that refuses to use square or curly
brackets or some other special characters in its syntax because they
weren't available on old punch-card machines.)

On the other hand, I probably won't be doing things Simon's way.  I
kind of like being able to keep my hands in one place, rather than
having to move them to use some sort of rodent-like attachment.  But I
appreciate the input from both of you.

                                        -- Adam




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25 16:42     ` Adam Beneschan
@ 2010-05-25 17:23       ` Ludovic Brenta
  2010-05-25 19:33         ` Warren
  2010-05-25 19:07       ` Simon Wright
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 23+ messages in thread
From: Ludovic Brenta @ 2010-05-25 17:23 UTC (permalink / raw)


Adam Beneschan writes on comp.lang.ada:
> On May 24, 7:44 pm, Stephen Leake <stephen_le...@stephe-leake.org>
> wrote:
>> Simon Wright <si...@pushface.org> writes:
>> > I hadn't come across electric-buffer-list before; I use
>> > mouse-buffer-menu, bound (not by me) to C-down-mouse-1.
>>
>> Ah; invoke electric-buffer-list.
>>
>> A little poking with the elisp debugger, and I found this variable:
>>
>> Buffer-menu-buffer+size-width is a variable defined in `buff-menu.el'.
>> Its value is 26
>>
>> Documentation:
>> How wide to jointly make the buffer name and size columns.
>>
>> You can customize this variable.
>
> Thanks, that's very helpful.  I'll play around with it a bit more to
> see if I can really make this work the way I'd like (ideally, setting
> up a key binding that would let me switch this value back and forth if
> needed), but I think this is the main answer.
>
> I'll also think about your suggestion to allow myself a wider screen.
> I think my reluctance has been a throwback to the old days when a lot
> of printouts were only allowed 80 columns, which is itself a throwback
> to the number of characters on a Hollerith card.  Here it's 2010 and
> my life still revolves around Hollerith cards.  Sigh.......  (Then
> again, I'm using a language that refuses to use square or curly
> brackets or some other special characters in its syntax because they
> weren't available on old punch-card machines.)
>
> On the other hand, I probably won't be doing things Simon's way.  I
> kind of like being able to keep my hands in one place, rather than
> having to move them to use some sort of rodent-like attachment.  But I
> appreciate the input from both of you.

I'm also an emacs bigot and I'm proud not to use the mouse at all from
within emacs.  I run ratpoison as my "desktop environment".  I
customized emacs not to display any menu bar or toolbar.  I limit my
source files are limited to 80 columns; with a wide screen I can do C-x
3 and display two source files side by side on my screen.  The buffer
list and the compiler output go into wide windows.  That's how I get the
best of all worlds :)

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25 16:42     ` Adam Beneschan
  2010-05-25 17:23       ` Ludovic Brenta
@ 2010-05-25 19:07       ` Simon Wright
  2010-05-26  7:35       ` Stephen Leake
  2010-05-26 12:42       ` Peter C. Chapin
  3 siblings, 0 replies; 23+ messages in thread
From: Simon Wright @ 2010-05-25 19:07 UTC (permalink / raw)


Adam Beneschan <adam@irvine.com> writes:

> On the other hand, I probably won't be doing things Simon's way.  I
> kind of like being able to keep my hands in one place, rather than
> having to move them to use some sort of rodent-like attachment.  But I
> appreciate the input from both of you.

The Macbook trackpad is pretty close to the keyboard!

But I must admit to using an actual mouse at work...



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25 17:23       ` Ludovic Brenta
@ 2010-05-25 19:33         ` Warren
  2010-05-26  7:42           ` Stephen Leake
  0 siblings, 1 reply; 23+ messages in thread
From: Warren @ 2010-05-25 19:33 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]

Ludovic Brenta expounded in news:87y6f799pf.fsf@ludovic-brenta.org:

> Adam Beneschan writes on comp.lang.ada:
>> On May 24, 7:44 pm, Stephen Leake <stephen_le...@stephe-leake.org>
>> wrote:
>>> Simon Wright <si...@pushface.org> writes:
>>> > I hadn't come across electric-buffer-list before; I use
>>> > mouse-buffer-menu, bound (not by me) to C-down-mouse-1.
>>>
>>> Ah; invoke electric-buffer-list.
..
> I'm also an emacs bigot and I'm proud not to use the mouse at all from
> within emacs.  I run ratpoison as my "desktop environment".  I
> customized emacs not to display any menu bar or toolbar.  ...
> best of all worlds :)

I'm also an emacs bigot though I've been using MicroEMACS
instead since the days of DOS, Atari-ST and Amiga.  It was 
also ported to the "then" relevant versions of unix in the 
late 80's (I think), when I adopted it. I have since 
customized it and ported it to Linux and other modern 
*nix. I've also added a few of my own C bugs. ;-)  But it 
ports well and has a very small footprint, which I like.
It's always my first "install" after loading up a given 
Linux distribution.

Ppl have encouraged me to (re)-try Gnu-emacs, but the one
feature that never seemed to work right was the "repeat
last executed operation" operation, that I bind to ^C.  
When I tried it last, it mostly worked, but was still
sufficiently busted that I could not switch. It is 
probably time for me to try it again (I had reported
something that was queued to be fixed). I use ^C
to repeat the last macro execution, among other things.

The best version of emacs on the planet was Pr1me emacs, 
(sniff). I still have my Pr1me emacs manual somewhere 
at home ;-)

I also have my .emacsrc set to recognize gnat code and
to make ^X^Z-G go to the source line in error. Thanks to
gnat it even points at the correct statement offset to
the very token (or nearly). I'm sure your Gnu-emacs elisp 
code does the same thing.  That sure saves a lot of time
when fixing compile issues.

The tools "emacs" and "Ada" -- best of breed IMO. ;-)

Warren



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25 16:42     ` Adam Beneschan
  2010-05-25 17:23       ` Ludovic Brenta
  2010-05-25 19:07       ` Simon Wright
@ 2010-05-26  7:35       ` Stephen Leake
  2010-05-26 15:17         ` Adam Beneschan
  2010-05-26 12:42       ` Peter C. Chapin
  3 siblings, 1 reply; 23+ messages in thread
From: Stephen Leake @ 2010-05-26  7:35 UTC (permalink / raw)


Adam Beneschan <adam@irvine.com> writes:

> On May 24, 7:44 pm, Stephen Leake <stephen_le...@stephe-leake.org>
> wrote:
>> Simon Wright <si...@pushface.org> writes:
>> > I hadn't come across electric-buffer-list before; I use
>> > mouse-buffer-menu, bound (not by me) to C-down-mouse-1.
>>
>> Ah; invoke electric-buffer-list.
>>
>> A little poking with the elisp debugger, and I found this variable:
>>
>> Buffer-menu-buffer+size-width is a variable defined in `buff-menu.el'.
>> Its value is 26
>>
>> Documentation:
>> How wide to jointly make the buffer name and size columns.
>>
>> You can customize this variable.
>
> Thanks, that's very helpful.  

You're welcome.

> I'll also think about your suggestion to allow myself a wider screen.
> I think my reluctance has been a throwback to the old days when a lot
> of printouts 

"printout"? what's a "printout"? :). Save a tree, and the fossil fuel
needed to transport it, and/or the harsh chemicals used to recycle it.
Electrons are recyclable; most other stuff really isn't.

> were only allowed 80 columns, which is itself a throwback to the
> number of characters on a Hollerith card. Here it's 2010 and my life
> still revolves around Hollerith cards. Sigh....... (Then again, I'm
> using a language that refuses to use square or curly brackets or some
> other special characters in its syntax because they weren't available
> on old punch-card machines.)

That's not the _only_ reason, but it is part of it.

> On the other hand, I probably won't be doing things Simon's way.  I
> kind of like being able to keep my hands in one place, rather than
> having to move them to use some sort of rodent-like attachment.  

"rodent-like attachment"; that's perfect :).

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25 19:33         ` Warren
@ 2010-05-26  7:42           ` Stephen Leake
  2010-05-27 16:55             ` Warren
  0 siblings, 1 reply; 23+ messages in thread
From: Stephen Leake @ 2010-05-26  7:42 UTC (permalink / raw)


Warren <ve3wwg@gmail.com> writes:

> I also have my .emacsrc set to recognize gnat code and
> to make ^X^Z-G go to the source line in error. Thanks to
> gnat it even points at the correct statement offset to
> the very token (or nearly). I'm sure your Gnu-emacs elisp 
> code does the same thing.  

Yes.

Even better is gnat-fix-compiler-error; it automatically recognizes simple
errors, especially style ones like "space required", and fixes them for
you.

I have 'next-error' bound to F6, and 'gnat-fix-compiler-error' bound to
C-F6. So processing compiler errors is often a simple sequence; F6 C-F6
F6 C-F6. It's really annoying when I hit one Emacs can't fix :).

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-25 16:42     ` Adam Beneschan
                         ` (2 preceding siblings ...)
  2010-05-26  7:35       ` Stephen Leake
@ 2010-05-26 12:42       ` Peter C. Chapin
  2010-05-26 14:26         ` Jeffrey R. Carter
  3 siblings, 1 reply; 23+ messages in thread
From: Peter C. Chapin @ 2010-05-26 12:42 UTC (permalink / raw)


Adam Beneschan wrote:

> I'll also think about your suggestion to allow myself a wider screen.
> I think my reluctance has been a throwback to the old days when a lot
> of printouts were only allowed 80 columns, which is itself a throwback
> to the number of characters on a Hollerith card.  Here it's 2010 and
> my life still revolves around Hollerith cards.  Sigh.......

I hear you. I recently (as in the last couple of years) upgraded my personal
style guide to allow 96 character long lines. Note that 96 = 64 + 32 so it's
kind of a round number. I choose that value because it makes formatting
source code easier (less "unnecessary" wrapping) and because one can still
print 96 character long lines in a reasonable font on 8.5 x 11 inch paper
without truncation. I don't print my code very often but once in a while I do
for special purposes and it's nice to know that it's going to look okay in
that case.

That said, with Ada I'm seriously considering extending my allowed lines to
128 characters. Between long, fully spelled out names and avoidance of 'use'
statements Ada source lines can get pretty long!

Peter




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26 12:42       ` Peter C. Chapin
@ 2010-05-26 14:26         ` Jeffrey R. Carter
  2010-05-26 21:24           ` Simon Wright
  0 siblings, 1 reply; 23+ messages in thread
From: Jeffrey R. Carter @ 2010-05-26 14:26 UTC (permalink / raw)


Peter C. Chapin wrote:
> 
> That said, with Ada I'm seriously considering extending my allowed lines to
> 128 characters. Between long, fully spelled out names and avoidance of 'use'
> statements Ada source lines can get pretty long!

I have long used 130-character lines. That prints legibly in landscape mode.

-- 
Jeff Carter
"Mr. President, we must not allow a mine-shaft gap!"
Dr. Strangelove
33



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26  7:35       ` Stephen Leake
@ 2010-05-26 15:17         ` Adam Beneschan
  2010-05-26 15:42           ` Jeffrey R. Carter
  0 siblings, 1 reply; 23+ messages in thread
From: Adam Beneschan @ 2010-05-26 15:17 UTC (permalink / raw)


On May 26, 12:35 am, Stephen Leake <stephen_le...@stephe-leake.org>
wrote:

> > I'll also think about your suggestion to allow myself a wider screen.
> > I think my reluctance has been a throwback to the old days when a lot
> > of printouts
>
> "printout"? what's a "printout"? :). Save a tree, and the fossil fuel
> needed to transport it, and/or the harsh chemicals used to recycle it.
> Electrons are recyclable; most other stuff really isn't.

Tried that.  My problem was that I found out that if I tried to mark a
line of source with a highlighter, the highlighting didn't move when I
scrolled the text.  Plus it was kind of nasty trying to clean the ink
off my monitor screen.  :) :) :)

Just kidding.  (Insert old joke with punchline "there's whiteout all
over your screen" here.)  But while I think some people are able to
cope without printouts, others sometimes need to have that piece of
paper to look at.  Don't ask me why.

                                  -- Adam




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  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
  0 siblings, 2 replies; 23+ messages in thread
From: Jeffrey R. Carter @ 2010-05-26 15:42 UTC (permalink / raw)


Adam Beneschan wrote:
> 
> Just kidding.  (Insert old joke with punchline "there's whiteout all
> over your screen" here.)  But while I think some people are able to
> cope without printouts, others sometimes need to have that piece of
> paper to look at.  Don't ask me why.

I recall a study that determined that people found more errors in code when 
examining it on paper than on screen.

-- 
Jeff Carter
"Mr. President, we must not allow a mine-shaft gap!"
Dr. Strangelove
33



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26 14:26         ` Jeffrey R. Carter
@ 2010-05-26 21:24           ` Simon Wright
  2010-05-26 23:30             ` Jeffrey R. Carter
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Wright @ 2010-05-26 21:24 UTC (permalink / raw)


"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> writes:

> Peter C. Chapin wrote:
>>
>> That said, with Ada I'm seriously considering extending my allowed lines to
>> 128 characters. Between long, fully spelled out names and avoidance of 'use'
>> statements Ada source lines can get pretty long!
>
> I have long used 130-character lines. That prints legibly in landscape mode.

Lineprinters had 132 columns as I remember.



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26 15:42           ` Jeffrey R. Carter
@ 2010-05-26 21:39             ` Peter C. Chapin
  2010-05-27 17:00             ` Warren
  1 sibling, 0 replies; 23+ messages in thread
From: Peter C. Chapin @ 2010-05-26 21:39 UTC (permalink / raw)


Jeffrey R. Carter wrote:

> I recall a study that determined that people found more errors in code when 
> examining it on paper than on screen.

I think the difference (one difference) is that you can typically see a lot
more code at once when it's printed out. This may be less true in today's
world of large, high resolution monitors. Still... I can comfortably lay out
four printed pages in front of me on a desk, each with 60+ lines. That's 240
lines of code in one view. I find that helps my comprehension considerably.

Peter




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26 21:24           ` Simon Wright
@ 2010-05-26 23:30             ` Jeffrey R. Carter
  2010-05-27  5:43               ` Simon Wright
  0 siblings, 1 reply; 23+ messages in thread
From: Jeffrey R. Carter @ 2010-05-26 23:30 UTC (permalink / raw)


Simon Wright wrote:
> 
> Lineprinters had 132 columns as I remember.

Yes. 600 LPM on 11x14-inch landscape paper with colored lines across it. 
Fast-moving chains or cylinders inside that made it dangerous to wear a tie 
(that was my excuse, anyway).

-- 
Jeff Carter
"Mr. President, we must not allow a mine-shaft gap!"
Dr. Strangelove
33



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26 23:30             ` Jeffrey R. Carter
@ 2010-05-27  5:43               ` Simon Wright
  0 siblings, 0 replies; 23+ messages in thread
From: Simon Wright @ 2010-05-27  5:43 UTC (permalink / raw)


"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> writes:

> Simon Wright wrote:
>>
>> Lineprinters had 132 columns as I remember.
>
> Yes. 600 LPM on 11x14-inch landscape paper with colored lines across
> it. Fast-moving chains or cylinders inside that made it dangerous to
> wear a tie (that was my excuse, anyway).

enscript --highlight-bars=1 ! (unfortunately you only get grey).



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-26  7:42           ` Stephen Leake
@ 2010-05-27 16:55             ` Warren
  0 siblings, 0 replies; 23+ messages in thread
From: Warren @ 2010-05-27 16:55 UTC (permalink / raw)


Stephen Leake expounded in news:82ocg35cst.fsf@stephe-leake.org:

> Warren <ve3wwg@gmail.com> writes:
> 
>> I also have my .emacsrc set to recognize gnat code and
>> to make ^X^Z-G go to the source line in error. Thanks to
>> gnat it even points at the correct statement offset to
>> the very token (or nearly). I'm sure your Gnu-emacs elisp 
>> code does the same thing.  
> 
> Yes.
> 
> Even better is gnat-fix-compiler-error; it automatically recognizes
> simple errors, especially style ones like "space required", and fixes
> them for you.

Cool. I'll have to take a look at that when my time
permits.

> I have 'next-error' bound to F6, and 'gnat-fix-compiler-error' bound
> to C-F6. So processing compiler errors is often a simple sequence; F6
> C-F6 F6 C-F6. It's really annoying when I hit one Emacs can't fix :).

;-)

I could probably use a "find next error" binding.  That's 
something for a rainy weekend.

Warren



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  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
  1 sibling, 1 reply; 23+ messages in thread
From: Warren @ 2010-05-27 17:00 UTC (permalink / raw)


Jeffrey R. Carter expounded in news:htjfib$cdd$1@tornado.tornevall.net:

> Adam Beneschan wrote:
>> 
>> Just kidding.  (Insert old joke with punchline "there's whiteout all
>> over your screen" here.)  But while I think some people are able to
>> cope without printouts, others sometimes need to have that piece of
>> paper to look at.  Don't ask me why.
> 
> I recall a study that determined that people found more errors in code
> when examining it on paper than on screen.

I find in my day job, that large (mainframe) COBOL 
programs are easier to debug in print form.  I know 
it is considered "old school" by my co-workers, but
I make a lot of use of those cross-reference listings
in my analysis. With COBOL, it is almost manditory
given that essentially everything is "global" to your 
code in paragraphs.

But for more modern languages, where you have proper
scoping rules at work, I wouldn't normally think of
printing out code.

Warren



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-27 17:00             ` Warren
@ 2010-05-28 12:52               ` Stephen Leake
  2010-05-28 15:18                 ` Warren
  0 siblings, 1 reply; 23+ messages in thread
From: Stephen Leake @ 2010-05-28 12:52 UTC (permalink / raw)


Warren <ve3wwg@gmail.com> writes:

> Jeffrey R. Carter expounded in news:htjfib$cdd$1@tornado.tornevall.net:
>
>> Adam Beneschan wrote:
>>> 
>>> Just kidding.  (Insert old joke with punchline "there's whiteout all
>>> over your screen" here.)  But while I think some people are able to
>>> cope without printouts, others sometimes need to have that piece of
>>> paper to look at.  Don't ask me why.
>> 
>> I recall a study that determined that people found more errors in code
>> when examining it on paper than on screen.
>
> I find in my day job, that large (mainframe) COBOL 
> programs are easier to debug in print form.  I know 
> it is considered "old school" by my co-workers, but
> I make a lot of use of those cross-reference listings
> in my analysis. 

I use cross-references with Ada as well. But Emacs knows how to use
them, so I just use C-c C-d to navigate the cross-references.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-28 12:52               ` Stephen Leake
@ 2010-05-28 15:18                 ` Warren
  2010-05-29 17:15                   ` Stephen Leake
  0 siblings, 1 reply; 23+ messages in thread
From: Warren @ 2010-05-28 15:18 UTC (permalink / raw)


Stephen Leake expounded in news:82r5kwrxwv.fsf@stephe-leake.org:

> Warren <ve3wwg@gmail.com> writes:
> 
>> Jeffrey R. Carter expounded in news:htjfib$cdd$1
@tornado.tornevall.net:
>>
>>> Adam Beneschan wrote:
>>>> 
>>>> Just kidding.  (Insert old joke with punchline "there's whiteout all
>>>> over your screen" here.)  But while I think some people are able to
>>>> cope without printouts, others sometimes need to have that piece of
>>>> paper to look at.  Don't ask me why.
>>> 
>>> I recall a study that determined that people found more errors in 
code
>>> when examining it on paper than on screen.
>>
>> I find in my day job, that large (mainframe) COBOL 
>> programs are easier to debug in print form.  I know 
>> it is considered "old school" by my co-workers, but
>> I make a lot of use of those cross-reference listings
>> in my analysis. 
> 
> I use cross-references with Ada as well. But Emacs knows how to use
> them, so I just use C-c C-d to navigate the cross-references.

I can see that I need to re-acquaint myself with 
Gnu emacs. ;-)

Warren



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Emacs and long file names
  2010-05-28 15:18                 ` Warren
@ 2010-05-29 17:15                   ` Stephen Leake
  0 siblings, 0 replies; 23+ messages in thread
From: Stephen Leake @ 2010-05-29 17:15 UTC (permalink / raw)


Warren <ve3wwg@gmail.com> writes:

> I can see that I need to re-acquaint myself with 
> Gnu emacs. ;-)

one down, five billion to go :)

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2010-05-29 17:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox