emacs

How to check if a variable is set to what in elisp/emacs?

Let's say I have the following line in .emacs file. (setq-default default-directory "~/Desktop/mag") How can I check the value for `default-directory' in elisp? Added I asked this question as I need to check the value of default-directory based on this question. The elisp code should change the default directory when I click C-x C...

Inbuffer emacs calculation

Is it possible to do inbuffer calculation in emacs. For example, if my file has the following numbers 10 11 12 (A) I would like to convert these numbers to hex (either in place or paste it next to that), 10 A 11 B 12 C (B) I would like to sum those numbers. 10 11 12 33 (C) I would like to increment the count (sth like a...

How to find if else blocks fast in Emacs

If I have code that has a lot of if/then/else conditions like so: if () { if () { } else { } } else { if () { } else { } } and there might also be a lot of text inside those conditions. How can I quickly find the outermost if as well as the corresponding else. ...

Emacs automatic encoding conversion

When I open a buffer in Emacs containing a German Umlaut (the word "Präsentation" occurs in a string), Emacs automatically converts it to a different encoding as soon as I save the file. How can I tell Emacs to leave the encoding alone? ...

emacs, auctex and query-replace strings with newline

I use emacs+auctex and auto-fill-mode. Now sometimes I want to search (and replace) a string containing spaces like "test1 test2". The problem is, that auto-fill-mode replaces space-characters sometimes by newline characters. So search and replace of "test1 test2" does not find those occurrences of this string where auto-fill replaced ...

Disable italic in Emacs?

Hi, I would really like to have the italic style disabled in Emacs. In this post it is explained how to disable bold and underline, but not italic. Does anyone know how to do that? Using tab-completion, I can see I have these available set-face-background set-face-background-pixmap set-face-font set-face-foregr...

Unable to type braces and square braces in emacs

I'm running Mac OS X and GNU Emacs 22.3.1. I use a swedish keyboard. I am unable to type braces {}, [] in emacs. When trying to type braces I get parenthesis. Since I'm quite new to Mac and emacs I need a little help on configuring emacs to get this right. TIA Niclas ...

emacs slime-connect version of clojure doesn't lookup the $CLASSPATH

I need to use my clojure functions with slime-connect. And I put all my libs in the $CLASSPATH. As I learned from this question. I used the following command to check the CLASSPATH for current environment, and I found none of my $CLASSPATH is used. How can I attach my class path for my clojure with emacs/slime-connect? I installed my...

narrowing a table's column in emacs

I have a table in emacs and I am trying to narrow some of the columns, say by 7 characters. I tried to do this by using C-7 M-x table-narrow-cell command. However, it says that: Variable binding depth exceeds max-specpdl-size Does anyone know what I need to do? Do I need to change something in the .emacs file? ...

Can't install yasnippet?

I tried to install yasnippet using the "normal install" protocol given here. After placing the yasnippet-0.6.1c folder in ~/.emacs.d/plugins/, I tried to eval the following in my .emacs: (add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c") (require 'yasnippet) ;; not yasnippet-bundle (yas/initialize) (yas/load-d...

Open new Emacs buffer using vertical splitting

How can I make vertical splitting the default instead of horizontal splitting in Emacs? My use case: I want to compare a Python file with an older revision of itself from the svn-repository, I do this with the C-x v ~ command. Unfortunately this always opens a second buffer while splitting the window horizontally. Vertically would be m...

How to move forward and backward in Emacs' mark ring

In Emacs, C-u C-SPC will "jump to the mark, and set the mark from position popped off the local mark ring". Is there a way to go the opposite way around the mark ring? Say you have typed C-u C-SPC several times and want to go back to a mark you have seen without going all the way around the ring. ...

emacs lisp library for input forms?

In Emacs Lisp (elisp), if I want to get several values from the user, is there a better way than just asking for each value in turn in the minibuffer? Ideally, there would be a library that would let me define an input form with several fields, present that form to the user (as a text-based dialog in text mode, and as a GUI-based dialog...

Java programming environment : emacs or eclipse?

I'm pretty new to Java, and I need to build up programming environments for it (editing, compiling, testing, debugging, and deploying/making jar files). And, even though I'm not a super expert of emacs, I'm a big fan of this wonderful tool. Here comes my question. Is it wise to use emacs for Java development? Is Eclipse better for Jav...

Emacs ruby symbol word completion

Quite often I define a ruby symbol (eg. :some_value), then I want to create a method with the same name def some_value. Unfortunately, the autocompletion(M + /) for the second occurrence of some_value string does not work, being slightly different (:some_value vs some_value). How can I setup emacs to handle such events? ...

Error starting sbcl under slime on Vista

I'm having trouble getting SBCL to start under slime. I've messed things up and I don't know how to recover. This was working fine until I... Had a problem loading a package via asdf. At which point I started debugging the asdf.lisp provided with SBCL to see what was going wrong. The sole change I made was to put a (break) in which ...

The code coloring in emacs22 on Mac OS X is rather weak. Is there any way I can grab Ubuntu's emacs configs?

I don't at all like the default colorings on Mac OS X, but I love them on Ubuntu. What config files govern these things? I'm hoping I can just copy the relevant files from Ubuntu onto Mac OS X. ...

Render Markdown in Emacs buffer

Is it possible to present Markdown rendered in an Emacs buffer using Emacs' own buffer text formatting capabilities? Emacs in graphical environments has rich text presentation capabilities (font styles, colors, links and even images) so it should be quite possible. Are there any existing implementations? Note that the idea is to have th...

Modifying an existing emacs color theme

Hello, I like the Emacs color theme clarity. I start the theme with M-x color-theme-clarity. However, I would rather have the background was always black, rather than the mixed black and white as seen in my screenshot. It seems like if there is a line that has never had text on it, it will be white rather than black. How do I fix this? ...

Does tramp offer any API for interrogating information from the buffer-file-name

I'm currently doing a lot of work on remote machines with tramp. However the project logic gets confused when building make command lines as it will attempt to cd to some /ssh:blah.... path. Does tramp provide any API functions to test if a buffer or a buffer filename is actually managed by tramp and therefor on a remote machine? Can it...