comp.lang.ada
 help / color / mirror / Atom feed
* AdaGIDE 7.42 and tabs
@ 2006-12-10 14:26 Dmitry A. Kazakov
  2006-12-10 14:34 ` Jeffrey R. Carter
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry A. Kazakov @ 2006-12-10 14:26 UTC (permalink / raw)


Does anybody know how to force AdaGIDE to use HT properly (tab stop = 8)?

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



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-10 14:26 AdaGIDE 7.42 and tabs Dmitry A. Kazakov
@ 2006-12-10 14:34 ` Jeffrey R. Carter
  2006-12-10 15:15   ` Dmitry A. Kazakov
  0 siblings, 1 reply; 16+ messages in thread
From: Jeffrey R. Carter @ 2006-12-10 14:34 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> Does anybody know how to force AdaGIDE to use HT properly (tab stop = 8)?

Tools => Global settings => [Editor tab] => Indent Spaces/block => 8

-- 
Jeff Carter
"C++ is like giving an AK-47 to a monk, shooting him
full of crack and letting him loose in a mall and
expecting him to balance your checking account
'when he has the time.'"
Drew Olbrich
52



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-10 14:34 ` Jeffrey R. Carter
@ 2006-12-10 15:15   ` Dmitry A. Kazakov
  2006-12-11  4:53     ` Jeffrey R. Carter
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry A. Kazakov @ 2006-12-10 15:15 UTC (permalink / raw)


On Sun, 10 Dec 2006 14:34:20 GMT, Jeffrey R. Carter wrote:

> Dmitry A. Kazakov wrote:
>> Does anybody know how to force AdaGIDE to use HT properly (tab stop = 8)?
> 
> Tools => Global settings => [Editor tab] => Indent Spaces/block => 8

No chance to separate indentation from source HTs?

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



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-10 15:15   ` Dmitry A. Kazakov
@ 2006-12-11  4:53     ` Jeffrey R. Carter
  2006-12-11  8:45       ` Dmitry A. Kazakov
  0 siblings, 1 reply; 16+ messages in thread
From: Jeffrey R. Carter @ 2006-12-11  4:53 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> 
> No chance to separate indentation from source HTs?

Not that I'm aware of. Do you have sources with tabs for other than 
indentation?

-- 
Jeff Carter
"C++ is like giving an AK-47 to a monk, shooting him
full of crack and letting him loose in a mall and
expecting him to balance your checking account
'when he has the time.'"
Drew Olbrich
52



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11  4:53     ` Jeffrey R. Carter
@ 2006-12-11  8:45       ` Dmitry A. Kazakov
  2006-12-11 10:07         ` gautier_niouzes
  2006-12-11 13:21         ` Stephen Leake
  0 siblings, 2 replies; 16+ messages in thread
From: Dmitry A. Kazakov @ 2006-12-11  8:45 UTC (permalink / raw)


On Mon, 11 Dec 2006 04:53:06 GMT, Jeffrey R. Carter wrote:

> Dmitry A. Kazakov wrote:
>> 
>> No chance to separate indentation from source HTs?
> 
> Not that I'm aware of. Do you have sources with tabs for other than 
> indentation?

Sure, all of them in fact. Indentation = 3, HT = 8.

It worked satisfactory in earlier versions of AdaGIDE. Or, maybe, I just
haven't noticed anything wrong. But now indentation seems to be expanded as
1 HT, when set to 3 spaces. Clearly 1*8 /= 3! So when the file gets opened
in another editor, the result is a total mess.

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



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11  8:45       ` Dmitry A. Kazakov
@ 2006-12-11 10:07         ` gautier_niouzes
  2006-12-11 14:05           ` Dmitry A. Kazakov
  2006-12-11 13:21         ` Stephen Leake
  1 sibling, 1 reply; 16+ messages in thread
From: gautier_niouzes @ 2006-12-11 10:07 UTC (permalink / raw)


Dmitry A. Kazakov:

> Sure, all of them in fact. Indentation = 3, HT = 8.
>
> It worked satisfactory in earlier versions of AdaGIDE. Or, maybe, I just
> haven't noticed anything wrong. But now indentation seems to be expanded as
> 1 HT, when set to 3 spaces. Clearly 1*8 /= 3! So when the file gets opened
> in another editor, the result is a total mess.

Not sure about changes about h-tabs; at some point of time around 7.0
version, there was a change from RichEdit 1.0 to RichEdit 2.0.
Anyway, my trick is just to avoid that character, because you always
get problems (50% of editors, formatters etc. think that HT must be 4
characters, the other 50% that it must be 8).
Then, use spaces, don't worry and be happy!
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!




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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11  8:45       ` Dmitry A. Kazakov
  2006-12-11 10:07         ` gautier_niouzes
@ 2006-12-11 13:21         ` Stephen Leake
  2006-12-11 14:01           ` Dmitry A. Kazakov
  2006-12-12 18:13           ` Robert A Duff
  1 sibling, 2 replies; 16+ messages in thread
