From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lg.zevlg@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#44466: 27.1; quail input fails at read-only boundary Date: Sun, 8 Nov 2020 20:07:46 +0400 Message-ID: References: <83tutz6gdb.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dick.r.chiang@gmail.com, 44466@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 08 17:08:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbnEf-0002so-EF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Nov 2020 17:08:09 +0100 Original-Received: from localhost ([::1]:49062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbnEe-00045A-Cq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Nov 2020 11:08:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbnEY-000453-J5 for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 11:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbnEY-0007Dc-AO for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 11:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbnEY-0000rk-4c for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 11:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: lg.zevlg@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Nov 2020 16:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44466 X-GNU-PR-Package: emacs Original-Received: via spool by 44466-submit@debbugs.gnu.org id=B44466.16048516793319 (code B ref 44466); Sun, 08 Nov 2020 16:08:02 +0000 Original-Received: (at 44466) by debbugs.gnu.org; 8 Nov 2020 16:07:59 +0000 Original-Received: from localhost ([127.0.0.1]:32907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbnEU-0000rT-V1 for submit@debbugs.gnu.org; Sun, 08 Nov 2020 11:07:59 -0500 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:34429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbnEQ-0000rE-6p for 44466@debbugs.gnu.org; Sun, 08 Nov 2020 11:07:57 -0500 Original-Received: by mail-lj1-f175.google.com with SMTP id y16so7008812ljk.1 for <44466@debbugs.gnu.org>; Sun, 08 Nov 2020 08:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=8Df1Sg7PEtg/cDjT2VNnxbDeZh3KFr1QdkeJtkhz1uU=; b=q9utzgilD/4UgLwaGnJTRdqh0ElscX+k/jkZMLBt1wTs85nn3TPiTwR9NkGleotcxw Y/WdYoyLU1T6Kxxf5HNn1PR4cXUkSpzqW0PGIg/ugAHqDSUrALUFVX8cAbxkEDiNoEJr dvpiN8PBL9wj4BWdlF94xTBALZklv2TbUzAPjXikpMyYjbAXMrRvqntT+fF3bZCUh5J2 Kwu8Lv9HcQjXIFOJjtC7vtlz0QsLUu6mFbn6IJrN3e1VjW+7m9S6OiEv4/VR8vpzSKcj Xl6oCUSkteMiRKBPB7UWokdmZa+ZUa8AK9UR9oPaqpoZ5jM2FO2prmqvEFcViYWfzTDK QIIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=8Df1Sg7PEtg/cDjT2VNnxbDeZh3KFr1QdkeJtkhz1uU=; b=hrEa97e2a3a3olq7DZuPygHUsje5vVbb9hKjT3ew5J/EmuOi1JdcPBHG8qSaeFiLX8 /SRtwKzNWzTiy+cIGXHodLu42CriWhYBI4QIqsf6XTiS+Qc6gHcO7tntYsgMi39p5Z3a xQE5J4kpAkh8YdyvAVHdfTk3Ry2FTj9FrJEkh4c+McnFdg0tk8Cx+giu3RG5Gc40YS1a IwHxQZa5IXW4jZmSkCqf8AtlbDNYwG6yweLlN/QBkwfEV6Jf0KRVsW+wKx0edtWsjTnR Z1n0XkQ8uJlsVxe0u73euv2UrnLIH9tGnNU0B61Pp5wjydumrCMRiNKfHQES/mgl4UEG MrbQ== X-Gm-Message-State: AOAM530o6R7mOxQ6/y8UEJBKsTHGbo/kYQwXoGmNiGQxFU8GncV5oaK0 AwqDN5ERGFCWLQsTevqQLx8= X-Google-Smtp-Source: ABdhPJzTCCsqXnvg7q0akmJXW8Xf7+gzXwVXHdpqOhQ2dTRZ18Bd0gFvOyrtW0kBR2luGqofupdU8Q== X-Received: by 2002:a2e:b170:: with SMTP id a16mr255551ljm.92.1604851668260; Sun, 08 Nov 2020 08:07:48 -0800 (PST) Original-Received: from localhost.localdomain (128-73-165-249.broadband.corbina.ru. [128.73.165.249]) by smtp.gmail.com with ESMTPSA id c125sm1303109lfd.31.2020.11.08.08.07.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Nov 2020 08:07:47 -0800 (PST) In-Reply-To: <83tutz6gdb.fsf@gnu.org> X-Mailer: iPad Mail (18A373) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192886 Archived-At: > 8 =D0=BD=D0=BE=D1=8F=D0=B1. 2020 =D0=B3., =D0=B2 19:02, Eli Zaretskii =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > =EF=BB=BF >>=20 >> From: Evgeny Zajcev >> Date: Sun, 8 Nov 2020 09:42:23 +0300 >> Cc: dick.r.chiang@gmail.com, 44466@debbugs.gnu.org >>=20 >>> When an input method is used in a read-only buffer, Emacs barfs >>> because it doesn't allow inserting text into such a buffer. It >>> doesn't insert the untranslated character, as what your patch did. >>>=20 >>>> Possible we need to check front-stickyness of the char at point along w= ith 'read-only property: >>>>=20 >>>> .. >>>> (and (get-char-property (point) 'read-only) >>>> (get-char-property (point) 'front-sticky))) >>>=20 >>> Does this solve the problem in this case? >>=20 >> Yes, because this mimics what is done in >> verify_interval_modification() function from textprop.c. >=20 > Any reason why pressing a key on a button should disregard the active > input method? What if the button needs the user to type the character > which the input method would produce? AFAIU, the patch we installed a > year ago makes this impossible. The reason is the same as for read-only buffers, making single char bindings= work. For example if you change input method in image-mode and press =E2=80= =9Cq=E2=80=9D key this will kill buffer, because correct command is executed= . Writable buffer might have read-only region with local-keymap installed with= single char binding. If input method is applied, then instead of executing c= orresponding command you will get =E2=80=9Ctext is read-only=E2=80=9D error,= because self-insert command is executed. >=20 >> Possibly the best solution would be to make >> verify_interval_modification() visible from elisp side and use it in >> quail-input-method to check for writability at point. >=20 > I think this would be overkill. =E2=80=94 lg