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 12:34:36 -0500 Message-ID: <87tzjil9oz.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> 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 1204911331 28270 80.91.229.12 (7 Mar 2008 17:35:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 17:35:31 +0000 (UTC) Cc: Tassilo Horn , Stefan Monnier , Reiner Steib , emacs-devel@gnu.org To: Bastien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 07 18:35:57 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 1JXgU7-0007iM-6R for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 18:35:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXgTZ-0002jR-G9 for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 12:35:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXgSv-0002NQ-Qe for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:34:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXgSu-0002Lv-2S for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:34:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXgSt-0002Lm-JD for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:34:39 -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 1JXgSt-0004WG-4c for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:34:39 -0500 Original-Received: from localhost ([127.0.0.1]:59883 helo=floss ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.68) (envelope-from ) id 1JXgSr-00089B-3A; Fri, 07 Mar 2008 11:34:37 -0600 In-Reply-To: <87skz2lacp.fsf@bzg.ath.cx> (Bastien's message of "Fri, 07 Mar 2008 17:20:22 +0000") 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:91651 Archived-At: Bastien writes: > He is right about the fact that you forget to rename the variable, but > renaming this variable is not enough - sorry to insist. Oh, it's okay -- I wasn't claiming anything beyond Tassilo being right about the intention of my rename. > We also need to update `bookmark-buffer-name' so that it returns a > sensible value in *any* mode: for now it only returns a value in a > buffer visiting a file, in dired and in info mode. > > My proposal is to add this: > > (defvar bookmark-make-name-function nil > "A function that should be called to return the name of the bookmark. > Modes may set this variable buffer-locally to enable a default name to > be proposed when calling `bookmark-set'.") Okay... > I thought your mistake about not renaming `bookmark-make-cell-function' > was not a mistake about renaming, but a mistake about forgetting to make > `bookmark-buffer-name'.handle this new variable. ...no, all I was doing was the rename, but... > I think we should: > > 1. Update `bookmark-buffer-name' like this: > > (defun bookmark-buffer-name () > "Return the name of the current buffer's file, non-directory. > In Info, return the current node." ...if we're going to have `bookmark-make-name-function' now, shouldn't Info mode implement that function just like any other mode would? Why have bookmark.el handle Info-related things? > 2. Use `bookmark-make-name-function' function in `bookmark-set' instead > of `bookmark-make-record-function': You mean for making it buffer-local, right? (We're not actually calling it.) But wouldn't we need to make them *both* buffer-local? External code will still need to call `bookmark-make-record-function' too. > ... > (or > (local-variable-p 'bookmark-make-name-function) > (bookmark-buffer-file-name) > (error "Buffer not visiting a file or directory")) > ... > > If you agree, I will make those changes. They are required for the > rewrite of gnus-bookmark.el. The overall plan sounds reasonable to me, modulo the above questions. Although I've been guilty earlier in this thread of agreeing to readily without looking at the code, I have looked at the code this time, and still agree! :-) Thanks, -Karl