unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Len Trigg <lenbok@gmail.com>
Cc: 59868@debbugs.gnu.org
Subject: bug#59868: 28.2.50; compilation-search-path incompatible with dir-locals
Date: Sun, 11 Dec 2022 09:14:12 +0200	[thread overview]
Message-ID: <83mt7uv2d7.fsf@gnu.org> (raw)
In-Reply-To: <CAOGVwe=MuFY8naDBBP+bukZqr1PohHXFSYPwPG4NbOzA5KwcYg@mail.gmail.com> (message from Len Trigg on Sun, 11 Dec 2022 11:01:53 +1300)

> From: Len Trigg <lenbok@gmail.com>
> Date: Sun, 11 Dec 2022 11:01:53 +1300
> Cc: 59868@debbugs.gnu.org
> 
>  Because from the pattern we use the *compilation* buffer it is clear
>  that it cannot be buffer-local.  The *compilation* buffer is reused by
>  each new compilation, so local setting there makes no sense.
> 
> Ahhh, right, thanks. My current hack would not work as expected if I switch to another project and compile
> that without first killing the previous *compilation* buffer, since it would have the previous project settings. So
> to be project aware I guess I would somehow need to set the compilation-search-path from
> compilation-start-hook?

Something like that.  That's why I thought about project.el: it is
already sensitive to project changes.

>  Why cannot you have all the possible directories in the list?
> 
> Do you mean all directories for the current project, or all directories across all projects? If the former, that's
> exactly what I want. If the latter, that seems prone to incorrectly resolving the source file for a message as
> coming from a project other than the current (particularly for generic filenames like "utils.c") and additionally I
> try not to have anything project specific in my global emacs init, they should live in the project repo (and
> .dir-locals.el is the only mechanism I'm aware of for that).

I didn't mean global init, I meant the single .dir-locals.el file in
the top-level directory of all your R projects (which AFAIU share a
common parent directory).  Is having files named the same in different
sub-projects a real danger in that case?

But I agree this is not a comprehensive solution.  I still think the
comprehensive one should be provided by project.el, since it already
has infrastructure for these situations.  For example, you can
consider files under a certain directory to belong to a project.





      reply	other threads:[~2022-12-11  7:14 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
2022-12-10 14:02         ` Eli Zaretskii
2022-12-10 22:01           ` Len Trigg
2022-12-11  7:14             ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83mt7uv2d7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59868@debbugs.gnu.org \
    --cc=lenbok@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).