Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275455 - app-emacs/org-mode-6.27a conflicts with the org-mode in emacs-22.3-r2
Summary: app-emacs/org-mode-6.27a conflicts with the org-mode in emacs-22.3-r2
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Emacs project
URL: http://thread.gmane.org/gmane.emacs.o...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-26 04:53 UTC by Beetle B.
Modified: 2009-06-27 16:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beetle B. 2009-06-26 04:53:53 UTC
I installed org-mode-6.27a.

For the most part, it works fine. Then I noticed a problem: The exporting to LaTeX and PDF commands don't work as described in the manual:

http://orgmode.org/manual/LaTeX_002fPDF-export-commands.html#LaTeX_002fPDF-export-commands

I get an error message instead. Looking into the gnus mailing list/newsgroup, I found the culprit:

http://thread.gmane.org/gmane.emacs.orgmode/7786/focus=7925

Essentially, there are two files:

/usr/share/emacs/site-lisp/org-mode/org-exp.el

which is owned by org-mode-6.27a, and:

/usr/share/emacs/22.3/lisp/textmodes/org-export-latex.el

which is owned by the org-mode that comes in emacs. The latter file, I believe, is not part of the current org-mode version.

When I try to export to LaTeX, there's a conflict between these two.

What's the best way to fix this? Is there a clean way for me to remove the org-mode that comes with Emacs without upsetting Portage? A simpler solution would be if I could somehow specify in my .emacsrc that it should always use the org-mode that I manually installed, rather than the one bundled in Emacs.

