* compilation-mode makes the buffer read-only
@ 2004-10-31 23:05 Stefan
2004-11-01 8:01 ` Daniel Pfeiffer
2004-11-02 8:53 ` Richard Stallman
0 siblings, 2 replies; 9+ messages in thread
From: Stefan @ 2004-10-31 23:05 UTC (permalink / raw)
Cc: emacs-devel
The recent change that makes compilation-mode buffers read-only breaks
C-u M-x checkdoc-current-buffer RET
Of course I can add some inhibit-read-only bindings in checkdoc.el but why
not avoid those incompatibilities altogether. How about the patch below?
Stefan
--- orig/lisp/progmodes/compile.el
+++ mod/lisp/progmodes/compile.el
@@ -939,7 +939,9 @@
(unless (getenv "EMACS") '("EMACS=t"))
(copy-sequence process-environment))))
(if (not (eq mode t))
- (funcall mode)
+ (progn
+ (funcall mode)
+ (setq buffer-read-only t))
(setq buffer-read-only nil)
(with-no-warnings (comint-mode))
(compilation-shell-minor-mode))
@@ -1203,8 +1205,6 @@
"Prepare the buffer for the compilation parsing commands to work.
Optional argument MINOR indicates this is called from
`compilation-minor-mode'."
- (unless minor
- (setq buffer-read-only t))
(make-local-variable 'compilation-current-error)
(make-local-variable 'compilation-messages-start)
(make-local-variable 'compilation-error-screen-columns)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-10-31 23:05 compilation-mode makes the buffer read-only Stefan
@ 2004-11-01 8:01 ` Daniel Pfeiffer
2004-11-02 8:53 ` Richard Stallman
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Pfeiffer @ 2004-11-01 8:01 UTC (permalink / raw)
Cc: emacs-devel
Saluton,
Stefan <monnier@iro.umontreal.ca> skribis:
> The recent change that makes compilation-mode buffers read-only breaks
> C-u M-x checkdoc-current-buffer RET
>
> Of course I can add some inhibit-read-only bindings in checkdoc.el but why
> not avoid those incompatibilities altogether. How about the patch below?
I did not do that change. I don't know what it was good for and so I don't
know if your patch solves the same problem.
I was also annoyed by this change because it breaks what is documented in the
example file, namely that for the broken output of Oracle's Pro*C, you can
just delete the newline in the middle of the filename to get it reparsed and
consequently found.
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer
--
lerne / learn / apprends / lär dig / ucz się Esperanto:
http://lernu.net/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-10-31 23:05 compilation-mode makes the buffer read-only Stefan
2004-11-01 8:01 ` Daniel Pfeiffer
@ 2004-11-02 8:53 ` Richard Stallman
2004-11-02 12:11 ` Stefan
1 sibling, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2004-11-02 8:53 UTC (permalink / raw)
Cc: occitan, emacs-devel
Your change would turn on buffer-read-only for modes other than
compilation-mode. That does not seem desirable.
What is your intent here?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-11-02 8:53 ` Richard Stallman
@ 2004-11-02 12:11 ` Stefan
2004-11-03 12:45 ` Richard Stallman
0 siblings, 1 reply; 9+ messages in thread
From: Stefan @ 2004-11-02 12:11 UTC (permalink / raw)
Cc: occitan, emacs-devel
> Your change would turn on buffer-read-only for modes other than
> compilation-mode. That does not seem desirable.
Presumably these other modes all derive from compilation-mode
(i.e. things like grep-mode), so they already are put in read-only mode.
But I agree that I don't understand the code well enough to know for sure
the implications of my change, hence my question.
> What is your intent here?
As mentioned the change
* progmodes/compile.el (compilation-start): Assume compilation-mode
will make the buffer read-only.
(compilation-mode): Take arg name-of-mode.
(compilation-setup): Make buffer read-only.
(compilation-handle-exit): Bind inhibit-read-only.
makes the buffer read-only in cases where it is not expected. This was
already partly fixed by making the buffer read-only for the non-minor-mode
case only, and my change intended to further reduce the number of cases
where the buffer is made read-only by moving it to `compilation-start'.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-11-02 12:11 ` Stefan
@ 2004-11-03 12:45 ` Richard Stallman
2004-11-03 14:16 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2004-11-03 12:45 UTC (permalink / raw)
Cc: occitan, emacs-devel
my change intended to further reduce the number of cases
where the buffer is made read-only by moving it to `compilation-start'.
Would you please be more specific? Can you tell us one or more
specific cases where currently this makes the buffer read-only but you
think it should not?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-11-03 12:45 ` Richard Stallman
@ 2004-11-03 14:16 ` Stefan Monnier
2004-11-04 9:51 ` Richard Stallman
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2004-11-03 14:16 UTC (permalink / raw)
Cc: occitan, emacs-devel
> my change intended to further reduce the number of cases
> where the buffer is made read-only by moving it to `compilation-start'.
> Would you please be more specific? Can you tell us one or more
> specific cases where currently this makes the buffer read-only but you
> think it should not?
Try C-u M-x checkdoc-current-buffer RET for one example (as mentioned in
the original message of this thread).
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-11-03 14:16 ` Stefan Monnier
@ 2004-11-04 9:51 ` Richard Stallman
2004-11-05 8:05 ` Stefan
0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2004-11-04 9:51 UTC (permalink / raw)
Cc: occitan, emacs-devel
> Would you please be more specific? Can you tell us one or more
> specific cases where currently this makes the buffer read-only but you
> think it should not?
Try C-u M-x checkdoc-current-buffer RET for one example (as mentioned in
the original message of this thread).
So how about changing checkdoc-current-buffer?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compilation-mode makes the buffer read-only
2004-11-04 9:51 ` Richard Stallman
@ 2004-11-05 8:05 ` Stefan
2004-11-09 11:14 ` Richard Stallman
0 siblings, 1 reply; 9+ messages in thread
From: Stefan @ 2004-11-05 8:05 UTC (permalink / raw)
Cc: occitan, emacs-devel
>> Would you please be more specific? Can you tell us one or more
>> specific cases where currently this makes the buffer read-only but you
>> think it should not?
> Try C-u M-x checkdoc-current-buffer RET for one example (as mentioned in
> the original message of this thread).
> So how about changing checkdoc-current-buffer?
Because I suspect that checkdoc is but one example that indicates we're
breaking backward compatibility, so maybe it's better to restrict this new
behavior to new code.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-11-09 11:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-31 23:05 compilation-mode makes the buffer read-only Stefan
2004-11-01 8:01 ` Daniel Pfeiffer
2004-11-02 8:53 ` Richard Stallman
2004-11-02 12:11 ` Stefan
2004-11-03 12:45 ` Richard Stallman
2004-11-03 14:16 ` Stefan Monnier
2004-11-04 9:51 ` Richard Stallman
2004-11-05 8:05 ` Stefan
2004-11-09 11:14 ` Richard Stallman
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.