unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Roland Winkler" <winkler@gnu.org>
To: Camm Maguire <camm@maguirefamily.org>
Cc: joakim@verona.se, emacs-devel@gnu.org
Subject: Re: Djvu mode
Date: Tue, 4 Oct 2011 05:21:11 -0500	[thread overview]
Message-ID: <20106.56855.285581.623515@gargle.gargle.HOWL> (raw)
In-Reply-To: <87fwj9oltj.fsf@maguirefamily.org>

On Mon Oct 3 2011 Camm Maguire wrote:
> I have some questions, but I wonder if you would mind posting a short
> series of keystrokes and their effects as I did to help me get a quick
> grasp of the features.  I've looked at the bindings, but commands
> which I think should be adding annotations seem to be producing no
> effect on the 'A' *djvu* output page for example.

Oops, now I see what you mean.

The buffer *djvu* is only intended for those special cases that can
not (yet) be handled by the existing commands and tools.

A normal work flow is as follows:

To visit a djvu file use fjvu-find-file. This is the only entry
point to this package. You may want to bind this command to a key
you like. I use

  (global-set-key "\C-cd" 'djvu-find-file)

If you use this command to visit file foo.djvu, it puts you into the
(not editable) buffer foo@djvu. Normally, this buffer is all you
need.

The menu bar of this buffer lists most of the commands with their
repsective key bindings. For example, you can:

- Use `g' to go to the page you want. (Yes, this package operates on
  one page at a time. I guess that anything else would be too slow
  for large documents.)

- Use `v' to (re)start djview using the position in foo.djvu
  matching where point is in foo@djvu. (I find djview fast enough
  for this, even for larger documents.)

- To highlight a region in foo.djvu mark the corresponding region in
  foo@djvu (as usual, transient-mark-mode comes handy for this).
  Then type `h' and add a comment in the minibuffer if you like.
  Type C-x C-s to save this editing. Then type `v' to (re)start
  djview to show what you have done.

- The editing of the text, annotation and outline (bookmark) layers
  really happens in the buffers foo@djvu-t.el, foo@djvu-a.el, and
  foo@djvu-o.el. (The djvused syntax used in these buffers is so
  close to elisp that it was natural to give these buffers a
  djvu-edit-mode that is derived from emacs-lisp-mode.)

  You can check what is happening by switching to these buffers. The
  respective switching commands put point in these buffers such that
  it matches where you were in foo@djvu.

  The menu bar lists a few low-level commands available for editing
  these buffers directly. If you know the djvused syntax, sometimes
  it can also be helpful to do such editing "by hand".

- But wait: The syntax in the annotations buffer foo@djvu-a.el is a
  slightly modified djvused syntax. djvused can only highlight
  rectangles. So the highlighting of larger regions of text must use
  multiple rectangles (i.e., multiple djvused "mapareas"). To make
  editing easier, these are combined in the buffer foo@djvu-a.el.
  (Before saving these things, they are converted using the proper
  djvused syntax.)

  When you visit a djvu file, djvu-mode recognizes mapareas
  belonging together by checking that "everything else in these
  mapareas except for the rects" is the same. So if you entered a
  (unique) comment, this allows djvu-mode to combine all the
  mapareas when you visit such a file the second time. Without a
  comment, this fails!

I guess I can put this description into djvu.el.

Roland




  parent reply	other threads:[~2011-10-04 10:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 20:17 highlighting large regions (comments) with font-lock keywords Eric Schulte
2011-09-28  1:30 ` Stefan Monnier
2011-09-28 13:08   ` Eric Schulte
2011-09-28 14:18 ` Djvu mode Camm Maguire
2011-09-28 16:50   ` Sivaram Neelakantan
2011-09-29 16:07     ` gnu-emacs-sources down? [was: Djvu mode] Roland Winkler
2011-09-29 16:21       ` gnu-emacs-sources down? Glenn Morris
2011-09-29 17:39       ` gnu-emacs-sources down? [was: Djvu mode] Sivaram Neelakantan
     [not found]       ` <87r52zl29j.fsf_-_@maguirefamily.org>
     [not found]         ` <20100.46983.768447.889306@gargle.gargle.HOWL>
     [not found]           ` <87d3ejgmmz.fsf@maguirefamily.org>
     [not found]             ` <20103.17789.10053.53615@gargle.gargle.HOWL>
2011-10-02  4:22               ` Djvu mode Camm Maguire
2011-10-03 18:23                 ` Roland Winkler
2011-10-03 19:41                   ` Camm Maguire
2011-10-03 19:59                   ` Camm Maguire
2011-10-03 20:35                   ` Camm Maguire
2011-10-04  6:20                     ` Roland Winkler
2011-10-12 15:19                       ` Camm Maguire
2011-10-14 12:52                         ` Roland Winkler
2011-10-04 10:21                     ` Roland Winkler [this message]
2011-09-28 21:02   ` Stefan Monnier
2011-09-29  6:26   ` Roland Winkler
2011-09-29  9:08     ` joakim
2011-09-29 19:07       ` Roland Winkler
2011-09-29 20:06         ` Camm Maguire
2011-09-29 21:34         ` joakim
2011-10-01 17:01           ` Roland Winkler
2011-10-01 17:19             ` joakim
2011-10-01 18:04               ` Roland Winkler

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=20106.56855.285581.623515@gargle.gargle.HOWL \
    --to=winkler@gnu.org \
    --cc=camm@maguirefamily.org \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).