From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33384: [PATCH] Fix zone.el when window is at the bottom of the buffer Date: Fri, 16 Nov 2018 16:42:05 +0200 Message-ID: <838t1tuls2.fsf@gnu.org> References: <20181114154802.16132-1-thomas.de.beauchene@gmail.com> <83a7m976rw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542379272 11846 195.159.176.226 (16 Nov 2018 14:41:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2018 14:41:12 +0000 (UTC) Cc: 33384@debbugs.gnu.org To: Thomas de Beauchene Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 16 15:41:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNfIw-0002z5-Sg for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Nov 2018 15:41:06 +0100 Original-Received: from localhost ([::1]:45125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNfL2-0002OB-VK for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Nov 2018 09:43:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNfKt-0002Nw-08 for bug-gnu-emacs@gnu.org; Fri, 16 Nov 2018 09:43:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNfKo-0007Sq-3l for bug-gnu-emacs@gnu.org; Fri, 16 Nov 2018 09:43:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50653) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNfKn-0007S6-Vo for bug-gnu-emacs@gnu.org; Fri, 16 Nov 2018 09:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNfKn-0002Fl-Mz for bug-gnu-emacs@gnu.org; Fri, 16 Nov 2018 09:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Nov 2018 14:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33384-submit@debbugs.gnu.org id=B33384.15423793488604 (code B ref 33384); Fri, 16 Nov 2018 14:43:01 +0000 Original-Received: (at 33384) by debbugs.gnu.org; 16 Nov 2018 14:42:28 +0000 Original-Received: from localhost ([127.0.0.1]:54911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNfKF-0002Ei-LX for submit@debbugs.gnu.org; Fri, 16 Nov 2018 09:42:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNfKD-0002ES-It for 33384@debbugs.gnu.org; Fri, 16 Nov 2018 09:42:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNfJy-0006ss-Uc for 33384@debbugs.gnu.org; Fri, 16 Nov 2018 09:42:17 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNfJy-0006sk-RR; Fri, 16 Nov 2018 09:42:10 -0500 Original-Received: from [176.228.60.248] (port=2523 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gNfJy-0003Pg-9y; Fri, 16 Nov 2018 09:42:10 -0500 In-reply-to: (message from Thomas de Beauchene on Fri, 16 Nov 2018 12:04:39 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152458 Archived-At: [Please keep the bug address on the CC list; use "Reply to All". > From: Thomas de Beauchene > Date: Fri, 16 Nov 2018 12:04:39 +0100 > > Thanks for the swift response. > > It is an issue that I am facing since I started using zone, when they > integrated it in Spacemacs a few month ago. Anytime the window is past the > buffer end (like the end of the buffer in the middle of the window) instead > of starting, Zone just throws an error: > > let: Args out of range: #, 21124, 22313 > > When I investigated I pinpointed the error to this exact line that I'm > patching. The numbers *do* correspond to the values of (window-start) and > (window-end). I then started playing around with it in a scratch buffer, > and (window-end) would always return the size of the buffer plus one, which > would always make (buffer-substring) throw an error when I ran it in > eval-expression. > > Again, I had this behaviour in Spacemacs, so with a lot of packages and > code on top of Emacs. I will try today to figure out the exact conditions, > why you don't reproduce while I do. Already I could reproduce in zone.el.gz > but not in *Messages* today. > > Any idea of what could alter the return value of (window-end) ? Some defadvice, perhaps?