From: Stephen Leake @ 2006-12-11 13:21 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Mon, 11 Dec 2006 04:53:06 GMT, Jeffrey R. Carter wrote:
>
>> Dmitry A. Kazakov wrote:
>>> 
>>> No chance to separate indentation from source HTs?
>> 
>> Not that I'm aware of. Do you have sources with tabs for other than 
>> indentation?
>
> Sure, all of them in fact. Indentation = 3, HT = 8.
>
> It worked satisfactory in earlier versions of AdaGIDE. Or, maybe, I just
> haven't noticed anything wrong. But now indentation seems to be expanded as
> 1 HT, when set to 3 spaces. Clearly 1*8 /= 3! So when the file gets opened
> in another editor, the result is a total mess.

I don't believe there is any sort of actual _standard_ that says HT =
column mod 8. 

On some old mechanical typewriters, you could set mechanical tab stops
where ever you wanted, to make typing tables etc easiser. Early
printers also had configurable tab stops (not mechanical).

Good editors also have configurable tab stops. 

But the only portable way to use tab stops is to insert spaces, not HT.

-- 
-- Stephe



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 13:21         ` Stephen Leake
@ 2006-12-11 14:01           ` Dmitry A. Kazakov
  2006-12-11 20:36             ` Simon Wright
                               ` (2 more replies)
  2006-12-12 18:13           ` Robert A Duff
  1 sibling, 3 replies; 16+ messages in thread
From: Dmitry A. Kazakov @ 2006-12-11 14:01 UTC (permalink / raw)


On Mon, 11 Dec 2006 08:21:19 -0500, Stephen Leake wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> On Mon, 11 Dec 2006 04:53:06 GMT, Jeffrey R. Carter wrote:
>>
>>> Dmitry A. Kazakov wrote:
>>>> 
>>>> No chance to separate indentation from source HTs?
>>> 
>>> Not that I'm aware of. Do you have sources with tabs for other than 
>>> indentation?
>>
>> Sure, all of them in fact. Indentation = 3, HT = 8.
>>
>> It worked satisfactory in earlier versions of AdaGIDE. Or, maybe, I just
>> haven't noticed anything wrong. But now indentation seems to be expanded as
>> 1 HT, when set to 3 spaces. Clearly 1*8 /= 3! So when the file gets opened
>> in another editor, the result is a total mess.
> 
> I don't believe there is any sort of actual _standard_ that says HT =
> column mod 8. 

This is my impression too. However it is a de-facto standard.

> On some old mechanical typewriters, you could set mechanical tab stops
> where ever you wanted, to make typing tables etc easiser. Early
> printers also had configurable tab stops (not mechanical).
> 
> Good editors also have configurable tab stops. 

Which is the root of the evil! A tool that requires configuration is a bad
tool. I am almost serious here... (:-))

> But the only portable way to use tab stops is to insert spaces, not HT.

That would be fine to me, unfortunately indent-block inserts HTs.

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



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 10:07         ` gautier_niouzes
@ 2006-12-11 14:05           ` Dmitry A. Kazakov
  0 siblings, 0 replies; 16+ messages in thread
From: Dmitry A. Kazakov @ 2006-12-11 14:05 UTC (permalink / raw)


On 11 Dec 2006 02:07:28 -0800, gautier_niouzes@hotmail.com wrote:

> Not sure about changes about h-tabs; at some point of time around 7.0
> version, there was a change from RichEdit 1.0 to RichEdit 2.0.

Ooch. The only usable Windows control is Static! (:-))

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



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 14:01           ` Dmitry A. Kazakov
@ 2006-12-11 20:36             ` Simon Wright
  2006-12-13  0:35               ` Stephen Leake
  2006-12-11 20:55             ` Jeffrey R. Carter
  2006-12-13  0:36             ` Stephen Leake
  2 siblings, 1 reply; 16+ messages in thread
