From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: doc-view support for bookmark.el Date: Tue, 25 Dec 2007 12:32:02 -0500 Message-ID: References: <8763yn3v07.fsf@member.fsf.org> <87prwu3kg0.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1198603953 17634 80.91.229.12 (25 Dec 2007 17:32:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2007 17:32:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 25 18:32:45 2007 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 1J7De1-0005cQ-Be for ged-emacs-devel@m.gmane.org; Tue, 25 Dec 2007 18:32:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J7Ddg-0003AR-HQ for ged-emacs-devel@m.gmane.org; Tue, 25 Dec 2007 12:32:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J7Ddc-00037G-6i for emacs-devel@gnu.org; Tue, 25 Dec 2007 12:32:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J7Ddb-000364-ES for emacs-devel@gnu.org; Tue, 25 Dec 2007 12:32:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J7Ddb-00035r-7m for emacs-devel@gnu.org; Tue, 25 Dec 2007 12:32:19 -0500 Original-Received: from zue-tix-bbcs-dynip-191-099.vtx.ch ([83.228.191.99] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J7Dda-0008RU-Pe for emacs-devel@gnu.org; Tue, 25 Dec 2007 12:32:19 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id A464FB40F7; Tue, 25 Dec 2007 12:32:02 -0500 (EST) In-Reply-To: <87prwu3kg0.fsf@member.fsf.org> (Tassilo Horn's message of "Tue, 25 Dec 2007 15:42:07 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (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:85449 Archived-At: >>> on emacs-sources there was a request for a bookmarking facility for >>> doc-view, so I added support for it in bookmark.el. >> >> Could we try and find a way to make the two packages independent: >> bookmark.el should provide a way for doc-view.el to override the >> behavior of bookmark commands in doc-view buffers. > Sure, a general interface would be a good idea. Do you propose an one? > A simple approach could be to add 2 new variables > - bookmark-make-cell-function: A function that creates the record part > of the bookmark (default: the current bookmark-make-cell after > renaming it appropriately) > - bookmark-jump-function: A function that jumps to the given bookmark > location without selecting it. (default: the current > bookmark-jump-noselect) > What do you think? I don't have time to look into it right now, but I'd have expected that the second one is not needed: doc-view's bookmark-make-cell-function would create a bookmark entry which contains a callback to doc-view, so that bookmark-jump would not need a bookmark-jump-function, or in other words the bookmark-jump-function shouldn't be a global (buffer-local) variable, but an (optional) entry in each bookmark. Stefan