unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer
@ 2024-04-02  5:54 Augusto Stoffel
  2024-04-02 11:58 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Augusto Stoffel @ 2024-04-02  5:54 UTC (permalink / raw)
  To: 70136; +Cc: Ergus

This would be sometimes useful, and more consistent with other modes like
dired and diff.  Is there any reason to not do it?

Ergus: I've cc'ed you because this is potentially related to your recent
discussion in emacs-devel about "out of sources compilation"
(compilation buffers use comint-mode).





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer
  2024-04-02  5:54 bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer Augusto Stoffel
@ 2024-04-02 11:58 ` Eli Zaretskii
  2024-04-02 14:03   ` Augusto Stoffel
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-04-02 11:58 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 70136, spacibba

> Cc: Ergus <spacibba@aol.com>
> From: Augusto Stoffel <arstoffel@gmail.com>
> Date: Tue, 02 Apr 2024 07:54:46 +0200
> 
> This would be sometimes useful, and more consistent with other modes like
> dired and diff.  Is there any reason to not do it?

It doesn't sound right to me to do that by default, since comint is
used for shell-like interpreters, and those tend to change directories
at will.  Which means that dir-locals for some random directory
doesn't necessarily take such modes into consideration.

If you need that for some particular use case, can't you call it from
comint-mode-hook or something?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer
  2024-04-02 11:58 ` Eli Zaretskii
@ 2024-04-02 14:03   ` Augusto Stoffel
  2024-04-02 15:11     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Augusto Stoffel @ 2024-04-02 14:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 70136, spacibba

On Tue,  2 Apr 2024 at 14:58, Eli Zaretskii wrote:

> It doesn't sound right to me to do that by default, since comint is
> used for shell-like interpreters, and those tend to change directories
> at will.  Which means that dir-locals for some random directory
> doesn't necessarily take such modes into consideration.

This observation makes sense, but it mostly applies to the good old
'M-x shell', not to 'M-x project-shell', other language interpreters, or
to compilation buffers.

By the way, I now realize that 'M-x compile' doesn't use comint-mode
by default.  Which raises the same question: should compilation-mode
call hack-dir-local-variables-non-file-buffer?

> If you need that for some particular use case, can't you call it from
> comint-mode-hook or something?

Sure, it's an easy customization, but the question is whether it's the
expected default behavior. :-)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer
  2024-04-02 14:03   ` Augusto Stoffel
@ 2024-04-02 15:11     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-04-02 15:11 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 70136, spacibba

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: 70136@debbugs.gnu.org,  spacibba@aol.com
> Date: Tue, 02 Apr 2024 16:03:23 +0200
> 
> By the way, I now realize that 'M-x compile' doesn't use comint-mode
> by default.  Which raises the same question: should compilation-mode
> call hack-dir-local-variables-non-file-buffer?

Maybe.  What kind of directory-specific variables relevant to
compilation-mode would make sense?

> > If you need that for some particular use case, can't you call it from
> > comint-mode-hook or something?
> 
> Sure, it's an easy customization, but the question is whether it's the
> expected default behavior. :-)

The only way to answer that is if we see a flood of requests to have
that by default.  Without that, local customizations are perfectly
adequate.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-02 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02  5:54 bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer Augusto Stoffel
2024-04-02 11:58 ` Eli Zaretskii
2024-04-02 14:03   ` Augusto Stoffel
2024-04-02 15:11     ` Eli Zaretskii

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).