comp.lang.ada
 help / color / mirror / Atom feed
* GNAT GPL 2016 Editor Bugs?
@ 2016-06-06 22:12 Eryndlia Mavourneen
  2016-06-07 11:49 ` Simon Wright
  0 siblings, 1 reply; 14+ messages in thread
From: Eryndlia Mavourneen @ 2016-06-06 22:12 UTC (permalink / raw)


I checked for a couple of annoying editor bugs that have been around for a couple of releases, and they are still there:

1)
     type A is new B with
        record
          C : D;
        end record;

  After this type declaration, the editor apparenty has lost track of the indentation level and auto-indents everything afterwards to the beginning of "end record".  The only "fix" I have found is to set my preferences to indent records 0 spaces.  This, of course, causes other problems -- just not as bad ones.

2) The "refill" command, "Ctrl+=", does not work.  It used to, once upon a time.  This means I have to have either ragged comments or spend a fair amount of time smoothing them out.


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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-06 22:12 GNAT GPL 2016 Editor Bugs? Eryndlia Mavourneen
@ 2016-06-07 11:49 ` Simon Wright
  2016-06-08  0:33   ` Eryndlia Mavourneen
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Wright @ 2016-06-07 11:49 UTC (permalink / raw)


Eryndlia Mavourneen <eryndlia@gmail.com> writes:

> 1)
>      type A is new B with
>         record
>           C : D;
>         end record;

I tried this with just

package Eryndlia is
   type A is new B with
      record
         C : D;
      end record;
   type A is new B with
      record
         C : D;
      end record;
end Eryndlia;

and that is the layout I got from GPS (after putting everything to the
left margin).

Likewise with Emacs ada-mode.


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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-07 11:49 ` Simon Wright
@ 2016-06-08  0:33   ` Eryndlia Mavourneen
  2016-06-08  7:14     ` Simon Wright
  2016-06-08 13:36     ` gautier_niouzes
  0 siblings, 2 replies; 14+ messages in thread
From: Eryndlia Mavourneen @ 2016-06-08  0:33 UTC (permalink / raw)


On Tuesday, June 7, 2016 at 6:49:07 AM UTC-5, Simon Wright wrote:
> Eryndlia Mavourneen <eryndlia@gmail.com> writes:
> 
> > 1)
> >      type A is new B with
> >         record
> >           C : D;
> >         end record;
> 
> I tried this with just
> 
> package Eryndlia is
>    type A is new B with
>       record
>          C : D;
>       end record;
>    type A is new B with
>       record
>          C : D;
>       end record;
> end Eryndlia;
> 
> and that is the layout I got from GPS (after putting everything to the
> left margin).
> 
> Likewise with Emacs ada-mode.

Ahhhh!  Never be in a hurry when posting.  LOL  My apology, Simon.

Apparently, the error is a combination of the above record extension PLUS a comment inserted before "record" -- the start column of the comment is immaterial.

So the indentation problem is caused by THIS:

          type A is new B with 
          -- This is how I made the comment.
             record 
                C : D; 
             end record;

THIS record definition does NOT cause the problem:

          type A is 
          -- This is how I made the comment.
             record 
                C : D; 
             end record;

-- Eryndlia [KK1T active on WinLink]

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08  0:33   ` Eryndlia Mavourneen
@ 2016-06-08  7:14     ` Simon Wright
  2016-06-08 13:36     ` gautier_niouzes
  1 sibling, 0 replies; 14+ messages in thread
From: Simon Wright @ 2016-06-08  7:14 UTC (permalink / raw)


Eryndlia Mavourneen <eryndlia@gmail.com> writes:

> So the indentation problem is caused by THIS:
>
>           type A is new B with 
>           -- This is how I made the comment.
>              record 
>                 C : D; 
>              end record;

Yes.

I was interested to find that ada-mode has a problem with this too: if
you put point on the comment and TAB you get

  Error: (error "cl-ecase failed: derived_type_definition, (aggregate aspect_specification_opt)")
  save-excursion: Wrong type argument: number-or-marker-p, nil

