From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el Date: Sat, 08 Mar 2008 10:06:56 +0000 Message-ID: <87ejalv8an.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> <8763vyl964.fsf@bzg.ath.cx> <874pbiypad.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204970859 5946 80.91.229.12 (8 Mar 2008 10:07:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 10:07:39 +0000 (UTC) Cc: Karl Fogel , 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 11:08:06 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 1JXvyI-0008Hw-7Q for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 11:08:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXvxj-0002tb-VH for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 05:07:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXvxJ-0002rn-Vc for emacs-devel@gnu.org; Sat, 08 Mar 2008 05:07:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXvxH-0002ow-Cq for emacs-devel@gnu.org; Sat, 08 Mar 2008 05:07:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXvxG-0002oY-B1 for emacs-devel@gnu.org; Sat, 08 Mar 2008 05:07:03 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.152]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXvxF-0001V6-Qe for emacs-devel@gnu.org; Sat, 08 Mar 2008 05:07:02 -0500 Original-Received: by fg-out-1718.google.com with SMTP id d23so921678fga.30 for ; Sat, 08 Mar 2008 02:07: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=94nBcGQxaSoQtSPk/ymBvjwwI3klE9PIyLRd5KtHcrA=; b=Q4gQNIARwJ3ceKd9sGQ4RyogWGMDsZ0t64h1uBYCW/6NYeQlZwNtCxayS0C0aRzDq7dNMnHLu7AS+AiHO40dk4PuabhTpCpQwAQIdPTqjxo7kWav8qLRUT8FtbFxS3qjLmnewylfey46RQfzP/ydYHNgCZTEdX3QZzLDZLheCx0= 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=pw38118xQjV52sFMUHccHJWz/KiQ3efKBM52nYyjNczX/pIcwagkPvcGkJJ41cmABlMxkoO55tmtQsM5CydxHWcHOvLTzeFsA6JKupLb8JzFwn9qhM8rhqWRoIkphYXshm9B/tdj7L+/MFQu27GK02FEcmqJfMOEzTbWTgUj7Wc= Original-Received: by 10.82.124.10 with SMTP id w10mr5988973buc.18.1204970820653; Sat, 08 Mar 2008 02:07:00 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id t12sm4935445gvd.2.2008.03.08.02.06.58 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 08 Mar 2008 02:06:59 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id CDF8015796E; Sat, 8 Mar 2008 10:06:56 +0000 (GMT) In-Reply-To: (Stefan Monnier's message of "Fri, 07 Mar 2008 21:38:49 -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:91709 Archived-At: Stefan Monnier writes: >> Following Karl advice I've applied a different patch. There is now >> `bookmark-make-name-function' *and* `bookmark-make-record-function', >> both buffer local. For an example on how this is supposed to work >> look at the changes I've made in info.el. > >> I think it's okay like this. If you plan to change anything please >> tell me before I work on gnus-bookmark.el. > > 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). If we get rid of the annotation argument for this single function, it means the annotation has to be done before this function returns sth that can be used as the suggested name for the bookmark. I'm all for a single function -- see my "single hesitation" in this thread. I suggested an optional argument "name" so that this function would only return a suggested name for the bookmark, or a complete record if name is nil. (defun bookmark-make-record-for-my-mode (name) (if name (buffer-file-name) ; or sth else [return the record])) With this solution, we could have a single function and get rid of the annotation without making it mandatory to *read* the annotation before `bookmark-set' is able to propose a suggested name. What do you think? BTW, reading a new annotation and sending it doesn't restore the window configuration here. I will fix this. -- Bastien