unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Marcin Borkowski <mbork@wmi.amu.edu.pl>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: RE: Advice on studying Emacs Lisp files
Date: Mon, 26 Jan 2015 16:39:21 -0800 (PST)	[thread overview]
Message-ID: <9e95e862-171e-4565-93c1-02f0a28b18b5@default> (raw)
In-Reply-To: <87ppa1du6q.fsf@wmi.amu.edu.pl>

> >> I want the bookmarks to be highlighted as soon as I visit the file...
> >> I do not intend to use bookmarks very heavily (i.e., not too many of
> >> them), and I'd like them to be highlighted by default, without any
> >> explicit action.
> >
> > See `bmkp-(un)light-bookmarks' and `bmkp-(un)light-this-buffer'.
> >
> > Use them from Lisp or interactively.  `bmkp-(un)light-bookmarks':
> 
> So do I get it correctly that the best bet (assuming that I want the
> bookmarks to be highlighted by default) is to call bmkp-light-bookmarks
> in some hook firing after loading?

After loading what?  That function lights up a set of bookmarks.
You could pass it your `bookmark-alist' as arg and it would then
light up *all* of your bookmarks.  But such all-bookmarks behavior
is not provided interactively, because it is not in fact useful.

`bmkp-light-bookmarks' just highlights.  It does not open any
buffers, and if a bookmark's buffer is not displayed then (for
better or worse) its highlighting is simply applied to the
current buffer.

`bmkp-light-bookmarks' is meant for bookmark locations that are
already displayed.  The interactive use cases defined for it
are really those that make sense (whether you invoke it
interactively or not).

Highlighting a bookmark makes little sense if the bookmarked
location is not visible.  And if it is visible then its buffer
is displayed somewhere.  Go to the buffer and then highlight
bookmarks there.  If you turn on `bmkp-auto-light-when-jump'
then getting there by jumping takes care of highlighting the
location.

I don't know what your best bet is.  I'd say just customize
`bmkp-auto-light-when-jump' and `bmkp-auto-light-when-set'
to the value `all-in-buffer'.  Then setting or jumping to a
bookmark will light all of the bookmarks in its buffer.

Or put `bmkp-light-this-buffer' on a hook such as  a mode hook
or `find-file-hook'.

I'd say start by playing with bookmarks a bit: setting them,
jumping to them, cycling among them, etc.  Play with autonamed
bookmarks, which are particularly useful with highlighting.

Once you find out how you will actually be using bookmarks,
you will, I think, discover how you want them to make use of
highlighting.



  reply	other threads:[~2015-01-27  0:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 21:57 Advice on studying Emacs Lisp files Marcin Borkowski
2015-01-14 21:59 ` Drew Adams
2015-01-14 22:22   ` Marcin Borkowski
2015-01-14 23:30     ` Drew Adams
2015-01-17 14:44       ` Marcin Borkowski
2015-01-17 20:32         ` Drew Adams
2015-01-23 23:06           ` Marcin Borkowski
2015-01-23 23:38             ` Drew Adams
2015-01-24 11:57               ` Marcin Borkowski
2015-01-24 15:40                 ` Drew Adams
2015-01-26 22:59                   ` Marcin Borkowski
2015-01-27  0:39                     ` Drew Adams [this message]
2015-01-26 23:04               ` Marcin Borkowski
2015-01-27  0:39                 ` Drew Adams
2015-01-28 23:53                   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e95e862-171e-4565-93c1-02f0a28b18b5@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@wmi.amu.edu.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).