and a little beep. Huh.

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08  0:33   ` Eryndlia Mavourneen
  2016-06-08  7:14     ` Simon Wright
@ 2016-06-08 13:36     ` gautier_niouzes
  2016-06-08 16:29       ` Egil H H
                         ` (4 more replies)
  1 sibling, 5 replies; 14+ messages in thread
From: gautier_niouzes @ 2016-06-08 13:36 UTC (permalink / raw)


Jumping on the bandwagon...

My top non-bugs (but annoyances) with GPS - overall excellent of course - are:

- "Select on Match" option in the Find/Replace box (checked by default it seems). When you want to find the next occurrence by pressing the Return key, it erases the selected text instead. It took me a while discovering it was not a GPS bug but a matter of unchecking that option...

- No easy way for indent / unindent a selection with a single key or some ctrl-key

- The little delay between the keypress for compiling or building, and the actual invocation of gcc. AdaGIDE seems significantly quicker for that. Of course gcc is slow in its turn, but it is another topic...

One point seems a lot better with GPS, 2016 vintage: the display of the text in the editor looks a lot more stable, doesn't swim a couple of pixels away when adding a comment, for instance.

Something else: is there a "find next" key ?
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada
NB: follow the above link for a valid e-mail address 


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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 13:36     ` gautier_niouzes
@ 2016-06-08 16:29       ` Egil H H
  2016-06-08 16:38       ` Dmitry A. Kazakov
                         ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Egil H H @ 2016-06-08 16:29 UTC (permalink / raw)


On Wednesday, June 8, 2016 at 3:36:05 PM UTC+2, gautier...@hotmail.com wrote:
> - "Select on Match" option in the Find/Replace box (checked by default it seems). When you want to find the next occurrence by pressing the Return key, it erases the selected text instead. It took me a while discovering it was not a GPS bug but a matter of unchecking that option...

Agreed, but at least it seems to remember the user's selection


> - No easy way for indent / unindent a selection with a single key or some ctrl-key
TAB (autoindent)

> Something else: is there a "find next" key ?

Ctrl-N

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 13:36     ` gautier_niouzes
  2016-06-08 16:29       ` Egil H H
@ 2016-06-08 16:38       ` Dmitry A. Kazakov
  2016-06-08 17:02         ` Jeffrey R. Carter
  2016-06-08 16:54       ` Jeffrey R. Carter
                         ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Dmitry A. Kazakov @ 2016-06-08 16:38 UTC (permalink / raw)


On 2016-06-08 15:36, gautier_niouzes@hotmail.com wrote:
> Jumping on the bandwagon...
>
> My top non-bugs (but annoyances) with GPS - overall excellent of course - are:
>
> - "Select on Match" option in the Find/Replace box (checked by
> default it seems). When you want to find the next occurrence by
> pressing the Return key, it erases the selected text instead. It took
> me a while discovering it was not a GPS bug but a matter of
> unchecking that option...
 >
> - No easy way for indent / unindent a selection with a single key or some ctrl-key

Same for comment/uncomment. There are hot keys for, but only comment hot 
key works.

> - The little delay between the keypress for compiling or building,
> andthe actual invocation of gcc. AdaGIDE seems significantly quicker for
> that. Of course gcc is slow in its turn, but it is another topic...

- Compile warnings shown first. Must be after all severe errors.

- Same for the "missing body" error, it must be shown last among all errors.

- In a split view, when multiple source file tabs are visible, the 
source file with errors pops in the current tab. This is extremely 
annoying. It must be some other tab.

- Docked debug tabs. They somehow alwyas pop in wrong places, like above 
or right of source file tabs.

> Something else: is there a "find next" key ?

I prefer to walk through the list of found items rather than navigate 
using keys. IMO find/replace must be a docked tab with entries for 
search and the list of found items in the same tab instead of a popup 
window + locations tab. There should be no popups at all.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 13:36     ` gautier_niouzes
  2016-06-08 16:29       ` Egil H H
  2016-06-08 16:38       ` Dmitry A. Kazakov
