auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] preview-datadir and XEmacs


From: David Kastrup
Subject: Re: [AUCTeX-devel] preview-datadir and XEmacs
Date: Tue, 21 Mar 2006 14:23:09 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> Okay, I think I found the reason why `preview-datadir' is not set
> correctly for XEmacs (which results in all preview-latex icons/images
> not being found).  There is a make target `install-metadata' in both
> Makefile and preview/Makefile.  The latter one is called first during
> `make install' and includes auto.el (which sets `preview-datadir'
> correctly) as the file to be appended to auto-autoloads.el.  After
> that `install-metadata' from the toplevel Makefile will be called
> which deletes the auto-autoloads.el which was just generated again and
> generates a new one, but this time with tex-site.el (not
> preview/auto.el) as the file to be appended.  In tex-site.el, however,
> `preview-datadir' is not being set.
>
> One idea for fixing this would be to eliminate the `install-metadata'
> call in preview/Makefile and just let the toplevel Makefile append
> preview/auto.el to the auto-autoloads.el file if AUCTeX was configured
> with preview-latex.  But actually I'd prefer a solution which is
> handled by preview/Makefile.  Any ideas?

Just a few comments: since I am currently down with a flu, I can't do
too much elaborate work.

It sounds like I goofed up when combining the preview-latex and AUCTeX
installation procedures for XEmacs, and that some of the generated
stuff is left out in the cold in consequence.  The proper procedure
would likely involve concatening all relevant source files for the
autogenerated stuff.  Moving stuff around is probably not an option as
long as --without-preview is going to be supported.

There are Emacsen where preview-latex won't work, so this option is
not going anytime soon, even though it leads to stuff like the Fedora
RPM omitting preview-latex for no good reason at all (basically, they
made their own spec file at one point of time and this forked spec
file did not appear trivial to change so as to include preview-latex.
Something like that).

So we should probably cook up some procedure that will be able to
append both auto.el and tex-site.el?

Here is a patch to prv-install.el that will try to append a _list_ of
files instead of just a single one.  I think this should probably help
with doing the trick.  We probably need not bother about a
preview-less XEmacs package.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
--- prv-install.el      23 Jun 2005 22:08:58 +0200      1.12
+++ prv-install.el      21 Mar 2006 14:19:35 +0100      
@@ -51,7 +51,7 @@
         (package-name (pop command-line-args-left))
         (release-version (eval (read (pop command-line-args-left))))
         (author-version (eval (read (pop command-line-args-left))))
-        (append-file (pop command-line-args-left))
+        append-file
          (lisp-dir (expand-file-name (format "lisp/%s/" package-name)
                                     package-dir))
          (metadata (expand-file-name "_pkg.el" lisp-dir))
@@ -103,11 +103,12 @@
               (update-autoload-files (list lisp-dir) "auctex"))
              (t (error "Failed to generate autoloads.")))
       (fset 'message si:message))
-    (when (file-exists-p generated-autoload-file)
-      (with-temp-buffer (insert-file append-file)
-                       (append-to-file (point-min) (point-max)
-                                       generated-autoload-file))
-      (byte-compile-file generated-autoload-file))))
+    (while (setq append-file (pop command-line-args-left))
+      (when (file-exists-p generated-autoload-file)
+       (with-temp-buffer (insert-file append-file)
+                         (append-to-file (point-min) (point-max)
+                                         generated-autoload-file))))
+    (byte-compile-file generated-autoload-file)))
 
 
 ;;; prv-install.el ends here

reply via email to

[Prev in Thread] Current Thread [Next in Thread]