background preloader

EMACS

Facebook Twitter

Jaor/geiser.

Emacs Themes

Emacs Stack Exchange. New MELPA URL. What's New In Emacs 24.4 : programming. Emacs Less-known Tips. Nothing Buy Xah Emacs Tutorial.

Emacs Less-known Tips

Master emacs benefits for life. This page shows some less known emacs tips. Before continuing, here are 4 commands every serious emacs users have memorized by heart. To find the command name of a keybinding, call command describe-key 【F1 k】.To find the keybinding of a command, call describe-function 【F1 f】. Editing Related Interactive Search How to search the last searched string? Type 【Ctrl+s Ctrl+s】 to search the same word searched last time. How to search the string under cursor without typing it? Type 【Ctrl+s Ctrl+w】 to search the word under the cursor. 〔➤ Emacs: Search & Highlight Words〕 Grep Lines How to sort lines? Select a region first, then call sort-lines. To sort lines by a specific column, use sort-fields or sort-numeric-fields. For example: Type 【Ctrl+u】, then 2, then 【Alt+x sort-numeric-fields】. Other I have a set of different texts i want to paste frequently. 〔➤ Emacs: Using Registers (Multiple Clipboards)〕 Misc Many ways.

How to start a second shell? Emacs Stack Exchange. Xah Emacs Tutorial. Nothing This emacs tutorial is designed for programers & scientists who wish to learn emacs to get things done quickly, without spending a lot time on Emacs's special terminologies & methods.

Xah Emacs Tutorial

For programers, knowing emacs benefits you for life. Use the search box at top to find things. Clojure and Emacs without Cider. I've been hacking Clojure for many years now, and I've been happy to rekindle my love for Emacs.

Clojure and Emacs without Cider

The Clojure/Emacs tool-chain has come a long way during this time, swank-clojure, nREPL, nrepl.el and now Cider. The feature list is ever growing, and every-time you look there are some new awesome shortcut that will 'make your day'. However, the last couple of months have been rough for the Cider project. I've experienced lots of instability, crashes and hanged UIs. Cider has become very complex and is starting to feel bloated. Emacs Keymap for Launching External Applications and Websites. 05 Oct 2014, by Artur Malabarba.

Emacs Keymap for Launching External Applications and Websites

The launcher-map wouldn’t be half of what it is if not for the run macro. With it, we can easily turn Emacs into a quick ’n dirty app launcher. (defmacro run (exec) "Return a function that runs the executable EXEC. " (let ((func-name (intern (concat "endless/run-" exec)))) `(progn (defun ,func-name () ,(format "Run the %s executable. " exec) (interactive) (start-process "" nil ,exec)) ',func-name))) (define-key launcher-map "m" (run "Mathematica"))(define-key launcher-map "k" (run "keepass"))(define-key launcher-map "v" (run "steam")) We could use a lambda instead of the macro, but the macro defines a nicely documented function.

While we’re at it, let’s do something similar for websites. Emacs Less-known Tips. Site Map. SLIME for Emacs Live. Emacs Live is a frakkin’ epic compilation of customizations and packages, streamlined for the ultimate hacking experience.

SLIME for Emacs Live

As I mentioned in my last post, Adventures in Clojure, it’s under development by the same team as the Clojure bridge to SuperCollider, Overtone. The one downside? It was designed for hacking Clojure, so it doesn’t include SLIME and Common Lisp support out of the box, and of course, it completely replaces your ~/.emacs.d/ directory and ~/.emacs config file, so you lose your existing SLIME setup (and all your other customizations) when you install Emacs Live. Don’t panic, the Emacs Live installer is smart enough to move your existing ~/.emacs.d/ folder and ~/.emacs config file to a safe place. To get the full Emacs Live experience for Common Lisp, however, you also need another package, AC-SLIME. I have packaged both together in an Emacs Live pack, which you can get at: Installation is a cinch. Thephoeron/slime-pack · GitHub. Clojure for the Brave and True. On your journey to Clojure mastery, your editor will be your closest ally.

Clojure for the Brave and True

You can, of course, use any editor you want. Some get pretty close to Emacs's Clojure functionality. The reason I recommend Emacs, however, is that it offers tight integration with a Clojure REPL. This allows you to instantly try out your code as you write. That kind of tight feedback loop will be useful both when learning Clojure and, later, when writing real Clojure programs. If you don't follow the thorough Emacs instructions in this chapter, then it's still worthwhile to invest time in setting up your editor to work with a REPL. By the end of this chapter, your Emacs setup will look something like this: To get there, we'll do the following: Global key bindings in Emacs (Shallow Thoughts)

Global key bindings in emacs.

Global key bindings in Emacs (Shallow Thoughts)

What's hard about that, right? Just something simple like (global-set-key "\C-m" 'newline-and-indent) and you're all set. Well, no. global-set-key gives you a nice key binding that works ... until the next time you load a mode that wants to redefine that key binding out from under you. For many years I've had a huge collection of mode hooks that run when specific modes load. Emacs Customization for Clojure. Synopsis: I talk about the value of paredit in Emacs and show a trick which allows you to insert the result of any given Clojure expression directly underneath that expression.

Emacs Customization for Clojure

As I said in the first post, a good set of tools can make a big difference in productivity and enjoyment while working in any language, and Clojure is certainly no exception. The most important tool in your toolbox, regardless of language, is your editor. Editing Lisp code in particular is much more natural with the right editor setup.