From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#11131: 24.0.94; Apropos bookmarks Date: Tue, 11 Sep 2012 13:41:08 +0530 Message-ID: <87wr01htcz.fsf@gmail.com> References: <81sjgqqyt2.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347351042 24450 80.91.229.3 (11 Sep 2012 08:10:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2012 08:10:42 +0000 (UTC) Cc: 11131@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 11 10:10:45 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 1TBLYR-00066p-Lv for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Sep 2012 10:10:43 +0200 Original-Received: from localhost ([::1]:40596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLYN-0006Iy-T2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Sep 2012 04:10:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLYD-0006He-Cj for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2012 04:10:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBLY6-0004dM-Vi for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2012 04:10:29 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBLY6-0004cW-S4 for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2012 04:10:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TBLYj-0004dD-Ka for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2012 04:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Sep 2012 08:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11131 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11131-submit@debbugs.gnu.org id=B11131.134735105617792 (code B ref 11131); Tue, 11 Sep 2012 08:11:01 +0000 Original-Received: (at 11131) by debbugs.gnu.org; 11 Sep 2012 08:10:56 +0000 Original-Received: from localhost ([127.0.0.1]:53578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBLYd-0004cu-TB for submit@debbugs.gnu.org; Tue, 11 Sep 2012 04:10:56 -0400 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:33375) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TBLYb-0004cn-RU for 11131@debbugs.gnu.org; Tue, 11 Sep 2012 04:10:54 -0400 Original-Received: by pbbrr4 with SMTP id rr4so441896pbb.3 for <11131@debbugs.gnu.org>; Tue, 11 Sep 2012 01:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Bi9tJ0QIXBuGQc23mvbvEBlgibL6kUF6kyOgGCFmQhY=; b=SsKe9sKkcEzIUQ0Shy9hrfBblDW2QTZmKAo6835OjJ9w0ABzqRPM0SQD2e1Q2wdNhc K73aMGNsSUqq16M0fMqus4NOxs5VaHMo8KhqaBuiYhdRlBwkGo5iFapfV7CvPOxblvtB UCwedN80Ct9RjKewq5SmvMMaSRwiNzp/DPCgMp5VceXPg0cYkBU94YU+EcQQrrfcsEmE NrpkFAESfllKNWcYIMvRQZyVQKyK79+cvCFBc+Av5Xtr3tCCJfnz36EAsXxgdlTt719F t6Rkqa/6yOawLTopA2nJZpj5IGOo9SAbtBV9OlVlXaEcFDYEwN9x/nvs2vCFAX/gocDf F/bg== Original-Received: by 10.66.82.3 with SMTP id e3mr25770462pay.56.1347351012604; Tue, 11 Sep 2012 01:10:12 -0700 (PDT) Original-Received: from debian-6.05 ([101.62.124.73]) by mx.google.com with ESMTPS id uu6sm9383441pbc.70.2012.09.11.01.10.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Sep 2012 01:10:11 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 30 Mar 2012 08:45:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) 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:64089 Archived-At: Stefan Monnier writes: >> Please provide an ido-like completion read for C-x r b. > > It's a bit late to change things for 24.1, but for 24.2 we can adjust. > Which part of "ido-like" would you like to see there? > >> Please provide a convenient default for C-x r m. You can work out the >> details. > > C-x r m already provides a default, so could you give some more details > as to what kind of default would be more "convenient"? Use case: ======== I mark frequently used functions with `C-x r m' and I create a bookmark to that function name using something like this in .emacs. (defadvice bookmark-set (around my-bookmark-set (name no-overwrite)) (ad-set-arg 0 (which-function)) (ad-set-arg 1 nil) (message "Bookmark: %s" (ad-get-arg 0)) ad-do-it) (ad-activate 'bookmark-set) With a simple ido-like completion (or iswitchb-like completion), I can jump to the function name quickly without typing the whole function name. (Indicative) patch ================== This is not an actual patch. Something like this will do. === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2012-08-08 08:48:57 +0000 +++ lisp/bookmark.el 2012-09-11 08:03:37 +0000 @@ -433,7 +433,7 @@ the empty string." (format " (%s): " default) ": "))) (str - (completing-read prompt + (ido-completing-read prompt bookmark-alist nil 0 Gnus also does it ================= Gnus also tries to achieve the same thing - that which I am trying to do wrt bookmarks - by it's own private user variable. ,---- from gnus-util.el :: L43 | (defcustom gnus-completing-read-function 'gnus-emacs-completing-read | "Function use to do completing read." | :version "24.1" | :group 'gnus-meta | :type `(radio (function-item | :doc "Use Emacs standard `completing-read' function." | gnus-emacs-completing-read) | ;; iswitchb.el is very old and ido.el is unavailable | ;; in XEmacs, so we exclude those function items. | ,@(unless (featurep 'xemacs) | '((function-item | :doc "Use `ido-completing-read' function." | gnus-ido-completing-read) | (function-item | :doc "Use iswitchb based completing-read function." | gnus-iswitchb-completing-read))))) `---- There is another way to do it ============================= Have bookmark use completing-read-function. Then I can set it to use ido-completing-read. ,----[ C-h v completing-read-function RET ] | completing-read-function is a variable defined in `minibuffer.el'. | Its value is completing-read-default | | This variable may be risky if used as a file-local variable. | | Documentation: | The function called by `completing-read' to do its work. | It should accept the same arguments as `completing-read'. | | [back] `---- Question ======== Now the question is, what is the best way to kill multiple mangoes with a single stone and not allow above customizations to proliferate on per-package basis. --