From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Maindoor Newsgroups: gmane.emacs.help Subject: Re: simple requirement, so simple don't know how to search Date: Wed, 3 Feb 2010 22:03:05 -0800 (PST) Message-ID: <78610.95524.qm@web63007.mail.re1.yahoo.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-161090863-1265263385=:95524" X-Trace: ger.gmane.org 1265263423 28625 80.91.229.12 (4 Feb 2010 06:03:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2010 06:03:43 +0000 (UTC) To: help-gnu-emacs@gnu.org, Richard Riley Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 04 07:03:37 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 1NcuoS-0005Wu-Nl for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Feb 2010 07:03:37 +0100 Original-Received: from localhost ([127.0.0.1]:36835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcuoR-0003Dh-OH for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Feb 2010 01:03:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ncuo1-0003DO-NE for help-gnu-emacs@gnu.org; Thu, 04 Feb 2010 01:03:09 -0500 Original-Received: from [199.232.76.173] (port=50407 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncuo1-0003D9-09 for help-gnu-emacs@gnu.org; Thu, 04 Feb 2010 01:03:09 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ncuny-00034J-Vo for help-gnu-emacs@gnu.org; Thu, 04 Feb 2010 01:03:08 -0500 Original-Received: from web63007.mail.re1.yahoo.com ([69.147.96.218]:29029) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Ncuny-00034D-KP for help-gnu-emacs@gnu.org; Thu, 04 Feb 2010 01:03:06 -0500 Original-Received: (qmail 96051 invoked by uid 60001); 4 Feb 2010 06:03:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265263385; bh=wI6wGsEq1+Y3TIm4Ae7dBAbFhF0/Jg0Tfv51sw/snH4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=a69nLbuHqrDbRzfzNJFKsjHPlT0H2jcjqqDELf4Gxhx1kWWerb60nINe707S6Rp+3OAz+R0Bfmh5CpO99yyp/ku4LmDXQnxlW+ELMJKWn5zOXXVCPlttNFsylbx7S4hFQzhWqk+Q4R1zHhM/qyToCFKhF6SC6R7CS4lAtsFOzik= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=qwR2p0JDEQrGKh2i4+Rr8EpI4hLv41jFhvVgpw2NdNTR6sJa08MYd71ehHXi8HVhSOVY6EdyRYlReEBlzJmGUSm46XapV4Zg8HDBktYUpku4IpGe4F99taM1Lux/uaPxLm86y4ZF5OB52g6Hvn5BCbiZYlhqz14O9S7M9uWjENM=; X-YMail-OSG: Mw0bmqEVM1ntdsBTdXcgi5UVR4OciAVH_2JuB6pw7RHoc0FJE7TXFUia8bVx0RL98KLaJj9UFOozhbc7nKOx0rEuCG3MUWXi0gAm48kCv1wFS3p02a7xl9A3aTJdGg079fwFE2OVb1F.b8ZnFpaOX86DaZLWC0qe88sCIYsEuPiRkO6iH2wqXQWAxPEKg8flSLxIKe_Ws7uotqCC5XluPkQQuEOQs1D1vLM.8dmEJZThJjWytca2o3UKhfO9v7_FxyLzw58S4qWZjk4QGBphpazOSieB.UDNzwe.usDpMYV69QHEFNhu18C_V1V1NPhpGwVLxXpRAs8uObue6.jphoYRaRo3hD3Fo601gaAoBxHTlHLQhrWiH3SIFro- Original-Received: from [61.12.14.5] by web63007.mail.re1.yahoo.com via HTTP; Wed, 03 Feb 2010 22:03:05 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) 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:71678 Archived-At: --0-161090863-1265263385=:95524 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Found exactly what I was looking for: bookmarknav . Give it a try. Maindoor. --- On Wed, 2/3/10, Richard Riley wrote: From: Richard Riley Subject: Re: simple requirement, so simple don't know how to search To: help-gnu-emacs@gnu.org Date: Wednesday, February 3, 2010, 11:28 PM 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. I= t 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 b= e 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.=A0 I cant comment on your attempts at using persistence=A0 as I haven't tried it myse= lf. > > My bm setup attempt is as under: > > (setq bm-restore-repository-on-load t) > (require 'bm) > (add-hook 'after-init-hook 'bm-repository-load) > >=A0=A0=A0;; Restoring bookmarks when on file find. >=A0=A0=A0(add-hook 'find-file-hooks 'bm-buffer-restore) > >=A0=A0=A0;; Saving bookmark data on killing a buffer >=A0=A0=A0(add-hook 'kill-buffer-hook 'bm-buffer-save) > >=A0=A0=A0;; Saving the repository to file when on exit. >=A0=A0=A0;; kill-buffer-hook is not called when emacs is killed, so we >=A0=A0=A0;; must save all bookmarks first. >=A0=A0=A0(add-hook 'kill-emacs-hook '(lambda nil > =A0=A0=A0 =A0 =A0=A0=A0 =A0=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0=A0=A0(bm-buffer= -save-all) > =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0=A0=A0(bm-repository= -save))) > >=A0=A0=A0;; Update bookmark repository when saving the file. >=A0=A0=A0(add-hook 'after-save-hook 'bm-buffer-save) > >=A0=A0=A0;; Restore bookmarks when buffer is reverted. >=A0=A0=A0(add-hook 'after-revert-hook 'bm-buffer-restore) > > (autoload 'bm-toggle=A0=A0=A0"bm" "Toggle bookmark in current buffer." t) > (autoload 'bm-next=A0 =A0=A0=A0"bm" "Goto bookmark."=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0=A0=A0t) > (autoload 'bm-previous "bm" "Goto previous bookmark."=A0 =A0 =A0 =A0 =A0 = =A0 t) > (global-set-key (kbd "")=A0=A0=A0'bm-next) > (global-set-key (kbd "") 'bm-previous) > (global-set-key (kbd "") 'bm-toggle) > (setq-default bm-buffer-persistence t) > --=20 Google Talk : rileyrgdev@googlemail.com=A0 http://www.google.com/talk ASCII ribbon campaign ( ) - against HTML email=A0 X =A0 =A0 =A0 =A0 =A0 =A0=A0=A0& vCards / \ =0A=0A=0A --0-161090863-1265263385=:95524 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Found exactly what I was looking for: bookmar= knav . Give it a try.

