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: Thu, 06 Mar 2008 19:51:59 +0000 Message-ID: <87zltbhbq8.fsf@bzg.ath.cx> References: <874pbj682f.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 1204833161 5991 80.91.229.12 (6 Mar 2008 19:52:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2008 19:52:41 +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 Thu Mar 06 20:53:07 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 1JXM9B-0005Y4-JO for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 20:52:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXM8d-0008LU-UQ for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 14:52:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXM8X-0008IB-Of for emacs-devel@gnu.org; Thu, 06 Mar 2008 14:52:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXM8U-0008Ck-08 for emacs-devel@gnu.org; Thu, 06 Mar 2008 14:52:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXM8T-0008Ch-Qy for emacs-devel@gnu.org; Thu, 06 Mar 2008 14:52:13 -0500 Original-Received: from hu-out-0506.google.com ([72.14.214.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXM8T-0006Jc-19 for emacs-devel@gnu.org; Thu, 06 Mar 2008 14:52:13 -0500 Original-Received: by hu-out-0506.google.com with SMTP id 23so454huc.1 for ; Thu, 06 Mar 2008 11:52:11 -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=PG0raVW3jzbbxuruSKYpXNcx+CrQj0QXefD0AwiPxA0=; b=gbXb1hiQZNja0rbAzlZVXTapa/y5TQqcA/uyyHcD9q1EPrqlR0rIgO47i9G0d8DwkfiDwo8J2FBw7UR0U2hkNvxMl06B6s6o5Zd8a0MDVlgrr5LzFnn3gOWpFheQB35l9R0QzEinOXse8elRb2Aa3yEcRl4t0C2ERbhxqmzl/9k= 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=JKhX6ZEwzbghBKjPDCqgs08rs/amHh5SMX8Pxm9y73OCmseGUUrJzv1f8QD394/gd6b4RaeuayS1PtqYc93FPveb+7oSLPO4lQhMD4M0eJdLb5En6BaguLJFYCFLxwFuh9E045jULWYAys5KRG8uZjVp8ncFmOKpEVPdLqkqzyg= Original-Received: by 10.78.177.3 with SMTP id z3mr651426hue.29.1204833130610; Thu, 06 Mar 2008 11:52:10 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id b30sm5536092ika.11.2008.03.06.11.52.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Mar 2008 11:52:06 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 3DA44157920; Thu, 6 Mar 2008 19:51:59 +0000 (GMT) In-Reply-To: (Stefan Monnier's message of "Thu, 06 Mar 2008 13:45:34 -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:91544 Archived-At: Stefan Monnier writes: >> Does anyone know why we have both 'bookmark.el' and 'gnus-bookmark.el'? >> The latter says: > >> ;; This file implements real bookmarks for Gnus, closely following the way >> ;; `bookmark.el' handles bookmarks. Most of the code comes from >> ;; `bookmark.el'. > >> I'm not sure why GNUS bookmarks should live in a separate space from >> other bookmarks, and my feeling is that they ought to be unified -- >> that is, the gnus-bookmark.el functionality absorbed into bookmark.el, >> with compatibility shims to transfer people's ~/.gnus.bmk file >> contents to ~/.emacs.bmk. (Of course, I really mean whatever the >> values of `gnus-bookmark-default-file' and `bookmark-default-file' >> are, respectively.) > >> Thoughts? > > Indeed, it seems worthwhile to merge them, tho I've never used > gnus-bookmarks. Bastien? Two answers: yes gnus-bookmarks.el should stored Gnus bookmarks in ~/.emacs.bmk (as every mode should do), but no we can't get rid of gnus-bookmarks.el because it adds some keybindings to Gnus. I think we should continue and generalize the work done by Tassilo. He added the buffer-local variable `bookmark-make-cell-function', which lets you define a handler for a mode: when setting a bookmark, a handler is added to the record and jumping to the bookmark will use this handler instead of `bookmark-jump' (see `bookmark-jump-internal'.) This is all good, but it only works for buffer visiting files and Info-mode. What would be great would be to change `bookmark-set' like this: - run every function in `bookmark-set-functions' until one returns something useful (those functions returning something similar to ` bookmark-buffer-file-name'); - if nil, then fall back on `bookmark-buffer-file-name' and return an error if this is nil. If we go for this, then gnus-bookmarks.el would do this: - add a function to `bookmark-set-functions', so that it return a sensible value (instead of the buffer-file-name) - locally set `bookmark-make-cell-function' to define the right handler (which should select a group/article in Gnus) I think this way let's people easily define man-bmk.el, or mew-bmk.el or whatever. What you think? -- Bastien