@ 2016-06-08 16:54       ` Jeffrey R. Carter
  2016-06-09 17:47         ` gautier_niouzes
  2016-06-09 15:51       ` brbarkstrom
  2016-06-14 14:25       ` gautier_niouzes
  4 siblings, 1 reply; 14+ messages in thread
From: Jeffrey R. Carter @ 2016-06-08 16:54 UTC (permalink / raw)


On 06/08/2016 06:36 AM, gautier_niouzes@hotmail.com wrote:
> 
> My top non-bugs (but annoyances) with GPS - overall excellent of course - are:
> 
> - No easy way for indent / unindent a selection with a single key or some ctrl-key

Ctrl-Alt-> and Ctrl-Alt-< move the selection one column right or left. While I
generally want one indent level rather than a single column, doing that a few
times is acceptable. Is there some reason that doesn't meet your needs?

-- 
Jeff Carter
"Unix and C are the ultimate computer viruses."
Richard Gabriel
99

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 16:38       ` Dmitry A. Kazakov
@ 2016-06-08 17:02         ` Jeffrey R. Carter
  0 siblings, 0 replies; 14+ messages in thread
From: Jeffrey R. Carter @ 2016-06-08 17:02 UTC (permalink / raw)


On 06/08/2016 09:38 AM, Dmitry A. Kazakov wrote:
> On 2016-06-08 15:36, gautier_niouzes@hotmail.com wrote:
>>
>> - No easy way for indent / unindent a selection with a single key or some
>> ctrl-key
> 
> Same for comment/uncomment. There are hot keys for, but only comment hot key works.

Both work for me.

-- 
Jeff Carter
"Unix and C are the ultimate computer viruses."
Richard Gabriel
99

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 13:36     ` gautier_niouzes
                         ` (2 preceding siblings ...)
  2016-06-08 16:54       ` Jeffrey R. Carter
@ 2016-06-09 15:51       ` brbarkstrom
  2016-06-10  8:41         ` Alejandro R. Mosteo
  2016-06-14 14:25       ` gautier_niouzes
  4 siblings, 1 reply; 14+ messages in thread
From: brbarkstrom @ 2016-06-09 15:51 UTC (permalink / raw)


On Wednesday, June 8, 2016 at 9:36:05 AM UTC-4, gautier...@hotmail.com wrote:
> Jumping on the bandwagon...
> 
> My top non-bugs (but annoyances) with GPS - overall excellent of course - are:
> 
> - "Select on Match" option in the Find/Replace box (checked by default it seems). When you want to find the next occurrence by pressing the Return key, it erases the selected text instead. It took me a while discovering it was not a GPS bug but a matter of unchecking that option...
> 
> - No easy way for indent / unindent a selection with a single key or some ctrl-key
> 
> - The little delay between the keypress for compiling or building, and the actual invocation of gcc. AdaGIDE seems significantly quicker for that. Of course gcc is slow in its turn, but it is another topic...
> 
> One point seems a lot better with GPS, 2016 vintage: the display of the text in the editor looks a lot more stable, doesn't swim a couple of pixels away when adding a comment, for instance.
> 
> Something else: is there a "find next" key ?
> _________________________
> Gautier's Ada programming
> http://gautiersblog.blogspot.com/search/label/Ada
> NB: follow the above link for a valid e-mail address

The 2015 GPS doesn't have a "hot key" for dealing with indentation.
Instead, use the drop-down menu for "edit" and then select "Format Selection".
The selection, of course, is done by putting the cursor on the top line
you want selected and then holding down the control key as you move the
cursor down.

