GNU bug report logs - #20152
24.4: bookmarks display wrong annotation (FIX INCLUDED)

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Fri, 20 Mar 2015 10:40:03 UTC

Severity: minor

Tags: wontfix

Found in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 20152 <at> debbugs.gnu.org
Subject: bug#20152: 24.4: bookmarks display wrong annotation (FIX INCLUDED)
Date: Wed, 25 Mar 2015 21:41:30 -0400
> In the bookmark list buffer, after viewing an annotation for a
> bookmark, navigating to another bookmark entry does not kill the
> annotation buffer display, leading to confusion about which entry
> the still-visible annotation refers.

Indeed.  How 'bout we only fix this part, not by removing the window,
but by keeping it up-to-date as long as the annotations buffer
is displayed?
Can you provide a patch which does just that?

> +(defvar bookmark-bmenu-toggle-auto-display-annotations nil

I think this is not needed: if the user wants to see the annotations,
she can hit `a' after which they'll be auto-updated as she moves in
the list.  And if she doesn't want to see the annotations, she can hit
`q' in the annotations buffer (which should call quit-window).

> +"When not `nil', function `bookmark-bmenu-show-annotation' (by
> +default, bound to `a`), toggles whether to automatically display
> +a bookmark's annotation as one navigates through the bookmark
> +list. Default is `nil'.")

We typically use "non-nil" and "nil" rather than "not `nil'" and
"`nil'".  Same for t which we don't put in `...'.  All other symbols
indeed do get `...'.

> +    (if bookmark-bmenu-auto-display-annotations
> +      (setq bookmark-bmenu-auto-display-annotations nil)
> +     (setq bookmark-bmenu-auto-display-annotations t)))

Aka (setq bookmark-bmenu-auto-display-annotations
          (not bookmark-bmenu-auto-display-annotations))

> +(defvar bookmark-bmenu-auto-display-annotations nil

I don't think we need this either, just use
(get-buffer-window "*Bookmark Annotation*" t) instead.

> +(defun bookmark-bmenu-post-command-hook-function ()
> +  (add-hook 'post-command-hook 'bookmark-bmenu-motion-hook-function t t))
> +
> +(add-hook 'bookmark-bmenu-mode-hook 'bookmark-bmenu-post-command-hook-function)

Better keep bookmark-bmenu-mode-hook nil by default.  IOW, the code
should simply be added to bookmark-bmenu-mode instead.


        Stefan




This bug report was last modified 3 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.