Emacs stopped exporting org files - emacs

I am using Emacs 24.4 and org-mode 8.2.10 (I can't understand why I can't update it to the last version 8.3.1. My version is the last in ELPA but when I ask for org-version I get 8.2.10).
The fact is that now I cannot export any org file to any type of file. The error message is Symbol's value as variable is void: org-planning-line-re.

One suggestion would be to reinstall Org from a new instance of emacs in which your current copy of Org is not loaded.
It seems, based on your description, that Org 8.3.1 was installed from Elpa while your existing copy of Org (8.2.10) was active, which resulted in a corrupted installation.

This issue might be happening because you are loading org package from system installation then loading it again from local installation (e.g. from a ELPA repository).
Double check if your have any (require 'org) before (package-initialize).

Related

Emacs polymode gives error when opening file

I downloaded the polymode zip-file from GitHub, open the zip-file which gives a folder named polymode-master . I renamed the folder to polymode and put it on my .emacs.d folder. Then I inserted the following lines into my .emacs file:
;; Polymode
(setq load-path
(append '("~/.emacs.d/polymode/" "~/.emacs.d/polymode/modes")
load-path))
(require 'poly-R)
(require 'poly-markdown)
When I open a file with emacs it gives me the following error:
Warning (initialization): An error occurred while loading `c:/Users/ab/.emacs':
File error: Cannot open load file, markdown-mode
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
Any idea what I did wrong?
Thanks for help.
PS:
Windows 7
GNU Emacs 24.3.1
ESS
polymode depends on markdown-mode for its Markdown support, and it doesn't look like you have it installed.
Since you're using Emacs 24, which has package.el built-in, I strongly recommend installing it via MELPA stable (also available in regular MELPA and Marmalade), but if you're still installing packages manually you can find it on its website.

org-mode - (require 'org-publish) causes downgrade in org-version

I have just upgraded org-mode to the latest available in ELPA. According to the official documentation, the installation has to be done in fresh emacs session where no org-related scripts/files have been loaded. The installation is successful, and org-version reports that I have updated to 8.2.6 (from 7.9.3f). However, as soon as I put back my old org-related scripts, and reload emacs, I'd get 7.9.3f when I run org-version. To track what's causing it I retrace my steps by adding my org-related scripts one by one. I found out that when I add back (require 'org-publish), the version downgrades to the built-in one. I don't know why this is happening.
The problem was primarily due to the way my emacs initializes (initialization script).
In the latest version of org (8.2.6 at the time of writing), org-publish is now ox-publish, so I needed to call (require 'ox-publish') instead. I think calling org-publish or any older version modules causes the confusion in the setup.
However, after changing the reference, I got an error about ox-publish not being found.
To trace the problem further, I removed all org-related scripts from my init.el (that's how I named my initialization script), and run emacs again. When I ran org-version that time, I saw that it's 8.2.6.
To check if ox-publish is getting loaded, I used the scratch buffer, and executed (require 'ox-publish') manually; it returned fine, confirming that the module was actually loaded. This means that ox-publish is only getting loaded after initialization.
My first work around was to load my org publishing script after initialization using the after-init-hook:
(add-hook 'after-init-hook (lambda() (load-file "/path/to/org-publish-project.el")))
That solved the problem, and I could see my org installation upgraded correctly. However, I didn't feel good about loading the script through after-init-hook. Some people in the official orgmode mailing list suggested that I should check if I'm calling (package-initialize) in my init.el. I didn't. The operation loads the packages installed through the package manager. If it's not specified in the init script, it will be called after initialization by default. Learning that, I added a call to (package-initialize) somewhere at the beginning of my init.el. Afterwards, I called load-file to my org publishing script directly.
(load-file "/path/to/org-publish-project.el")

emacs elpa version of auctex has no "auctex.el"

To set up auctex in Emacs you are told to include
(load "auctex.el" nil t t)
...etc. in your init/.emacs file. But if you installed auctex with elpa (which puts files in ~/.emacs.d/elpa/auctex-11.86/), you have no auctex.el and the (load ...) fails. What should I do?
Instead of loading nonexistent auctex.el do
(require 'tex)
which initializes AUCTeX for me (Windows Emacs 24.3 and pdflatex from Cygwin). If you have MiKTeX, you would also need
(require 'tex-mik)
Another potential problem with the package from elpa is the tex-site.el which is supposed to be generated during installation and contain system-specific data but gets installed from elpa instead. You may want to examine the file and make corrections if needed (and copy it to some other location which is listed earlier in your load-path). For instance it has some unix paths which make no sense in Windows environment.
Your problem is most likely due to the package initialization problem discussed here: Emacs 24 Package System Initialization Problems
You need to call (package-initialize) before calling load to not get an error.

Emacs 24.3 dired+ won't load

I installed dired+ through list-packages (the folder was put in the elpa folder), and put '(add-to-list 'load-path "~/.emacs.d/elpa/")' in my init file (which I created myself), and '(require 'dired+) under. When I open emacs, I get an error telling me there's an error in my init file. If I remove the '(require 'dired+) line, the error stops, but again dired+ doesn't work when I call dired mode. The actual folder that was downloaded when I installed it is 'dired+-20130206.1702'. So I tried '(require dired+-20130206.1702), which again gave me an error on startup.
I'm at my wits end. I've tried everything I can think of, gone through the GNU emacs docs, googled the problem, looked at the answers here at Stack, and no luck. Does anyone have any suggestions? I'm using Windows XP.
It's impossible to say for certain without seeing all the code, but you appear to be quoting your forms for no reason.
i.e., these:
'(add-to-list 'load-path "~/.emacs.d/elpa/")
'(require 'dired+)
should be:
(add-to-list 'load-path "~/.emacs.d/elpa/")
(require 'dired+)
However that should just make them ineffectual, rather than causing errors directly.
Show us the code and the error message.
Edit:
Adding the /dired+/ to the end seemed to fix it ... Although I have no idea why. Any thoughts?
load-path holds a list of directories in which Emacs will look for libraries. It does not automatically descend into sub-directories, so you need to specify all relevant directories for your libraries. Your dired+ library is clearly in the ~/.emacs.d/elpa/dired+/ directory.
For menubarplus, you will similarly need to check to see which directory the library is in.
To be honest, I had thought that the package management in Emacs 24 would take care of this automatically; but as I've not been using it, I'm not certain.
Edit 2:
Yes, I suspect you have some other problem here. I just experimented with installing a library via the package manager (albeit from the default package repository, which doesn't include a dired+ package), and after restarting Emacs load-path contained the path for the new library without any intervention on my part.
I think Phils answered your question wrt loading Dired+ (specify the right directory, the one where you put dired+.el).
Wrt Menu-bar+, the feature name is menu-bar+, not menubarplus and not menu-barplus. So change your (require 'menubarplus) to (require 'menu-bar+).

org mode refile error

Since some time (but I didn't change anything in .emacs), I have some errors with emacs's behaviour :
Remember mode will not kill the temporary buffer on "Ctl-C Ctl-C"
Orgmode will not refile any entry
Both operations complain with error "Not bookmark format"
I restored an old .emacs to make sure that I didn't mess it up but the error persists.
Where can I investigate to find out the problem ?
I have Emacs 24.2.1 since end of august.
The built in orgmode version is 7.8.11 (I see 7.9.2 is out ...)
It's always best to start debugging problems such as this by seeing if the problem still happens when you ignore your init file altogether - try starting emacs with --no-init-file and seeing if you still get the problem. If you don't then it's clearly something in your init file.
You can also get odd behaviour if you've got a local install of Org-mode in addition to the one bundled with Emacs itself - eg if you pull in a newer one through ELPA. If you have a local install through ELPA then you can try uninstalling the Org-mode package and trying again using the built-in Org-mode.
I have something similar to the following in my init file to make it switch to the ELPA-installed Org-mode to avoid such problems (this variant is untested so forgive me if it's not quite right):
(package-initialize) ; load and initialise ELPA-installed packages
(org-reload) ; restart Org-mode with the ELPA package
I filed a bug to the emacs team and they found out that the error comes from a corrupted bookmark file.
I removed my ~/.emacs.d/bookmark file (it was empty) and everything is fine now.