From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Aug 2018 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 32378@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15335894308353 (code B ref -1); Mon, 06 Aug 2018 21:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Aug 2018 21:03:50 +0000 Received: from localhost ([127.0.0.1]:42950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmmfM-0002Ae-EH for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:03:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmmfK-0002AN-JF for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:03:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmmfE-00011u-4y for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:03:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fmmfE-00011q-0w for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:03:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmmfC-00063D-H7 for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmmf9-0000z3-Dm for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:03:38 -0400 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:35464) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmmf9-0000yK-2K for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:03:35 -0400 Received: by mail-oi0-x236.google.com with SMTP id m11-v6so24768720oic.2 for ; Mon, 06 Aug 2018 14:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=YNiYSM4SS8SPG9LStmrmwrtDA8vw7juUA6tzsR0zhpE=; b=KCN9ImzUSoNBJ2/WaGpzYiZMjJNQHUfM8BugXPSM6c2DUCGJCfT5FLDD8uq6WTJN0s Dq2gRwx3WVc8k4dPJ2SJi6N7MkACMqbJ6QC/iMbbWGnc/2T+mEEIE/aMV7X2ma/twGpv JSswcQicdFjI29scACU4eQOGgE8HGPzD1QaMJUG+2pGE3A/47uPkWKdlI9eJ3LGiOh83 Mxng60XeotStI6X3yORJEUlzN9Ro5phzLR9FaKiWLupbOYHZ/vZrumwOgbWjLwxcGeXK wpc86+sPiYtKfPNC6XVRxY+a6rktUwk05eyTr4TBYKZrwdywzxzuOG5/SclByfF5ygnO MPCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=YNiYSM4SS8SPG9LStmrmwrtDA8vw7juUA6tzsR0zhpE=; b=iqMueuNQw0+3etpUp68+BIp0Ovkdo2m/y0XvongfFsfbTFW+k/DZQL0eJJx63dj5Xr J14Puv3MP/j+txvgJhHagAXLEKDFIKqsOnaImS1oGzaih/VJRWxoZB57fRRC0WueibWt R6YDgQR2NXIB1okhkCEAXHDw/f1jTblgGhTnIv2HB+eHUed2WflSIc0YIavMv260NdtL rK8NuTJhcY9GtzPckSr/3+hWQL6kfGYZgGOxfMKBo03PCFEvPbNvrERhcnXVoUMW9z2I QpcT9IlX2GW9yC9/+ftTXU6T18dgLpRXD62MypO9rVvho1dFTW6XpJ5td+tZfZ0Ka7M5 kJhw== X-Gm-Message-State: AOUpUlG8KJLZv/TdMNpIB5HTJoheilZw+3NzD1fnNdCdovOgfVfg6gBT 5DCDReZe0YmnM/BElATc19+6u/TPkI4= X-Google-Smtp-Source: AAOMgpdfXZrs6+wXTlh+r/M9PTxRXuApLCM1jYHQbJjrgnrNyXjHiJrx8djPGT7m0VepgxRJ8TBILQ== X-Received: by 2002:aca:c484:: with SMTP id u126-v6mr16893350oif.209.1533589413736; Mon, 06 Aug 2018 14:03:33 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id o125-v6sm20392685oig.44.2018.08.06.14.03.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Aug 2018 14:03:32 -0700 (PDT) User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham Date: Mon, 06 Aug 2018 16:03:30 -0500 Message-ID: <87lg9jcin1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain This patch adds two functions in bibtex-modeto navigate forward or backward by entry. I also bind them to M-{ and M-} because the paragraph forward/backward commands in bibtex-mode just go up and down single lines, which you can just use C-n/p to do more easily. Let me know if something looks off. Thanks, Alex --- >From 406d6d438f890adb03a77c1bc15096db68f13fa7 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 5 +++++ lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 21887f5bfd..a3c06a3cb5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -232,6 +232,11 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 ++++ +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry +They are bound to M-{ and M-} in bibtex-mode-map. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..966e774ae5 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km "\M-\}" 'bibtex-next-entry) + (define-key km "\M-\{" 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,20 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward." + (interactive "p") + (bibtex-end-of-entry) + (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward." + (interactive "p") + (bibtex-beginning-of-entry) + (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-textmodes-bibtex.el-New-functions-bibtex-next-p.patch >From 406d6d438f890adb03a77c1bc15096db68f13fa7 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 5 +++++ lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 21887f5bfd..a3c06a3cb5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -232,6 +232,11 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 ++++ +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry +They are bound to M-{ and M-} in bibtex-mode-map. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..966e774ae5 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km "\M-\}" 'bibtex-next-entry) + (define-key km "\M-\{" 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,20 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward." + (interactive "p") + (bibtex-end-of-entry) + (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward." + (interactive "p") + (bibtex-beginning-of-entry) + (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-=-- From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Aug 2018 02:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.15336081279197 (code B ref 32378); Tue, 07 Aug 2018 02:16:01 +0000 Received: (at 32378) by debbugs.gnu.org; 7 Aug 2018 02:15:27 +0000 Received: from localhost ([127.0.0.1]:43059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmrWx-0002OG-51 for submit@debbugs.gnu.org; Mon, 06 Aug 2018 22:15:27 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:36050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmrWv-0002O2-Nq for 32378@debbugs.gnu.org; Mon, 06 Aug 2018 22:15:25 -0400 Received: by mail-io0-f181.google.com with SMTP id r15-v6so12758638ioa.3 for <32378@debbugs.gnu.org>; Mon, 06 Aug 2018 19:15:25 -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=r+81FT66xnxTO98sTS+N2o+jt//133QNEkjeHOgg8WE=; b=twp9MrwhKIZiUsA1H69N6BELelIhFizfTEzJb9YKMkbnonm/mMnRR4rAfpQj7fYUmv ifqkHJ8ERDFySs++ET9PiP4gw6DBPTqlhWMYmBC4tzTAD+zQOTWHhhU4H7Y4SAiLZsxW mkJqjFtnUbj2k7Axw0BclWrOXFxPqjlfCR4+plYPEh4dTMTAK25EXyt4Eo/9gai2wupU B7nlQftohs1sBiptr+EpfuztHBiACZAVKcitLFAaQa3L9ROqv7e4SJtjQSjxTGMPf2Wo tq70Xk9fWYC1w3qLaNAY2z5Wt5L/bL5d4omHP4JCnlpOpJFLBIpeIf0OzUA/AVaVoIVf +x2Q== 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=r+81FT66xnxTO98sTS+N2o+jt//133QNEkjeHOgg8WE=; b=WvhmnXQ/Bbyh9xP/YEFDa7F+772alcQs0wh4rdfApucwP7dAOwP6x6dXDSBaUbQ3+p U3kPrE6pQLfg0AxPYVRpJg2a3jYL5w36JpjLbXQ7n5YvRbuMqEQILxXJwtm2BPmyhSU8 Ero9kPU6iUJ/J9T20PVJmkKFkP49zZt/arui2O5eyjmxrf1GjV9qzaZFfUzIAYIOpCXt ADCR2xE3cUF3GqT+GoXkr90XuVOtAjqkUa6QDGwuTKrqAMbBHKsIMiFpMRiWuE3jRKuO Kr4mQRk/KUm2JSPrHJU0VxDPiVQhasvJ6cC6jETeZn51YUPJVMp/DCI/GpEgcpWycbvu PEGw== X-Gm-Message-State: AOUpUlHY1EWFq411OcgO8PFQKlRftvMwMTS08dpcrSCAyduWIXkQLQZf lC8WWOLuCtg3F5VZRNHw9L8MB+Pv X-Google-Smtp-Source: AA+uWPxOhqDKIYN50IuWKocm2RHVJclr3YxpsuAmalP0koiDEwKGEuSvNzZiwBD1ECzErt+SPoM48w== X-Received: by 2002:a6b:1410:: with SMTP id 16-v6mr2876049iou.23.1533608119990; Mon, 06 Aug 2018 19:15:19 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id n142-v6sm6893540itb.3.2018.08.06.19.15.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Aug 2018 19:15:19 -0700 (PDT) From: Noam Postavsky References: <87lg9jcin1.fsf@gmail.com> Date: Mon, 06 Aug 2018 22:15:18 -0400 In-Reply-To: <87lg9jcin1.fsf@gmail.com> (Alex Branham's message of "Mon, 06 Aug 2018 16:03:30 -0500") Message-ID: <87d0uuylah.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Branham writes: > +(defun bibtex-next-entry (&optional arg) > + "Move point ARG entries forward." > + (interactive "p") > + (bibtex-end-of-entry) > + (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) > + (goto-char (match-beginning 0))) > + > +(defun bibtex-previous-entry (&optional arg) > + "Move point ARG entries backward." > + (interactive "p") > + (bibtex-beginning-of-entry) > + (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) > + (goto-char (match-beginning 0))) You forgot to check the return value of re-search-forward/backward, if there is no match then (match-beginning 0) might return something unexpected. Alternatively, if you don't expect the match to fail, pass nil for NOERROR. From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Aug 2018 09:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153363360819987 (code B ref 32378); Tue, 07 Aug 2018 09:21:01 +0000 Received: (at 32378) by debbugs.gnu.org; 7 Aug 2018 09:20:08 +0000 Received: from localhost ([127.0.0.1]:43175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmy9w-0005CI-5O for submit@debbugs.gnu.org; Tue, 07 Aug 2018 05:20:08 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:33756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmy9t-0005Bc-Ox for 32378@debbugs.gnu.org; Tue, 07 Aug 2018 05:20:06 -0400 Received: by mail-wr1-f46.google.com with SMTP id g6-v6so15065001wrp.0 for <32378@debbugs.gnu.org>; Tue, 07 Aug 2018 02:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RN4ZC/TLcuuBLPL1fJggJVsPbmPjI1WcPg2HQgFAogg=; b=EZ67cb2NydP4QbX/BfAOLNGLTpArih3lvlI18fvtvqQm3+GILO/uW7vWaUm0WoO2Fv F8zOWYeKSUVLi9GItgZEb65hVrFt56ZRyrqQQGWiJC/6IxB9+bMEYSmcQGuVmQnwYfZ2 T50z+hyvLwGEm5gCdvW0LxL/DruLaJioLusu6ElJ5KdGxJUY7ufSfXpkYUmudBHV9xiW P8vMjc5HsKDBX36HpxTUZQjJGWRvjmb8frcCT+ObC8D4I8nbQIUJFQVAD8OU6DEEf7Tp UwZTNqYdfpbzZePvXoYwJOEk19LDeKsSwvir73C4dlFDAtALzGN6MDZ66afDilwmk5hU 6ITA== 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=RN4ZC/TLcuuBLPL1fJggJVsPbmPjI1WcPg2HQgFAogg=; b=NHoOBD+PUOaFipGcBmJuax3OdpdrWoXLNd+WxOJcTMZYhBeXoXnURmzf/gx26jXAxL 96t3cWnUAMKzIpV3h7/q6IkM9uEYnSpkBaclDDW2Bk+gRnH4XYwGgC9L8NRWIiDL4E22 v/EIlnVYx9PM8INdblj0+6Yf+ISb+L31w4H5ODwyMk61lbDpoBPOrG31fRlAwbvCVloh OK8Hu+vMKKamXocZcj/l4gRFGK+UYQe49DpggQ1/GWaKBOyLWQK7+2i6WvvB3IfZXtc5 pBc75malA3t2R8DLefIew0C8Co/G7+gYoxe0c75WM17xv9iv4jFBX1pZddLsJD0JlLnN xbQw== X-Gm-Message-State: AOUpUlHl6DgZf5sJtmQoBCNvqEcJl7QVSxYPA9L95/Bt74bJ8VcctGvp Lr0/xANKoGnje1Qpr/9yGwYJNQ== X-Google-Smtp-Source: AAOMgpdKWtR8YKuI6T25IotcfkhkJY6aK1d4oyWNkqtRqXMT+HggeBNRr+GYB3ReSNQlQYolflMB1A== X-Received: by 2002:adf:9366:: with SMTP id 93-v6mr12280498wro.60.1533633600037; Tue, 07 Aug 2018 02:20:00 -0700 (PDT) Received: from localhost (adsl-213.91.140.88.tellas.gr. [91.140.88.213]) by smtp.gmail.com with ESMTPSA id m207-v6sm1364232wma.31.2018.08.07.02.19.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Aug 2018 02:19:59 -0700 (PDT) From: "Basil L. Contovounesios" References: <87lg9jcin1.fsf@gmail.com> Date: Tue, 07 Aug 2018 12:19:46 +0300 In-Reply-To: <87lg9jcin1.fsf@gmail.com> (Alex Branham's message of "Mon, 06 Aug 2018 16:03:30 -0500") Message-ID: <87effa7cul.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Branham writes: > This patch adds two functions in bibtex-modeto navigate forward or > backward by entry. > > I also bind them to M-{ and M-} because the paragraph forward/backward > commands in bibtex-mode just go up and down single lines, which you can > just use C-n/p to do more easily. Are these commands (or could they be made) suitable for use with beginning-of-defun-function and end-of-defun-function, as discussed in the following messages? https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00820.html https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00821.html Thanks, -- Basil From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Aug 2018 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153364702216361 (code B ref 32378); Tue, 07 Aug 2018 13:04:02 +0000 Received: (at 32378) by debbugs.gnu.org; 7 Aug 2018 13:03:42 +0000 Received: from localhost ([127.0.0.1]:43230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn1eH-0004Fp-Qx for submit@debbugs.gnu.org; Tue, 07 Aug 2018 09:03:42 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:41215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn1eG-0004Fa-2g for 32378@debbugs.gnu.org; Tue, 07 Aug 2018 09:03:40 -0400 Received: by mail-oi0-f66.google.com with SMTP id k12-v6so28206045oiw.8 for <32378@debbugs.gnu.org>; Tue, 07 Aug 2018 06:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=KKPxKuh6c5uKRsIv6mZXfVQbZ81GW7Q/gspk/B9E+Es=; b=Up8jA5rgdbKNcu/dufJzXRt040WVJ2paBBJvm5xrAJwi7BgzPxoD9NNBUOnt3CBL04 fyEtsm6yuLUl+eSrD2B4rFE2uZjsnyiB9N+D5Hfmq8NpYDMJplvn0w5J+7ucAhGnS1vA 0xXyOUJuo93C6EHNoCyt16br5Zxpy0wry4jH64QEfLYQQaqueIQ3rA+YVGLRqY5y+CHI A3Xn2f97GYapvKqzffKsTpOv8x7M11uDpAtVhoDg61rUpUFnGc3BidYbVdUk9AMYu7pl E3sQ80Dn+M5EmUndryrpdzWopZfrZJSTbJV8M0OEVwsoj6TJuFY1R/dVaI9lNywUD7e7 xcwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=KKPxKuh6c5uKRsIv6mZXfVQbZ81GW7Q/gspk/B9E+Es=; b=Ru94avxzRPP/iuk+08kBcSItjIzEjVvuMqjq0EMnC1isFJrDiyLAv3ljw2hLZugkhT XkH3EtMQJb3Qra4FfeSD/xQcvrb4vt8TzwS9+3Lo10zNHYR72+dxaRqCY8Uv8sUMRAik xlxZ8uuciFnN6bD0N+EiEe8LAFqus36WJKzwfaU8ll+jPLQv1PdmvifRVu1emrU8L7f1 q+49G2mL5pNQsBSQcZs0dLYXuEyJrC2cPRRpki+wMlU3lotGlr6VnO1YoOgKlXNBJjc7 6UFfgm/Z01IYwBRf5lk5tkVL+7XVTCu4LGgWy8NvQwRPLz/xgp1A7yeoNq+20Aggnhxr 1MHg== X-Gm-Message-State: AOUpUlEu3ELRhJjqQVrqXI7aV5SfOPxNIZMeRxrZxYXqGSd+rmCPNuag DB8B++4vz/C8sqhNLcG6r+GgZthMDYA= X-Google-Smtp-Source: AA+uWPwbKYN+ObIJFwviIwDcGwhFuImuGn8tg6YFOiwc0lq/hKOgkYNNBr33s+CVw4/Kzd11yXL6LQ== X-Received: by 2002:aca:cf97:: with SMTP id f145-v6mr19835306oig.131.1533647014004; Tue, 07 Aug 2018 06:03:34 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id m203-v6sm1110977oig.42.2018.08.07.06.03.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Aug 2018 06:03:33 -0700 (PDT) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham In-reply-to: <87d0uuylah.fsf@gmail.com> Date: Tue, 07 Aug 2018 08:03:31 -0500 Message-ID: <87mutytjks.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On Mon 06 Aug 2018 at 21:15, Noam Postavsky wrote: > You forgot to check the return value of re-search-forward/backward, if > there is no match then (match-beginning 0) might return something > unexpected. Yes, totally forgot that. Updated with new patch which just wraps that in a call to when. > Alternatively, if you don't expect the match to fail, pass nil for > NOERROR. The match can fail if point is at the beginning/end of the buffer, so I think NOERROR needs to be non-nil. --- >From 3720b4a53bece9ddfde526093e3a537a1dace5e5 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 5 +++++ lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 21887f5bfd..a3c06a3cb5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -232,6 +232,11 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 ++++ +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry +They are bound to M-{ and M-} in bibtex-mode-map. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..56352bd20e 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km "\M-\}" 'bibtex-next-entry) + (define-key km "\M-\{" 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,20 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-textmodes-bibtex.el-New-functions-bibtex-next-p.patch >From 3720b4a53bece9ddfde526093e3a537a1dace5e5 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 5 +++++ lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 21887f5bfd..a3c06a3cb5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -232,6 +232,11 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 ++++ +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry +They are bound to M-{ and M-} in bibtex-mode-map. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..56352bd20e 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km "\M-\}" 'bibtex-next-entry) + (define-key km "\M-\{" 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,20 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-=-- From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Aug 2018 13:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: "Basil L. Contovounesios" Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153364724216766 (code B ref 32378); Tue, 07 Aug 2018 13:08:02 +0000 Received: (at 32378) by debbugs.gnu.org; 7 Aug 2018 13:07:22 +0000 Received: from localhost ([127.0.0.1]:43239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn1hp-0004MM-T4 for submit@debbugs.gnu.org; Tue, 07 Aug 2018 09:07:22 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:41990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn1hn-0004M6-H6 for 32378@debbugs.gnu.org; Tue, 07 Aug 2018 09:07:20 -0400 Received: by mail-oi0-f47.google.com with SMTP id b16-v6so14892569oic.9 for <32378@debbugs.gnu.org>; Tue, 07 Aug 2018 06:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=nZWeeL+UxKMxbw2+x1jJ/3WpXdqmYNPL3Bk/+70KY4w=; b=RtEKu8sZzcHGvktuijBHEUR8FuqunkMebU9KfVXQVeevvM3YKNYODTxFZhjCt23mRZ VbyIpBT+aIJPImGPuTVf2nVZKwkqripaXxwlUlkzWScppB9q3lslkx6hghEYa1ZJwkP7 ylHUjBX+18+RTkBUR24hV3MaGZqzlV0pJowNFwGUD5jH2MpnB5Rjd57t1dHw0a9/u8te Dt5LlRhhpmXSRS7+/QHKRvxgqfEJva7Yw/Ze0ZS0uwhcl2kzratwbyMqpKs3+DAj1Ce1 ymYV4Klh9diALVRFedU+dnrazUk76qo4At1ggbahDu8fBo4qBmabaKTA5NZP8DRi7x3X GQkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=nZWeeL+UxKMxbw2+x1jJ/3WpXdqmYNPL3Bk/+70KY4w=; b=afS42AIwnBnN5Om1bFPU6bheryyhBl7JPYzo7P949qQNpikH44Yhv12QznoI7uCnX4 ewrXSwFATD09vxtXJs80qD+8oKKyGMnYdYls+LRq3uIA2Ekz8zOq6xjNwV4G1rQ4n3hX IckK6Z2bfQns986UA98YDhKvE6D0DMwhjbdaPaHUe+CtBUcFaSdZTTgddD6twOcwo/Pf pn8OA3fns8BJDC+sc0Y34p/9WU7QlzcMFSMYZk4KqVgy1U/Di7TP/Kdcc1FpH07//tkF 1mkGJJcFhDcYFlaWOD6tMCGKDboL4J6r+44jKWMsTq4QHlY8BYi+pwDpspl2na6rJT8p 0RtA== X-Gm-Message-State: AOUpUlGDT+0ae6jDFBVoYPUWkuZqnMsrbl4Ss/5FLEhrUTadtiYkmlkA mJKMSxzRj8E0P8jwp651mlwhQv8vS2E= X-Google-Smtp-Source: AAOMgpffEqNcdARoL3tqqlW1AMbemDd6C6CQidrb4fHsHlwM8rB3rNrwrJFUOS1C64OG1jZLGvylXQ== X-Received: by 2002:aca:c70f:: with SMTP id x15-v6mr19965866oif.97.1533647233878; Tue, 07 Aug 2018 06:07:13 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id w204-v6sm2669206oif.2.2018.08.07.06.07.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Aug 2018 06:07:13 -0700 (PDT) References: <87lg9jcin1.fsf@gmail.com> <87effa7cul.fsf@tcd.ie> User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham In-reply-to: <87effa7cul.fsf@tcd.ie> Date: Tue, 07 Aug 2018 08:07:12 -0500 Message-ID: <87lg9itjen.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Tue 07 Aug 2018 at 04:19, Basil L. Contovounesios wrote: > Are these commands (or could they be made) suitable for use with > beginning-of-defun-function and end-of-defun-function, as discussed in > the following messages? > > https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00820.html > https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00821.html Thanks for bringing those to my attention; I don't subscribe to emacs-devel. We could certainly modify bibtex-beginning-of-entry to take an optional argument that allows it to move past the current entry if point is already at the beginning. I wouldn't want to modify the current behavior because other packages rely on bibtex-beginning/end-of-entry not to move past the current one (e.g. bibtex-completion.el and org-ref.el). From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Aug 2018 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153409567924337 (code B ref 32378); Sun, 12 Aug 2018 17:42:01 +0000 Received: (at 32378) by debbugs.gnu.org; 12 Aug 2018 17:41:19 +0000 Received: from localhost ([127.0.0.1]:49000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fouMh-0006KT-Mz for submit@debbugs.gnu.org; Sun, 12 Aug 2018 13:41:19 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:36432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fouMf-0006KF-Vx for 32378@debbugs.gnu.org; Sun, 12 Aug 2018 13:41:18 -0400 Received: by mail-io0-f180.google.com with SMTP id m4-v6so11246158iop.3 for <32378@debbugs.gnu.org>; Sun, 12 Aug 2018 10:41:17 -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=Sjp+Gy1hkxp3FNlUvCNkydltJI3dgQ5zMZn80XWTxB4=; b=UcIDJteFWj8TPAybBAKLNbtVzOwQvF6ZHRBei65mR+o1E7yo7i4g8rhP5o/Bj46RnE chEgkL9bmMlNYAgz3sb5hCQDmuIZJdLqLBXBPN9pvUbtxKjDGN7eoQ7qiE9iesT+quRV ZAHNRtSHOdWzEOqKL8D5QLIeBySU9J3sxMdJ9aSGjjplMT780hdTHe8mATkKjcpiJ3ce d3tHu9Ucq2hhuMfWynA4S7opiy5o0Ia3y6D5qa4R5gAsct9JzZmM8CR+sPBHLrRWxs3e sVne/M7+g3viBRI/zIhvVlgZG2AMmLdl82b2GUKsqr3L4JP+3WWZKXAtW4aHWlgPvLDv fGUA== 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=Sjp+Gy1hkxp3FNlUvCNkydltJI3dgQ5zMZn80XWTxB4=; b=Me/ZLnlu/a6kmd8QTIaG/OXKA/6J/yVkOnWI23tvLiZvnSwgYDkY9Pk9tajSksxAXD +tf+pYPnGvlLPAEtQE4yruFaZTo4nbo0W64mTsAgqHTypR8vvDfvPYWhZ51NhRYdTzXe s5eJKmdCkiUaNT/OESCpmkX9NeQnvh8CGsfcb9pEBrygMZuzT/notxN6llsU+ly4PBTl yVHsHjzCvE2AW57rAgNCTyskfUQNBVZWLhV88jVLi0meL9KgON4S6spzRfSLi3r6TTKQ 5dmDMgTzMA0DOFvYc6x8sHzHn4Oy1PTORbgOa/e77WxvuKJIEwhobDG/w93znVoVcn+N 7UGg== X-Gm-Message-State: AOUpUlH4RyCBGDMZYpJAX/8bwLgqU9YaBlCG8GaIxlj5AixUgtJmlvlO ty7XBhPFqmyus44PWq2jovNOUAh7 X-Google-Smtp-Source: AA+uWPyjbdsC25zx/bVlTwG20vSdcOCp7JywMWH1i0jCW4clXa4JcdSCC08rMAFyOpUkjbYaa/mvUw== X-Received: by 2002:a6b:d307:: with SMTP id s7-v6mr11170545iob.190.1534095671976; Sun, 12 Aug 2018 10:41:11 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e19-v6sm5452439ioc.46.2018.08.12.10.41.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Aug 2018 10:41:11 -0700 (PDT) From: Noam Postavsky References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> Date: Sun, 12 Aug 2018 13:41:10 -0400 In-Reply-To: <87mutytjks.fsf@gmail.com> (Alex Branham's message of "Tue, 07 Aug 2018 08:03:31 -0500") Message-ID: <87a7prwki1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Branham writes: > @@ -1356,6 +1356,8 @@ bibtex-mode-map > ;; The Key `C-c&' is reserved for reftex.el > (define-key km "\t" 'bibtex-find-text) > (define-key km "\n" 'bibtex-next-field) > + (define-key km "\M-\}" 'bibtex-next-entry) > + (define-key km "\M-\{" 'bibtex-previous-entry) Would it make sense to use [remap forward-paragraph] and [remap backward-paragraph] instead of "\M-\}" and "\M-\{"? (I guess the question is how "paragraph-like" are these movement commands) From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Aug 2018 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.15347930513899 (code B ref 32378); Mon, 20 Aug 2018 19:25:01 +0000 Received: (at 32378) by debbugs.gnu.org; 20 Aug 2018 19:24:11 +0000 Received: from localhost ([127.0.0.1]:55885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frpmb-00010n-28 for submit@debbugs.gnu.org; Mon, 20 Aug 2018 15:24:09 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:42918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frpmZ-00010b-7V for 32378@debbugs.gnu.org; Mon, 20 Aug 2018 15:24:07 -0400 Received: by mail-oi0-f41.google.com with SMTP id b16-v6so27847161oic.9 for <32378@debbugs.gnu.org>; Mon, 20 Aug 2018 12:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=MKHy0bRA0v2ab9uu9C0tiQG/7tr2R5IiuhlotS/i6NU=; b=ciJFSEsYpfptpXxuIS1uJuYQFZBGJf3YcA/vBJcJGldHINsBbzmA/CGyeoPkAxMoEM LsKvrfjghHNTiiaUaaNxgLGtIy6jqr0ZdZN4ooBTnn/E2tuKmZGVcQ1QqJY/eS1Io24M UakUiKGmEXlMvLJwMB/k/JiWXx8aQzhAIT/Npqto9ZULFpGJ82/eALNqOIDZDQU4xSVT Fld6TpbaOouKrUqYaJxN/gbW72j2KOCeRvT6jxdlzNnA+GmQFi8euzkcJ2sWFe5chc08 jLgKgYP4KubfF+rSepeALQo471pYJ/YOqlhly9HV32gIH+llZDQr+Th3js83hiUQnLVo 2X+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=MKHy0bRA0v2ab9uu9C0tiQG/7tr2R5IiuhlotS/i6NU=; b=Qx5OXLFHJufLpO68JABe9yphOF2cycUu7fsbj2hP2+O0hTjOKje8hAvyASQng4+Khe 4tKJF+/yNk1EdxoP61F5Y/rvNIPw76S3080IZVgiKIaBZvKXRPCbpj3IGU/8moJ993lH gU3yY9zshSFgEXLlIPW9rbR4ZPxT92m6OZNnhhTXP86EECHGpdw5QwhCu4dwQxCRu+8O 7lrSX0fYidOgKs9ZvzDRYkT2nOwfxsJvvcJbQuKl8WPryfq8l0EqrZhvWejZ7b3tGVhp gj9rvzsT3RHt0wNuR+VwTjK89C8GB3UzADZueYk51/6fiCGmUj1ihrF0iRAOTbwVrAbV zq2A== X-Gm-Message-State: AOUpUlFx4WRvjjnTx2PjWBka38WICBYApls9cRvynYQMO0TY1yb9J6XR 8zk3DoAlboYLFHrdB65f5znqnMsKAVw= X-Google-Smtp-Source: AA+uWPysdfV5j3S4Pq2pt1goddsUfwH94oXoX0CA3ywYgwlsKzuIPE+xEQbB5H4rfkzJh4eiKHSsew== X-Received: by 2002:aca:c1d6:: with SMTP id r205-v6mr15475501oif.20.1534793041276; Mon, 20 Aug 2018 12:24:01 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id 16-v6sm7007286oin.5.2018.08.20.12.24.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Aug 2018 12:24:00 -0700 (PDT) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham In-reply-to: <87a7prwki1.fsf@gmail.com> Date: Mon, 20 Aug 2018 14:23:58 -0500 Message-ID: <87efesyh81.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On Sun 12 Aug 2018 at 12:41, Noam Postavsky wrote: > Would it make sense to use [remap forward-paragraph] and [remap > backward-paragraph] instead of "\M-\}" and "\M-\{"? (I guess the > question is how "paragraph-like" are these movement commands) Yes, that probably makes sense. Revised patch attached. Thanks! Alex --- >From d329f0c7465e7c8d66b918eb984be6863a895544 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 5 +++++ lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a9f8ed2ef8..2145983afa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -255,6 +255,11 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 ++++ +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry +They are bound to M-{ and M-} in bibtex-mode-map. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..fccaed7cac 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km [remap forward-paragraph] 'bibtex-next-entry) + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,20 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-textmodes-bibtex.el-New-functions-bibtex-next-p.patch >From d329f0c7465e7c8d66b918eb984be6863a895544 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 5 +++++ lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a9f8ed2ef8..2145983afa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -255,6 +255,11 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 ++++ +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry +They are bound to M-{ and M-} in bibtex-mode-map. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..fccaed7cac 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km [remap forward-paragraph] 'bibtex-next-entry) + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,20 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-=-- From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Aug 2018 00:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.15348124551871 (code B ref 32378); Tue, 21 Aug 2018 00:48:01 +0000 Received: (at 32378) by debbugs.gnu.org; 21 Aug 2018 00:47:35 +0000 Received: from localhost ([127.0.0.1]:56046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frupb-0000U7-5I for submit@debbugs.gnu.org; Mon, 20 Aug 2018 20:47:35 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:43425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frupZ-0000Tr-Bb for 32378@debbugs.gnu.org; Mon, 20 Aug 2018 20:47:33 -0400 Received: by mail-io0-f174.google.com with SMTP id y10-v6so14103104ioa.10 for <32378@debbugs.gnu.org>; Mon, 20 Aug 2018 17:47:33 -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=eobZLcB3bIBoONAsYdj92A1uaSpPSbcvKa037V0+Tj0=; b=rctBWKA1BsLpyn4D2PTrVqXxpPR7s4cjXsEwYAbb8F9GnQerBdYcPPhbfkToerxsha 8nHb/ug+gYIJ+gmYYawHBFt4caVr/FyDo/7PHYKcut1KtX+KFhXPiLmrUL8Q/7nmv7rC c/MnCbGuMdIbq36DAz52ZpxGKlwdHnJIz+IwCasb+LzxbfeIKd9jg6XgBs9F+7WloCr7 3w+38y7hjvhvliczsHPMci+gS2v7DawZgymao5A4d1PasSo8i/B2o9dRVJEj2UgmN4UT Jm+7TaOj7LqwdMksFzi+XI6icbNQMi6jaTpZV5Ed8zyYoysnCYgETMUjgcHbn+tKYBNF 0rtw== 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=eobZLcB3bIBoONAsYdj92A1uaSpPSbcvKa037V0+Tj0=; b=Fs/c0mkxb+HYGdwJHO6vM1E4pG3C51CbV5J0iXnogzv+nts6cTZrYDiyFJ/CoH3HBn xjx09RBpgMD8495AogxZCzMDgDGbZ9wBBph+e59m6KuoWjpNUVw8Eg4TF97YOIo2fFB3 t+JDd8MNJIIRQxKP1OFKHL/pw8ZLPO8ziodg/+1r9TiiRdOc29Qh9TGc8F/URNtDjCzy AeMlLeIS7CSiqCA9+2logFdlZ1EDdej7hCFsTwujlNPmzqt0kTgXkKaTgux3b8wZ/H+W yX80NSnrf3zcQPfjsxO3z1u2UMqn9iOijthdy5fafd66Yd1MxnDP/zF7AYUdm0f/PlPv P6NQ== X-Gm-Message-State: APzg51DSeohl8CtWFRBtg7tdxWUcT1oVRhbB5w/3Z9eZ9kZlF1mZ7NoB POC3gmPby6q7cXucQI0Dlw8+KIrn X-Google-Smtp-Source: ANB0VdbB5rKdWHy9Z+gFgY1DavR58YW6j+NdxqwEOwYXUi378OnGCk9QIIGouhiclvJla0Vg6RO4Rw== X-Received: by 2002:a6b:f00c:: with SMTP id w12-v6mr1157178ioc.65.1534812447549; Mon, 20 Aug 2018 17:47:27 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id f1-v6sm3971370ioq.10.2018.08.20.17.47.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Aug 2018 17:47:26 -0700 (PDT) From: Noam Postavsky References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> Date: Mon, 20 Aug 2018 20:47:25 -0400 In-Reply-To: <87efesyh81.fsf@gmail.com> (Alex Branham's message of "Mon, 20 Aug 2018 14:23:58 -0500") Message-ID: <877ekkwnoi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Branham writes: > On Sun 12 Aug 2018 at 12:41, Noam Postavsky wrote: > >> Would it make sense to use [remap forward-paragraph] and [remap >> backward-paragraph] instead of "\M-\}" and "\M-\{"? (I guess the >> question is how "paragraph-like" are these movement commands) > > Yes, that probably makes sense. Revised patch attached. > etc/NEWS | 5 +++++ > lisp/textmodes/bibtex.el | 18 ++++++++++++++++++ > ++++ > +** bibtex > +*** New commands bibtex-next-entry and bibtex-previous-entry > +They are bound to M-{ and M-} in bibtex-mode-map. I guess the NEWS entry should be revised as well. I notice you put "+++" but haven't made any manual updates, did you mean "---" instead (i.e., no manual updates are required)? > + (define-key km [remap forward-paragraph] 'bibtex-next-entry) > + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Aug 2018 02:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 32378@debbugs.gnu.org, npostavs@gmail.com Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153481852019577 (code B ref 32378); Tue, 21 Aug 2018 02:29:02 +0000 Received: (at 32378) by debbugs.gnu.org; 21 Aug 2018 02:28:40 +0000 Received: from localhost ([127.0.0.1]:56074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frwPP-00055g-NX for submit@debbugs.gnu.org; Mon, 20 Aug 2018 22:28:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frwPO-00055N-DN for 32378@debbugs.gnu.org; Mon, 20 Aug 2018 22:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frwPG-0005mX-63 for 32378@debbugs.gnu.org; Mon, 20 Aug 2018 22:28:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frwPG-0005mS-0J; Mon, 20 Aug 2018 22:28:30 -0400 Received: from [176.228.60.248] (port=2629 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1frwPF-0004ZI-Is; Mon, 20 Aug 2018 22:28:29 -0400 Date: Tue, 21 Aug 2018 05:28:27 +0300 Message-Id: <83y3d0cv1w.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87efesyh81.fsf@gmail.com> (message from Alex Branham on Mon, 20 Aug 2018 14:23:58 -0500) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Alex Branham > Date: Mon, 20 Aug 2018 14:23:58 -0500 > Cc: 32378@debbugs.gnu.org > > > Would it make sense to use [remap forward-paragraph] and [remap > > backward-paragraph] instead of "\M-\}" and "\M-\{"? (I guess the > > question is how "paragraph-like" are these movement commands) > > Yes, that probably makes sense. Revised patch attached. Thanks. > ++++ > +** bibtex > +*** New commands bibtex-next-entry and bibtex-previous-entry Missing period at end of sentence. Also, please quote command 'like this'. > +They are bound to M-{ and M-} in bibtex-mode-map. > + > +++ > ** Dired > > diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el > index 50a30cf6c3..fccaed7cac 100644 > --- a/lisp/textmodes/bibtex.el > +++ b/lisp/textmodes/bibtex.el > @@ -1356,6 +1356,8 @@ bibtex-mode-map > ;; The Key `C-c&' is reserved for reftex.el > (define-key km "\t" 'bibtex-find-text) > (define-key km "\n" 'bibtex-next-field) > + (define-key km [remap forward-paragraph] 'bibtex-next-entry) > + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) > (define-key km "\M-\t" 'completion-at-point) > (define-key km "\C-c\"" 'bibtex-remove-delimiters) > (define-key km "\C-c{" 'bibtex-remove-delimiters) > @@ -1415,6 +1417,8 @@ bibtex-mode-map > ("Moving inside an Entry" > ["End of Field" bibtex-find-text t] > ["Next Field" bibtex-next-field t] > + ["Next entry" bibtex-next-entry t] > + ["Previous entry" bibtex-previous-entry t] > ["Beginning of Entry" bibtex-beginning-of-entry t] > ["End of Entry" bibtex-end-of-entry t] > "--" > @@ -4452,6 +4456,20 @@ bibtex-next-field > (goto-char (match-beginning 0))) > (bibtex-find-text begin nil bibtex-help-message))) > > +(defun bibtex-next-entry (&optional arg) > + "Move point ARG entries forward." We usually say in the doc string that interactively ARG is the prefix argument. Also that the default is 1 if ARG is omitted or nil. From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Aug 2018 15:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: Eli Zaretskii , 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153486480029209 (code B ref 32378); Tue, 21 Aug 2018 15:20:02 +0000 Received: (at 32378) by debbugs.gnu.org; 21 Aug 2018 15:20:00 +0000 Received: from localhost ([127.0.0.1]:56895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs8Rs-0007b3-G6 for submit@debbugs.gnu.org; Tue, 21 Aug 2018 11:20:00 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:38819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs8Rr-0007aq-An for 32378@debbugs.gnu.org; Tue, 21 Aug 2018 11:19:59 -0400 Received: by mail-oi0-f54.google.com with SMTP id v8-v6so32666189oie.5 for <32378@debbugs.gnu.org>; Tue, 21 Aug 2018 08:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=VSKhdOwYG4vQBbR5OQZJdVtGsiDgrAZCb+o9f/MkBVA=; b=Iyu5aj5ZqqeEo7T6Bf3Kw63Ij6TC0nSC77HndSef1aUXlTowvr69ykp7a1720n9q0A p4efh/FDjoHMJNTskKbDD/VHWEUFZgJMuXJiPJ2klzDS6AYpyic9af4kCUD3c+7pPcbn mbrPwJQOTwG557pwVQkZ39qzgREwlWKK4ZJ51ZNUHHj3YiIGjwH5dcuIX+NrqecbMLuy YOldqrPtgFdSWK/PPNAhCFIQ80k7DNzbHk4uLt9MZCZRI3uZKSWbwBP6cZbjINndSgMH vGg1x8pvFxg4U/jgaBiViHfb4d7Qv8uj1d7oYkzCFXy0AVY5rzjRU7BydvzNwKt2o9d8 fNdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=VSKhdOwYG4vQBbR5OQZJdVtGsiDgrAZCb+o9f/MkBVA=; b=BB1bNNIqlmyQ3PRuU6nmRFAc/D6vsITwspx4uTdZRMnqDRV2vcNptJ3S3kcAeuPq+w hEhS5BYNuLQaXLaQrBBb6fKAd6dM7a2krnCGchnRZK6Ckt7mQ9Y1Ca6Zvl0aXzVELS8U eZxF7Fre6su+xHh7V0VGiNWE9VQdeIoUd5vQ9/vQa8Mzu2o/d4lxOmtEE0Hn33ICaDBe /xvDD+vzJd921+G4OPhN6ZjKA6vUaV8O9/DgTLsEwC+tZ712mqcYe6cYsE8pGITXKTFK PWInN/tlgsfB4Kc7frOpmDtDtUgJ65vhfW2OZX0vhsfk5/xBlKx+aluxjCit5L0X7PVF zByg== X-Gm-Message-State: AOUpUlFA3bhKnJ2iZz5/BTGyT8I5jp2QmEoIiAPNW2tT1xEnihFXKp7L +2M5tBbiXS9ms3zbY2RZpkM= X-Google-Smtp-Source: AA+uWPxCv3W+20QxFtsjqWwEeIdcRCgkxQ5+p4muVhaL3YUElZ+HdLF/SbhsZCAlaleohWVUZnD5YA== X-Received: by 2002:aca:d605:: with SMTP id n5-v6mr17862752oig.287.1534864793507; Tue, 21 Aug 2018 08:19:53 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id s145-v6sm2641660oih.16.2018.08.21.08.19.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 08:19:52 -0700 (PDT) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> <877ekkwnoi.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham In-reply-to: <877ekkwnoi.fsf@gmail.com> Date: Tue, 21 Aug 2018 10:19:50 -0500 Message-ID: <87efer927d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > > I guess the NEWS entry should be revised as well. I notice you put > "+++" but haven't made any manual updates, did you mean "---" instead > (i.e., no manual updates are required)? Thanks, done. I wasn't sure if I should use "---" (no manual updates required, which is true) or "+++" (all doc strings updated, which is also true). --- >From 579953250b3e7f9c2f804dd609a373e31f393518 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 6 ++++++ lisp/textmodes/bibtex.el | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a9f8ed2ef8..bb8fa5411e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -255,6 +255,12 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 +--- +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry. +In bibtex-mode-map, forward-paragraph and backward-paragraph are +remapped to these, respectively. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..54aa3de433 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km [remap forward-paragraph] 'bibtex-next-entry) + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,24 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward. +ARG defaults to one. Called interactively, ARG is the prefix +argument." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward. +ARG defaults to one. Called interactively, ARG is the prefix +argument." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-textmodes-bibtex.el-New-functions-bibtex-next-p.patch >From 579953250b3e7f9c2f804dd609a373e31f393518 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 6 ++++++ lisp/textmodes/bibtex.el | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a9f8ed2ef8..bb8fa5411e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -255,6 +255,12 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 +--- +** bibtex +*** New commands bibtex-next-entry and bibtex-previous-entry. +In bibtex-mode-map, forward-paragraph and backward-paragraph are +remapped to these, respectively. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..54aa3de433 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km [remap forward-paragraph] 'bibtex-next-entry) + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,24 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward. +ARG defaults to one. Called interactively, ARG is the prefix +argument." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward. +ARG defaults to one. Called interactively, ARG is the prefix +argument." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 --=-=-=-- From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Aug 2018 15:22:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: Eli Zaretskii , 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153486490829463 (code B ref 32378); Tue, 21 Aug 2018 15:22:06 +0000 Received: (at 32378) by debbugs.gnu.org; 21 Aug 2018 15:21:48 +0000 Received: from localhost ([127.0.0.1]:56909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs8Tc-0007f8-4z for submit@debbugs.gnu.org; Tue, 21 Aug 2018 11:21:48 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:38253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs8Ta-0007eJ-23 for 32378@debbugs.gnu.org; Tue, 21 Aug 2018 11:21:46 -0400 Received: by mail-oi0-f47.google.com with SMTP id v8-v6so32677529oie.5 for <32378@debbugs.gnu.org>; Tue, 21 Aug 2018 08:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Ba1mS/0Sd8Idf7W6vtpmTZXg1FAINzlqi0DBLEcVAv8=; b=nvfumNaMURoJSvdyMbNZxplhMl6LRDWJwQ8deLCCdvWv3UTKL9oTXHf56nYJqOomKQ 24S5UYzEeufOdGfExBPnr7pAaBgUApnOvCjJ0LqPxysKVBxHxNxWh9D6yG47KV7nM2Gg Y1DwcXdKsZE80b/3NexcuGrtNKzFkbMS67vlI/D3iLDNC+QDVVrRpCbngIA47wNYk3UH u1Oh/Fg+3/sCAM02njdtt6VR7ttztF3EbvAewEYLoOxeSLTPYX/ngOD4C0lfMzicKaso dVOSl811ckEhh3dfZEimoL8rrvNH+Z7F2ZAt7n4N0FutuUTmda0AK5K1th5GNtGXWvAc Do6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Ba1mS/0Sd8Idf7W6vtpmTZXg1FAINzlqi0DBLEcVAv8=; b=ZP0bl5N9UIvvd90OOtSoBD8R3RzAq9MXi/BWhjHAyTAh2QhdaaYPf/TrYQufICUvBb t9gEjfe3GiFxQBe/KWHP15Oix42M6l7VAt5HHcfmUcIOGTMtCOCF9VOMsT6VvQIO9Rr6 DHjEl+XrLOLOnoC4wbueeC44slPHMWzhsgM9xMlnSmtBcYo3jkiLWgpGx4guEr9u9JFU 08yGVDn1g3ah5ISuXeVDRtLI52X9IdvHt4JYji6p3z+z6NWl5EplnhYEKltinpoeneGZ 0r39qazCrEGIwtzdX3GnptK8zPvMpIb43terWGCAoMZAOFZmbi+U0+yMBL1Jd3uXoKBA ZpFQ== X-Gm-Message-State: AOUpUlHaYb2KdN7Kfh+dVZD0dNTGZxGaolOdnBuYv+AJ1900AkMRu4fx 69+rGTZ2mMCgUua9bb+Qys8= X-Google-Smtp-Source: AA+uWPz8cXvdSDuwkVUTKNnh3A70OKqPuCJbx2o8C+jv0T2qdcYzLDwDR+dAu8PDzivBAcXI6hFuVA== X-Received: by 2002:aca:b355:: with SMTP id c82-v6mr19792974oif.9.1534864900576; Tue, 21 Aug 2018 08:21:40 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id h186-v6sm3380368oib.55.2018.08.21.08.21.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 08:21:40 -0700 (PDT) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> <877ekkwnoi.fsf@gmail.com> <87efer927d.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham In-reply-to: <87efer927d.fsf@gmail.com> Date: Tue, 21 Aug 2018 10:21:39 -0500 Message-ID: <87d0ub924c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sorry, sent the wrong patch. This is the right one: Alex -------- >From 430b4d956456d8567dd51172187f3457e8a9c045 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Mon, 6 Aug 2018 15:47:12 -0500 Subject: [PATCH] * lisp/textmodes/bibtex.el: New functions bibtex-next/previous-entry (bibtex-next-entry, bibtex-previous-entry): new functions. (bibtex-mode-map): Bind to M-{/}, overriding forward/backward paragraph, which only move single lines in bibtex-mode --- etc/NEWS | 6 ++++++ lisp/textmodes/bibtex.el | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index a9f8ed2ef8..58efcd1689 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -255,6 +255,12 @@ navigation and editing of large files. * Changes in Specialized Modes and Packages in Emacs 27.1 +--- +** bibtex +*** New commands 'bibtex-next-entry' and 'bibtex-previous-entry'. +In bibtex-mode-map, forward-paragraph and backward-paragraph are +remapped to these, respectively. + +++ ** Dired diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 50a30cf6c3..54aa3de433 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1356,6 +1356,8 @@ bibtex-mode-map ;; The Key `C-c&' is reserved for reftex.el (define-key km "\t" 'bibtex-find-text) (define-key km "\n" 'bibtex-next-field) + (define-key km [remap forward-paragraph] 'bibtex-next-entry) + (define-key km [remap backward-paragraph] 'bibtex-previous-entry) (define-key km "\M-\t" 'completion-at-point) (define-key km "\C-c\"" 'bibtex-remove-delimiters) (define-key km "\C-c{" 'bibtex-remove-delimiters) @@ -1415,6 +1417,8 @@ bibtex-mode-map ("Moving inside an Entry" ["End of Field" bibtex-find-text t] ["Next Field" bibtex-next-field t] + ["Next entry" bibtex-next-entry t] + ["Previous entry" bibtex-previous-entry t] ["Beginning of Entry" bibtex-beginning-of-entry t] ["End of Entry" bibtex-end-of-entry t] "--" @@ -4452,6 +4456,24 @@ bibtex-next-field (goto-char (match-beginning 0))) (bibtex-find-text begin nil bibtex-help-message))) +(defun bibtex-next-entry (&optional arg) + "Move point ARG entries forward. +ARG defaults to one. Called interactively, ARG is the prefix +argument." + (interactive "p") + (bibtex-end-of-entry) + (when (re-search-forward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + +(defun bibtex-previous-entry (&optional arg) + "Move point ARG entries backward. +ARG defaults to one. Called interactively, ARG is the prefix +argument." + (interactive "p") + (bibtex-beginning-of-entry) + (when (re-search-backward bibtex-entry-maybe-empty-head nil t (or arg 1)) + (goto-char (match-beginning 0)))) + (defun bibtex-find-text (&optional begin noerror help comma) "Move point to end of text of current BibTeX field or entry head. With optional prefix BEGIN non-nil, move point to its beginning. -- 2.18.0 From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Aug 2018 15:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153486499429762 (code B ref 32378); Tue, 21 Aug 2018 15:24:02 +0000 Received: (at 32378) by debbugs.gnu.org; 21 Aug 2018 15:23:14 +0000 Received: from localhost ([127.0.0.1]:56931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs8V0-0007jy-8Y for submit@debbugs.gnu.org; Tue, 21 Aug 2018 11:23:14 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:39297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs8Uy-0007jl-EK for 32378@debbugs.gnu.org; Tue, 21 Aug 2018 11:23:12 -0400 Received: by mail-oi0-f45.google.com with SMTP id c190-v6so3735145oig.6 for <32378@debbugs.gnu.org>; Tue, 21 Aug 2018 08:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=at0Ci1lJBcORT6fAE5XdugtGqB1BM0EhVVDO355Lmcs=; b=iQW4SX7SxkuXht4EYVHXSTVhzK1k1A8FoRnkwKrfnCLoTN0ROLKpTACahhyUpTxucg CjFPNKT3yG8VavC0jAI7XhIDwWOjgQor1KcJsMFC0V9rlY8nwr4JJorPGdUimCDkwrIe gCO53vuZHcl5kqxywhiC3LHQMftI6SWQrdUiVPzI7/RNmcNzM7DgOplcnt3JmYqGcvhr L3InSBpDx7M4Ple+X2fiFdChkNVOgpQ0RFMXDuUj8e3A1lXcbfHquhRtdn0CAB/h8huJ Ynvlx7I69Nw5AKhPx8TsUL9D9lr1WaspfjO9CdgsyXouBdq2VCo/ttjx9HoRr1IVEd+R uy5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=at0Ci1lJBcORT6fAE5XdugtGqB1BM0EhVVDO355Lmcs=; b=boCzT3COF9uDnAFHtp5oiV+f3KyKrNQd7K/EVCFUNTkBhEryk4mm06McnCSPy+tO4N Xcq3u9GHbH+cemQeYoTD0j4NNaBUwcL4/Ma+R0EcpYp9azjwgZSWNNb4J1eGiElFQi4j botiw7xAK6g1Vz0zyW9xfHZFe56mez/sMRq40KJsDK4miMn93X3hmz2feZdqVRGZ6RE9 BJiG7huw/3F9rB/H37BVxJymqWikos1am40RVy9tEy891JPCK90eFjUjHeSSpFLJpjRA bFaidbRU2Av75tmY/taQ61n6ynlE2BJPgTeVnEUOrqhbNs07wYX62CDO38ahJld0LvdI QaLw== X-Gm-Message-State: AOUpUlH9GV7XhFEuDaFn0LxSyEbnzz/viYfGYMdQM6TYUHQulswG1vYD 0ZuwIuPcvlulg4wL6FZmtpaGiZAk X-Google-Smtp-Source: AA+uWPwytS77ag7pgjNkmb38myHnK4cQQfVoYNsWnQP+XWLY7lcHCW8Nt2g11YD45ONCDiZAmO/Qxw== X-Received: by 2002:aca:5155:: with SMTP id f82-v6mr17735000oib.272.1534864986808; Tue, 21 Aug 2018 08:23:06 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id u18-v6sm6881927oiv.10.2018.08.21.08.23.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 08:23:06 -0700 (PDT) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> <83y3d0cv1w.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Alex Branham In-reply-to: <83y3d0cv1w.fsf@gnu.org> Date: Tue, 21 Aug 2018 10:23:05 -0500 Message-ID: <87bm9v921y.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon 20 Aug 2018 at 21:28, Eli Zaretskii wrote: >> +** bibtex >> +*** New commands bibtex-next-entry and bibtex-previous-entry > > Missing period at end of sentence. Also, please quote command 'like > this'. Added. Just FYI the period at the end of a heading seems to be inconsistent throughout the NEWS file. >> +(defun bibtex-next-entry (&optional arg) >> + "Move point ARG entries forward." > > We usually say in the doc string that interactively ARG is the prefix > argument. Also that the default is 1 if ARG is omitted or nil. Done. I attached the patch in the other thread. From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Aug 2018 16:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.15348677699339 (code B ref 32378); Tue, 21 Aug 2018 16:10:01 +0000 Received: (at 32378) by debbugs.gnu.org; 21 Aug 2018 16:09:29 +0000 Received: from localhost ([127.0.0.1]:56974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs9Dl-0002QZ-Es for submit@debbugs.gnu.org; Tue, 21 Aug 2018 12:09:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fs9Dk-0002QL-4f for 32378@debbugs.gnu.org; Tue, 21 Aug 2018 12:09:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fs9Da-000702-Ti for 32378@debbugs.gnu.org; Tue, 21 Aug 2018 12:09:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs9Da-0006ze-Mw; Tue, 21 Aug 2018 12:09:18 -0400 Received: from [176.228.60.248] (port=2447 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fs9DZ-0003CT-4I; Tue, 21 Aug 2018 12:09:18 -0400 Date: Tue, 21 Aug 2018 19:09:16 +0300 Message-Id: <83lg8zd7mb.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87bm9v921y.fsf@gmail.com> (message from Alex Branham on Tue, 21 Aug 2018 10:23:05 -0500) References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> <83y3d0cv1w.fsf@gnu.org> <87bm9v921y.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Alex Branham > Cc: 32378@debbugs.gnu.org > Date: Tue, 21 Aug 2018 10:23:05 -0500 > > Just FYI the period at the end of a heading seems to be inconsistent throughout the NEWS file. Thanks, I fixed the few ones that didn't use the right format. From unknown Mon Aug 11 21:36:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32378: [PATCH] bibtex-next/previous-entry Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Aug 2018 23:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alex Branham Cc: Eli Zaretskii , 32378@debbugs.gnu.org Received: via spool by 32378-submit@debbugs.gnu.org id=B32378.153541418726130 (code B ref 32378); Mon, 27 Aug 2018 23:57:01 +0000 Received: (at 32378) by debbugs.gnu.org; 27 Aug 2018 23:56:27 +0000 Received: from localhost ([127.0.0.1]:34594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fuRMx-0006nJ-7l for submit@debbugs.gnu.org; Mon, 27 Aug 2018 19:56:27 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:54000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fuRMu-0006n0-FK; Mon, 27 Aug 2018 19:56:24 -0400 Received: by mail-it0-f41.google.com with SMTP id p79-v6so120306itp.3; Mon, 27 Aug 2018 16:56:24 -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=cpLp6M2XQtiATZFVhdFlNuA/Y7imLR7DLyZJp1rPeFQ=; b=T+lAipuevlRvEpcnMOvsUCtY6i7lx9PPtEOrQ7KiqAcBxfmbVqTJ0iDGHsoLLwrQAQ kjEvNSSYFr0vpTWPCTtwjyMbZceV6FYU3T2ihFuglepU705ZR6cYSwQ4HhzEjzvrdJPn 1z8kP888r80QMpAipSYdittNM3ucZKYi1x+e0alpSVqx4xA5k+iZcWzhjFVsBSTCndJG 1S+I0rmQJ7mM1zo6KJK8wmiZm7BWf9z8x3N5XIqsyRvNv/nP7/prH5zwh8XToCzhW8hZ RxsathtlMGd3D4/pG3+Prn4crZcmGRdXmF6aBfy8Aa2ST7jkcqvNEXsDuk0WT4sQ6yn9 atzw== 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=cpLp6M2XQtiATZFVhdFlNuA/Y7imLR7DLyZJp1rPeFQ=; b=Lw1iWYyg2/q4gjs0eOHT0Olfv20VOHMqsqRR5HHKFyADFD47sfIbPu8+UYaPU45g/j h/dwlzNDnQ+ZNmd1wls4/Ahf7x2qd/Q2LvYPDWCh4DSWI27aDxm375Z1Yk7T5O11amGf Tl/MnQefraM1EVKPlaqxTtcmgvWJsXZgifnUxo2i0B0pkEKO8LMV6s4HEGyFNSi1NoAX vL6TZkKLwiFJ2KimcvrULHkS+cXfQQLwXi6vc4hflrvnqY/pV/N2v6lsTUy24Ovc3VG3 uxdwYwTitjfKBeHoVDaVDWShm9z7FapOGtRF9y5Ry/pHPsebROnzX85QnGcmQjW2M6C4 C44g== X-Gm-Message-State: APzg51BOHYp/AHhW4ArbEcF+jWg9izBmYDrcPzL4PNkacVjeo48PfddP TcloaOYqXHowSJhLYWHgo+81QAIG X-Google-Smtp-Source: ANB0VdYdXSiwGQtCRZO8Y7Ztasb9f1uj8Zh6UY/QUVKwAHr9uh1y7FDYFUXAbs06cO9dPSorp5o6Bg== X-Received: by 2002:a24:3c53:: with SMTP id m80-v6mr8621720ita.86.1535414178768; Mon, 27 Aug 2018 16:56:18 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e140-v6sm266766iof.50.2018.08.27.16.56.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Aug 2018 16:56:18 -0700 (PDT) From: Noam Postavsky References: <87lg9jcin1.fsf@gmail.com> <87d0uuylah.fsf@gmail.com> <87mutytjks.fsf@gmail.com> <87a7prwki1.fsf@gmail.com> <87efesyh81.fsf@gmail.com> <877ekkwnoi.fsf@gmail.com> <87efer927d.fsf@gmail.com> <87d0ub924c.fsf@gmail.com> Date: Mon, 27 Aug 2018 19:56:16 -0400 In-Reply-To: <87d0ub924c.fsf@gmail.com> (Alex Branham's message of "Tue, 21 Aug 2018 10:21:39 -0500") Message-ID: <8736uzuzxb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 32378 fixed close 32378 27.1 quit Alex Branham writes: > Sorry, sent the wrong patch. This is the right one: Pushed to master. [1: 717b0341aa]: 2018-08-27 19:55:04 -0400 New commands bibtex-next/previous-entry (Bug#32378) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=717b0341aafb9ae9b93395dba1192b12c4459f0c