[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: special-mode buffer changes to fundamental when modified

From: Stefan Huchler
Subject: Re: special-mode buffer changes to fundamental when modified
Date: Sun, 23 Oct 2016 18:47:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Michael Heerdegen <> writes:

> Stefan Huchler <> writes:
>> condition-case: Buffer is read-only: #<killed buffer>
> Well, your code behaved differently depending on whether the buffer
> already existed or not.

ahh yes I get that now. cause I should done it not in the mode
activation function but the "open-buffer" function makes sense.

that happens if you look over other code and copy to much I guess :)

> Ok, I used the excerpt you posted and edited it very slightly.  There
> was indeed a problem: `special-mode', from which your mode derived,
> makes the buffer read-only.  So I suggest to bind `inhibit-read-only' to
> ignore the read-only flag, since I assume you want the buffer to stay
> read-only.

Yes thats exactly what I want. so I thought let is to define new
temporary varibbales, but in this case you use that to set a value
temporary? so it goes back to its default nil?

thats neat. so basicly you overwrite the buffer wide variable with a
let-scope wide, and after it it falls back to the buffer-wide?

Nice learned something new.

So basicly the straight forward way is right, I just aperently got
unconsistent results because I did the stuff in the mode-activation
function instead the buffer-open function.

Well then I take it back then its not so much a problem of the
documentiation but a mistake on my part.

Still some more example code especialy for special mode would help,
pointing to other modes as example can be problematic, especialy for
elisp noobs that are not so good in understanding the code.

> HTH,
> Michael.

Thank you very much, then I will soon release a new version of
kodi-remote :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]