GNU bug report logs - #20150
24.4: bookmarks: return from editing annotations (FIX INCLUDED)

Previous Next

Package: emacs;

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

Date: Fri, 20 Mar 2015 07:26:02 UTC

Severity: minor

Tags: patch

Found in version 24.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#20150: closed (24.4: bookmarks: return from editing
 annotations (FIX INCLUDED))
Date: Sun, 14 Jul 2019 06:30:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 14 Jul 2019 09:29:01 +0300
with message-id <837e8lyvrm.fsf <at> gnu.org>
and subject line Re: bug#20150: 24.4: bookmarks: return from editing annotations (FIX INCLUDED)
has caused the debbugs.gnu.org bug report #20150,
regarding 24.4: bookmarks: return from editing annotations (FIX INCLUDED)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
20150: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20150
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Boruch Baum <boruch_baum <at> gmx.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4: bookmarks: return from editing annotations (FIX INCLUDED)
Date: Fri, 20 Mar 2015 03:24:04 -0400
[Message part 3 (text/plain, inline)]
When completing a bookmark annotation edit, the point on the bmenu-list
would move to point-max and the selected window would be wherever the
annotation buffer had been displayed.

The fix restores focus to the bmenu-list window, and restores point to
where it had been prior to editing the annotation.

(defun bookmark-send-edited-annotation ()
  "Use buffer contents as annotation for a bookmark.
Lines beginning with `#' are ignored."
  (interactive)
  (if (not (derived-mode-p 'bookmark-edit-annotation-mode))
      (error "Not in bookmark-edit-annotation-mode"))
  (goto-char (point-min))
  (while (< (point) (point-max))
    (if (looking-at "^#")
        (bookmark-kill-line t)
      (forward-line 1)))
  ;; Take no chances with text properties.
  (let
    ((annotation (buffer-substring-no-properties (point-min) (point-max)))
	 (bookmark-name bookmark-annotation-name)
     (return-line
       (with-current-buffer "*Bookmark List*"
         (line-number-at-pos)))
     (return-column
       (with-current-buffer "*Bookmark List*"
         (current-column))))
    (bookmark-set-annotation bookmark-name annotation)
    (setq bookmark-alist-modification-count
          (1+ bookmark-alist-modification-count))
    (kill-buffer (current-buffer))
    (pop-to-buffer (get-buffer "*Bookmark List*"))
    (bookmark-bmenu-list)
    (goto-char (point-min))
    (forward-line (1- return-line))
    (forward-char return-column)))

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0

[attachment (text/plain, attachment)]
[signature.asc (application/pgp-signature, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 20150-done <at> debbugs.gnu.org
Subject: Re: bug#20150: 24.4: bookmarks: return from editing annotations (FIX
 INCLUDED)
Date: Sun, 14 Jul 2019 09:29:01 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Sat, 13 Jul 2019 15:09:39 +0200
> Cc: 20150 <at> debbugs.gnu.org
> 
> Please see this updated patch with those two changes.

Thanks, pushed to the master branch.


This bug report was last modified 5 years and 318 days ago.

Previous Next


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