The indentation of comment lines depends on the the indentation of the
nearest preceding comment line.  If you use the "select" button in the
"edit menu", the comment indentation usually goes in the left column
of the text.  If you select a set of lines that include the newly 
commented lines, the "format selection" approach will indent the start
of the new comment lines to be consistent with the other non-commented
lines.

Once you get used to this approach, it's quite usable.  Of course, it
isn't the same as a hot key.  I routinely use this on my Windows XP
machine.  I haven't tried on the Linux box, but I expect it will behave
the same way.

Bruce B.

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 16:54       ` Jeffrey R. Carter
@ 2016-06-09 17:47         ` gautier_niouzes
  2016-06-09 18:43           ` Jeffrey R. Carter
  0 siblings, 1 reply; 14+ messages in thread
From: gautier_niouzes @ 2016-06-09 17:47 UTC (permalink / raw)


Le mercredi 8 juin 2016 18:54:42 UTC+2, Jeffrey R. Carter a écrit :
> On 06/08/2016 06:36 AM, gautier_niouzes@hotmail.com wrote:
> > 
> > My top non-bugs (but annoyances) with GPS - overall excellent of course - are:
> > 
> > - No easy way for indent / unindent a selection with a single key or some ctrl-key
> 
> Ctrl-Alt-> and Ctrl-Alt-< move the selection one column right or left. While I
> generally want one indent level rather than a single column, doing that a few
> times is acceptable. Is there some reason that doesn't meet your needs?

It works perhaps on an American keyboard, but not on some others, like mine (Swiss keyboard) where '<' and '>' are on the same key and the mentioned combinations produce a '\'...
What I do is using Notepad++ in parallel.
Indent there is simply obtained with the Tab key, Unindent with Shift-Tab.
And you have multi-line edition, which is a visual equivalent of the "Rectangle" features in GPS.
Fortunately both Notepad++ and GPS are able to synchronize.
_________________________ 
Gautier's Ada programming 
http://gautiersblog.blogspot.com/search/label/Ada 
NB: follow the above link for a valid e-mail address 

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-09 17:47         ` gautier_niouzes
@ 2016-06-09 18:43           ` Jeffrey R. Carter
  0 siblings, 0 replies; 14+ messages in thread
From: Jeffrey R. Carter @ 2016-06-09 18:43 UTC (permalink / raw)


On 06/09/2016 10:47 AM, gautier_niouzes@hotmail.com wrote:
> Le mercredi 8 juin 2016 18:54:42 UTC+2, Jeffrey R. Carter a écrit :
>>
>> Ctrl-Alt-> and Ctrl-Alt-< move the selection one column right or left. While I
>> generally want one indent level rather than a single column, doing that a few
>> times is acceptable. Is there some reason that doesn't meet your needs?
> 
> It works perhaps on an American keyboard, but not on some others, like mine (Swiss keyboard) where '<' and '>' are on the same key and the mentioned combinations produce a '\'...
> What I do is using Notepad++ in parallel.

Interesting. On the US keyboard, '<' is Shift-',', and '>' is Shift-'.', so
these are really Ctrl-Alt-Shift-',' and Ctrl-Alt-Shift-'.' '\' is on a key above
Enter and below Backspace.

-- 
Jeff Carter
"C++ is like jamming a helicopter inside a Miata
and expecting some sort of improvement."
Drew Olbrich
51

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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-09 15:51       ` brbarkstrom
@ 2016-06-10  8:41         ` Alejandro R. Mosteo
  0 siblings, 0 replies; 14+ messages in thread
From: Alejandro R. Mosteo @ 2016-06-10  8:41 UTC (permalink / raw)


On 09/06/16 17:51, brbarkstrom@gmail.com wrote:
> On Wednesday, June 8, 2016 at 9:36:05 AM UTC-4, gautier...@hotmail.com wrote:
>> Jumping on the bandwagon...
>>
>> My top non-bugs (but annoyances) with GPS - overall excellent of course - are:
>>
>> - "Select on Match" option in the Find/Replace box (checked by default it seems). When you want to find the next occurrence by pressing the Return key, it erases the selected text instead. It took me a while discovering it was not a GPS bug but a matter of unchecking that option...
>>
>> - No easy way for indent / unindent a selection with a single key or some ctrl-key
>>
>> - The little delay between the keypress for compiling or building, and the actual invocation of gcc. AdaGIDE seems significantly quicker for that. Of course gcc is slow in its turn, but it is another topic...
>>
>> One point seems a lot better with GPS, 2016 vintage: the display of the text in the editor looks a lot more stable, doesn't swim a couple of pixels away when adding a comment, for instance.
>>
>> Something else: is there a "find next" key ?
>> _________________________
>> Gautier's Ada programming
>> http://gautiersblog.blogspot.com/search/label/Ada
>> NB: follow the above link for a valid e-mail address
>
> The 2015 GPS doesn't have a "hot key" for dealing with indentation.
> Instead, use the drop-down menu for "edit" and then select "Format Selection".
> The selection, of course, is done by putting the cursor on the top line
> you want selected and then holding down the control key as you move the
> cursor down.
>
> The indentation of comment lines depends on the the indentation of the
> nearest preceding comment line.  If you use the "select" button in the
> "edit menu", the comment indentation usually goes in the left column
> of the text.  If you select a set of lines that include the newly
> commented lines, the "format selection" approach will indent the start
> of the new comment lines to be consistent with the other non-commented
> lines.
>
> Once you get used to this approach, it's quite usable.  Of course, it
> isn't the same as a hot key.  I routinely use this on my Windows XP
> machine.  I haven't tried on the Linux box, but I expect it will behave
> the same way.

You can set a custom shortcut for such options. I currently use Ctrl+I 
for /Format selection/ and Ctrl+P for /Autoindent selection/. I had 
forgotten about the latter one, I have settled on always using Ctrl+I, 
so not sure about the differences.

Álex.

>
> Bruce B.
>


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

* Re: GNAT GPL 2016 Editor Bugs?
  2016-06-08 13:36     ` gautier_niouzes
                         ` (3 preceding siblings ...)
  2016-06-09 15:51       ` brbarkstrom
