From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46933: Possible bugs in filepos-to-bufferpos / bufferpos-to-filepos Date: Thu, 01 Apr 2021 18:32:45 +0300 Message-ID: <83zgyif2aq.fsf@gnu.org> References: <87sg4arq9x.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10508"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, 46933@debbugs.gnu.org To: handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 01 17:35:02 2021 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 1lRzLZ-0002Yw-RL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 17:35:01 +0200 Original-Received: from localhost ([::1]:40582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRzLY-0004YQ-P5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 11:35:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRzKc-0003Zz-Fs for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 11:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRzKc-0004st-5c for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRzKc-0003Rb-0w for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Apr 2021 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46933 X-GNU-PR-Package: emacs Original-Received: via spool by 46933-submit@debbugs.gnu.org id=B46933.161729119113176 (code B ref 46933); Thu, 01 Apr 2021 15:34:01 +0000 Original-Received: (at 46933) by debbugs.gnu.org; 1 Apr 2021 15:33:11 +0000 Original-Received: from localhost ([127.0.0.1]:58332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRzJn-0003QS-Jf for submit@debbugs.gnu.org; Thu, 01 Apr 2021 11:33:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRzJl-0003QF-K6 for 46933@debbugs.gnu.org; Thu, 01 Apr 2021 11:33:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56670) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRzJg-0004J9-8n; Thu, 01 Apr 2021 11:33:04 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3623 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lRzJe-0001Sy-Mz; Thu, 01 Apr 2021 11:33:03 -0400 In-Reply-To: <87sg4arq9x.fsf@gnu.org> (message from handa on Fri, 02 Apr 2021 00:14:02 +0900) 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:203432 Archived-At: > From: handa > Cc: gregory@heytings.org, 46933@debbugs.gnu.org > Date: Fri, 02 Apr 2021 00:14:02 +0900 > > In article <83tuovmivc.fsf@gnu.org>, Eli Zaretskii writes: > > > > Any coding system can have :post-read-conversion and > > > :pre-write-conversion functions, it is not guaranteed that encoded byte > > > length is greater than the number of characters. > > > Agreed, but AFAICT, ISO-2022-JP doesn't have any of these attributes, > > right? > > Yes, but one can add them by coding-system-put. Leaving the :pre-write/:post-read-conversion use case aside, do we have some means of find where ISO-2022 shift-in/out sequence begins and ends, so that we never try to decode a partial sequence (and produce "characters" that are not really in the original buffer)? If not, where can I find the description of every kind of such sequences, i.e. sequences that modify the decoder state without producing any characters? (UTF-8 has the same issue, btw, but in that case we have a simpler solution.)