auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] "No connection to bus" message in Cygwin Emacs


From: Tassilo Horn
Subject: Re: [AUCTeX] "No connection to bus" message in Cygwin Emacs
Date: Wed, 10 Jun 2015 16:53:37 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Sebastien Vauban <address@hidden>
writes:

Hi Sebastien,

>>> What's not clear to me at this instant is that `C-h f
>>> TeX-evince-dbus-p' doesn't return me a link to the file where the
>>> function is defined, as you can see on
>>> http://screencast.com/t/7HSPqoXIJm.
>>
>> That's indeed strange.  Is than only with this function, also with
>> other AUCTeX functions,
>
> Trying functions at random: `C-h f tex-region-header RET' returns
>
>   ┌────
>   │ tex-region-header is a compiled Lisp function in `tex-mode.el'.
>
>   │ (tex-region-header FILE &optional BEG)
>
>   │ If there is a TeX header in the current buffer, write it to FILE.
>   │ Return point at the end of the region so written, or zero.  If
>   │ the optional buffer position BEG is specified, then the region
>   │ written out starts at BEG, if this lies before the start of the header.
>
>   │ If the first line matches `tex-first-line-header-regexp', it is
>   │ also written out.  The variables `tex-start-of-header' and
>   │ `tex-end-of-header' are used to locate the header.  Note that the
>   │ start of the header is required to be within the first 100 lines.
>   └────
>
> but... `tex-mode.el' is found in `/usr/share/emacs/24.5/lisp/textmodes'!
> So, there is well an installation problem?

Nope, that's.  Emacs ships with tex-mode.el but that's a separate thing
from AUCTeX.  All AUCTeX functions start with TeX-* or LaTeX-* (case
matters) or font-latex-*.

> Well, maybe, I should have tested `TeX-*' functions, right?

Yup!

> Let's do it.  `C-h f TeX-kill-job RET' (chosen at random) returns:
>
>   ┌────
>   │ TeX-kill-job is an interactive autoloaded Lisp function in `tex-buf.el'.
>
>   │ [Arg list not available until function definition is loaded.]
>
>   │ Not documented.
>   └────
>
> which is well found in `/cygdrive/d/Users/fni/.emacs.d/elpa/auctex-11.88.6'.
>
> If the above is good, it shows that there is a link for some (most?)
> AUCTeX functions.

Well, that's all good.  Really strange that the link isn't there for at
least one function...

>>> Installation problem?  I'm using the ELPA version!
>>
>> I've also checked with 11.88.6 from ELPA and Emacs 24.5, and there
>> the link is there.
>
> Note -- I'm using the ~/.emacs.d/elpa for both Emacs versions.

You mean, the older cygwin emacs and the more recent windows version?
It could be the case that auctex has been compiled with the newer
version resulting in byte-code which is not completely compatible with
the older emacs version on cygwin.

>>> `C-h v AUCTeX-version' returns "11.88.6"...
>>>
>>> And `M-x locate-library RET tex-site' returns "Library is file
>>> ~/.emacs.d/elpa/auctex-11.88.6/tex-site.elc".
>>>
>>> So, it seems well installed, nope?
>>
>> Yes, that's what's expected.  Locating the libraries tex and latex
>> also suggests tex.el and latex.el in that directory, right?  (There
>> has been a problem with some special distribution of Emacs which did
>> some setup in default.el and thereby overwrote user and package.el
>> settings.  There, the result was that tex-site.el from AUCTeX ELPA
>> eventually triggered loading of a bundled, system-wide AUCTeX install
>> so effectively you couldn't upgrade your AUCTeX version.)
>
> Let's test it.
>
> - `M-x locate-library tex RET' returns:
>   Library is file ~/.emacs.d/elpa/auctex-11.88.6/tex.elc
>
> - `M-x locate-library latex RET' returns:
>   Library is file ~/.emacs.d/elpa/auctex-11.88.6/latex.elc
>
> So far, so good?

Yes.

>>> PS- I don't have `evince' installed on my Windows.  I'm using
>>> SumatraPDF to view the PDF files.  I don't know about evince, but
>>> that one refreshes automatically the PDF after each compilation.
>>
>> Yes, evince does that, too.  And forward and backward search with
>> evince as a viewer are implemented using DBus communication if
>> possible in AUCTeX.
>
> I could go the Evince route in the future.  But, right now, I'm happy
> with SumatraPDF which opens very fast (unlike Acrobat Reader).
>
>> Now I see where the error probably comes from.  When dbus.el gets
>> loaded, it'll call `dbus--init-bus' defined in dbusbind.c, and that
>> can possibly throw a "No connection to bus" error.  However, when
>> I test with cygwin's emacs 24.4.1 and auctex 11.88.6, I get no such
>> error and the source link in the help buffer is also there.
>>
>> Anyway, you could try the following things:
>>
>>   1. Wrap a (let ((dbus-debug nil)) ...) around the (and ...) in
>>     `TeX-evince-dbus-p'.
>>   2. If that doesn't help, also wrap the (require 'dbus nil :no-error)
>>      form in a (dbus-ignore-errors ...).
>>
>> Then do `M-x byte-recompile-directory' for
>> ~/.emacs.d/elpa/auctex-11.88.6/ and restart emacs.  Do you still get
>> the error then?
>
> I tried to implement #1, removed the `tex.elc' file (to be really sure),
> `C-M-x'ed the function, and directly tried to revert the `.tex' buffer
> to see if the mode changed from Fundamental to something else.
>
> Without restarting Emacs, the above worked (well, almost).  I now have
> a buffer in "LaTeX/P" mode, much better.

Ah, great.  I guess recompiling with the (older) cygwin will also do the
trick then.  (See my guess above.)

> Though, when pressing `C-c C-c', I now have:
>
>   ┌────
>   │ Running `LaTeX' on `haie-ecm' with ``pdflatex  -file-line-error   
> -interaction=nonstopmode "\input" haie-ecm.tex''
>   │ This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) 
> (preloaded format=pdflatex)
>   │  restricted \write18 enabled.
>   │ entering extended mode
>   │ LaTeX2e <2014/05/01>
>   │ Babel <3.9l> and hyphenation patterns for 79 languages loaded.
>   │ ! I can't find file `haie-ecm.tex'.
>   │ <*> \input haie-ecm.tex
>
>   │ (Press Enter to retry, or Control-Z to exit)
>   │ Please type another input file name
>   │ ! Emergency stop.
>   │ <*> \input haie-ecm.tex
>
>   │ !  ==> Fatal error occurred, no output PDF file produced!
>   │ Transcript written on texput.log.
>
>   │ TeX Output exited abnormally with code 1 at Wed Jun 10 16:32:24
>   └────
>
> If I now run `which pdflatex' in a Shell buffer inside Cygwin Emacs,
> I get:
>
>     /cygdrive/c/texlive/2014/bin/win32/pdflatex
>
> Problem using my TeX Live PDFLaTeX from Cygwin Emacs?

Well, what happens when you execute the same pdflatex command in the
cygwin bash from the directory containing the master file haie-ecm.tex?

Bye,
Tassilo




reply via email to

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