unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 20150@debbugs.gnu.org
Subject: bug#20150: 24.4: bookmarks: return from editing annotations (FIX INCLUDED)
Date: Fri, 20 Mar 2015 12:22:31 -0400	[thread overview]
Message-ID: <550C4947.9080900@gmx.com> (raw)
In-Reply-To: <jwvk2ybyc8i.fsf-monnier+emacsbugs@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 389 bytes --]

Pleasure.

On 03/20/2015 10:28 AM, Stefan Monnier wrote:
>> The fix restores focus to the bmenu-list window, and restores point to
>> where it had been prior to editing the annotation.
> 
> Could you send it as a patch, otherwise I can't really see what's different.
> 
> 
>         Stefan
> 


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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: emacs_bug_20150.patch --]
[-- Type: text/x-patch; name="emacs_bug_20150.patch", Size: 1230 bytes --]

--- bookmark.el	2015-03-20 12:08:33.477496667 -0400
+++ bookmark-new.el	2015-03-20 12:09:49.401494206 -0400
@@ -889,13 +889,24 @@
         (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))
+  (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))
-    (bookmark-bmenu-surreptitiously-rebuild-list))
-  (kill-buffer (current-buffer)))
+    (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)))
 
 
 (defun bookmark-edit-annotation (bookmark-name-or-record)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-03-20 16:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20  7:24 bug#20150: 24.4: bookmarks: return from editing annotations (FIX INCLUDED) Boruch Baum
2015-03-20 14:28 ` Stefan Monnier
2015-03-20 16:22   ` Boruch Baum [this message]
2019-07-02  1:54 ` Stefan Kangas
2019-07-02  3:23   ` Stefan Kangas
2019-07-03 20:05     ` Stefan Kangas
2019-07-04 19:20       ` Stefan Kangas
2019-07-04 19:40         ` Stefan Kangas
2019-07-13  7:30           ` Eli Zaretskii
2019-07-13 13:09             ` Stefan Kangas
2019-07-13 13:24               ` Eli Zaretskii
2019-07-13 13:51                 ` Stefan Kangas
2019-07-14  1:48                   ` Glenn Morris
2019-07-14  6:04                     ` Eli Zaretskii
2019-07-14  6:29               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=550C4947.9080900@gmx.com \
    --to=boruch_baum@gmx.com \
    --cc=20150@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).