From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#35572: suggested improvement to ibuffer documentation Date: Mon, 06 May 2019 00:54:39 +0100 Message-ID: <87h8a8pidc.fsf@tcd.ie> References: <5c115713-bffc-3a1f-a583-7a055209aa43@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="176543"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35572@debbugs.gnu.org To: Ed Mangimelli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 06 01:55:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNQyQ-000joe-Rc for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 May 2019 01:55:15 +0200 Original-Received: from localhost ([127.0.0.1]:47813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNQyP-00047e-KM for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 May 2019 19:55:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNQyG-000465-Nl for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 19:55:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNQyF-0005Ld-5J for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 19:55:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41679) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNQyE-0005LW-Lw for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 19:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNQyE-0002IK-Jk for bug-gnu-emacs@gnu.org; Sun, 05 May 2019 19:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 May 2019 23:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35572 X-GNU-PR-Package: emacs Original-Received: via spool by 35572-submit@debbugs.gnu.org id=B35572.15571004928793 (code B ref 35572); Sun, 05 May 2019 23:55:02 +0000 Original-Received: (at 35572) by debbugs.gnu.org; 5 May 2019 23:54:52 +0000 Original-Received: from localhost ([127.0.0.1]:55221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNQy2-0002Hh-Oj for submit@debbugs.gnu.org; Sun, 05 May 2019 19:54:52 -0400 Original-Received: from mail-ed1-f65.google.com ([209.85.208.65]:43471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNQxz-0002HN-QV for 35572@debbugs.gnu.org; Sun, 05 May 2019 19:54:49 -0400 Original-Received: by mail-ed1-f65.google.com with SMTP id w33so10964325edb.10 for <35572@debbugs.gnu.org>; Sun, 05 May 2019 16:54:47 -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=eNwduLqdo0FQf+WE7MigmrmaOPQ+NE2X+SsweXLk6dE=; b=0YJWV5ScnRdjm14m+YH8+Yccer8RePT021p2UY2d+KsGROi30yXHzc04j/3X3MUZV1 03kJe9nQgo2ofq1oy0uLLX1wbav6bfjWZwVUrpFhrK2FIFnX6IXxffOi2Xj8D/wprUIs Wz1aigPql5uOeIxOibkHO39ZB/oP9kY+cLSo32RnZlF4Ms1CX02IMcPf77TQ24EK5FZf P6r26a/tKL5l33SeAoY5yIITsUmBB5Sgr96hX1peKGgdyufSxFivh6/mG9Y3sAoxDGXL sgi4xWOEXNiQDsifeq+2vsbugB8JDUqAVF+uMn5UVoj3GcIEwRRuzdG7QDk72FiLQXNE /ZVA== 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=eNwduLqdo0FQf+WE7MigmrmaOPQ+NE2X+SsweXLk6dE=; b=b4QUQrHRmtQjsOmQV2kalHtRx4t3IPA4GJk17NQsaYJqUAlc3JpTMdKiysZpfVxKjN YFR7CTob8d7tz0noH4pHHAplXZaXChsON+4jXP7aFMqTz3g5rtEHpSyYCCS2kWLlGcsL Nt9waSMS1qWBt18V8W5Xo2WKvdPmBRRaQuKkhALgPWFTc+As8o8/yUbFZ4qUsn8A+rzy 4EeBnUF86g8pKzquRNTVwjsu85Wr7eRta0nYI3FgXPAIXzFG8hH1Sp/t3QPaFL1hUsFJ jggiUEd0VKat1g2mFXkTcURYHkfspy3S1uIy+TeeatgeijhAgLbB/XH1/QC4xOouOZae PbkA== X-Gm-Message-State: APjAAAXhPAqu7QPs0OxpmZsoppfX9tiE+Opp3P9FGMSmiBFVUug8hN/9 MzXDP5Tb9gP0qKHaT1Ln/cyZwA== X-Google-Smtp-Source: APXvYqwkSRFYa4yf81Xi0hVbriqHJyQidObuUtfHpDLDdCRLGcyM/0IESGT4K6zhk2RkP6YFpbhsZA== X-Received: by 2002:a17:906:79c5:: with SMTP id m5mr16185166ejo.114.1557100481983; Sun, 05 May 2019 16:54:41 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:6fa:38d6:1fce:ddb3]) by smtp.gmail.com with ESMTPSA id a13sm1267290ejp.26.2019.05.05.16.54.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 05 May 2019 16:54:40 -0700 (PDT) In-Reply-To: <5c115713-bffc-3a1f-a583-7a055209aa43@gmail.com> (Ed Mangimelli's message of "Sat, 4 May 2019 23:11:56 -0500") 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: 209.51.188.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:158818 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tags 35572 patch quit Ed Mangimelli writes: > Lines 2549 and 2550 of lisp/ibuffer.el read: > > =C2=A0 `\\[ibuffer-unmark-backward]' - Unmark the buffer at point, and mo= ve to the > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 previous line. > > After using this function (bound to DEL), it seems like it should read: > > =C2=A0 `\\[ibuffer-unmark-backward]' -=C2=A0 Move to the previous line an= d unmark the > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 buffer at point. I agree that the current synopsis is incorrect, but I think it shouldn't mention line movement at all. Ibuffer mark commands do not always change line (e.g. when point is on a filter group name), and the docstring of ibuffer-mode does not describe any other marking commands as moving line, so it would be inaccurate and inconsistent to do so for ibuffer-unmark-backward. The synopsis need only refer to the command's key binding and general purpose; the rest can be left to its docstring. So how about the following instead? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-ibuffer-unmark-backward-synopsis.patch >From 088726781c04c8f2401b580c954e184de9ce6145 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 5 May 2019 16:04:26 +0100 Subject: [PATCH] Fix ibuffer-unmark-backward synopsis * lisp/ibuffer.el (ibuffer-mark-region-or-n-with-char): Fix indentation. (ibuffer-mark-interactive): Remove optional third argument of internal subroutine considered deprecated since Emacs 24.4. (ibuffer-mark-for-delete-backwards): Don't use it. (ibuffer-mode): Minor copy-edits. Fix synopsis of ibuffer-unmark-backward. (bug#35572) --- lisp/ibuffer.el | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 2d3c140536..efa9226e65 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1477,14 +1477,11 @@ ibuffer-mark-region-or-n-with-char (goto-char start) (ibuffer-mark-interactive line-count mark-char) (goto-char cur)) - (ibuffer-mark-interactive arg mark-char))) + (ibuffer-mark-interactive arg mark-char))) -(defun ibuffer-mark-interactive (arg mark &optional movement) +(defun ibuffer-mark-interactive (arg mark) (ibuffer-assert-ibuffer-mode) (or arg (setq arg 1)) - ;; deprecated movement argument - (when (and movement (< movement 0)) - (setq arg (- arg))) (ibuffer-forward-line 0) (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name) (progn @@ -1525,7 +1522,7 @@ ibuffer-mark-for-delete-backwards "Mark for deletion the ARG previous buffers. If point is on a group name, this function operates on that group." (interactive "p") - (ibuffer-mark-interactive arg ibuffer-deletion-char -1)) + (ibuffer-mark-interactive (- arg) ibuffer-deletion-char)) (defun ibuffer-current-buffer (&optional must-be-live) (let ((buf (car (get-text-property (line-beginning-position) @@ -2507,8 +2504,8 @@ ibuffer-mode Operations on marked buffers: \\ - `\\[ibuffer-do-save]' - Save the marked buffers - `\\[ibuffer-do-view]' - View the marked buffers in this frame. + `\\[ibuffer-do-save]' - Save the marked buffers. + `\\[ibuffer-do-view]' - View the marked buffers in the selected frame. `\\[ibuffer-do-view-other-frame]' - View the marked buffers in another frame. `\\[ibuffer-do-revert]' - Revert the marked buffers. `\\[ibuffer-do-toggle-read-only]' - Toggle read-only state of marked buffers. @@ -2531,7 +2528,7 @@ ibuffer-mode buffer's file as an argument. `\\[ibuffer-do-eval]' - Evaluate a form in each of the marked buffers. This is a very flexible command. For example, if you want to make all - of the marked buffers read only, try using (read-only-mode 1) as + of the marked buffers read-only, try using (read-only-mode 1) as the input form. `\\[ibuffer-do-view-and-eval]' - As above, but view each buffer while the form is evaluated. @@ -2546,21 +2543,20 @@ ibuffer-mode all unmarked buffers. `\\[ibuffer-change-marks]' - Change the mark used on marked buffers. `\\[ibuffer-unmark-forward]' - Unmark the buffer at point. - `\\[ibuffer-unmark-backward]' - Unmark the buffer at point, and move to the - previous line. + `\\[ibuffer-unmark-backward]' - Unmark the previous buffer. `\\[ibuffer-unmark-all]' - Unmark buffers marked with MARK. `\\[ibuffer-unmark-all-marks]' - Unmark all marked buffers. `\\[ibuffer-mark-by-mode]' - Mark buffers by major mode. `\\[ibuffer-mark-unsaved-buffers]' - Mark all \"unsaved\" buffers. This means that the buffer is modified, and has an associated file. `\\[ibuffer-mark-modified-buffers]' - Mark all modified buffers, - regardless of whether or not they have an associated file. + regardless of whether they have an associated file. `\\[ibuffer-mark-special-buffers]' - Mark all buffers whose name begins and ends with `*'. `\\[ibuffer-mark-dissociated-buffers]' - Mark all buffers which have an associated file, but that file doesn't currently exist. `\\[ibuffer-mark-read-only-buffers]' - Mark all read-only buffers. - `\\[ibuffer-mark-dired-buffers]' - Mark buffers in `dired' mode. + `\\[ibuffer-mark-dired-buffers]' - Mark buffers in `dired-mode'. `\\[ibuffer-mark-help-buffers]' - Mark buffers in `help-mode', `apropos-mode', etc. `\\[ibuffer-mark-old-buffers]' - Mark buffers older than `ibuffer-old-time'. `\\[ibuffer-mark-for-delete]' - Mark the buffer at point for deletion. @@ -2639,17 +2635,17 @@ ibuffer-mode ** Information on Filtering: - You can filter your ibuffer view via different criteria. Each Ibuffer +You can filter your Ibuffer view via different criteria. Each Ibuffer buffer has its own stack of active filters. For example, suppose you are working on an Emacs Lisp project. You can create an Ibuffer -buffer displays buffers in just `emacs-lisp' modes via +buffer displaying only `emacs-lisp-mode' buffers via `\\[ibuffer-filter-by-mode] emacs-lisp-mode RET'. In this case, there is just one entry on the filtering stack. You can also combine filters. The various filtering commands push a new filter onto the stack, and the filters combine to show just buffers which satisfy ALL criteria on the stack. For example, suppose -you only want to see buffers in `emacs-lisp' mode, whose names begin +you only want to see buffers in `emacs-lisp-mode', whose names begin with \"gnus\". You can accomplish this via: \\[ibuffer-filter-by-mode] emacs-lisp-mode RET @@ -2693,8 +2689,8 @@ ibuffer-mode multiple filter groups; instead, the first filter group is used. The filter groups are displayed in this order of precedence. -You may rearrange filter groups by using the regular -`\\[ibuffer-kill-line]' and `\\[ibuffer-yank]' pair. Yanked groups +You may rearrange filter groups by using the usual pair +`\\[ibuffer-kill-line]' and `\\[ibuffer-yank]'. Yanked groups will be inserted before the group at point." ;; Include state info next to the mode name. (set (make-local-variable 'mode-line-process) -- 2.20.1 --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=--