From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el Date: Fri, 07 Mar 2008 21:43:53 -0500 Message-ID: <87bq5qexzq.fsf@red-bean.com> References: <874pbj682f.fsf@red-bean.com> <87zltbhbq8.fsf@bzg.ath.cx> <87iqzzigv6.fsf@bzg.ath.cx> <87ejan7xhq.fsf@member.fsf.org> <87hcfi3egg.fsf@bzg.ath.cx> <87abla8w6b.fsf@member.fsf.org> <87bq5qhba6.fsf@bzg.ath.cx> <871w6m8t59.fsf@member.fsf.org> <87ablamphg.fsf@red-bean.com> <87skz2lacp.fsf@bzg.ath.cx> <87tzjil9oz.fsf@red-bean.com> <8763vyl964.fsf@bzg.ath.cx> <874pbiypad.fsf@bzg.ath.cx> Reply-To: Karl Fogel NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204944256 13895 80.91.229.12 (8 Mar 2008 02:44:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 02:44:16 +0000 (UTC) Cc: Bastien , Tassilo Horn , Reiner Steib , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 03:44:42 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXp35-0000w9-CK for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 03:44:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXp2X-0000yL-Mk for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 21:44:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXp2T-0000yC-DV for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:43:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXp2S-0000xp-6V for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:43:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXp2R-0000xm-Vu for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:43:56 -0500 Original-Received: from sanpietro.red-bean.com ([66.146.193.61]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JXp2R-0004Ro-Kq for emacs-devel@gnu.org; Fri, 07 Mar 2008 21:43:55 -0500 Original-Received: from localhost ([127.0.0.1]:39209 helo=floss ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.68) (envelope-from ) id 1JXp2P-00069m-Ry; Fri, 07 Mar 2008 20:43:54 -0600 In-Reply-To: (Stefan Monnier's message of "Fri, 07 Mar 2008 21:38:49 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91692 Archived-At: Stefan Monnier writes: > I think we should do as I suggest above: a single function of no > arguments that is called first that returns a bookmark record, including > a suggested name (which can be nil so as to use the default heuristic > to decide the default bookmark name). > > This has another advantage: since the function is called first, it can > signal an error if the bookmark can't be created (e.g. if > buffer-file-name is nil), so we can drop the (or (local-variable-p ...) > (bookmark-buffer-file-name) (error ...)) test which is currently forced > to guess whether the actual bookmark construction function will work. I think this way is fine too. I almost proposed it in my first response, in fact -- well, something close to it. What I'd suggest is that `bookmark-make-record-function's value return an alist: ((`name' . NAME) (`record' . RECORD) ...) That's extensible, and if you don't want to supply a name, just leave out that alist element entirely. -Karl