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 23:15:41 +0000 Message-ID: <87iqzzigv6.fsf@bzg.ath.cx> References: <874pbj682f.fsf@red-bean.com> <87zltbhbq8.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 1204845360 17517 80.91.229.12 (6 Mar 2008 23:16:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2008 23:16:00 +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 Fri Mar 07 00:16:27 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 1JXPK6-0005FF-DO for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 00:16:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXPJY-0005uZ-Fn for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 18:15:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXPJT-0005u7-Kv for emacs-devel@gnu.org; Thu, 06 Mar 2008 18:15:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXPJS-0005td-2h for emacs-devel@gnu.org; Thu, 06 Mar 2008 18:15:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXPJR-0005ta-Ta for emacs-devel@gnu.org; Thu, 06 Mar 2008 18:15:45 -0500 Original-Received: from hu-out-0506.google.com ([72.14.214.230]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXPJR-0001ET-Hu for emacs-devel@gnu.org; Thu, 06 Mar 2008 18:15:45 -0500 Original-Received: by hu-out-0506.google.com with SMTP id 23so35793huc.1 for ; Thu, 06 Mar 2008 15:15:44 -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=+9X7JPLO03kqQnEeWEiZcNHDRN4U24yVkqRditgLmaI=; b=BfwVu6cauyuE4eSEdgPRHN1BYsRDxyCbe9Ot7ViTk0i2BZUZuCPSyZB0N/aeYd9/sif2g5DtHJ77p+LN522UO3wWpi8pWpjelCkWVbpev4oSpgdALeAPY+7KRAsZORvESAdPSxyVYzIb/3ZmIoHjzpnPf1G1Mbck9VkPSkEw+wI= 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=QzrzP6VSqXtnjJJ0FDFWUGlyN80Ege72z+ywuesj4ZErbUVASH9QFNXuOforXRsGt4yIev2aH05Uy8+qQW8RZDA5ASi5EIeGHWTFCW0IjSSlg5PeNTznn8xu2SRXttwFufWfzw7VzPYa0ZTuH0xgVnJnR38J8cZzQh/WIuizZps= Original-Received: by 10.78.147.6 with SMTP id u6mr1398797hud.13.1204845343240; Thu, 06 Mar 2008 15:15:43 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id c24sm744002ika.10.2008.03.06.15.15.41 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Mar 2008 15:15:41 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 14BBC157920; Thu, 6 Mar 2008 23:15:40 +0000 (GMT) In-Reply-To: (Stefan Monnier's message of "Thu, 06 Mar 2008 16:27:11 -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:91561 Archived-At: Stefan Monnier writes: >> 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. > > I don't understand why you think so. Could you explain in more > details? This boils down to this: having a `bookmark-make-name-function' doing for the names of the bookmarks what `bookmark-make-cell-function' does for the records. This would be locally set depending on the mode we're in. For now the the name of the bookmark is set by bookmark-buffer-file-name which doesn't return anything unless you are in a buffer visiting a file or an Info node, or dired. > BTW bookmark-make-cell-function needs to be fixed so it doesn't receive > any `info-node' argument. This was needed back when > bookmark-make-cell-function didn't exist, but now that info uses > bookmark-make-cell-function, bookmark.el shouldn't need any > info-specific code. > >> - run every function in `bookmark-set-functions' until one returns >> something useful (those functions returning something similar to >> ` bookmark-buffer-file-name'); > > What would it do differently from bookmark-make-cell-function? Yes, bookmark-set-functions was not the right thing. Having a buffer-local value for `bookmark-make-name-function' should be enough. This is rather simple, and will help getting rid of the code. Should I go for this? -- Bastien