Re: [PATCHv2] gdbserver: Add .dir-locals.el file

Eli Zaretskii
2020-03-02T19:19:29Z

> Cc: andrew.burgess@embecosm.com, gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Mon, 2 Mar 2020 18:12:53 +0000
>
> > Put a single file in the parent directory of those 3, I think.
>
> Good point. This would affect all projects in the top level,
> though perhaps the file is right for all of them.

You can arrange for the settings to affect only some of the
subdirectories, the Emacs manual shows an example of that.

> OOC, if we wanted to say, source "../gdb/.dir-locals.el" from
> a gdbserver/.dir-locals.el file, would it be possible?

.dir-locals.el supports 'eval' forms, so you could in principle do
anything there. But my advice is to stick to simplicity, for reasons
of speed of visiting files, if nothing else. Also, maintaining such a
tricky file would need an Emacs expert, something that is not
guaranteed (although currently we have several on board).

> I guess a symlink would do too. Except that might not work
> as nicely on Windows filesystems.

IME, symlinks in versioned directories are a PITA.