unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Strange problem with (setq buffer-read-only t).
@ 2009-01-15 18:03 Andy Stewart
  2009-01-15 18:22 ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Stewart @ 2009-01-15 18:03 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I have develop irfc.el (interface for IETF RFC document) at:
http://www.emacswiki.org/emacs-en/irfc.el

I use (setq buffer-read-only t) in function `irfc-mode' for make RFC
buffer read-only.

And strange thing is, the (setq buffer-read-only t) that write in code looks
no effect.
But everything is okay if i eval (setq buffer-read-only t) after i open
RFC document.

Why not effect in my code?

So strange....

Andy idea?

Thanks.

  -- Andy





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

* Re: Strange problem with (setq buffer-read-only t).
  2009-01-15 18:03 Strange problem with (setq buffer-read-only t) Andy Stewart
@ 2009-01-15 18:22 ` Juanma Barranquero
  2009-01-16  1:04   ` Andy Stewart
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2009-01-15 18:22 UTC (permalink / raw)
  To: Andy Stewart; +Cc: help-gnu-emacs

On Thu, Jan 15, 2009 at 19:03, Andy Stewart <lazycat.manatee@gmail.com> wrote:

> I use (setq buffer-read-only t) in function `irfc-mode' for make RFC
> buffer read-only.
>
> And strange thing is, the (setq buffer-read-only t) that write in code looks
> no effect.

What do you mean with "no effect"?

I just tried irfc.el and RFC buffers are indeed read-only.

Which version of Emacs are you using? What steps should I follow to
reproduce the bug?

    Juanma




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

* Re: Strange problem with (setq buffer-read-only t).
  2009-01-15 18:22 ` Juanma Barranquero
@ 2009-01-16  1:04   ` Andy Stewart
  2009-01-16  1:16     ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Stewart @ 2009-01-16  1:04 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: help-gnu-emacs

Hi Juanma,

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Thu, Jan 15, 2009 at 19:03, Andy Stewart <lazycat.manatee@gmail.com> wrote:
>
>> I use (setq buffer-read-only t) in function `irfc-mode' for make RFC
>> buffer read-only.
>>
>> And strange thing is, the (setq buffer-read-only t) that write in code looks
>> no effect.
>
> What do you mean with "no effect"?
>
> I just tried irfc.el and RFC buffers are indeed read-only.
>
> Which version of Emacs are you using? What steps should I follow to
> reproduce the bug?
I use 23.0.60.1, i find if i association rfc[0-9]+\\.txt with
'irfc-mode', then buffer is not read-only when it open, even i write
(setq buffer-read-only t) in source code.

But RFC buffer can read-only if i eval-expression "(setq buffer-read-only t)" with
*after* i open RFC buffer.

  -- Andy


>
>     Juanma




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

* Re: Strange problem with (setq buffer-read-only t).
  2009-01-16  1:04   ` Andy Stewart
@ 2009-01-16  1:16     ` Juanma Barranquero
  2009-01-16  1:29       ` Andy Stewart
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2009-01-16  1:16 UTC (permalink / raw)
  To: Andy Stewart; +Cc: help-gnu-emacs

On Fri, Jan 16, 2009 at 02:04, Andy Stewart <lazycat.manatee@gmail.com> wrote:

> I use 23.0.60.1, i find if i association rfc[0-9]+\\.txt with
> 'irfc-mode', then buffer is not read-only when it open, even i write
> (setq buffer-read-only t) in source code.

Please do a precise recipe, starting from emacs -Q.

For example, I move to the directory containing the RFCs and I do:

  emacs -Q -l irfc.el rfc2866.txt

and RFC2866 opens in read-only mode.

    Juanma




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

* Re: Strange problem with (setq buffer-read-only t).
  2009-01-16  1:16     ` Juanma Barranquero
@ 2009-01-16  1:29       ` Andy Stewart
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Stewart @ 2009-01-16  1:29 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: help-gnu-emacs

Juanma Barranquero <lekktu@gmail.com> writes:

> On Fri, Jan 16, 2009 at 02:04, Andy Stewart <lazycat.manatee@gmail.com> wrote:
>
>> I use 23.0.60.1, i find if i association rfc[0-9]+\\.txt with
>> 'irfc-mode', then buffer is not read-only when it open, even i write
>> (setq buffer-read-only t) in source code.
>
> Please do a precise recipe, starting from emacs -Q.
>
> For example, I move to the directory containing the RFCs and I do:
>
>   emacs -Q -l irfc.el rfc2866.txt
>
> and RFC2866 opens in read-only mode.
Yep, buffer is read-only inneed.
Strange, i think have something wrong with this....

Thank you very much!

  -- Andy

>
>     Juanma




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

end of thread, other threads:[~2009-01-16  1:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 18:03 Strange problem with (setq buffer-read-only t) Andy Stewart
2009-01-15 18:22 ` Juanma Barranquero
2009-01-16  1:04   ` Andy Stewart
2009-01-16  1:16     ` Juanma Barranquero
2009-01-16  1:29       ` Andy Stewart

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