From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#20177: 24.4: bookmark.el: show all annotations does not display in proper order (FIX INCLUDED) Date: Mon, 23 Mar 2015 06:21:49 -0400 Message-ID: <550FE93D.1030300@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TkmKH9Ul2AXWR4eoDmTgAXCQjieRQRPmM" X-Trace: ger.gmane.org 1427106264 25208 80.91.229.3 (23 Mar 2015 10:24:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Mar 2015 10:24:24 +0000 (UTC) To: 20177@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 23 11:24:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YZzWm-00017e-4b for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Mar 2015 11:24:12 +0100 Original-Received: from localhost ([::1]:54779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZzWl-0001Fo-6N for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Mar 2015 06:24:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZzWg-0001Fd-D5 for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZzWc-00020O-Bk for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:24:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZzWc-00020K-83 for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YZzWb-0001Tj-RG for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Mar 2015 10:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20177 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14271061865615 (code B ref -1); Mon, 23 Mar 2015 10:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Mar 2015 10:23:06 +0000 Original-Received: from localhost ([127.0.0.1]:33198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZzVh-0001SU-JC for submit@debbugs.gnu.org; Mon, 23 Mar 2015 06:23:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49526) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZzVe-0001Rv-UN for submit@debbugs.gnu.org; Mon, 23 Mar 2015 06:23:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZzVY-0001u7-Qz for submit@debbugs.gnu.org; Mon, 23 Mar 2015 06:22:57 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:51732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZzVY-0001u3-NK for submit@debbugs.gnu.org; Mon, 23 Mar 2015 06:22:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZzVX-00016z-HR for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:22:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZzVT-0001ti-GT for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:22:55 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:52018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZzVT-0001tb-6F for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2015 06:22:51 -0400 Original-Received: from [192.168.1.10] ([96.232.130.59]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MOO6X-1Yd2J33LO9-005tzX for ; Mon, 23 Mar 2015 11:22:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 OpenPGP: url=hkp://keys.gnupg.net X-Provags-ID: V03:K0:bNfzN+m3TtwlL5LDcCQZXQ+YuTCMDu3Gik5e1e+mC7U++6HW+Sp oRoKRqn3EulD6T9NHGR/A6obwidpjx7XIwvwqyH7Ze+rodVGkj+3s5rx8Vic83EoGhmivBh Bvs81gUBQIo/CsDICS1Ay8/Br0tc9rcpv7MeqceWoOWllbwWazW8VYbDsokn8G/p199RFQN BvcLyCgqXWALHIXbXsA4A== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100832 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TkmKH9Ul2AXWR4eoDmTgAXCQjieRQRPmM Content-Type: multipart/mixed; boundary="------------020607030306070207040301" This is a multi-part message in MIME format. --------------020607030306070207040301 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When `bookmark-sort-flag' is set, the bmenu list displays in sorted order, but the function `bookmark-show-all-annotations' (keybinding `A'), does not. The first attached patch file, `simple.patch', is just that. The second attached patch file, `fancy.patch', adds an option to display the list of all annotations as a pre-formatted org-mode buffer, based upon the setting of a new variable, `bookmark-show-all-annotations-in-org-mode'. --=20 hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --------------020607030306070207040301 Content-Type: text/x-patch; name="simple.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="simple.patch" --- bookmark.el 2015-03-23 04:52:30.503739608 -0400 +++ bookmark-new.el 2015-03-23 05:15:50.763694210 -0400 @@ -1756,7 +1756,7 @@ (save-selected-window (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) (delete-region (point-min) (point-max)) - (dolist (full-record bookmark-alist) + (dolist (full-record (bookmark-maybe-sort-alist)) (let* ((name (bookmark-name-from-full-record full-record)) (ann (bookmark-get-annotation full-record))) (insert (concat name ":\n")) --------------020607030306070207040301 Content-Type: text/x-patch; name="fancy.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fancy.patch" --- bookmark.el 2015-03-23 04:52:30.503739608 -0400 +++ bookmark-new.el 2015-03-23 06:08:22.399592029 -0400 @@ -1751,15 +1751,30 @@ (switch-to-buffer-other-window old-buf)))))) =20 =20 + +(defvar bookmark-show-all-annotations-in-org-mode nil +"When not `nil', the command `bookmark-show-all-annotations' will +format its display as an org-mode buffer") + (defun bookmark-show-all-annotations () "Display the annotations for all bookmarks in a buffer." (save-selected-window (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) (delete-region (point-min) (point-max)) - (dolist (full-record bookmark-alist) + (unless (null bookmark-show-all-annotations-in-org-mode) + (org-mode)) + (let* ((heading-text "Bookmark annotations for ALL bookmarks") + (heading (if (null bookmark-show-all-annotations-in-org-mode)= + (concat "# " heading-text "\n---------------------= -------------------\n") + (concat "* " heading-text "\n"))) + (prefix (unless (null bookmark-show-all-annotations-in-org-mo= de) + "** "))) + (insert heading) + + (dolist (full-record (bookmark-maybe-sort-alist)) (let* ((name (bookmark-name-from-full-record full-record)) (ann (bookmark-get-annotation full-record))) - (insert (concat name ":\n")) + (insert (concat prefix name ":\n")) (if (and ann (not (string-equal ann ""))) ;; insert the annotation, indented by 4 spaces. (progn @@ -1769,10 +1784,9 @@ (beginning-of-line) ; paranoia (insert " ") (forward-line) - (end-of-line)))))) + (end-of-line))))))) (goto-char (point-min)))) =20 - (defun bookmark-bmenu-mark () "Mark bookmark on this line to be displayed by \\\\[bookmark-bmenu-select]." (interactive) --------------020607030306070207040301-- --TkmKH9Ul2AXWR4eoDmTgAXCQjieRQRPmM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVD+k9AAoJEDvrUfDmCx9LCPoQAIvjgzwXLUIRo4RApBPaJQkH BcngHteqNcOTFqOHCJnaIdO/GvQhi4EWgCMmDZoz4xCYdecb51zz5VRAMZ+a3PU+ eS+T28QRT9eqwr4W269+mbXhbFviBP3ikQ22vm9Ff35yvbMV9s/RxDi7ffc4Sg/8 yqvMAoRpCync3WTq7gUs8mi6cMZRQXYlzVeW0nGFqGA7LjPqs6em62YocfqwIGFH dgC2ehlTdaAedk2rHsZVbfX6ekHI4DdAp4uJPo78IO/S1vziRn+pdrnNbQmRw4q9 E9lxIE+s9E3CQBygbAGsZ8RwrKhswud0IpU+qp2KVwf33bkM5z6eWSy6LIYVrBbA +n1P7+Z1j2ne1hXZSD8AKD+Udk/RO3m8ITas5IskDX1tTkBFpVzTB0x97ILFoTuq bFLPpJWdsw3ArMqfCoQ+qdstuol0zGITL4MDz9bElYRYogLk8xPfQza8/dxo+kME 59YKgNNHVwdjN+GUFSZOjnxWxURNJT4qIRUsP3B+psPpKtSRUAqlos0Eun7gJJhJ X70If+d3Jfzt0DPyIfwoR04fPQahaKxiY761t3fEVwZJACOSCQkl9UKLdH8QjUge SnZd8TcivabwGo1ruShCXheOZYNV+mgV+gqpvL80pXdN/veqM3ipdy8af7+A5MlC DyQ2ve7D1owtqvZZxEVG =OB7e -----END PGP SIGNATURE----- --TkmKH9Ul2AXWR4eoDmTgAXCQjieRQRPmM--