emacs

What's the purpose/usage of prefix argument with emacs?

As I asked here, I can choose the lisp for running SLIME with prefix argument(C-u), and I is written in here, I see that C-u is a way to insert the output in the current buffer. I use 'C-u 10 SOMETHING', in order to run SOMETHING 10 times. What's the usage/purpose of using prefix argument (C-u)? Is C-u the only prefix argument? ...

Emacs client/server and ClearCase views

So I got tired of waiting for Emacs to load every time anew, and consulting Emacs Wiki, I wrote me an invocation script such as: #!/bin/bash # @file: /usr/local/bin/emacs # @version: 1 server=/tmp/emacs${UID}/server if [ ! -S ${server} ] ; then /opt/emacs/bin/emacs --daemon until [ -S ${server} ] ; do sleep 1s done ...

How to implement 'shell-command-on-region-to-string' emacs/elisp function?

I need to get a range (or whole range) of current buffer, run program to process the range as an input, get the result and to put the string at the end of the current buffer. I learned that shell-command-on-region can process a region. I learned that shell-command-to-string can store the result of the program to a string. Then, how ...

Video of a programmer using Emacs... for programming?

I've started programming Erlang in Emacs. I keep hearing about how productive Emacs is, but every screencast I've found involves something silly, like (I'd post the links, but I don't have the rep.): creating an HTML table! emailing a project plan directly from the editor! browsing the web! I'd like to see a video of programmer's wor...

What's the font-lock-mode for in emacs?

I have font-lock mode on by putting (global-font-lock-mode 1) in .emacs. And, with font-lock mode "your program certainly look different" as explained in page 274 of Learning GNU emacs. What I found was that, with python mode or org mode, when I change the font for that mode, some of the keywords are not shown because of the change in c...

How can I make emacs' cperl-mode indent all statement continuations by only one level?

In emacs' cperl-mode, lines that continute a statement from a previous line are indented by one level: my $var = (1+1) * (2+2) / (3+3); However, if the statement does not begin at zero indentation because it is inside a block, then if you break your statement onto a third line, you get another level of indentation, and so on: s...

Make emacs accept period/dot from keypad?

How can I make emacs accept the period/dot from the keypad and insert a "." into the current buffer? I've managed to set-up all the numbers on the keypad using the following: (global-set-key (kbd "<kp-0>") "0") (global-set-key (kbd "<kp-1>") "1") ... But the code that emacs tells me is registered when pressing the dot key is M-O n rat...

Scheme dialect of Lisp in Emacs

How do I get the EMACS lisp interpreter use the Scheme dialect of LISP. I am going over the SICP book and am new to EMACS (just finished learning the navigation and file access commands)? ...

Prevent emacs from mixing tabs and spaces?

Background: I'm primarily a Javascript developer. Espresso mode rocks. I work on a team where other people touch my code (and I theirs). Different folks have different preferences for tab width. I like mine at four, a coworker likes his at two. JSLint complains if you mix tabs and spaces (yes, I realize you can turn it off - but it he...

Emacs folding mode error

I want to be able to use the emacs folding mode provided by folding.el from http://www.emacswiki.org/emacs/FoldingMode I put the following in my .emacs file: (setq load-path (cons (concat (getenv "HOME") "/.emacs.d") load-path)) (load "folding") (folding-mode-add-find-file-hook) (folding-add-to-marks-list 'latex-mode "%{" "%}" nil ...

emacs: using bookmark to open a file but always in a given position

emacs. when using bookmarks to open a file, is there a way to always open at a particular position of the file? thanks. ...

Why reload notification slow in emacs (when using git)?

I'm learning git, and emacs is my editor. The thing is that when the (version controlled) file is updated, the emacs doesn't show the status instantly. With TextMate, if something changes with the file that I'm editing, it notifies me right away. Is there any way to make the notification instant? M-x load-file is the only way to check ...

EMACS htmlize in batch mode?

I like to use htmlize-file in emacs to turn clojure source files into html. I want to use it from the linux command line instead, or programmatically from clojure itself. I tried $ emacs --eval "(htmlize-file \"/home/john/file.clj\" ) (kill-emacs)" and $ emacs -batch --eval "(htmlize-file \"/home/john/file.clj\" )" Both work, wit...

emacs-dired and globalff

Hi, How can I pass the output of globalff to emacs-dired. Essentially I am looking for something corresponding to find-name-dired that works with output of globalff. ...

[Emacs] View the contents of a gzip archive in hexl mode

I want to write a function, similar hexl-find-file, that will open a gzipped file and show the contents in the hexl-mode. How would I do that? ...

How to start a specific mode with emacs?

Users use 'M-x auto-revert-mode' for starting auto revert mode. How can I set the .emacs file to do the same thing when emacs starts? How to start a specific mode, when a major mode starts? For example, how to set the .emacs file when I want to start the auto revert mode when LaTeX mode starts? ...

emacs keybinding to compile C file

Here's what I would like to do: When C-c C-l is pressed, a new terminal window is launched if there is no terminal window already, then, in that terminal, gcc is invoked with some flags and the current buffer's file. How would I do that? ...

dired list files sorted by access time

Hi, How can I list the output of this command ls -ltDR `find . -maxdepth 4 -type f -name "*.org"` within dired-buffer. The above command lists all org files sorted by access time. Thanks, Sandeep ...

Redefining ENTER key in Emacs

I don't know elisp, but I'm trying to do something like the following: (add-hook 'scala-mode-hook (lambda () (define-key scala-mode-map (kbd "RET") (lambda () (scala-newline) (scala-indent-line))))) Goal is to call the two functions each time ...

find several files with one command in Emacs

Hi all, I would like to know Emacs' equivalent of Vim's :n, which opens several files according to a glob. Say I have this directory: -rw-rw-r-- 1 pablo pablo 31 Jun 25 00:59 /home/pablo/tmp/prueba.php -rw-rw-r-- 1 pablo pablo 2442 May 9 1913 /home/pablo/tmp/sin_soap.php -rw-rw-r-- 1 pablo pablo 726 Jun 25 15:20 /home/pablo/tmp/...