Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Hal Mueller
See my previous link to per-directory-tree configuration files, which seem tailored to this exact use case. Hal > On Apr 30, 2019, at 11:00 AM, Tom Russo wrote: > > would still advocate leaving the variable settings in the file, to > override personal defaults and enforce project defaults.

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Curt Mills
On Tue, Apr 30, 2019 at 10:10 AM Tom Russo wrote: > Four character indents are the Xastir coding standard. > > http://xastir.org/index.php/HowTo:Developer_Guidelines_and_Notes > > I personally hate it, but that's what this project has always required. > Right. I don't like it either. We're

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Curt Mills
There's also project-specific VIM files: https://andrew.stwrt.ca/posts/project-specific-vimrc/ Which would require tweaks to the users ~/.vimrc file to enable. On Tue, Apr 30, 2019 at 11:14 AM Curt Mills wrote: > What do you think of this idea instead: https://editorconfig.org/ > It requires

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread km5vy Tom Russo
On Tue, Apr 30, 2019 at 11:14:54AM -0700, we recorded a bogon-computron collision of the flavor, containing: > What do you think of this idea instead: https://editorconfig.org/ > It requires a plug-in for Emacs and VIM, but we could add that to the > coding standards. I'm not particularly keen

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread km5vy Tom Russo
On Tue, Apr 30, 2019 at 12:41:50PM -0600, we recorded a bogon-computron collision of the flavor, containing: > On Tue, Apr 30, 2019 at 11:14:54AM -0700, we recorded a bogon-computron > collision of the flavor, containing: > > What do you think of this idea instead: https://editorconfig.org/ >

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Hal Mueller
That’s for Emacs. You can specify major mode and per-file variables. https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables Hal N3YX > On Apr 30, 2019, at

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread km5vy Tom Russo
Seconded. I think that the people who established the current standard for Xastir are long gone, and maintaining consistency with that style for the sake of consistency has gone on long enough. I personally hate *both* the four-space indentation *and* the "egyptian brace"/K style, and prefer

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Tom Russo
On Tue, Apr 30, 2019 at 10:23:20AM -0700, we recorded a bogon-computron collision of the flavor, containing: > Thanks. Looks like the equivalent in Vim is Modelines: > > https://vim.fandom.com/wiki/Modeline_magic > > But a lot of the major distributions turn off modelines by default. > > We

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Jason KG4WSV
I haven't seen this before, but it does make my emacs behave differently (the file had 2 space tabs, this made it do 4) and does nothing to vi. RHEL 7 -j On Tue, Apr 30, 2019 at 11:06 AM Curt Mills wrote: > I see this header in _some_ of our source files: > > /* -*- c-basic-offset: 4;

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Tom Russo
On Tue, Apr 30, 2019 at 09:06:29AM -0700, we recorded a bogon-computron collision of the flavor, containing: > I see this header in _some_ of our source files: > > /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- > > Is that for VI -and- Emacs, or just one of them? I use Vim. Emacs.

[Xastir-dev] Editor header in source files

2019-04-30 Thread Curt Mills
I see this header in _some_ of our source files: /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- Is that for VI -and- Emacs, or just one of them? I use Vim. I've noticed while editing files in the last couple of weeks that my tab is not 4 chars sometimes. I have to manually space to

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Curt Mills
What do you think of this idea instead: https://editorconfig.org/ It requires a plug-in for Emacs and VIM, but we could add that to the coding standards. It would avoid having to have a special config in each of our source files. On Tue, Apr 30, 2019 at 11:00 AM Tom Russo wrote: > On Tue, Apr

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Tom Russo
On Tue, Apr 30, 2019 at 11:20:59AM -0500, we recorded a bogon-computron collision of the flavor, containing: > I haven't seen this before, but it does make my emacs behave differently > (the file had 2 space tabs, this made it do 4) and does nothing to vi. Four character indents are the Xastir

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Curt Mills
Thanks. Looks like the equivalent in Vim is Modelines: https://vim.fandom.com/wiki/Modeline_magic But a lot of the major distributions turn off modelines by default. We should either have the Emacs and VIM Modelines in all the source files, or none of them. Our source guidelines specify

Re: [Xastir-dev] Editor header in source files

2019-04-30 Thread Hal Mueller
I think per-directory local variables would be a cleaner solution (but I’ve never used them). Looks like one file at top of source tree would do it. https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables Embedded spaces (vs tabs) certainly make