unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29504: 26.0.90; Can't enter Japanes text in a read-only buffer even if inhibit-read-only is t
@ 2017-11-30  3:39 Katsumi Yamaoka
  2017-11-30  4:03 ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2017-11-30  3:39 UTC (permalink / raw)
  To: 29504

Hi,

Not only Japanese, every input method should work in a read-only
buffer (such as that of eww) where the `inhibit-read-only' text
or overlay property is set in some areas.  Here is a recipe to
reproduce the problem:

Launch Emacs with -Q, eval this form in the *scratch* buffer,
and type `C-x o', `C-\', and `a'.  "あ" should appear.

(set-input-method 'japanese)

(let ((buffer (get-buffer-create "*texting*")))
  (with-current-buffer buffer
    (setq buffer-read-only nil)
    (erase-buffer)
    (insert (propertize " " 'inhibit-read-only t 'front-sticky t))
    (setq buffer-read-only t)
    (goto-char (point-min)))
  (display-buffer buffer))

Thanks.





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

* bug#29504: 26.0.90; Can't enter Japanes text in a read-only buffer even if inhibit-read-only is t
  2017-11-30  3:39 bug#29504: 26.0.90; Can't enter Japanes text in a read-only buffer even if inhibit-read-only is t Katsumi Yamaoka
@ 2017-11-30  4:03 ` Katsumi Yamaoka
  2017-12-09  9:05   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2017-11-30  4:03 UTC (permalink / raw)
  To: 29504

On Thu, 30 Nov 2017 12:39:28 +0900, Katsumi Yamaoka wrote:
> Not only Japanese, every input method should work in a read-only
> buffer (such as that of eww) where the `inhibit-read-only' text
> or overlay property is set in some areas.

A patch:

--- lisp/international/quail.el~	2017-11-26 22:09:06.936385900 +0000
+++ lisp/international/quail.el	2017-11-30 04:01:39.868772300 +0000
@@ -1332,3 +1332,5 @@
 (defun quail-input-method (key)
-  (if (or buffer-read-only
+  (if (or (and buffer-read-only
+	       (not (or inhibit-read-only
+			(get-char-property (point) 'inhibit-read-only))))
 	  (and overriding-terminal-local-map





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

* bug#29504: 26.0.90; Can't enter Japanes text in a read-only buffer even if inhibit-read-only is t
  2017-11-30  4:03 ` Katsumi Yamaoka
@ 2017-12-09  9:05   ` Eli Zaretskii
  2017-12-11  1:28     ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2017-12-09  9:05 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 29504

> Date: Thu, 30 Nov 2017 13:03:30 +0900
> From: Katsumi Yamaoka <yamaoka@jpl.org>
> 
> On Thu, 30 Nov 2017 12:39:28 +0900, Katsumi Yamaoka wrote:
> > Not only Japanese, every input method should work in a read-only
> > buffer (such as that of eww) where the `inhibit-read-only' text
> > or overlay property is set in some areas.
> 
> A patch:
> 
> --- lisp/international/quail.el~	2017-11-26 22:09:06.936385900 +0000
> +++ lisp/international/quail.el	2017-11-30 04:01:39.868772300 +0000
> @@ -1332,3 +1332,5 @@
>  (defun quail-input-method (key)
> -  (if (or buffer-read-only
> +  (if (or (and buffer-read-only
> +	       (not (or inhibit-read-only
> +			(get-char-property (point) 'inhibit-read-only))))
>  	  (and overriding-terminal-local-map
> 

Looks OK to me.  Please push to the emacs-26 branch, and thanks.





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

* bug#29504: 26.0.90; Can't enter Japanes text in a read-only buffer even if inhibit-read-only is t
  2017-12-09  9:05   ` Eli Zaretskii
@ 2017-12-11  1:28     ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2017-12-11  1:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29504-done

On Sat, 09 Dec 2017 11:05:49 +0200, Eli Zaretskii wrote:
> Looks OK to me.  Please push to the emacs-26 branch, and thanks.

Done.  Thanks.





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

end of thread, other threads:[~2017-12-11  1:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-30  3:39 bug#29504: 26.0.90; Can't enter Japanes text in a read-only buffer even if inhibit-read-only is t Katsumi Yamaoka
2017-11-30  4:03 ` Katsumi Yamaoka
2017-12-09  9:05   ` Eli Zaretskii
2017-12-11  1:28     ` Katsumi Yamaoka

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