From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer Date: Wed, 11 Aug 2021 20:42:08 +0200 Message-ID: <87eeazq0vz.fsf@gnus.org> References: <877e8q2mc7.fsf@halibut> <87o91zs2sm.fsf@halibut> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7940"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 36573@debbugs.gnu.org To: Rupert Swarbrick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 11 20:43:13 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 1mDtC3-0001oH-Mn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 20:43:11 +0200 Original-Received: from localhost ([::1]:53550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDtC2-0007pi-G5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 14:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDtBu-0007or-DX for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 14:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDtBu-0000IU-3Q for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 14:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDtBt-0003MO-TL for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 14:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Aug 2021 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36573 X-GNU-PR-Package: emacs Original-Received: via spool by 36573-submit@debbugs.gnu.org id=B36573.162870734212851 (code B ref 36573); Wed, 11 Aug 2021 18:43:01 +0000 Original-Received: (at 36573) by debbugs.gnu.org; 11 Aug 2021 18:42:22 +0000 Original-Received: from localhost ([127.0.0.1]:36606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDtBG-0003LD-0f for submit@debbugs.gnu.org; Wed, 11 Aug 2021 14:42:22 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:32808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDtBD-0003Kw-NW for 36573@debbugs.gnu.org; Wed, 11 Aug 2021 14:42:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1cOtO1NswW7G/dj/17E6+OjQBq6WPoMmdeBATFLka7A=; b=eK2Ky8VM+S6skLUrFoZXrRDvKD Lt1sDKZvHPcuhTp/ffAffLqDbtQtlDmRMOuIXcMjFvL1fqdy+DlLWo+W+YNFCCG2BYEf3+32QpWCw 2/AVGBZH/3ue+Uphf4rpytQ8cEd5BFjpXigvnbc027iloikUAvxf8GLVuqKux1eOVdd8=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDtB3-00038u-1U; Wed, 11 Aug 2021 20:42:13 +0200 In-Reply-To: <87o91zs2sm.fsf@halibut> (Rupert Swarbrick's message of "Fri, 12 Jul 2019 16:14:33 +0100") 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:211623 Archived-At: Rupert Swarbrick writes: > Thank you for the reply. I've now found the "culprit" (bisecting my > init.el starting with emacs -Q). The dubious setting was: > > '(file-coding-system-alist > (quote > (("\\.dz\\'" no-conversion . no-conversion) (etc) Even with this setting, I'm not able to reproduce the problem. It would be helpful with a recipe, starting from "emacs -Q", to verify that we're fixing this in the correct way. > I think it probably still makes sense to add a note to the manual for > bufferpos-to-filepos and filepos-to-bufferpos to point out that they > don't work if the line ending convention is unknown. Well, manual does say that the coding system has to be known (which implies that the line ending convention should also be known)... > For bonus points, maybe it makes sense to add something to fail > earlier (and more understandably!) in the info reading code. I'm not > sure exactly where that would be, though. I think those functions probably shouldn't signal an error in this situation if asked to do an approximate calculation (but just guess at a one-byte ending), perhaps. But give a better error message when asked to do an exact calculation. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no