(In case you're wondering, the features in the new org-mode not present in Emacs work - so somewhere Emacs is seeing the new org-mode).  

Reproducible: Always

Steps to Reproduce:
1.Load up an org file. 
2.Switch to org-mode.
3.Press C-c C-e l to output as LaTeX. 

Actual Results:  
Fails - gives an error message. 

Expected Results:  
A .tex file

emerge --info output.

Portage 2.2_rc33 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r8-i686-Intel-R-_Pentium-R-_4_CPU_2.53GHz-with-glibc2.0
Timestamp of tree: Wed, 24 Jun 2009 19:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.4.4-r14, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en ar"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/roslin /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/interactive-fiction /usr/portage/local/layman/games /usr/portage/local/layman/mozilla /usr/portage/local/layman/sunrise /usr/portage/local/layman/science /usr/portage/local/layman/other"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="7zip X a52 aac aalib acl acpi aim alsa apache2 apm asf avi bash-completion berkdb bitmap-fonts bittorrent blas bluetooth branding browserplugin bzip2 cairo calendar caps cdparanoia cdr cli cracklib crypt css cups cvs dbus dga dirac directfb divx4linux djvu doc dri dvb dvd dvdnav dvdr dvdread eds emacs emboss encode exif fam fbcon fbdev ffmpeg fftw firefox flac fortran ftp gd gdbm gif gimp glitz gnuplot gnutella gphoto2 gpm gstreamer gtk guile hal hbci hdri i8x0 iconv icq imagemagick imap imlib ipv6 isdnlog jabber java javascript jpeg jpeg2k justify kde lame lapack latex lcms ldap leim libcaca libnotify libsamplerate live loop-aes lyx mad maildir matroska mbox md5sum midi mikmod mjpeg mmx mng mozilla mp2 mp3 mpeg mplayer msn mudflap musepack mysql ncurses network nls nptl nptlonly nsplugin oav ofx ogg oggvorbis openexr opengl openmp oscar oss pam pcre pda pdf pdflib perl pgp php plotutils png pnm pnp ppds pppd python qt qt3 qt3support qt4 quicktime radio rar readline reflection rss rtsp samba sasl schroedinger sdl session shout sndfile sox speex spell spl srt sse ssl startup-notification stream subtitles subversion svg svga sysfs tcpd tetex tga theora threads tiff tivo transparency truetype truetype-fonts type1-fonts unicode usb vcd vesa videos vidix vorbis wavpack win32codecs wma wmf wxwindows x264 x86 xcomposite xine xml xorg xosd xpm xscreensaver xulrunner xv xvid yahoo zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ar" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ulrich Müller gentoo-dev 2009-06-27 09:53:34 UTC
Could you please post your load-path:
C-h v load-path RET
Comment 2 Beetle B. 2009-06-27 13:04:23 UTC
load-path is a variable defined in `C source code'.
Its value is 
("/home/mueen/emacs/" "/usr/share/emacs/22.3/site-lisp" "/usr/share/emacs/site-lisp" "/usr/share/emacs/site-lisp/autoconf-mode" "/usr/share/emacs/site-lisp/bbdb" "/usr/share/emacs/site-lisp/cmake" "/usr/share/emacs/site-lisp/desktop-file-utils" "/usr/share/emacs/site-lisp/git" "/usr/share/emacs/site-lisp/gnuplot" "/usr/share/emacs/site-lisp/gtk-doc" "/usr/share/emacs/site-lisp/guile" "/usr/share/emacs/site-lisp/icicles" "/usr/share/emacs/site-lisp/ipython" "/usr/share/emacs/site-lisp/kdvi" "/usr/share/emacs/site-lisp/libidn" "/usr/share/emacs/site-lisp/mercurial" "/usr/share/emacs/site-lisp/ngnus" "/usr/share/emacs/site-lisp/noweb" "/usr/share/emacs/site-lisp/org-mode" "/usr/share/emacs/site-lisp/po-mode" "/usr/share/emacs/site-lisp/python-mode" "/usr/share/emacs/site-lisp/rst" "/usr/share/emacs/site-lisp/ruby-mode" "/usr/share/emacs/site-lisp/site-gentoo.d" "/usr/share/emacs/site-lisp/subversion" "/usr/share/emacs/site-lisp/tex-utils" "/usr/share/emacs/site-lisp/timidity++" "/usr/share/emacs/site-lisp/txt2tags" "/usr/share/emacs/site-lisp/bbdb/bits" "/usr/share/emacs/22.3/lisp" "/usr/share/emacs/22.3/lisp/url" "/usr/share/emacs/22.3/lisp/textmodes" "/usr/share/emacs/22.3/lisp/progmodes" "/usr/share/emacs/22.3/lisp/play" "/usr/share/emacs/22.3/lisp/obsolete" "/usr/share/emacs/22.3/lisp/net" "/usr/share/emacs/22.3/lisp/mh-e" "/usr/share/emacs/22.3/lisp/mail" "/usr/share/emacs/22.3/lisp/language" "/usr/share/emacs/22.3/lisp/international" "/usr/share/emacs/22.3/lisp/gnus" "/usr/share/emacs/22.3/lisp/eshell" "/usr/share/emacs/22.3/lisp/erc" "/usr/share/emacs/22.3/lisp/emulation" "/usr/share/emacs/22.3/lisp/emacs-lisp" "/usr/share/emacs/22.3/lisp/calendar" "/usr/share/emacs/22.3/lisp/calc" "/usr/share/emacs/22.3/leim")



Documentation:
*List of directories to search for files to load.
Each element is a string (directory name) or nil (try default directory).
Initialized based on EMACSLOADPATH environment variable, if any,
otherwise to default specified by file `epaths.h' when Emacs was built.
Comment 3 Ulrich Müller gentoo-dev 2009-06-27 13:32:02 UTC
In you load-path site-lisp/org-mode comes before 22.3/lisp/textmodes as it should be, so Emacs it should find the standalone org-mode before the one that is included with Emacs 22.

And I cannot reproduce the problem. I've tried with org-mode-6.27a and the following example file: <http://overlays.gentoo.org/proj/emacs/attachment/wiki/test%20plans/example.org?format=raw>. LaTeX export seems to work fine.
Comment 4 Ulrich Müller gentoo-dev 2009-06-27 13:41:38 UTC
(In reply to comment #3)
> In you load-path site-lisp/org-mode comes before 22.3/lisp/textmodes as it
> should be, so Emacs it should find the standalone org-mode before the one that
> is included with Emacs 22.

Sorry, this sentence should read:
"In your load-path site-lisp/org-mode comes before 22.3/lisp/textmodes, as it should be. So Emacs should find the standalone org-mode before the one that is included with Emacs 22."
Comment 5 Beetle B. 2009-06-27 14:14:23 UTC
That is strange. I tried again and it still fails. Below is the Message buffer. Is there any way to get some sort of trace when it executes the command?

Select command: 
Loading org-export-latex...done
Exporting to LaTeX...
Loading latexenc...done
(New file)
Loading tex-mode...
Loading regexp-opt...done
Loading tex-mode...done
org-export-latex-first-lines: Symbol's function definition is void: org-cleaned-string-for-export

Comment 6 Ulrich Müller gentoo-dev 2009-06-27 14:31:38 UTC
Does it also fail if you start Emacs with "emacs -q"?

What is the output of "C-h f org-export-as-latex RET", if you issue this as the first command after starting Emacs? The first line should be as follows:
org-export-as-latex is an interactive autoloaded Lisp function in `org-latex'.
Comment 7 Beetle B. 2009-06-27 15:07:13 UTC
Without emacs -q, the output is:

org-export-as-latex is an interactive autoloaded Lisp function in `org-export-latex'.

With emacs -q, the output is the same.

It gives the same error with emacs -q.
Comment 8 Beetle B. 2009-06-27 15:08:21 UTC
I seem to have fixed this by adding 

(require 'org-install)

in .emacs. 

Closing the bug (but you can reopen if you want to investigate further).
Comment 9 Beetle B. 2009-06-27 15:26:10 UTC
This probably explains it. From the orgmode FAQ:

"This wrong version loading may also happen if you have a byte-compiled org.elc from an old version together with a new org.el. Since Emacs prefers loading byte-compiled files (even if the .el is newer), it will load the old Org-mode." 
Comment 10 Ulrich Müller gentoo-dev 2009-06-27 15:35:15 UTC
(In reply to comment #8)
> I seem to have fixed this by adding 
> 
> (require 'org-install)
> 
> in .emacs. 

This is normally done in the site-initialisation file of org-mode, 
/usr/share/emacs/site-lisp/site-gentoo.d/51org-mode-gentoo.el which is also part of site-gentoo.el. So you don't load site-gentoo in your site-start.el or ~/.emacs?

> Closing the bug (but you can reopen if you want to investigate further).

Reopening, since we still don't know if this issue is a real bug or a problem with your configuration.
Comment 11 Beetle B. 2009-06-27 16:03:02 UTC
I don't have that in my .emacs.

Where exactly is it located?

I'd like to read up more about it - where is this documented? A brief glance at the emacs ebuild doesn't seem to show it. 
Comment 12 Ulrich Müller gentoo-dev 2009-06-27 16:24:00 UTC
(In reply to comment #11)
> I don't have that in my .emacs.

In the default Gentoo installation, there should be a file /usr/share/emacs/site-lisp/site-start.el . I think the postinst message of app-emacs/emacs-common-gentoo explains it well:

    All site initialisation for Gentoo-installed packages is added to
    /usr/share/emacs/site-lisp/site-gentoo.el. In order for this site
    initialisation to be loaded for all users automatically, a default
    site-start.el is created in the same directory. You are responsible
    for all further maintenance of this file.

    Alternatively, individual users can add the following command:

    (require 'site-gentoo)

    to their ~/.emacs initialisation files, or, for greater flexibility,
    users may load single package-specific initialisation files from
    /usr/share/emacs/site-lisp/site-gentoo.d/.

You may run "emerge --config emacs-common-gentoo" to create the default site-start file.

Resolving as invalid since this is not a bug of org-mode.