From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Guerry Newsgroups: gmane.emacs.devel Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el Date: Fri, 07 Mar 2008 17:45:55 +0000 Message-ID: <8763vyl964.fsf@bzg.ath.cx> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204911990 30960 80.91.229.12 (7 Mar 2008 17:46:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 17:46:30 +0000 (UTC) Cc: Tassilo Horn , Stefan Monnier , Reiner Steib , emacs-devel@gnu.org To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 07 18:46:55 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 1JXgeY-0004Ed-Dv for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 18:46:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXge0-0002vU-NR for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 12:46:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXgdv-0002rW-UR for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:46:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXgdu-0002nM-8v for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:46:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXgdt-0002my-ND for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:46:01 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXgdt-0007fI-2r for emacs-devel@gnu.org; Fri, 07 Mar 2008 12:46:01 -0500 Original-Received: by ug-out-1314.google.com with SMTP id a2so4312102ugf.48 for ; Fri, 07 Mar 2008 09:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; bh=8SDHf37tpwL6QK+bstZb/0yhWsYXl2PzjvWoYmb/SAo=; b=gHq8wtro43ZQdy9EkAgL57dh+c+gpPSmmg0WzR1P8YASFhCj2ni8znfvziCuTJVMjOe0/hc7dEtMNbSnVQatTwXZ9mS8gtCJs4BTPRUIKXY3RUQBqjtW4AROe57QymrC87UQTwuSDvk7cLEviSWXK2+NQKtnoMorVX4sLi205js= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; b=ZnPRQ5jt5Di0/4EWHZl9cc5hPy2wVhtZgJPp8fMaWz2Bn6qixrza6bbC3q7ZAc6iJEiKkur4yybEQ9l2Wmu5K1j4GsOh8whX93vMK15la1Eb+aeAz+he0LfmKE5NGnrY4J5UKcpqX2FnHo8lFsiLk0qi78H/4yPMdyRaD72lzB0= Original-Received: by 10.78.166.7 with SMTP id o7mr4524769hue.77.1204911959530; Fri, 07 Mar 2008 09:45:59 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id c24sm8020850ika.10.2008.03.07.09.45.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Mar 2008 09:45:57 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 04AB1157920; Fri, 7 Mar 2008 17:45:55 +0000 (GMT) In-Reply-To: <87tzjil9oz.fsf@red-bean.com> (Karl Fogel's message of "Fri, 07 Mar 2008 12:34:36 -0500") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:91652 Archived-At: Karl Fogel writes: >> (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? Yes, we should move Info-related code out of bookmark.el. >> 2. Use `bookmark-make-name-function' function in `bookmark-set' instead >> of `bookmark-make-record-function': > > You mean for making it buffer-local, right? Right! > But wouldn't we need to make them *both* buffer-local? External code > will still need to call `bookmark-make-record-function' too. Yes, they should be both buffer-local. > The overall plan sounds reasonable to me, modulo the above questions. My single remaining hesitation is this one: having two buffer local variables is a bit too much, since each mode would have to set them both. Better use `bookmark-make-record-function' for both purposes: returning a name *or* returning a record. For example, the function for text files would look like: (defun bookmark-make-record-for-text-file (annotation &optional name) "Return the record. If optional arg NAME is non-nil, just return the default name for this bookmark." ...) I think it's easier. Each mode should have to worry about one buffer-local variable (and each dev would only read one docstring...) > 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! :-) Ok, I continue to agree ! Unless told otherwise (Tassilo?) I will implement the solution with one single variable, and let Info-mode set this variable accordingly. -- Bastien