all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Len Trigg <lenbok@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59868@debbugs.gnu.org
Subject: bug#59868: 28.2.50; compilation-search-path incompatible with dir-locals
Date: Sat, 10 Dec 2022 08:11:10 +1300	[thread overview]
Message-ID: <CAOGVwemGXC+4zbCVffGtVNvq_fMHbOradu+eXQxq7-HunGFn_w@mail.gmail.com> (raw)
In-Reply-To: <83a63x12ew.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2671 bytes --]

On Fri, 9 Dec 2022 at 20:06, Eli Zaretskii <eliz@gnu.org> wrote:

> You are ignoring the first sentence in my response, right?
>

 I don't think so - the purpose of my email was essentially to ask why you
thought the variable shouldn't be buffer-local in *compilation* buffers.
I'm hoping to see where my mental model of using .dir-locals.el and/or
buffer-local variables is at odds with how emacs intends. The user manual
for both of these make it seem like this would be a perfect fit.


The rest was a suggestion (and I do see a good reason why project.el
> would like to provide this as a project-specific setting).
>
> More generally, why would you want a directory-specific value for this
> variable, if it isn't something the entire directory tree shares?
>

From my understanding, settings in .dir-locals.el *do* affect the whole
directory tree under the directory containing the file (and I'm happy for
that to be the case here). I think of .dir-locals.el in the project root as
the preferred way of specifying project-wide settings, and of
project.el/projectile.el as primarily providing meta functionality (e.g.
cross projects, or multi-file within a project). (I would also perhaps
naively expect that project.el would in turn get its project-wide settings
via that .dir-locals.el, at least that is how I have done it for projects
where I've needed to customize projectile settings (sorry, I haven't tried
project.el yet)).


Maybe you should tell why you need to tell Emacs where to find the
> sources?  Doesn't the tool you use to compile spell that out?
>

In my specific case the project is in R (which is a terrible language for
software development) and we are using a single top level makefile in the
project. It has a target to run linting, which (within each R linter
invocation) lints from a subdirectory, and the filenames in each lint
message are relative to those directories. There is not the hierarchy of
makefiles that you would often see in say C projects, where compilation
mode could parse make-issued messages about changing directories etc. It
seemed a perfect fit for compilation-search-path. I am currently working
around it with the following ugliness in my .dir-locals.el:

(
 (compilation-mode . ((eval . (progn
                                (setq-local compilation-search-path '(
                                              "~/sandboxes/myproject/R"
                                              "~/sandboxes/myproject/tests"
                                              ))
                                (put 'compilation-search-path
'permanent-local t)
                                (compilation-mode))))))


Cheers,
Len.

[-- Attachment #2: Type: text/html, Size: 3695 bytes --]

  reply	other threads:[~2022-12-09 19:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07  1:56 bug#59868: 28.2.50; compilation-search-path incompatible with dir-locals Len Trigg
2022-12-07 13:01 ` Eli Zaretskii
     [not found]   ` <CAOGVwekSSS5+FPecNxdm7TFzXoweB+4jvaKD7z72o0+e25byuA@mail.gmail.com>
2022-12-09  7:06     ` Eli Zaretskii
2022-12-09 19:11       ` Len Trigg [this message]
2022-12-10 14:02         ` Eli Zaretskii
2022-12-10 22:01           ` Len Trigg
2022-12-11  7:14             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOGVwemGXC+4zbCVffGtVNvq_fMHbOradu+eXQxq7-HunGFn_w@mail.gmail.com \
    --to=lenbok@gmail.com \
    --cc=59868@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.