unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: MON KEY <monkey@sandpframing.com>, 6915@debbugs.gnu.org
Subject: bug#6915: Please consider making left-margin-width etc buffer local instead of major mode local
Date: Thu, 26 Aug 2010 22:01:14 +0200	[thread overview]
Message-ID: <AANLkTik7QufV2yhJvPFsysJqTjiJ9genY60ioefu2R0s@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin8WvrGGZmpADGm5=usNdZkq6wHC5evwZ1KHmps@mail.gmail.com>

On Thu, Aug 26, 2010 at 3:05 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Thu, Aug 26, 2010 at 14:40, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> If there is only one major mode in the buffer this is perhaps the case, yes.
>
> This is what happens now, and in the foreseeable future, in the vast
> majority of buffers. Or do you anticipate the need to use mumamo in
> all kinds of buffers?

No, just for multi major mode buffers. (But for web programming these
are common, of course.)

>> Emacs was not very good prepared for several major modes in a buffer.
>
> Agreed.
>
>> I suppose this will change in the future, but we are not there yet.
>
> Why?

I just mean that Emacs hopefully will adopt some multi major mode
framework (and some changes needed for that).

>>  - Emulator mode buffer local variable.

Viper, cua-mode, etc. In some cases there are state variables per buffer.

>>  - Modified state buffer local variables.

Just an example, maybe a bad one though... - I meant any variable
describing changes of the buffer content.

> I lack context (or knowledge) to understand what you mean here.

The examples was only a try to evoke some thoughts about variable
position locallity.


>> I try to move this a bit forward by pointing to cases where a major
>> mode local variable probably is seen by users more like something
>> belonging to the buffer contents.
>
> Yes, I understand, but I think here is where I disagree. A priori, I
> don't know why margins would be related more to buffer contents than
> to buffer mode.

I am a bit hesitating about this (that is why I was expressing this
wish less strongly). I know quite little about margin use in Emacs.
The only uses I know of are:

- linum-mode.
- mumamo-margin-info-mode (alt display chunk start-end inf margin)
- wrap-to-fill-column-mode (display text dark room style in the middle
of the buffer)

The last two are mine, so I do not know much at all about this. What
other uses are there in Emacs of the margin widths?

However for all of these a buffer local value of the margin width
makes perfect sense. Also in multi major mode it would be very
disturbing to change the margin width when moving from one major mode
chunk to another.

What arguments are there for having the margin width as a major mode
local value?


>> Yes, of course mumamo can take care of these cases, but it comes at a cost.
>
> Making variables permanent buffer-local also has a cost. Surprise and
> bugs, if the user or other modes weren't expecting it, for example.

You mean other major modes? As I have explained earlier those examples
are better to catch. (Stefan was hesitating about this.)

>> (And it definitively can not be taken care of the way that was
>> suggested in the answer you are commenting on.)
>
> I trust you on this. But perhaps what is lacking is something at the
> Emacs API level.

Yes. of course. I expect that to happen later on (see my examples
above for possible needs). But please remember that the current "api"
is adding the property permanent-local.

> What I mean is that making permanent buffer-local every variable that
> mumamo needs so isn't necessarily the best answer.
>
>     Juanma





  reply	other threads:[~2010-08-26 20:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 22:59 bug#6915: Please consider making left-margin-width etc buffer local instead of major mode local Lennart Borgman
2010-08-26  3:58 ` MON KEY
2010-08-26  9:19   ` Lennart Borgman
2010-08-26 12:16     ` Juanma Barranquero
2010-08-26 12:40       ` Lennart Borgman
2010-08-26 13:05         ` Juanma Barranquero
2010-08-26 20:01           ` Lennart Borgman [this message]
2010-08-26 22:20           ` MON KEY
2010-08-26 23:30             ` Lennart Borgman
2010-08-27  2:59               ` MON KEY
2010-08-27  8:39                 ` Lennart Borgman
2010-08-28  3:49                   ` MON KEY
2010-08-28  6:26                     ` Lennart Borgman
2010-08-30  0:45                       ` Ken Hori
2010-08-30  0:55                         ` Lennart Borgman
2010-08-26 22:51 ` Stefan Monnier
2010-08-27  3:47 ` bug#6915: Please consider making left-margin-width etc buffer local inst MON KEY
2022-04-17 13:55 ` bug#6915: Please consider making left-margin-width etc buffer local instead of major mode local Lars Ingebrigtsen

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=AANLkTik7QufV2yhJvPFsysJqTjiJ9genY60ioefu2R0s@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=6915@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monkey@sandpframing.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).