emacs

Why clojure starts with 'M-x slime' for my Aquamacs without any setup?

I have Aquamacs running on my Mac. I installed the ESK for Aquamacs and it installs ELPA at ~/.emacs.d/elpa. With ELPA, I installed clojure-mode/clojure-est-mode/slime/slime-repl/swank-clojure. The thing is that when I run 'M-x slime', clojure is run. Why is this? I'm curious as I don't have any setup for slime in my .emacs and even i...

What's the magic behind the ELPA?

I use Aquamacs, and I use ELPA that installs files in ~/.emacs.d/elpa? What's the magic behind this ELPA? I mean, without ELPA, I should download and install the packages in a specific directory, and add those two lines in .emacs. (add-to-list 'load-path "PACKAGE_DIRECTORY") (require 'PACKAGE) But, with ELPA, I don't see anythin...

What does the 'swank-clojure' do exactly, and do we have 'swank-SOMETHING_ELSE'?

My superficial understanding is that 'swank-clojure' makes 'M-x slime-connect' possible. I mean, it gives a connection to a clojure server something like 'lein swank'. Is my understanding correct? If not, what's the purpose of swank? Then, is there any 'swank-SOMETHING_ELSE' for other lisp like implementations? For example, swank-clisp?...

PPRINT in Emacs Lisp?

Emacs Lisp does not seem to have a PPRINT function. How do you pretty print an S-EXP in elisp the way you can in Common Lisp? Thanks! ...

Using ispell/aspell to spell check camelcased words

I need to spell check a large document containing many camelcased words. I want ispell or aspell to check if the individual words are spelled correctly. So, in case of this word: ScientificProgrezGoesBoink I would love to have it suggest this instead: ScientificProgressGoesBoink Is there any way to do this? (And I mean, whi...

How to outdent a block with emacs?

I can use C-x TAB for indenting 1 column, or C-u N C-x TAB for N columns. How can I `outdent' a block with emacs? ...

How to choose what scheme to use for emacs?

I have the following code in ~/.emacs for running scheme (gosh and mit-scheme). ;(setq scheme-program-name "gosh -i") (setq scheme-program-name "mit-scheme") (autoload 'scheme-mode "cmuscheme" "Major mode for scheme." t) (autoload 'run-scheme "cmuscheme" "Run an inferior scheme process." t) (defun scheme-other-window () "Run scheme on...

emacs can invoke shell and execute commands-- can they act on Emacs buffers?

I use Alt-! (Alt-Bang) a lot in Emacs. One of the big things I use it for is Alt-! cat $logfile | grep 'this' # show me one kind of event or sometimes Alt-! cat $logfile | grep 'this' | wc -l # count that one event's occurrences Two things: 1) No tab-completion from this prompt: why not? 2) What if instead of $logfile, I want to ...

Emacs' CC Mode issues with method alignment

Hello everyone. I'm having trouble finding a way to (properly) align the following lines in CC Mode using the style "java": // Correct when this is used: (c-set-offset 'arglist-cont-nonempty '++). private static synchorized horkingLongMethodName(int anArg, ........Object anotherArg, String yetAnotherArg, ........Object andStillAnother)...

How do you send meta key over ssh on Mac?

I'm using ssh in Terminal to ssh into a Linux host where I'm running Emacs. I'd like to be able to use meta key commands, but I'm not how to send them from my (local) Mac to the (remote) Linux host. How do I do that? Sorry if this isn't exactly a programming question. ...

Perforce and Emacs

I'm looking to setup emacs to allow me to use perforce without having to use p4v. I've had a look at the emacs wiki and a search on the site but there only seems to be two options out there - both of which are pretty old. First option is p4.el which was last updated in 2004. The second option is the integration with emacs VC component,...

Using Emacs for Web Development? (Php/mysql/javascript/css/html

I'm a Web developer. I had been using a variety of editors and ide-s for web development(php, javascript,html,css) six months before I decided to learn a true editor and started using emacs. I learned all the basics, used the starter kit, practiced using buffer, windows etc.. I got a grip in 2 months. A month ago I started learning abou...

Emacs nxhtml applying wrong mode when using Emacs-desktop

I have I standard Emacs/nxhtml install. My nxhtml-autoload.el has the following line (I use .djhtml for my django template files) (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . django-nxhtml-mumamo-mode)) I also use Emacs Desktop to re-open buffers ("save desktop state") when starting Emacs. When Emacs Desktop opens buffers, it fa...

How to set the default width of fill mode to 80 with emacs?

I know that "C-u 80 C-x f" sets the fill width 80, and M-q adjusts it. How to make it default? I mean, how to make width 80 deafault for fill width? ...

Which is the closest Python equivalent to Perl::Tidy?

Coming from Perl I've been used to hitting C-c t to reformat my code according to pre-defined Perl::Tidy rules. Now, with Python I'm astonished to learn that there is nothing that even remotely resembles the power of Perl::Tidy. PythonTidy 1.20 looks almost appropriate, but barfed at first mis-aligned line ("unexpected indent"). In part...

The two methods for key mapping in emacs

I find that there are two ways to set key in emacs: golbal-set-key and define-key. Are they the same? Or is there any pros/cons between the two approaches? (global-set-key (kbd "C-c C-f") 'my-find-file) (define-key global-map "\C-ck" 'hello) ...

Filtering result from running start-process in emacs/elisp.

I have the following code to run python and get the result in scratch buffer. (defun hello () "Test, just prints Hello, world to mini buffer" (interactive) (start-process "my-process" "*scratch*" "python" "/Users/smcho/Desktop/temp/hello.py") (message "Hello, world : I'm glad to see you")) (define-key global-map "\C-ck" 'hello)...

How to get the start/end of the current buffer info with emacs/elisp?

I have the following code that runs figlet that has input as a range. How can I modify this code to check if b or e is not specified, make b to the start of the current buffer, and e end of the current buffer? (defun figlet-region (&optional b e) (interactive "r") (shell-command-on-region b e "/opt/local/bin/figlet" (current-buffer...

How to make a *TODO* buffer, and it is open every time I conjure emacs?

I want to make TODO list buffer (text mode or whatever other mode) that is open whenever I start the emacs. How can I do that? ...

Is there an eclipse equivalent to emacs M-/ (dabbrev-expand)?

To quote emacs help, M-/ is: (dabbrev-expand ARG) Expand previous word "dynamically". Expands to the most recent, preceding word for which this is a prefix. If no suitable preceding word is found, words following point are considered. If still no suitable word is found, then look in the buffers accepted by the ...