@ 2016-06-14 14:25       ` gautier_niouzes
  4 siblings, 0 replies; 14+ messages in thread
From: gautier_niouzes @ 2016-06-14 14:25 UTC (permalink / raw)


One last annoyance (again: other than that, GPS is a just few millimeters away from perfection :-) ):

The automatic fix for " "x" is not modified, could be declared constant " aligns the first character to that of the above row. In the example below, it works perfectly for adding "constant" after "u_arg", but for "arg" it shifts to align with "declare". Arg!


    declare
    arg: constant String:= Argument(i);
      u_arg: String:= To_Upper( arg );


Thanks for the Ctrl-N, very handy.
Sure, you can configure GPS, but if you are a nomad programmer, you need to reconfigure over and over...
_________________________ 
Gautier's Ada programming 
http://gautiersblog.blogspot.com/search/label/Ada 
NB: follow the above link for a valid e-mail address 

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

end of thread, other threads:[~2016-06-14 14:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 22:12 GNAT GPL 2016 Editor Bugs? Eryndlia Mavourneen
2016-06-07 11:49 ` Simon Wright
2016-06-08  0:33   ` Eryndlia Mavourneen
2016-06-08  7:14     ` Simon Wright
2016-06-08 13:36     ` gautier_niouzes
2016-06-08 16:29       ` Egil H H
2016-06-08 16:38       ` Dmitry A. Kazakov
2016-06-08 17:02         ` Jeffrey R. Carter
2016-06-08 16:54       ` Jeffrey R. Carter
2016-06-09 17:47         ` gautier_niouzes
2016-06-09 18:43           ` Jeffrey R. Carter
2016-06-09 15:51       ` brbarkstrom
2016-06-10  8:41         ` Alejandro R. Mosteo
2016-06-14 14:25       ` gautier_niouzes

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