octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the competition's expm vs ours


From: Jaroslav Hajek
Subject: Re: the competition's expm vs ours
Date: Wed, 10 Dec 2008 07:19:57 +0100

On Tue, Dec 9, 2008 at 10:47 PM, Thomas Weber
<address@hidden> wrote:
> On Tue, Dec 09, 2008 at 08:55:33PM +0100, Jaroslav Hajek wrote:
>> > Yes, but then the customizations for the files depend on users
>> > individual settings.
>>
>> Which is good, isn't it?
>
> No, it isn't. I can adapt to whatever style Octave chooses, but please:
> only *one* style, and that one enforced with an iron fist.
>

I must be missing something important here. What *style* are you talking about?
The coding style, incl. indenting & whitespace, is part of the source,
and that should be fixed.
But I still don't see what good is this:
/*
;;; Local Variables: ***
;;; mode: C++ ***
;;; End: ***
*/

What does it do, other than telling Emacs that this is a C++ source?
Isn't it possible to configure Emacs so that it can tell from the file
extension?
In general, if these blocks are used to somehow alter the visual
display of the source beyond the level of personal preferences, it's
probably not a good idea because non-Emacs users won't see the effect.
And if it's just about personal preferences (like coloring etc), then
why on Earth should it be part of the source?

> And yes, I'm happy to have that choice in the file, so I don't need to
> find out how to set those preferences.
>
>> > We can delete those if people would prefer to
>> > not have them in the source files.
>> >
>>
>> I think it's weird, that's all. By the same logic, we could be adding
>> settings for a dozen of other editors. Is it maybe possible to make
>> the emacs settings per-directory using special files?
>
> If you want to add some settings for vim, I'd say: go ahead.

That would mean adding a magic line like this:
// vim:cindent:sw=2:cino={1s>2sn-1sf^-1s(0u0U1t0
to every source file. Or there is a plugin for Vim to recognize the
Local Variables blocks aka Emacs. Still, it will work only if enabled.

> I'm not
> sure which other editors check for special syntax in the edited files.
>

I think Kate does, for instance. And I bet there are more. Now, if we
allow putting settings there for all editors we use, not only is every
file going to be decorated with a pretty weird block of comments
that's easy to forget to add if you create a new file (I bet most
sources I created don't have the Emacs block), but we may run into
problems. For instance, ViM by default searches only 5 leading &
trailing lines for modelines. Maybe Emacs has a similar default. And I
guess Kate has. So, the trailing lines are going to get really
crowded, because leading lines should be reserved for the copyright
clause.

If you insist on saving editor settings within Octave's sources (which
I'm still not convinced is a good idea), in vim, there is another
option - use a per-directory setting via local .vimrc files. Isn't
something similar possible with emacs? That would be much better,
won't it? The settings would be localized and would automatically
apply to every new file.

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]