Can't activate 'remember' in org-mode - emacs

I can't get 'remember' to work in org-mode of emacs.
I'm on snow leopard.
I added
(global-set-key (kbd "C-M-r") 'org-remember)
to my .emacs file but when I try to use that shortcut it says:
Wrong type argument: commandp, remember
So I added
(org-remember-insinuate)
and when I start emacs it says:
symbol's function definition is void org-remember-insinuate
Ideas?
GNU Emacs 22.1.1

Checking the obvious stuff...
Have you ensured that org-remember was loaded? i.e. by adding this to your .emacs:
(require 'org-remember)
And, while you're at it, have you ensured that remember can load properly also?
(require 'remember)
remember is a separate package from org, which you'll have to download. Check out the wiki page.
You'll want to ensure that the org and remember packages are in your load path before you require the libraries, with something like:
(add-to-list 'load-path "/path/to/orgdir/lisp")
(add-to-list 'load-path "/path/to/remember")
(require 'remember)
(require 'org-remember)
Note: Emacs 22 comes with org-mode, but not a recent version. You need the more recent version in order to get the org-remember package.

Related

Built-in Evil mode for Emacs 24

I've read in a lot of places such as the WikEmacs (http://wikemacs.org/wiki/Evil) that Emacs24 already came with support for Evil mode, no need to install it via el-get. But I can't seem to understand how do I activate it.
I tried just adding the
(require 'evil)
(evil-mode 1)
lines to my .emacs but it can't seem to work, how do you guys use the built-in evil mode on emacs24? without cloning git repositories, etc.
The statement on WikEmacs is false; evil-mode is not included in Emacs 24. (As it's a wiki, I just edited the page and removed that text.)
There are many ways to install evil-mode. I'd suggest activating the MELPA package repository by adding the following to your .emacs file:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
Then type M-x list-packages, find evil in the list, and install it.

Emacs: can't autostart projectile installed through MELPA

I'm fairly new to emacs. In fact I'm learning the editor and trying to setup something that will replicate "go to a file inside the project" feature known from Code::Blocks or certain plugins of notepad++.
'projectile' fulfills this need, and I installed it through MELPA. Package installed properly, as I can start it with M-x projectile-global-mode and C-c p commands are recognized.
However, if I put it into my .emacs file, Emacs starts with an error:
Symbol's function definition is void: projectile-global-mode
Contents of my .emacs file are as follows:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(global-whitespace-mode 1)
(global-linum-mode 1)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(projectile-global-mode 1)
When I try to (require 'projectile) first, I only end up with another error:
'File error: Cannot open load file, projectile'
I'm using Emacs 24.3.1.
How do I put this on autostart properly?
By default, Emacs initializes packages after evaluated init.el. Hence, in a standard setup, packages are not yet available while init is evaluated.
Use (add-hook 'after-init-hook #'projectile-global-mode) to enable Projectile only after packages are initialized, or explicitly initialize packages at the beginning of your init.el with the following code:
(require 'package)
(setq package-enable-at-startup nil) ; To avoid initializing twice
(package-initialize)
You have to load projectile first, e.g. by using this:
(require 'projectile)
(projectile-global-mode)
you can add
'(initial-major-mode (quote projectile-global-mode))
to your .emacs(or init.el or whatever your file is called) file in the custom-set-variable section.
Alternatively, in newer versions of emacs, the menu Options | Customize Emacs | Specific Option you can type 'initial-major-mode' and this will take you to an interface where emacs can customize itself with that setting. just remember to apply and save

(message "%S" load-path) and (describe-variable load-path) give different results

(message "%S" load-path) and (describe-variable 'load-path)
give different results.
Several more path like "/Users/updogliu/.emacs.d/elpa/flycheck-20140323.828" appeared in the latter.
How can I make (require 'flycheck) use the "describe" one load-path?
To setup Flycheck properly, you do not need to require Flycheck. Instead, just enable Global Flycheck Mode:
(add-hook 'after-init-hook #'global-flycheck-mode)
This will enable Flycheck for all supported languages.
To make (require 'flycheck) work in your init.el, you need to add (package-initialize) at the very beginning of your init.el.
(package-initialize) sets up Emacs' built-in package system, which includes adding all packages to the load-path. Emacs calls this automatically, but only after your init.el has been processed, hence the use of after-init-hook to enable Flycheck.
If you added a message call to your init.el without calling (package-initialize) first, you'll hence see the standard load-path without any of your packages.
To make your packages available in your init.el right away, you need to call (package-initialize) manually, at the beginning of your init.el.

can't find any symbol in common lisp in emacs with slime

According to the guide on the Internet, we can search in the HyperSpec for the symbol like "format" in emacs by typing C-c C-d h , However, I just cannot have it work, emacs just prompts that there's no completion for the symbol. Can somebody cope with it? thanks in advance!
Are you actually using the Slime REPL mode? Sometimes, when starting Slime without any configuration, you're not getting the REPL mode, and instead you'll be sitting in the *inferior-lisp* buffer.
First of all, check what the title of the buffer is. If it's *inferior-lisp*, it's not the correct one. It should read *slime-repl sbcl* (where sbcl refers to the CL implementation you're using).
If this is the case, then you need to make sure you enable slime-fancy in your Emacs init file. This is what I have:
(defun init-slime-configuration ()
(slime-setup '(slime-fancy slime-fuzzy))
(setq slime-load-failed-fasl 'never)
(define-key slime-repl-mode-map (kbd "C-<tab>") 'slime-fuzzy-complete-symbol)
(define-key slime-mode-map (kbd "C-<tab>") 'slime-fuzzy-complete-symbol))
(add-hook 'slime-load-hook 'init-slime-configuration)
This also allows me to use C-TAB for fuzzy expand.
I ran into this very problem after switching from the version of SLIME installed using Quicklisp (version 2.9) to that installed from MELPA (version 20141010.1357, as a dependency of ac-slime).
Using SLIME from Quicklisp worked fine with my local copy of the HyperSpec, using the settings:
(require 'slime-autoloads)
(add-to-list 'slime-contribs 'slime-fancy)
(setq slime-lisp-implementations
'((ccl ("ccl"))
(clisp ("clisp"))
(cmucl ("cmucl"))
(ecl ("ecl"))
(sbcl ("sbcl"))))
(setq slime-default-lisp 'sbcl)
(setq common-lisp-hyperspec-root "file:/usr/share/doc/HyperSpec/")
(setq common-lisp-hyperspec-symbol-table "file:/usr/share/doc/HyperSpec/Data/Map_Sym.txt")
I then completely removed and reinstalled Quicklisp (without reinstalling SLIME!), then installed ac-slime from MELPA using the Emacs package manager.
By chance I happened to notice that when I tried to lookup documentation in the HyperSpec, Emacs opened a hidden buffer with an empty file named "Map_Sym.txt" in it.
Looking at the full pathname of this file using C-h v buffer-file-name [RET] revealed that it was set to "/home/miki/file:/usr/share/doc/HyperSpec/Data/Map_Sym.txt".
As an experiment, I tried removing the "file:/" from the last two lines of my settings, to make them read:
(setq common-lisp-hyperspec-root "/usr/share/doc/HyperSpec/")
(setq common-lisp-hyperspec-symbol-table "/usr/share/doc/HyperSpec/Data/Map_Sym.txt")
It appears to have resolved the issue. Why this works, I don't know (it differs from the documentation). A bug or undocumented change, maybe?

cannot open load file: /yasnippet

I receive this message every time I start emacs
Emacs 24.2
Win7 64 and Ubuntu 12.10
yasnippet 0.8.0 installed with package-list
If there is a way to fix it ?
yasnippet doesn't get initialised automatically when installed with elpa, which I find unconventional. You still need to add the yasnippet directory into your load-path.
Here is my set up in my .emacs
;; yasnippet
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.8.0")
(require 'yasnippet)
(setq yas-snippet-dirs '("~/.emacs.d/elpa/yasnippet-0.8.0/snippets" "~/Dropbox/Applications/Customise/emacs/myyassnipets"))
(yas-global-mode 1)
This is the sort of message I would expect to see if you're calling load or load-file in your init.el with a bad path. Look for any uses of those functions and correct the path if you can.
If this is in code you control, you probably want to call (require 'yasnippet) instead of directly loading the file.