Maindoor.

--- On Wed, 2/3/10, Richar= d Riley <rileyrgdev@gmail.com> wrote:

From: Richard Riley <rileyrgdev@gmail.com>
Subject: Re= : simple requirement, so simple don't know how to search
To: help-gnu-em= acs@gnu.org
Date: Wednesday, February 3, 2010, 11:28 PM

rustom <rustompmody@gmail.com> w= rites:

> On Feb 3, 12:47 pm, Richard Riley <ril= eyrg...@gmail.com> wrote:
>> Maindoor <sanjeevfi...@yahoo.com> writes:
>> > Ex= actly. 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 g= reat.
>> > Perhaps concat the list as in bm-show-all and then d= o 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<= br>>> elisp - its some heady mixture of overlays for current buffer b= ookmarks
>> and man made strings with text properties for global l= ists. 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 woul= d expect. I didn't try or suggest the persistent part of
it so can not r= eally add anything.

>
> If I then open a file where I had p= reviously 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 bookmark= s 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 classif= y this as a working bookmark system?

Well, yes. As it does work in t= he 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:
>
&g= t; (setq bm-restore-repository-on-load t)
> (require 'bm)
> (ad= d-hook 'after-init-hook 'bm-repository-load)
>
>  &nb= sp;;; Restoring bookmarks when on file find.
>   (add-= hook 'find-file-hooks 'bm-buffer-restore)
>
>   = ;; Saving bookmark data on killing a buffer
>   (add-h= ook 'kill-buffer-hook 'bm-buffer-save)
>
>   ;; = Saving the repository to file when on exit.
>   ;; kil= l-buffer-hook is not called when emacs is killed, so we
>  =  ;; must save all bookmarks first.
>   (add-hook = 'kill-emacs-hook '(lambda nil
>         = ;                  &= nbsp;(bm-buffer-save-all)
>                       &= nbsp;  (bm-repository-save)))
>
>   ;;= Update bookmark repository when saving the file.
>   = (add-hook 'after-save-hook 'bm-buffer-save)
>
>  &nbs= p;;; Restore bookmarks when buffer is reverted.
>   (a= dd-hook 'after-revert-hook 'bm-buffer-restore)
>
> (autoload 'b= m-toggle   "bm" "Toggle bookmark in current buffer." t)
&= gt; (autoload 'bm-next     "bm" "Goto bookmark."  =                    t= )
> (autoload 'bm-previous "bm" "Goto previous bookmark."   = ;         t)
> (global-set-key (kbd "<f8>")=    'bm-next)
> (global-set-key (kbd "<M-f8>") 'b= m-previous)
> (global-set-key (kbd "<C-f8>") 'bm-toggle)
> (setq-default bm-buffer-persistence t)
>

= --
Google Talk : rileyrgdev@googlemail.com  http://ww= w.google.com/talk
ASCII ribbon campaign ( )
- against HTML email=   X
             & vCar= ds / \




=0A=0A=0A=0A= --0-161090863-1265263385=:95524--