spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » EMACS » Page 1
Common Lisp: How to get (in-package ...) to work from within Emacs Slime
When you compile the file as a whole, it is first read as a whole. At that time, none of it has yet been evaluated, so the package QT is not defined yet. You can either use eval-when to evaluate something at an earlier time, or use a system definition facility (ASDF is predominant nowadays) to load your system in the right order. Eval-when: (eval-when (:compile-toplevel :load-toplevel :execute

Categories : Emacs

Emacs: load-file .emacs when saved
Way 1 One way of doing is to install auto-compile-mode from MELPA, and enable it: (defun my-emacs-lisp-hook () (auto-compile-mode 1)) (add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-hook) Now each time you save an Elisp file that's byte-compiled, it will be re-compiled. Compilation will usually catch some bad errors. To compile any Elisp file, select it in dired (C-x d) and press B (dired-d

Categories : Emacs

Wrong type argument: keymapp, emacs-lisp-mode-map
define-key expects an actual keymap as its first argument. You are passing it a symbol (variable) whose value is a keymap. You need to use this: (dolist (map (list emacs-lisp-mode-map lisp-interaction-mode-map))...) list is a normal function, so it evaluates its arguments. In this case, that gives you a list of two keymaps, not two keymap variables (symbols). In the code you used, quote jus

Categories : Emacs

Running emacs in a docker container
Running an editor inside the container isn't really a good idea. Containers work well for services, not interactive applications. If you try it, all the input and output is being multiplexed over an http channel from the process (emacs) to the Docker CLI via the Docker daemon. Also if the files you are editing are within the container's layered filesystem then that adds extra overhead too. As Do

Categories : Emacs

How do I disable electric indent on RET but still keep other electric characters (e.g., ‘{’)?
By checking the documentation for c-electric-brace, I found that the behavior of electric characters is controlled by the buffer-local variable c-electric-flag. It worked after I added the following lines to my .emacs file: (add-hook 'c-mode-hook (lambda () (set 'c-electric-flag t))) (add-hook 'c++-mode-hook (lambda () (set 'c-electric-flag t)))

Categories : Emacs

How to export ditaa or dot blocks as captioned figures (LaTeX)?
To get it to work you need to have a #+RESULTS: section under the #+BEGIN_SRC block and caption that instead: * Plain source code #+CAPTION: This works #+LABEL: fig:works #+BEGIN_SRC this is a test #+END_SRC See Figure [[fig:works]]. * Ditaa #+BEGIN_SRC ditaa :file foo.png :cmdline -E /----- ----------------------------->| foo |<----------------------------

Categories : Emacs

Symbol's function definition is void: emacs 24
You need to load the elpy package before you can enable it. Depending on how you installed it, you can do (require 'elpy) or something like it. E.g., (when (load "full/path/to/elpy" t) (elpy-enable) (elpy-use-ipython)) PS. Did you actually do what is described in the official docs? (Specifically, package-install)

Categories : Emacs

Extending list in .emacs init file
Yes, that's elisp. You can test for the extension with the following test: (equal ".tex" (substring "file.tex" -4)) To remove it, use substring again: (substring "file.tex" 0 -4) Negative numbers count positions from the right.

Categories : Emacs

Emacs semantic auto-complete show error?
You're using a horribly outdated CEDET. Just update to latest Emacs, or at least to 24.3. Then you can test with zero config: emacs24.3 -Q ~/test.c M-x semantic-mode. After this, semantic-ia-complete-symbol will bring up the appropriate popup.

Categories : Emacs

remove "-" of the file names in emacs dired mode
Short answer: after entering dired editable mode (aka wdired) go to the beginning of the buffer and do M-% - RET RET ! M-% is the shortcut for query-replace; it will prompt what you want to be replaced (-) and by what (empty string), then it will put you in interactive mode, where key ! tell it to replace all occurrences. wdired will deal properly (innore when replacing) the "-" characters at th

Categories : Emacs

Emacs and Cider for Clojure development in Ubuntu 14.04
Emacs doesn't know where your lein is installed. You have two options: Move lein. As root, move lein to /usr/bin/ if you want to keep a copy in ~ # ln -s ~/lein /usr/bin/ if you don't want to # mv ~/lein /usr/bin/ Tell emacs where to find lein. Unfortunately, your home folder is not a good place. Directories in the path should be kept as clean as possible. Usually, you'll want to ha

Categories : Emacs

Format exception SML
I do not have Linux Mint but try to open the structure Control.Print: - open Control.Print; opening Control.Print val printDepth : int ref val printLength : int ref val stringDepth : int ref val intinfDepth : int ref val printLoop : bool ref val signatures : int ref val printOpens : bool ref val out : {flush:unit -> unit, say:string -> unit} ref val linewidth : int ref v

Categories : Emacs

Open file remotely on a vagrant box with sudo access using Emacs 24.3
Works for me ok if I use something like /ssh:vagrant@localhost#2222|sudo:root@localhost#2222:/etc/hosts as the path. I think the only difference to your recipe is the ssh: method explicitly included as suggested by @Carl Groner in the comment Updated I previously suggested leaving the hostname for the sudo part empty, but it turns out that this is rather a bad idea, as pointed out by @Chris i

Categories : Emacs

Return link type property from org-follow-link-hook
You could wrap the function and check whether you're in a different location before narrowing. (defun my-org-open-at-point () (interactive) (let ((starting-loc (point))) (call-interactively #'org-open-at-point) (when (not (equal starting-loc (point))) (org-narrow-to-subtree)))) (define-key org-mode-map [remap org-open-at-point] 'my-org-open-at-point) This works for internal l

Categories : Emacs

Emacs polymode gives error when opening file
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.

Categories : Emacs

emacs bookmark+ :How to create a file specific bookmark file?
No, actually, command bmkp-this-file-bmenu-list does this (from the doc string): Show the bookmark list just for bookmarks for the current file. Set `bmkp-last-specific-file` to the current file name. If the current buffer is not visiting a file, prompt for the file name. It shows the *Bookmark List* display, listing only and all bookmarks that target the current file. So if you use this comma

Categories : Emacs

How can I put a buffer into dired mode?
Strictly speaking, the answer to the question is: M-x virtual-dired RET If you have a buffer containing the output of ls -lR <dir> then this command will convert it into a dired buffer. The -R argument means that the path to each of the listed directories is included, and Emacs will pick that up as the default value when it prompts you for the directory path. Of course you don't always w

Categories : Emacs

Emacs company mode inserts completion on space key pressed
See the description of company-auto-complete, and set it to nil to disable this behavior. It's nil by default, though, so it shouldn't have caught you unawares. Are you using someone else's Emacs config?

Categories : Emacs


Recently Add
How to start emacs with ipython shell running in one side of a divided window?
Common Lisp: How to get (in-package ...) to work from within Emacs Slime
Emacs: load-file .emacs when saved
Wrong type argument: keymapp, emacs-lisp-mode-map
Running emacs in a docker container
How do I disable electric indent on RET but still keep other electric characters (e.g., ‘{’)?
How to export ditaa or dot blocks as captioned figures (LaTeX)?
Symbol's function definition is void: emacs 24
Extending list in .emacs init file
Emacs semantic auto-complete show error?
remove "-" of the file names in emacs dired mode
Emacs and Cider for Clojure development in Ubuntu 14.04
Format exception SML
Open file remotely on a vagrant box with sudo access using Emacs 24.3
Return link type property from org-follow-link-hook
Emacs polymode gives error when opening file
emacs bookmark+ :How to create a file specific bookmark file?
How can I put a buffer into dired mode?
Emacs company mode inserts completion on space key pressed
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.