From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marco Wahl Newsgroups: gmane.emacs.bugs Subject: bug#31061: 27.0.50; next-page of page-ext non-functional in dired Date: Sun, 29 Apr 2018 22:23:13 +0200 Organization: Marco Wahl Message-ID: <84sh7dahji.fsf@gmail.com> References: <84bmezxd5k.fsf@gmail.com> <874lk0rr3f.fsf@gmail.com> <84k1ss3m33.fsf@gmail.com> <87sh7eq37k.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525033325 8954 195.159.176.226 (29 Apr 2018 20:22:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2018 20:22:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31061@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 29 22:22:01 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 1fCspc-0002Cj-Ul for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2018 22:22:01 +0200 Original-Received: from localhost ([::1]:56690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCsrj-0006UC-SX for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2018 16:24:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCsrd-0006Sv-CN for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 16:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCsra-00017J-5U for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 16:24:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCsrZ-00017A-WF for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 16:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCsrZ-0006FR-NS for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 16:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marco Wahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Apr 2018 20:24:01 +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.152503340323964 (code B ref 31061); Sun, 29 Apr 2018 20:24:01 +0000 Original-Received: (at 31061) by debbugs.gnu.org; 29 Apr 2018 20:23:23 +0000 Original-Received: from localhost ([127.0.0.1]:43190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCsqw-0006ES-Rs for submit@debbugs.gnu.org; Sun, 29 Apr 2018 16:23:23 -0400 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:50379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCsqv-0006EG-QS for 31061@debbugs.gnu.org; Sun, 29 Apr 2018 16:23:22 -0400 Original-Received: by mail-wm0-f45.google.com with SMTP id t11so10081250wmt.0 for <31061@debbugs.gnu.org>; Sun, 29 Apr 2018 13:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version; bh=2GQ26evLT6HTJZFRFI260VeyGEOXnWBMfMFvUSdBLFY=; b=JvgrFa0IspYClhfrDQh8PxJhnBlnz9c+8jEPEQDD5ah8swz5bemRl+c6P0nwSSBtyE MI4FhW7RGac+mlyLx8wFXs60Fauc4fyUgQmuDWIYggYqVKaTVgrvuqkh6LlH8+DcYlw0 5Vdpdx32acDabks/yhSUKlC/viPKYV4OQHjMwNWoyGRG68GVNbE/7/Wrb9HyMAhx8vN/ P2YTCET/a8++kd1bJZlh0RtcQE8w+p4BPjLzQ4zXvFvfhyKITZzRhN7tqLbGszuyueoL 0JoYqFKH8wd8GD9j5/O5ogyVVfYqSWn3YMYkZZO1vDJKVU1nvZnFXjLjNdHsr1pX32H4 hzkQ== 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:organization:references:date :in-reply-to:message-id:user-agent:mime-version; bh=2GQ26evLT6HTJZFRFI260VeyGEOXnWBMfMFvUSdBLFY=; b=UD+k/k9v4B89YIs+Jp48oyybrI0hF01wLF8ElCQaQRi+RUHUwUv4rl15sWvFRgZSA7 y/Ys6CKfRe/ukt97ILicIffq1lt1tGmayeamH6QK4F7l6Bg+8t5cg8AQyyKVaDLSjYCN QiAlHGdBt60D0UOgOjNzKzSSyxG85cknlmiSiCS4Ic8AhPKwQI9Iu0lZd8U7VfQIqc3y rLr78gXOb0PLlatQ8HXrP30PYWPWAcomg1taHPs35JUP0+LASQVTZpe1vkLZ4PWUugTs 4omCrIDN3S2Lak4NCeyFhtAhfIPX46drT+SKXLEGu8gTvtUmnU59eBoqi52odeSHpREc CwHw== X-Gm-Message-State: ALQs6tC+ZbjPP+9tlXxM2upjMx1Xa3o8hhy/I79iOLla00XqVERRUKGJ /YCnYJ8Go50J15Aab8bHWVM= X-Google-Smtp-Source: AB8JxZraD5AyW6bRwaHc1P3ccg36H8HWfcTttF3eK85zdcoYS/jOTgdWiX/c8ZIrvO3PhK9X4aNFDQ== X-Received: by 10.28.195.134 with SMTP id t128mr5920962wmf.113.1525033396147; Sun, 29 Apr 2018 13:23:16 -0700 (PDT) Original-Received: from tm6592 (p200300ED5BC18852F56E98D4A7210073.dip0.t-ipconnect.de. [2003:ed:5bc1:8852:f56e:98d4:a721:73]) by smtp.gmail.com with ESMTPSA id 4sm6763055wmg.40.2018.04.29.13.23.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Apr 2018 13:23:15 -0700 (PDT) In-Reply-To: <87sh7eq37k.fsf@gmail.com> (Noam Postavsky's message of "Sat, 28 Apr 2018 20:13:51 -0400") 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:145837 Archived-At: Noam Postavsky writes: > 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. I fully agree that one might like the separator to be part of the page. This might help e.g. for killing and yanking. Actually I tend towards excluding any separator when narrowing to a page. I see a document as sequence like ... and the content is all I'd expect when narrowing to a 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. Cool. Best regards!