From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#5476: 23.1.91; bookmark open info node in fundamental mode Date: Tue, 26 Jan 2010 08:11:08 +0100 Organization: ThierryVolpiatto Message-ID: <877hr5pchf.fsf@tux.homenetwork> References: <87eildpxqg.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264491609 6542 80.91.229.12 (26 Jan 2010 07:40:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2010 07:40:09 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 26 08:40:02 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NZg1n-0000qp-M1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jan 2010 08:40:00 +0100 Original-Received: from localhost ([127.0.0.1]:54041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZg1o-0006Jo-Fa for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jan 2010 02:40:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZg1j-0006J8-6W for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:39:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZg1e-0006DS-C0 for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:39:54 -0500 Original-Received: from [199.232.76.173] (port=38461 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZg1e-0006DL-9h for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:39:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57654) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZg1d-0005H0-Hh for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:39:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NZffa-000162-25; Tue, 26 Jan 2010 02:17:02 -0500 X-Loop: bug-gnu-emacs@gnu.org In-Reply-To: Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jan 2010 07:17:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5476 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12644901994200 (code B ref -1); Tue, 26 Jan 2010 07:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Jan 2010 07:16:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZffD-00015h-8y for submit@debbugs.gnu.org; Tue, 26 Jan 2010 02:16:39 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZffB-00015a-TQ for submit@debbugs.gnu.org; Tue, 26 Jan 2010 02:16:38 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:38149) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZff8-0000W2-OX for submit@debbugs.gnu.org; Tue, 26 Jan 2010 02:16:34 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NZff6-0001gg-Tm for submit@debbugs.gnu.org; Tue, 26 Jan 2010 02:16:34 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:52897) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZff6-0001gT-MK for submit@debbugs.gnu.org; Tue, 26 Jan 2010 02:16:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZff5-0006Qb-N6 for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:16:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZff0-0006Oa-51 for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:16:30 -0500 Original-Received: from [199.232.76.173] (port=41870 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZfez-0006OQ-Nw for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:16:25 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:38758) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZfez-0001e4-86 for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 02:16:25 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NZfeu-0003G5-Id for bug-gnu-emacs@gnu.org; Tue, 26 Jan 2010 08:16:20 +0100 Original-Received: from 134.77.197-77.rev.gaoland.net ([77.197.77.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jan 2010 08:16:20 +0100 Original-Received: from thierry.volpiatto by 134.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jan 2010 08:16:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 70 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 134.77.197-77.rev.gaoland.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwB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 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -5.9 (-----) Resent-Date: Tue, 26 Jan 2010 02:17:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34720 Archived-At: Stefan Monnier writes: >>> 1. Emacs -q >>> 2. C-h i m d emacs RET >>> 3. C-x r m RET >>> 4. C-x r b and select the bookmark in step 3 (It is 'top' in my case) >>> >>> The info will be opened in fundamental mode. Tested with bookmark.el >>> from the devel repo. >>> >>> In GNU Emacs 23.1.91.2 (i386-apple-darwin9.8.0, Carbon Version 1.6.0 AppKit 949.54) >>> of 2010-01-01 on victoria.local >>> Windowing system distributor `Apple Inc.', version 10.5.8 >>> configured using `configure '--with-mac' '--prefix=/usr/local/opensource/emacs'' > >> The bug come from bookmark-default-handler that now doesn't handle >> buffer anymore (only file) thus most info functions are not loaded and >> `list*' (Cl) also. > >> I have fixed bookmark-default-handler, > > I'm not sure that would be right. Instead, the bookmark for the info > buffer should create a bookmark that uses a different handler. Exactly, it's what does Info-bookmark-jump: ,---- | (bookmark-default-handler | (list* "" `(buffer . ,buf) (bookmark-get-bookmark-record bmk))))) `---- But for that work bookmark-default-handler have to set a buffer-name with the buffer info given by the handler. Actually it doesn't, it use only the filename: ,---- | (if (not file) | (signal 'bookmark-error-no-filename (list 'stringp file)) | (set-buffer (find-file-noselect file)) `---- So we should add in bookmark-default-handler the info given by handler: ,---- | (let ((file (bookmark-get-filename bmk-record)) | =====>(buf (bookmark-prop-get bmk-record 'buffer)) | (forward-str (bookmark-get-front-context-string bmk-record)) | (behind-str (bookmark-get-rear-context-string bmk-record)) | (place (bookmark-get-position bmk-record))) `---- And then something like this: (need to clean for bookmark.el) ,---- | (if (and file (file-readable-p file) (not (buffer-live-p buf))) | (with-current-buffer (find-file-noselect file) (setq buf (buffer-name))) | ;; No file found. See if a non-file buffer exists for this. If not, raise error. | (unless (and buf (get-buffer buf)) | (signal 'file-error `("Jumping to bookmark" "No such file or directory" file)))) | (set-buffer buf) ;>>>>>>>Now we are in the buffer given by the handler `---- Though we also need a buffer-name entry in bookmark alist to be able to bookmark also in all non--filenames bookmarks, but that another thing. (See bookmark-extension.el). -- Thierry Volpiatto