From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: simple requirement, so simple don't know how to search Date: Wed, 03 Feb 2010 18:58:02 +0100 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <851468.74289.qm@web63007.mail.re1.yahoo.com> <3dbe53b3-4966-4d45-bcf6-58737e1cfd3d@f17g2000prh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265220138 21124 80.91.229.12 (3 Feb 2010 18:02:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Feb 2010 18:02:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 03 19:02:16 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NcjYN-0004jV-KR for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Feb 2010 19:02:15 +0100 Original-Received: from localhost ([127.0.0.1]:46916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcjYN-0008Rb-2m for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Feb 2010 13:02:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcjVs-0007nm-6i for help-gnu-emacs@gnu.org; Wed, 03 Feb 2010 12:59:40 -0500 Original-Received: from [199.232.76.173] (port=39275 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcjVr-0007ne-Nq for help-gnu-emacs@gnu.org; Wed, 03 Feb 2010 12:59:39 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcjVq-0005MR-DO for help-gnu-emacs@gnu.org; Wed, 03 Feb 2010 12:59:39 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:51137) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcjVp-0005ML-T2 for help-gnu-emacs@gnu.org; Wed, 03 Feb 2010 12:59:38 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NcjVZ-0002Nb-3h for help-gnu-emacs@gnu.org; Wed, 03 Feb 2010 18:59:21 +0100 Original-Received: from 85.183.18.158 ([85.183.18.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Feb 2010 18:59:21 +0100 Original-Received: from rileyrgdev by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Feb 2010 18:59:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 82 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.183.18.158 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71659 Archived-At: rustom writes: > On Feb 3, 12:47 pm, Richard Riley wrote: >> Maindoor writes: >> > Exactly. It is a weird default. If it were global, that would be it. It would have been >> > perfect. I am a newbie to lisp. >> > Drew, If I may request, If you can hack it up a little bit, it would be great. >> > Perhaps concat the list as in bm-show-all and then do a bm-next on it, >> > instead of a getting the list from the local buffer. >> >> > Maindoor. >> >> Use bm-show-all and "space" to see the buffer associated with the >> bookmark under point. I had a brief look and, well, its way beyond my >> elisp - its some heady mixture of overlays for current buffer bookmarks >> and man made strings with text properties for global lists. I might try >> later but don't hold your breath ;) > > bm-show-all with emacs straight after startup (no open files/buffers) > says > "No bookmarks defined" As I would expect. I didn't try or suggest the persistent part of it so can not really add anything. > > If I then open a file where I had previously put a bookmark and do bm- > show-all -- it shows only that file's bookmarks, not the bookmarks in > other files. It shows all bookmarks in all buffers in the current session. BTW, only bookmarks set with the bm interface. The code loops on all open buffers. > So it appears that bm does not know of a bookmark unless you somehow > go to a bookmark and say Hello :-) > > Would you classify this as a working bookmark system? Well, yes. As it does work in the scenario previously discussed. I cant comment on your attempts at using persistence as I haven't tried it myself. > > My bm setup attempt is as under: > > (setq bm-restore-repository-on-load t) > (require 'bm) > (add-hook 'after-init-hook 'bm-repository-load) > > ;; Restoring bookmarks when on file find. > (add-hook 'find-file-hooks 'bm-buffer-restore) > > ;; Saving bookmark data on killing a buffer > (add-hook 'kill-buffer-hook 'bm-buffer-save) > > ;; Saving the repository to file when on exit. > ;; kill-buffer-hook is not called when emacs is killed, so we > ;; must save all bookmarks first. > (add-hook 'kill-emacs-hook '(lambda nil > (bm-buffer-save-all) > (bm-repository-save))) > > ;; Update bookmark repository when saving the file. > (add-hook 'after-save-hook 'bm-buffer-save) > > ;; Restore bookmarks when buffer is reverted. > (add-hook 'after-revert-hook 'bm-buffer-restore) > > (autoload 'bm-toggle "bm" "Toggle bookmark in current buffer." t) > (autoload 'bm-next "bm" "Goto bookmark." t) > (autoload 'bm-previous "bm" "Goto previous bookmark." t) > (global-set-key (kbd "") 'bm-next) > (global-set-key (kbd "") 'bm-previous) > (global-set-key (kbd "") 'bm-toggle) > (setq-default bm-buffer-persistence t) > -- Google Talk : rileyrgdev@googlemail.com http://www.google.com/talk ASCII ribbon campaign ( ) - against HTML email X & vCards / \