From: Simon Wright @ 2006-12-11 20:36 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> That would be fine to me, unfortunately indent-block inserts HTs.

In this ada-mode, there's a write-file-hook that removes trailing
spaces & untabifies the buffer.

(defun ada-set-write-file-hook ()
  "Reset the `local-write-file-hooks' for support of ada-mode.
As a result, the buffer is cleaned up upon saving, according
to the rules described for `ada-clean-buffer-before-saving'."
  (if (and ada-clean-buffer-before-saving
           (null local-write-file-hooks))
      (progn
        ;; remove all spaces at the end of lines in the whole buffer.
        (add-hook 'local-write-file-hooks
                  'delete-trailing-whitespace)
        ;; convert all tabs to the correct number of spaces.
        (add-hook 'local-write-file-hooks
                  (lambda () (untabify (point-min) (point-max))))
        )))



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 14:01           ` Dmitry A. Kazakov
  2006-12-11 20:36             ` Simon Wright
@ 2006-12-11 20:55             ` Jeffrey R. Carter
  2006-12-12 18:34               ` Dmitry A. Kazakov
  2006-12-13  0:36             ` Stephen Leake
  2 siblings, 1 reply; 16+ messages in thread
From: Jeffrey R. Carter @ 2006-12-11 20:55 UTC (permalink / raw)


Dmitry A. Kazakov wrote:
> 
> That would be fine to me, unfortunately indent-block inserts HTs.

I'm not seeing this. All indentation is done using spaces.

-- 
Jeff Carter
"Blessed is just about anyone with a vested interest in the status quo."
Monty Python's Life of Brian
73



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 13:21         ` Stephen Leake
  2006-12-11 14:01           ` Dmitry A. Kazakov
@ 2006-12-12 18:13           ` Robert A Duff
  1 sibling, 0 replies; 16+ messages in thread
From: Robert A Duff @ 2006-12-12 18:13 UTC (permalink / raw)


Stephen Leake <stephen_leake@stephe-leake.org> writes:

> On some old mechanical typewriters, you could set mechanical tab stops
> where ever you wanted, to make typing tables etc easiser. Early
> printers also had configurable tab stops (not mechanical).

Right, but the tab key did not insert 'tab' characters (no such thing)!  ;-)

> Good editors also have configurable tab stops. 
>
> But the only portable way to use tab stops is to insert spaces, not HT.

Exactly.

- Bob



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 20:55             ` Jeffrey R. Carter
@ 2006-12-12 18:34               ` Dmitry A. Kazakov
  0 siblings, 0 replies; 16+ messages in thread
From: Dmitry A. Kazakov @ 2006-12-12 18:34 UTC (permalink / raw)


On Mon, 11 Dec 2006 20:55:26 GMT, in comp.lang.ada you wrote:

> Dmitry A. Kazakov wrote:
>> 
>> That would be fine to me, unfortunately indent-block inserts HTs.
> 
> I'm not seeing this. All indentation is done using spaces.

Yes, you are right. The effect appears only when the file already contains 
HTs. Indent leaves HTs. Further AdaGIDE expands them wrong. I set indent = 
8 and created the following file

<HT>1
<HT><HT>2
12345678901234567890

In AdaGIDE it is displayed as

______1
____________2
12345678901234567890

And also unindent does not consider HTs as blanks! I can't unindent past a 
HT. It is strange.

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



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 20:36             ` Simon Wright
@ 2006-12-13  0:35               ` Stephen Leake
  2006-12-14 21:07                 ` Simon Wright
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Leake @ 2006-12-13  0:35 UTC (permalink / raw)


Simon Wright <simon.j.wright@mac.com> writes:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>
>> That would be fine to me, unfortunately indent-block inserts HTs.
>
> In this ada-mode, there's a write-file-hook that removes trailing
> spaces & untabifies the buffer.
>
> (defun ada-set-write-file-hook ()
>   "Reset the `local-write-file-hooks' for support of ada-mode.
> As a result, the buffer is cleaned up upon saving, according
> to the rules described for `ada-clean-buffer-before-saving'."
>   (if (and ada-clean-buffer-before-saving
>            (null local-write-file-hooks))
>       (progn
>         ;; remove all spaces at the end of lines in the whole buffer.
>         (add-hook 'local-write-file-hooks
>                   'delete-trailing-whitespace)
>         ;; convert all tabs to the correct number of spaces.
>         (add-hook 'local-write-file-hooks
>                   (lambda () (untabify (point-min) (point-max))))
>         )))

I don't think AdaGIDE can interpret Emacs lisp. It would be
interesting if it could !

-- 
-- Stephe



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-11 14:01           ` Dmitry A. Kazakov
  2006-12-11 20:36             ` Simon Wright
  2006-12-11 20:55             ` Jeffrey R. Carter
@ 2006-12-13  0:36             ` Stephen Leake
  2 siblings, 0 replies; 16+ messages in thread
From: Stephen Leake @ 2006-12-13  0:36 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Mon, 11 Dec 2006 08:21:19 -0500, Stephen Leake wrote:
>
>> But the only portable way to use tab stops is to insert spaces, not HT.
>
> That would be fine to me, unfortunately indent-block inserts HTs.

If there is no configuration setting to tell AdaGIDE to not do that,
AdaGIDE needs to be fixed.

-- 
-- Stephe



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

* Re: AdaGIDE 7.42 and tabs
  2006-12-13  0:35               ` Stephen Leake
@ 2006-12-14 21:07                 ` Simon Wright
  0 siblings, 0 replies; 16+ messages in thread
From: Simon Wright @ 2006-12-14 21:07 UTC (permalink / raw)


Stephen Leake <stephen_leake@stephe-leake.org> writes:

> I don't think AdaGIDE can interpret Emacs lisp. It would be
> interesting if it could !

I suppose it would be called Emacs then. (I did suspect I might have
got the wrong end of the stick there)



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

end of thread, other threads:[~2006-12-14 21:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-10 14:26 AdaGIDE 7.42 and tabs Dmitry A. Kazakov
2006-12-10 14:34 ` Jeffrey R. Carter
2006-12-10 15:15   ` Dmitry A. Kazakov
2006-12-11  4:53     ` Jeffrey R. Carter
2006-12-11  8:45       ` Dmitry A. Kazakov
2006-12-11 10:07         ` gautier_niouzes
2006-12-11 14:05           ` Dmitry A. Kazakov
2006-12-11 13:21         ` Stephen Leake
2006-12-11 14:01           ` Dmitry A. Kazakov
2006-12-11 20:36             ` Simon Wright
2006-12-13  0:35               ` Stephen Leake
2006-12-14 21:07                 ` Simon Wright
2006-12-11 20:55             ` Jeffrey R. Carter
2006-12-12 18:34               ` Dmitry A. Kazakov
2006-12-13  0:36             ` Stephen Leake
2006-12-12 18:13           ` Robert A Duff

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