From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: Djvu mode Date: Tue, 4 Oct 2011 05:21:11 -0500 Message-ID: <20106.56855.285581.623515@gargle.gargle.HOWL> References: <871uv17nar.fsf@gmail.com> <874nzwvjgi.fsf@maguirefamily.org> <82bou4y5kz.fsf@gmail.com> <87d3ejtjrb.fsf_-_@niu.edu> <87r52zl29j.fsf_-_@maguirefamily.org> <20100.46983.768447.889306@gargle.gargle.HOWL> <87d3ejgmmz.fsf@maguirefamily.org> <20103.17789.10053.53615@gargle.gargle.HOWL> <878vp49g56.fsf@maguirefamily.org> <20105.64927.931187.909507@gargle.gargle.HOWL> <87fwj9oltj.fsf@maguirefamily.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1317780925 16817 80.91.229.12 (5 Oct 2011 02:15:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2011 02:15:25 +0000 (UTC) Cc: joakim@verona.se, emacs-devel@gnu.org To: Camm Maguire Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 05 04:15:20 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RBH0y-0000hA-5C for ged-emacs-devel@m.gmane.org; Wed, 05 Oct 2011 04:15:20 +0200 Original-Received: from localhost ([::1]:45100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBH0x-0005mX-7e for ged-emacs-devel@m.gmane.org; Tue, 04 Oct 2011 22:15:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB27g-0002k9-Nl for emacs-devel@gnu.org; Tue, 04 Oct 2011 06:21:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB27f-0008Mp-EH for emacs-devel@gnu.org; Tue, 04 Oct 2011 06:21:16 -0400 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:19950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB27f-0008Md-5F for emacs-devel@gnu.org; Tue, 04 Oct 2011 06:21:15 -0400 Original-Received: from regnitz (u010774.lc.ehu.es [158.227.8.163]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 2123D3980A; Tue, 4 Oct 2011 12:21:13 +0200 (CEST) In-Reply-To: <87fwj9oltj.fsf@maguirefamily.org> X-Mailer: VM 8.2 trial under 24.0.50.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 131.188.164.197 X-Mailman-Approved-At: Tue, 04 Oct 2011 22:15:14 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144573 Archived-At: 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