From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.bugs Subject: bug#44466: 27.1; quail input fails at read-only boundary Date: Sun, 8 Nov 2020 09:42:23 +0300 Message-ID: References: <878sbfvrs7.fsf@dick> <83eel56zze.fsf@gnu.org> <83wnyw5xx3.fsf@gnu.org> Mime-Version: 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="1751"; 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 07:43:17 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 1kbeQ0-0000MZ-Sa for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Nov 2020 07:43:16 +0100 Original-Received: from localhost ([::1]:50812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbePz-0003Wa-Cf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Nov 2020 01:43:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbePr-0003WL-QY for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 01:43:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbePm-0006Pa-7x for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 01:43:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbePm-0005qy-52 for bug-gnu-emacs@gnu.org; Sun, 08 Nov 2020 01:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Evgeny Zajcev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Nov 2020 06:43: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.160481776322475 (code B ref 44466); Sun, 08 Nov 2020 06:43:02 +0000 Original-Received: (at 44466) by debbugs.gnu.org; 8 Nov 2020 06:42:43 +0000 Original-Received: from localhost ([127.0.0.1]:59627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbePT-0005qR-AM for submit@debbugs.gnu.org; Sun, 08 Nov 2020 01:42:43 -0500 Original-Received: from mail-lf1-f45.google.com ([209.85.167.45]:32858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbePR-0005qE-7G for 44466@debbugs.gnu.org; Sun, 08 Nov 2020 01:42:41 -0500 Original-Received: by mail-lf1-f45.google.com with SMTP id l2so7734910lfk.0 for <44466@debbugs.gnu.org>; Sat, 07 Nov 2020 22:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DbzES/bz+W39lWlIeU2y6Cy8h5PXBfElwhdjWjyubwE=; b=fo736dpDTmVEBrJbfM9+Hj9mlDqlqrz6pceCT54V8KuOrGZpZzLj7icaAGgQjJ5tAW VfKVITN3jsvdV2zKDspErVwdcFaSNFU/UQUoObAmIOOnL+o58DhZJ2bMuoCxuaoeJ+j0 T7dqR/0DNQwTzpjgJ3q6pc8HoUZ5Fwx8HgseJfmstenZw4kccT1hd/KHEeI+5U6Jn1T5 TsTj4s38+cl9eWTlIwjkSUn/QmKdgTp8+Unscg9syS3kiYm2TXcvrxcfKoxqQsBW0cGF 3lELVxQZOSWkZALBXZ3JwH8TDYMJ2GCgRPttipY4G3Lc0vnRx/BTv4wxNBbDI9XdPdwW SgFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DbzES/bz+W39lWlIeU2y6Cy8h5PXBfElwhdjWjyubwE=; b=bjYTEujp0WFhMSl69dEIAJnAFvIWj2QsowgMbzexfovpIVkIF6Eq/1TYrvI58o+CDY oHl4gBDnm+JRWv2TzrPPIA/sH/mEa17DTBfgwFI1JoqcNOJINHpJPL5YapFqiwWVaSFy iv0/gjVz6ntoZRb7fGYoYoSxi4vsIOLYbDFfo0vR9UHuRbAXMg5ekzhqwPyLObarp5v5 DIon5i7i8yGFiSliyujmkMDa1uBuMGgQ0TkGiW7i1QjO/day44x98QWlaj0pSPa9uON9 Wo0Aq7ZPHra5sFskwAkV+OVRdxzF1fUNxi1YhovF5iO7goM4eVg9LPiZH9tOBdKk31bM 8HDQ== X-Gm-Message-State: AOAM532Z+PHTxIXQTjpE0pwVGS4eseLWR7/bG0kKpKtyy3SV5PVSByKL jzU4BgLOFkvkQGbAXEm+GT4q/5qQiGNgzSLLRvc= X-Google-Smtp-Source: ABdhPJyqLQN1byivqhYm52mgAHml+7zL3K91L25tu/Leqpny5w6PA6ZYY+e8vIZQBNLXahig+zDovEX+yiiDnkTKMQk= X-Received: by 2002:a19:2d5:: with SMTP id 204mr3450333lfc.117.1604817755147; Sat, 07 Nov 2020 22:42:35 -0800 (PST) In-Reply-To: <83wnyw5xx3.fsf@gnu.org> 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:192865 Archived-At: > 8 =D0=BD=D0=BE=D1=8F=D0=B1. 2020 =D0=B3., =D0=B2 07:29, Eli Zaretskii =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): > > =EF=BB=BF >> >> From: Evgeny Zajcev >> Date: Sun, 8 Nov 2020 01:24:26 +0300 >> Cc: dick , 44466@debbugs.gnu.org >> >> What I want with that patch is that if some key is pressed on read-only = area in non-read-only buffer, then >> quail should do what it does as if buffer marked as read only, i.e. no i= nput method translations are done, and >> all single char bindings continue to work. > > 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. > >> Possible we need to check front-stickyness of the char at point along wi= th 'read-only property: >> >> .. >> (and (get-char-property (point) 'read-only) >> (get-char-property (point) 'front-sticky))) > > Does this solve the problem in this case? Yes, because this mimics what is done in verify_interval_modification() function from textprop.c. 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. -- lg