Subject: bug#20150: closed (Re: bug#20150: 24.4: bookmarks: return from editing annotations (FIX INCLUDED))

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 14 Jul 2019 06:30:02 +0000

Your bug report

#20150: 24.4: bookmarks: return from editing annotations (FIX INCLUDED)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20150: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20150
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20150: 24.4: bookmarks: return from editing annotations (FIX INCLUDED)
From: Eli Zaretskii <[email-masked]>
To: Stefan Kangas <[email-masked]>
Cc: [email-masked]
Date: Sun, 14 Jul 2019 09:29:01 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Stefan Kangas <[email-masked]>
> Date: Sat, 13 Jul 2019 15:09:39 +0200
> Cc: [email-masked]
> 
> Please see this updated patch with those two changes.

Thanks, pushed to the master branch.

Subject: 24.4: bookmarks: return from editing annotations (FIX INCLUDED)
From: Boruch Baum <[email-masked]>
To: [email-masked]
Date: Fri, 20 Mar 2015 03:24:04 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

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