* bug#14933: 24.3; [PATCH] bookmark-set default changed
@ 2013-07-22 13:12 Leo Liu
2013-07-22 20:00 ` Juri Linkov
0 siblings, 1 reply; 3+ messages in thread
From: Leo Liu @ 2013-07-22 13:12 UTC (permalink / raw)
To: 14933
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
Before this change:
,----
| revno: 109508
| fixes bug: http://debbugs.gnu.org/12107
| committer: Juri Linkov <juri@jurta.org>
| 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bookmark.diff --]
[-- Type: text/x-patch, Size: 1174 bytes --]
=== 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#14933: 24.3; [PATCH] bookmark-set default changed
2013-07-22 13:12 bug#14933: 24.3; [PATCH] bookmark-set default changed Leo Liu
@ 2013-07-22 20:00 ` Juri Linkov
2013-07-23 1:03 ` Leo Liu
0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2013-07-22 20:00 UTC (permalink / raw)
To: Leo Liu; +Cc: 14933
> 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?
(car record) is used in `bookmark-set' when a specific
bookmark-make-record-function doesn't provide default values.
OTOH, (bookmark-buffer-name) in `bookmark-make-record' is intended
to do what `bookmark-insert-current-bookmark' used to do,
i.e. instead of typing a non-standard `C-u' binding,
now you can type `M-n' to insert the value of (bookmark-buffer-name)
to the minibuffer.
Your patch looks right, but please include
(bookmark-buffer-name) after (car record) as well,
i.e. you could use such code fragment in your patch:
(delq nil (delete-dups (append (bookmark-prop-get record 'defaults)
(list bookmark-current-bookmark
(car record)
(bookmark-buffer-name)))))
Then `M-n' will insert (car record) to the minibuffer,
and `M-n M-n' will insert (bookmark-buffer-name).
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#14933: 24.3; [PATCH] bookmark-set default changed
2013-07-22 20:00 ` Juri Linkov
@ 2013-07-23 1:03 ` Leo Liu
0 siblings, 0 replies; 3+ messages in thread
From: Leo Liu @ 2013-07-23 1:03 UTC (permalink / raw)
To: Juri Linkov; +Cc: 14933-done
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-23 1:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22 13:12 bug#14933: 24.3; [PATCH] bookmark-set default changed Leo Liu
2013-07-22 20:00 ` Juri Linkov
2013-07-23 1:03 ` Leo Liu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.