emacs

ede-proj-regenerate does weird things with my Makefile

Hi, I have created a really basic project (Make) like this: (ede-proj-project "zrm" :name "zrm" :file "Project.ede" :targets (list (ede-proj-target-makefile-program "zm" :name "zrm" :path "" :source '("zrm.c") ) ) ) When doing M-x ede-proj-regenerate RET and M-x compile RET RET (accepting make -k as my c...

Accessing StackExchange API from Emacs

I am trying to access the StackExchange API from Emacs' elisp: (require 'url) (require 'json) (defvar url-http-end-of-headers) (defun read-json () (interactive) (with-current-buffer (url-retrieve-synchronously "http://api.stackoverflow.com/0.8/users/2386") (goto-char url-http-end-of-headers) (json-read))) M-x read-json resul...

[cedet]: how to add a new ede target ?

Hi, I can't find an easy way to add ede targets to my projects. I am looking for the way to add an install target or even a test target to run unittest. How do you do that with ede-project-manager ? ...

How can I highlight different types of file in dired mode in Emacs?

In a nutshell, I want to have different faces for some types of file in dired mode. I don't think it matters, but I am using Aquamacs. The example I will use here is .tex files. If I can do it for .tex, then I can just apply the same structure to do create other faces for other types of files. From what I understand, I have to create a...

emacs exporting org file as PDF in batch mode

I'm trying to export a bunch of org mode files to PDF using emacs in batch mode. So far, only export to html seems to work. When I export to html I see the following - U:\tmp>d:\programs\emacs-23.1\bin\emacs.exe -batch --visit=Changelog.org --funcall org-export-as-html-batch OVERVIEW Exporting... Exporting... S...

Anyone know how I can change the color of the filenames on my modeline in emacs?

Anyone know how I can change the color of the filenames on my modeline? . Here's the theme I'm using: (defun color-theme-twilight () "Color theme by Marcus Crafter, based off the TextMate Twilight theme, created 2008-04-18" (interactive) (color-theme-install '(color-theme-twilight ((background-color . "#141414") ...

Correct use of apply in Emacs Lisp?

I'm not sure whether the use of apply is recommended here. Is there a better/standard solution for setting the major mode dynamically? I couldn't find any other. Background: Whenever I get the X has auto save data; consider M-x recover-this-file message in Emacs, I wonder what the difference between the current file and the auto-sa...

Controlling code beautifing in emacs

How can I get Emacs to put padding spaces around opening brackets and operators on indentation ()? ...

Extend Emacs to edit encrypted text files

I am trying to add special handling to emacs to handle Triple-DES encrypted files (any file with extension .des3 is assumed to be a valid encrypted text file). My approach is to append to format-alist, like so: (setq format-alist (cons (list 'des3 "Triple-DES encrypted files" ".*\.des3" "show" "" t nil) fo...

Is there an Emacs-analog for the VI '.' command to repeat-last-typed-text

I've used emacs for decades and always wondered, but kept on coding, if there was a way to type in something, them move the cursor and insert the same text, like the VI . command. Instead what I do is to type the text, set the mark, backup, copy the region, go to the next spot (often just C-n, down one line) and then pre-arg yank, C-u C...

How can I prevent the mini-buffer from displaying previous commands in Emacs?

I am not even sure this is a previous command or a non-finished command or whatever, but I do know I really don't like it. My problem is that some commands (or messages, or whatever) get stuck in the mini-buffer so that when I type a new command it appears there really quickly, and then the mini-buffer is back to the stubborn command. ...

Can I install WhizzyTeX for Emacs on a Mac (is Mac OS X a unix environment)?

I think my question is pretty stupid, but here it goes: I am using Aquamacs, and I want to install the WhizzyTeX mode. The website for WhizzyTeX says that "it is designed for Unix platforms". I read that Mac OS X is unix certified, but does that mean I can install WhizzyTeX on my mac? If yes, can I install and use it with Aquamacs or ...

How do I change the color settings in emacs23 running in a terminal emulator?

I use xterm and set its appearance in ~/.Xdefaults: XTerm*background: paleTurquoise XTerm*foreground: black I also use emacs, but set its appearance differently in ~/.emacs: (set-background-color "black") (set-foreground-color "yellow") I usually run emacs within the terminal emulator with emacs -nw, rather than creatin...

ESS workflow for R project/package development

Can anyone share his experience on workflow for R peject development under ESS? I tried several times to learn emacs but I have not get it yet. I can understand ESS as an editor, but is there a project view in ESS? what's the efficient ways to set up/view R project directory, coding, and testing, and how's ESS has an edge to facilitate t...

Good workflow with emacs+swank+slime+clojure?

I just wanted opinion on good workflow using the emacs environment with clojure+swank+slime. I often find myself doing very repetitive keycommands and wonder if there is an obvious better way. I include swank with lein and start my project using lein swank from shell. Then I connect with emacs and do the correct use commands so that I ...

check if current emacs buffer contains a string

I have a buffer open in emacs. I want a function that will return t if the current buffer contains the string, otherwise it returns nil. (defun buffer-contains-substring (string) ... ) ...

In emacs can you evaluate an elisp expression and replace it with the result?

For example if I have the text: Sum of items is (+ 1 2 3) I want to move to the end of the line, evaluate the expression and replace it with the result, so that it reads: Sum of items is 6 ...

Cant apply color theme to one frame in Emacs?

This is my emacs file http://pastie.org/1003551. I want the theme to change when I am in shell-mode. But what happens is that the theme gets applied on all the windows. I set the variable color-theme-is-global to nil, but still the same problem is persisting. (add-hook 'shell-mode-hook 'color-theme-monokai-terminal) (set-variable 'color...

Can emacs generate a table of comments and number sections of a document?

I'm writing a plain text document with numbered sections or chapters and am wondering if emacs can help with numbering and re-numbering sections. And of course would be great if it could then generate a table of contents as well. I have had a search on google and looked through the emacs wiki but did not come up with anything other tha...

In emacs, how to stop nxthml to mess with my background-color?

I just started to use nxhtml, and I opened PHP file, it looks just really awful. I usually set black background-color, but PHP/nxhtml mode, background-color is set to light blue, and I don't know how to change it. How can I change it? Is there any good site to learn nxhtml mode? ...