emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#14933: closed (24.3; [PATCH] bookmark-set default


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14933: closed (24.3; [PATCH] bookmark-set default changed)
Date: Tue, 23 Jul 2013 01:04:02 +0000

Your message dated Tue, 23 Jul 2013 09:03:28 +0800
with message-id <address@hidden>
and subject line Re: bug#14933: 24.3; [PATCH] bookmark-set default changed
has caused the debbugs.gnu.org bug report #14933,
regarding 24.3; [PATCH] bookmark-set default changed
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14933: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14933
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3; [PATCH] bookmark-set default changed Date: Mon, 22 Jul 2013 21:12:49 +0800
Before this change:

,----
| revno: 109508
| fixes bug: http://debbugs.gnu.org/12107
| committer: Juri Linkov <address@hidden>
| branch nick: trunk
| timestamp: Wed 2012-08-08 11:48:57 +0300
| message:
|   * lisp/bookmark.el: Add `defaults' property to the bookmark record.
|   (bookmark-current-buffer): Doc fix.
|   (bookmark-make-record): Add `defaults' property with default values
|   to the bookmark record.
|   (bookmark-minibuffer-read-name-map): Remove key binding "\C-u"
|   with `bookmark-insert-current-bookmark'.
|   (bookmark-set): Get `defaults' property from the bookmark record
|   and use it in `read-from-minibuffer'.
|   (bookmark-insert-current-bookmark): Remove function.
| 
|   * lisp/info.el (Info-bookmark-make-record): Add `defaults' property
|   with values of canonical Info node name, the current Info file name
|   and the current Info node name.
`----

bookmark-set used to (at least in 24.2) use (car record) i.e. NAME as
the default bookmark name when read from minibuffer. Now I am seeing
buffer name instead. Is this change intentional? Any objection to
applying the attached patch?

Thanks,
Leo

=== modified file 'lisp/bookmark.el'
--- lisp/bookmark.el    2013-05-09 01:40:20 +0000
+++ lisp/bookmark.el    2013-07-22 13:04:48 +0000
@@ -481,19 +481,17 @@
 (defun bookmark-make-record ()
   "Return a new bookmark record (NAME . ALIST) for the current location."
   (let ((record (funcall bookmark-make-record-function)))
+    ;; Set up default name if the function does not provide one.
+    (unless (stringp (car record))
+      (if (car record) (push nil record))
+      (setcar record (or bookmark-current-bookmark (bookmark-buffer-name))))
     ;; Set up defaults.
     (bookmark-prop-set
      record 'defaults
      (delq nil (delete-dups (append (bookmark-prop-get record 'defaults)
                                    (list bookmark-current-bookmark
-                                         (bookmark-buffer-name))))))
-    ;; Set up default name.
-    (if (stringp (car record))
-        ;; The function already provided a default name.
-        record
-      (if (car record) (push nil record))
-      (setcar record (or bookmark-current-bookmark (bookmark-buffer-name)))
-      record)))
+                                         (car record))))))
+    record))
 
 (defun bookmark-store (name alist no-overwrite)
   "Store the bookmark NAME with data ALIST.


--- End Message ---
--- Begin Message --- Subject: Re: bug#14933: 24.3; [PATCH] bookmark-set default changed Date: Tue, 23 Jul 2013 09:03:28 +0800 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.4)
Fixed in trunk.

On 2013-07-23 04:00 +0800, Juri Linkov wrote:
> Your patch looks right, but please include
> (bookmark-buffer-name) after (car record) as well

Thanks and done as suggested.

Leo


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]