From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set" Date: Sun, 05 Aug 2012 03:01:39 +0300 Organization: JURTA Message-ID: <87obmqb40s.fsf@mail.jurta.org> References: <87ipd38tc7.fsf@mail.jurta.org> <87vch3xbf4.fsf@mail.jurta.org> <87obmudymn.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344125244 17266 80.91.229.3 (5 Aug 2012 00:07:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Aug 2012 00:07:24 +0000 (UTC) Cc: 12107@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 05 02:07:24 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SxoNP-0002qz-6Q for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Aug 2012 02:07:23 +0200 Original-Received: from localhost ([::1]:50687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxoNN-0000tX-Tb for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Aug 2012 20:07:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxoNL-0000tS-Sh for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 20:07:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxoNK-0007iQ-P7 for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 20:07:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxoNK-0007iK-LV for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 20:07:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SxoUn-0000cb-U3 for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 20:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Aug 2012 00:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12107 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12107-submit@debbugs.gnu.org id=B12107.13441256502317 (code B ref 12107); Sun, 05 Aug 2012 00:15:01 +0000 Original-Received: (at 12107) by debbugs.gnu.org; 5 Aug 2012 00:14:10 +0000 Original-Received: from localhost ([127.0.0.1]:34158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SxoTx-0000bJ-T9 for submit@debbugs.gnu.org; Sat, 04 Aug 2012 20:14:10 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:49140 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SxoTv-0000bC-2j for 12107@debbugs.gnu.org; Sat, 04 Aug 2012 20:14:08 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id CE9A5451CB26; Sat, 4 Aug 2012 17:06:20 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 01 Aug 2012 20:10:04 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62825 Archived-At: > Is there a good reason why we can't use a list in (car record) and avoid > using a new `defaults' field? > If so, please add a comment explaining it. BTW, I noticed your comment about removing `bookmark-insert-current-bookmark', so it could be replaced with a list of the same default values for M-n (this patch is an addition to the previous patch): === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2012-08-04 23:12:29 +0000 +++ lisp/bookmark.el 2012-08-04 23:54:51 +0000 @@ -473,6 +473,12 @@ (defvar bookmark-make-record-function 'b (defun bookmark-make-record () "Return a new bookmark record (NAME . ALIST) for the current location." (let ((record (funcall bookmark-make-record-function))) + ;; 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. @@ -738,10 +744,6 @@ (defvar bookmark-minibuffer-read-name-ma (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) (define-key map "\C-w" 'bookmark-yank-word) - ;; This C-u binding might not be very useful any more now that we - ;; provide access to the default via the standard M-n binding. - ;; Maybe we should just remove it? --Stef-08 - (define-key map "\C-u" 'bookmark-insert-current-bookmark) map)) ;;;###autoload @@ -900,19 +902,6 @@ (defun bookmark-edit-annotation (bookmar (bookmark-edit-annotation-mode bookmark-name-or-record)) -(defun bookmark-insert-current-bookmark () - "Insert into the bookmark name currently being set the value of -`bookmark-current-bookmark' in `bookmark-current-buffer', defaulting -to the buffer's file name if `bookmark-current-bookmark' is nil." - (interactive) - (let ((str - (with-current-buffer bookmark-current-buffer - (or bookmark-current-bookmark - (bookmark-buffer-name))))) - (insert str))) - - (defun bookmark-buffer-name () "Return the name of the current buffer in a form usable as a bookmark name. If the buffer is associated with a file or directory, use that name."