• Bug#258249: auctex installed not default breaks xemacs' auctex

    From =?iso-8859-1?q?Frank_K=FCster?=@1:229/2 to The original reporter on Fri Aug 20 20:10:10 2004
    From: [email protected]

    Hi AUCTeXnicians,

    maybe you can help with this strange bug report in Debian. I don't even
    know if it is a problem with AUCTeX, or rather with XEmacs.

    The original reporter wrote:

    On a system with emacs and xemacs installed, installing auctex breaks
    the auctex of xemacs in some cases.

    It breaks when [...]

    when there is no site-wide startup file containing (require 'tex-site),
    but this line is the only one of the user's XEmacs startup file:


    [email protected] (Frank K�ster) wrote:

    Thomas Deselaers <[email protected]> wrote:

    this is with an .xemacs/init.el file of

    -------------------------------------------------------------------
    (require 'tex-site)
    -------------------------------------------------------------------


    when doing the same with parameter -debug-init we get:
    -------------------------------------------------------------------
    Signaling: (wrong-number-of-arguments add-to-list 3)
    add-to-list(load-path "/usr/share/emacs/site-lisp/auctex/" append)
    load-internal("tex-site" nil t nil undecided)
    load("tex-site" nil t nil)
    require(tex-site)
    load-internal("/u/deselaers/.xemacs/init.el" t t t undecided)
    load("/u/deselaers/.xemacs/init.el" t t t)
    load-user-init-file()
    load-init-file()
    command-line()
    normal-top-level()
    -------------------------------------------------------------------

    When choosing "loaded by default" in debconf, we have no problems.

    (This writes the require... in the site-wide startup file, or rather in /etc/emacs/site-start.d/50auctex.el.)

    This is strange (too me, at least). In XEmacs' own tex-site.el, the
    load-path call is commented out, and consequently there's no load-path
    call in tex-site.elc.

    Therefore it seems that the tex-site.el that is loaded by the (require 'tex-site) line is auctex's. I am not familiar to XEmacs, but I don't
    think that this is correct. Hm, maybe it is, because here XEmacs finds /usr/local/share/emacs/site-lisp/tex-site.el with

    M-x locate-library RET tex-site

    although "/usr/local/share/emacs/site-lisp/" is not in the load-path.

    So now let's assume that XEmacs does load auctex's tex-site.el. Then I
    still do not understand where the wrong add-to-list statement comes
    from. In tex-sit.el (the one from auctex-11.14-3) we have one occurence
    of "load-path", and that is

    (add-to-list 'load-path TeX-lisp-directory).

    TeX-lisp-directory is defined in the same file as

    (defcustom TeX-lisp-directory
    (concat "/usr/share/"
    (symbol-name debian-emacs-flavor)
    "/site-lisp/auctex/")
    "The directory where the AUC TeX Lisp files are located."
    :group 'TeX-file
    :type 'directory)

    What came to my mind since then is that I am probably using a different
    XEmacs. I have xemacs21_21.4.6-8 from woody (but could easily install an
    other in my sid chroot), unstable has 21.4.15, but the reporting user
    seems to use Debian testing (sarge). Unfortunately, there's currently no
    xemacs package in sarge (whyever), and I don't know which he had back
    then.

    TIA, Frank
    --
    Frank K�ster, Biozentrum der Univ. Basel
    Abt. Biophysikalische Chemie

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From David Kastrup@1:229/2 to [email protected] on Fri Aug 20 20:40:10 2004
    From: [email protected]

    [email protected] (Frank K�ster) writes:

    Hi AUCTeXnicians,

    maybe you can help with this strange bug report in Debian. I don't
    even know if it is a problem with AUCTeX, or rather with XEmacs.

    It is a problem with Debian, I'd guess.

    The original reporter wrote:

    On a system with emacs and xemacs installed, installing auctex
    breaks the auctex of xemacs in some cases.

    It breaks when [...]

    when there is no site-wide startup file containing (require 'tex-site),
    but this line is the only one of the user's XEmacs startup file:


    [email protected] (Frank K�ster) wrote:

    Thomas Deselaers <[email protected]> wrote:

    this is with an .xemacs/init.el file of

    -------------------------------------------------------------------
    (require 'tex-site)
    -------------------------------------------------------------------


    when doing the same with parameter -debug-init we get:
    -------------------------------------------------------------------
    Signaling: (wrong-number-of-arguments add-to-list 3)
    add-to-list(load-path "/usr/share/emacs/site-lisp/auctex/" append)
    load-internal("tex-site" nil t nil undecided)
    load("tex-site" nil t nil)
    require(tex-site)
    load-internal("/u/deselaers/.xemacs/init.el" t t t undecided)
    load("/u/deselaers/.xemacs/init.el" t t t)
    load-user-init-file()
    load-init-file()
    command-line()
    normal-top-level()
    -------------------------------------------------------------------

    When choosing "loaded by default" in debconf, we have no problems.

    (This writes the require... in the site-wide startup file, or rather in /etc/emacs/site-start.d/50auctex.el.)

    Straightforward: a version of tex-site gets loaded that uses
    "add-to-list" to _append_ /usr/share/emacs/site-lisp/auctex to the
    current load-path. Appending something to a load-path is a bad idea
    almost always: if you have an explicit initialization in some file,
    you almost always want to _override_ some existing functionality;
    everything else usually is a mistake. If you think that the
    functionality is already provided elsewhere, you should not tamper
    with load-path at all.

    Anyway, the call is done using
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex/" 'append)
    and this syntax is illegal on XEmacs.

    The example tex-site.el in AUCTeX contains no such call.

    This is a pure Debian package problem, or a user configuration problem.

    --
    David Kastrup, Kriemhildstr. 15, 44793 Bochum

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Peter S Galbraith@1:229/2 to David Kastrup on Fri Aug 20 21:30:21 2004
    From: [email protected]

    David Kastrup <[email protected]> wrote:

    Signaling: (wrong-number-of-arguments add-to-list 3)
    add-to-list(load-path "/usr/share/emacs/site-lisp/auctex/" append)

    Anyway, the call is done using
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex/" 'append)
    and this syntax is illegal on XEmacs.

    The example tex-site.el in AUCTeX contains no such call.

    This is a pure Debian package problem, or a user configuration problem.

    I hadn't follwed this thread, but...

    In Debian Emacs packages, we usually do something like:

    (setq load-path (append ${APPEND_LOAD_PATH} load-path))

    So this looks to be a simple bug to fix if this is the case. Having
    said that, the Debian package of auctex clearly:

    - depends on emacs21

    - has a description that states "Currently XEmacs ships with its own
    AUC TeX, so this package should only be used with GNU/Emacs. (I.e.,
    you don't need to install this package if your site uses only
    XEmacs.)"

    - skips byte-compilation for XEmacs.

    So the problem is that the XEmacs setup of its own version of auctex is
    being tramped-on by the Debian package (as the bug submitter said).

    Sorry if this was obvious to everyone else.

    Peter


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?iso-8859-1?q?Frank_K=FCster?=@1:229/2 to Peter S Galbraith on Sat Aug 21 15:30:17 2004
    From: [email protected]

    Peter S Galbraith <[email protected]> wrote:

    David Kastrup <[email protected]> wrote:

    Signaling: (wrong-number-of-arguments add-to-list 3)
    add-to-list(load-path "/usr/share/emacs/site-lisp/auctex/" append)

    Anyway, the call is done using
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex/" 'append)
    and this syntax is illegal on XEmacs.

    The example tex-site.el in AUCTeX contains no such call.

    This is a pure Debian package problem, or a user configuration problem.

    I hadn't follwed this thread, but...

    In Debian Emacs packages, we usually do something like:

    (setq load-path (append ${APPEND_LOAD_PATH} load-path))

    So this looks to be a simple bug to fix if this is the case.

    I am really bad in Lisp. But it seems to me there are two differences
    here: Your version does not use GNU Emacs' function add-to-list, but furthermore the order is changed - in your version it is prepended to
    the old load-path, isn't it?

    As for the rest you said, I think you are right, and I also have the
    solution - I'll post it separately to the bug.

    Regards, Frank
    --
    Frank K�ster, Biozentrum der Univ. Basel
    Abt. Biophysikalische Chemie

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From David Kastrup@1:229/2 to [email protected] on Sat Aug 21 15:40:09 2004
    From: [email protected]

    [email protected] (Frank K�ster) writes:

    Peter S Galbraith <[email protected]> wrote:

    David Kastrup <[email protected]> wrote:

    Signaling: (wrong-number-of-arguments add-to-list 3)
    add-to-list(load-path "/usr/share/emacs/site-lisp/auctex/" append)

    Anyway, the call is done using
    (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex/" 'append)
    and this syntax is illegal on XEmacs.

    The example tex-site.el in AUCTeX contains no such call.

    This is a pure Debian package problem, or a user configuration problem.

    I hadn't follwed this thread, but...

    In Debian Emacs packages, we usually do something like:

    (setq load-path (append ${APPEND_LOAD_PATH} load-path))

    So this looks to be a simple bug to fix if this is the case.

    I am really bad in Lisp. But it seems to me there are two differences
    here: Your version does not use GNU Emacs' function add-to-list,

    XEmacs has add-to-list as well. It just does not understand the
    'append argument.

    but furthermore the order is changed - in your version it is
    prepended to the old load-path, isn't it?

    Probably a typo, or one could use add-to-list in the first place. Or
    even the unconditional push: if Debian packages normally use an
    unconditional append, then they have the danger of accumulating stuff
    into load-path: add-to-list only adds stuff that isn't there yet.

    The equivalent to add-to-list with append would be something like
    (unless (member "..." load-path)
    (setq load-path (append load-path '("..."))))

    --
    David Kastrup, Kriemhildstr. 15, 44793 Bochum

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?iso-8859-1?q?Frank_K=FCster?=@1:229/2 to [email protected] on Sat Aug 21 17:20:09 2004
    From: [email protected]

    [email protected] (Frank K�ster) wrote:

    Thomas Deselaers <[email protected]> wrote:

    this is with an .xemacs/init.el file of

    -------------------------------------------------------------------
    (require 'tex-site)
    -------------------------------------------------------------------


    when doing the same with parameter -debug-init we get:
    -------------------------------------------------------------------
    Signaling: (wrong-number-of-arguments add-to-list 3)
    add-to-list(load-path "/usr/share/emacs/site-lisp/auctex/" append)

    XEmacs' add-to-list does not understand the optional "append" argument.

    [...]
    Therefore it seems that the tex-site.el that is loaded by the (require 'tex-site) line is auctex's. I am not familiar to XEmacs, but I don't
    think that this is correct.

    No, it isn't. Furthermore, it is against Debian Emacsen Policy:

    ,----
    | Emacs add-on packages may not modify load-path directly. They must
    | use (debian-pkg-add-load-path-item <path>).
    `----

    Therefore, and since Debian policy explicitly refers to /usr/share/doc/emacsen-common/debian-emacs-policy.gz, this behavior is a
    policy violation. I don't know whether we should call it serious, making
    this bug release-critical.

    But in fact Davide has yet recognized this - in the packages for the
    then-beta versions of auctex-11.50, he has yet corrected it. Thus a fix
    of #265598, that is: upgrading to 11.52 using Davide's beta packages,
    would also fix this bug.


    I would be _very_ glad to hear from you, Davide.

    Regards, Frank
    --
    Frank K�ster, Biozentrum der Univ. Basel
    Abt. Biophysikalische Chemie

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)