[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#336400: emacs-goodies-el: please add xdvi-search.el



Hi Peter and all others,

On Oct 31 2005, Peter S Galbraith wrote:
> I am CC'ing this to interested parties, including
> debian-emacsen@lists.debian.org for discussion.

Nice. I'm including debian-tetex-maint@lists.debian.org also, as they
may have some insight in the situation.

> Rogério Brito <rbrito@ime.usp.br> wrote:
> > As you probably know, Emacs is used quite a lot by people that use LaTeX
> > and in the usual workflow of generating a LaTeX document, one usually
> > goes through the compilation of the source and then sees the output
> > using a variety of modes, the most common of which is seeing a DVI
> > output file.
> > 
> > Since LaTeX supports source specials and the xdvi in current Debian
> > versions support forward and backward searching, it would be a very good
> > addition if the file xdvi-search.el could be added to the package
> > emacs-goodies-el.
> > 
> > The xdvi-search.el file can be obtained from:
> > <http://xdvi.sourceforge.net/xdvi-search.el>.
> 
> Thanks.  This would be useful to me also as I also use LaTeX.
> 
> I just tried this at work on sarge and xdvi wasn't compiled with this
> support, so it didn't work.  I'll try it at home on unstable.

Humm, this is actually quite strange, since I was using this
Forward/Backward thing with sarge when it wasn't released (I'm always
tracking testing, BTW).

Do you use AUCTeX? Based on the fact that you included them on the CC,
I'd assume that you do. With current AUCTeX, you have to compile the
file with source specials and this can be achieved with C-c C-t C-s.

Then, from that moment on, you can go to the desired point in xdvi just
by typing something like C-c h; I included this in my .emacs so that I
can use forward/backward searching:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; To enable forward-search with xdvi(k)
(add-to-list 'load-path (expand-file-name "~/.emacs.d/"))
(require 'xdvi-search)
(add-hook 'LaTeX-mode-hook (lambda ()
			     (outline-minor-mode)
			     (reftex-mode)
			     (setq reftex-plug-into-AUCTeX t)
			     (local-set-key "\C-ch" 'xdvi-jump-to-line)))

; to avoid clash with prefix of auctex
(setq outline-minor-mode-prefix "\C-c\C-o")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The 'load-path thing that you see is just because I currently keep my
xdvi-search.el inside of the ~/.emacs.d/ directory.

I also have this on my .Xdefaults file, BTW:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!!! XDvi
xdvi*highlight:                 red
xdvi*keepPosition:              True
xdvi.wwwBrowser:                loadurl
xdvi.shrinkFactor:              4
xdvi.expert:                    True
xdvi.paper:                     a4
!xdvi.editor:                   gnuclient -q +%l %f
xdvi.editor:                    emacsclient --no-wait +%l %f
!xdvi.mfMode:                    ljfour:1200
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Feel free to grab whatever you want from it.

> I wonder if users would be better served if this were included either
> in auctex or in some part of tetex (perhaps tetex-extra).  So my
> questions for everybody are:

I think that forward/backward searching is independent of the use of
AUCTeX (despite the fact that heavy LaTeX users use AUCTeX already,
probably).

I don't think that Frank Küster & Co. would like to include it in
tetex-extra (I think that they would prefer it in an agnostic way, since
Debian will soon have both teTeX and TeX Live on its repository).

It might be a possibility to have xdvi-search.el on tex-common, though
(which is the basic infra-structure package for the TeX distributions in
Debian from now on).

> - Which package do you think xdvi-search.el should be added to?

I'd still say that emacs-goodies-el is the strongest candidate of it
all, but having it in tex-common might make sense (unless others are
vehemently opposed to that).

> - If you maintain tetex or auctex, do you think it should o in your
>   package?   Are you willing to add it?

Whatever is the decision, I think that it deserves to be more
well-known for Emacs users.

Oh, BTW, if I am not mistaken, kdvi (the dvi previewer for KDE) even has
some tips and long explanations on how kdvi supports source specials.

> Note: the author needs to run `M-x checkdoc' on it.  I'll file a bug
> report at Sourceforge.

Nice. I didn't know about the existence of checkdoc. :-)


Regards, Rogério.

-- 
Rogério Brito : rbrito@ime.usp.br : http://www.ime.usp.br/~rbrito
Homepage of the algorithms package : http://algorithms.berlios.de
Homepage on freshmeat:  http://freshmeat.net/projects/algorithms/



Reply to: