all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60787: setq-mode-local doesn't work for buffers not visiting files
@ 2023-01-13 17:32 Sean Whitton
  2023-01-17  7:31 ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Whitton @ 2023-01-13 17:32 UTC (permalink / raw)
  To: 60787

Hello,

  (setq-mode-local diff-mode view-read-only nil)

doesn't affect *vc-diff* buffers, but it should, according to the docstring of
setq-mode-local.

-- 
Sean Whitton





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

* bug#60787: setq-mode-local doesn't work for buffers not visiting files
  2023-01-13 17:32 bug#60787: setq-mode-local doesn't work for buffers not visiting files Sean Whitton
@ 2023-01-17  7:31 ` Juri Linkov
  2023-01-18 22:42   ` Sean Whitton
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2023-01-17  7:31 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 60787

>   (setq-mode-local diff-mode view-read-only nil)
>
> doesn't affect *vc-diff* buffers, but it should, according to the docstring of
> setq-mode-local.

Is this because of the condition `(buffer-file-name b)`
in mode-local-map-file-buffers?





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

* bug#60787: setq-mode-local doesn't work for buffers not visiting files
  2023-01-17  7:31 ` Juri Linkov
@ 2023-01-18 22:42   ` Sean Whitton
  2023-01-19  6:31     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Whitton @ 2023-01-18 22:42 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 60787

Hello,

On Tue 17 Jan 2023 at 09:31AM +02, Juri Linkov wrote:

>>   (setq-mode-local diff-mode view-read-only nil)
>>
>> doesn't affect *vc-diff* buffers, but it should, according to the docstring of
>> setq-mode-local.
>
> Is this because of the condition `(buffer-file-name b)`
> in mode-local-map-file-buffers?

Yes, but also how setq-mode-local relies on find-file-hook.

-- 
Sean Whitton





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

* bug#60787: setq-mode-local doesn't work for buffers not visiting files
  2023-01-18 22:42   ` Sean Whitton
@ 2023-01-19  6:31     ` Eli Zaretskii
  2023-01-19 21:06       ` Sean Whitton
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-01-19  6:31 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 60787, juri

> Cc: 60787@debbugs.gnu.org
> From: Sean Whitton <spwhitton@spwhitton.name>
> Date: Wed, 18 Jan 2023 15:42:42 -0700
> 
> On Tue 17 Jan 2023 at 09:31AM +02, Juri Linkov wrote:
> 
> >>   (setq-mode-local diff-mode view-read-only nil)
> >>
> >> doesn't affect *vc-diff* buffers, but it should, according to the docstring of
> >> setq-mode-local.
> >
> > Is this because of the condition `(buffer-file-name b)`
> > in mode-local-map-file-buffers?
> 
> Yes, but also how setq-mode-local relies on find-file-hook.

All of mode-local.el is written under the assumption that only
file-visiting buffers are supported.  Evidently, it assumes that modes
for buffers that don't visit files are "not interesting" enough.  This
assumption is explicitly in the doc strings of some of its functions.

I don't know why this was the assumption (maybe because CEDET was
about support of editing program source files?), but if we want to
lift the restriction, it would require changing many of the functions
in the package, not just this one.  Maybe we should do that.
mode-local.el wasn't significantly changed since it was added to Emacs
as part of CEDET merge, so maybe it's time to extend it?





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

* bug#60787: setq-mode-local doesn't work for buffers not visiting files
  2023-01-19  6:31     ` Eli Zaretskii
@ 2023-01-19 21:06       ` Sean Whitton
  0 siblings, 0 replies; 5+ messages in thread
From: Sean Whitton @ 2023-01-19 21:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 60787, juri

Hello,

On Thu 19 Jan 2023 at 08:31AM +02, Eli Zaretskii wrote:

>> Cc: 60787@debbugs.gnu.org
>> From: Sean Whitton <spwhitton@spwhitton.name>
>> Date: Wed, 18 Jan 2023 15:42:42 -0700
>>
>> On Tue 17 Jan 2023 at 09:31AM +02, Juri Linkov wrote:
>>
>> >>   (setq-mode-local diff-mode view-read-only nil)
>> >>
>> >> doesn't affect *vc-diff* buffers, but it should, according to the docstring of
>> >> setq-mode-local.
>> >
>> > Is this because of the condition `(buffer-file-name b)`
>> > in mode-local-map-file-buffers?
>>
>> Yes, but also how setq-mode-local relies on find-file-hook.
>
> All of mode-local.el is written under the assumption that only
> file-visiting buffers are supported.  Evidently, it assumes that modes
> for buffers that don't visit files are "not interesting" enough.  This
> assumption is explicitly in the doc strings of some of its functions.
>
> I don't know why this was the assumption (maybe because CEDET was
> about support of editing program source files?), but if we want to
> lift the restriction, it would require changing many of the functions
> in the package, not just this one.  Maybe we should do that.
> mode-local.el wasn't significantly changed since it was added to Emacs
> as part of CEDET merge, so maybe it's time to extend it?

Sounds good to me.

-- 
Sean Whitton





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

end of thread, other threads:[~2023-01-19 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 17:32 bug#60787: setq-mode-local doesn't work for buffers not visiting files Sean Whitton
2023-01-17  7:31 ` Juri Linkov
2023-01-18 22:42   ` Sean Whitton
2023-01-19  6:31     ` Eli Zaretskii
2023-01-19 21:06       ` Sean Whitton

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.