From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31061: 27.0.50; next-page of page-ext non-functional in dired Date: Sat, 28 Apr 2018 20:13:51 -0400 Message-ID: <87sh7eq37k.fsf@gmail.com> References: <84bmezxd5k.fsf@gmail.com> <874lk0rr3f.fsf@gmail.com> <84k1ss3m33.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524960727 25626 195.159.176.226 (29 Apr 2018 00:12:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2018 00:12:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 31061@debbugs.gnu.org To: Marco Wahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 29 02:12:03 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 1fCZwg-0006XN-KK for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2018 02:12:02 +0200 Original-Received: from localhost ([::1]:53952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCZyl-0002i4-OE for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Apr 2018 20:14:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCZyf-0002d0-PT for bug-gnu-emacs@gnu.org; Sat, 28 Apr 2018 20:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCZyc-0003HM-L6 for bug-gnu-emacs@gnu.org; Sat, 28 Apr 2018 20:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34501) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCZyc-0003HI-H8 for bug-gnu-emacs@gnu.org; Sat, 28 Apr 2018 20:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCZyc-0001SF-2s for bug-gnu-emacs@gnu.org; Sat, 28 Apr 2018 20:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Apr 2018 00:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31061 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 31061-submit@debbugs.gnu.org id=B31061.15249608405577 (code B ref 31061); Sun, 29 Apr 2018 00:14:02 +0000 Original-Received: (at 31061) by debbugs.gnu.org; 29 Apr 2018 00:14:00 +0000 Original-Received: from localhost ([127.0.0.1]:42398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCZya-0001Rt-IJ for submit@debbugs.gnu.org; Sat, 28 Apr 2018 20:14:00 -0400 Original-Received: from mail-io0-f175.google.com ([209.85.223.175]:40816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCZyZ-0001Rg-5M for 31061@debbugs.gnu.org; Sat, 28 Apr 2018 20:13:59 -0400 Original-Received: by mail-io0-f175.google.com with SMTP id g14-v6so2873550ioc.7 for <31061@debbugs.gnu.org>; Sat, 28 Apr 2018 17:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=1WN3DesgJ1S7SxKwSsgMxGvhICGpQvbQnjFEfUowzPM=; b=OcWst5nC7uqjsq2h32RsBsjEHbZ9Q+QctNmxjtdjQYN602c1dNao6SgjzQfg20mk7C 4uRgpHN7gj7dAfxbW6Vct/pshNa8R6R2GTHX80HYMqTWiM/BxGnmKomx0HHD5lFn4dB6 P61sGaljxvL0KwxCrfmiHFAqQvZJiHOovE3rrN6aMMbrsVAnhaeM3R4rswitVOUvAMzL Qq+oRUtaNwGLosQ0zY7nb1GWfUFk+BRk3cYtfuj8QI8datzpSXAeyPYRx4yH5oARjyru w6fQL2yfABU4yvtBGKGhYTCZsBuXTMBfPe1YnlQerVGKz/16l5294wHPoRwDRAwu3+ps ZqvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=1WN3DesgJ1S7SxKwSsgMxGvhICGpQvbQnjFEfUowzPM=; b=MmzyMt1mecIxQpxe3QUcAMCfPhQpsbVK1K8/nm5MIx9OjeXJ66A8WK104kIW+vK0Df KBYJRDgh5g+wSfZVDyVZ6bKJcEctbDULySRdP+eX880Q2nEEH6n6q8w1BKfJkQnt0OFY yedyM9YpFEfXHZ4/92tfDaFWdW18Gy2IQU2O/9osa7pWdOU0J0ZHs7hUjf4mP7KOysFZ hATSRHsqydWSYtTeRIBd3bvj8n7JyaYZZfibgPnJejDaHCX5tH/F8LGnsZAiED9YYU+5 spVw5OlD503Xg1WzO8vyv5MXPyByS2c5lufBeSST8Y5OiPy9EU+gyJoA9q/8L5gzEWF6 gshQ== X-Gm-Message-State: ALQs6tCWf4FMHRGqqQtpwrTpEY+VC4AYlKz1RNWpeyHmkiQL6F2Fd4/C VEDlVVp9xxd726LHJwfjyN4HPQ== X-Google-Smtp-Source: AB8JxZoXVrqgUYbwvyKaDfQfblm5NU2D/eA6U3Qs/yq2rYTGDKyzh53CnrZbjTVpRiMgbl5a03wLsg== X-Received: by 2002:a6b:8668:: with SMTP id i101-v6mr7307842iod.273.1524960833436; Sat, 28 Apr 2018 17:13:53 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id i12-v6sm2220386iod.85.2018.04.28.17.13.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Apr 2018 17:13:52 -0700 (PDT) In-Reply-To: <84k1ss3m33.fsf@gmail.com> (Marco Wahl's message of "Fri, 27 Apr 2018 13:50:08 +0200") 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:145815 Archived-At: Marco Wahl writes: > I found that with your suggestion next-page with negative argument goes > back one page too much in a dired buffer, though. > > I further think that the core of the irritation is that `narrow-to-page' > does not narrow to the following page when on the start of the '\n\n' > page-separator (unlike for the usual '^^L' separator). As far as I can tell, narrow-to-page still has the same problem with the default "\n\f" separator as the "\n\n" one. It's just that the problem is more visually obvious in the dired case. Using thingatpt seems to work better (but this doesn't handle the COUNT argument for narrow-to-page): (let ((bounds (bounds-of-thing-at-point 'page))) (narrow-to-region (car bounds) (cdr bounds))) Though I guess it might be arguable whether the page separator should count as part of the page or not. The above expression (and `mark-page') treat the separator as part of the preceding page, `narrow-to-page' seems to exclude the separator from the page. > Starting with your fix I propose this modification of the else part: > > (while (and (< count 1) (not (bobp))) > (if (re-search-backward page-delimiter nil t) > (when (= count 0) > (goto-char (match-end 0))) > (goto-char (point-min))) > (setq count (1+ count))) > > This is: go to the end of the delimiter when the final page has been > reached. Yeah, that works.