Emacs indentation screwed up - emacs

I recently upgraded to emacs 24.3.1 in order to use a new mode for programming in D. I seem to have introduced some problem with my other modes now (Java, C++ C I'm just using whatever comes with emacs). When I scroll up/down in a buffer, the text displayed is totally messed up. As in lines mixed together, indentation screwy, cursor not modifying where it looks like it is. If I hit ctrl-l the screen refreshes and all is good. I noticed this problem every once in a while with my previous version when editing C .h files. But now it's happening on every single buffer. I can't work with it. Every time I move up/down I have to refresh the screen. I can't find anything similar to my problem with a google search. Might end up being an issue with some incompatible version of a dependency. Here's my system stats.
CentOS release 5.4 (Final)
linux 2.6.18-164.el5
emacs 24.3.1
I don't even know what other libs emacs might depend on. I'll be happy to post versions of anything that might be relevant.
Thanks

Since you say that this happens also with emacs -Q, i.e., without your init file, consider filing a bug report: M-x report-emacs-bug. For that, try to give a short, reprocible recipe, starting with emacs -Q. Emacs Dev will take a look and let you know whether they think there is a bug.
Using report-emacs-bug also automatically gathers info about your Emacs version etc., and includes it with your bug description.

Related

Editing a lisp file in emacs with SBCL

Ok so i am trying to get started with lisp and slime and i am running into some problems. I have correctly installed emacs and slime and SBCL but i run into problems when trying to edit files. I am doing this all on mac osx lion though i dont think that makes a difference. So this maybe stupid but when i first enter the terminal i enter
$ emacs <myfile.lisp>
and then it opens up my file but then slime is not running so i do..
M-x: slime
but when i do that is now gone and all i see is the "REPL" (i think) anyway it just shows me
*
and then i can enter things like
*15
15
but now i can't get back to my file so that i can compile it. Could somone please hlep me through this? Thank you!
Try C-x← and C-x→, that switches the current window's buffer to the previous or next buffer.
For a more interactive approach, split the screen vertically C-x2 (or horizontally C-x3), so you may see your code and try something out on the REPL. You may switch windows with C-xo (remember, O as in Other). You may close a window (not the buffer) with C-x0.
However, you'd better search for an Emacs tutorial, as all of this is very basic. I also recommend you start with a graphical Emacs, such as Emacs for Mac OS X. Some people prefer other versions, which integrate better with Mac OS X but also have lots of different keybindings and come with extra packages. I personally prefer having similar installations and keybindings in whatever OS I'm using.

Xemacs does not show compilation errors anymore

I know this sounds really stupid, but:
I used to compile an Android jni project under Xemacs. The only feature that I needed was the ability to locate the place reported by gcc in the source code, edit and save.
But now this does not work anymore. Probably Xemacs caught some keypresses intended for another window (that is, I did not mention which one has the focus) and switched into a different mode. When I restart Xemacs, it works initially and after a while stops working again.
Question: how do I make it functional again?
What happens when you try this in GNU Emacs? It seems you don't haven't
heavily customized XEmacs so switching shouldn't be painful.
I hope someone with XEmacs expertise can help you, but XEmacs has 13
THIRTEEN followers on Stackoverflow. Clearly your chances of getting help will
improve is you try the Emacs that more people use.

emacs strips away all ansi color codes in shells

I'm using emacs 24 on OS X and have the strange problem that I'm unable to see any color codes. Emacs seems to just ignore them. My motivation is to see colored output from cmake, llvm and the googletest framework for a C++ project. I'd like to see the colors in compile mode, however it would probably suffice to fix the display for comint or shell modes.
My problem differs from many others in the fact that I can neither see the raw ansi color sequences nor the colors they should produce. It seems that the codes are just stripped away from the output, but I can't find out where.
I tried out the obvious things like
requiring 'ansi-color
turning ansi-color-for-comint-mode on
unsuccessfully trying to produce any ansi-colored output in either shell, eshell, multi-term, ansi-term
setting my TERM to various settings, including xterm, xterm-color, xterm-256color
all to no avail.
Edit:
My emacs configuration is divided into my personal settings and a fork of emacs prelude in which I modified some minor settings, mainly adding packages
So it turned out that the problem was caused by zenburn-theme 1.2. There was a bug there with the ansi-color-names-vector that's fixed in version 1.3 (released just now). If you're experiencing a similar problem make sure you upgrade your version of zenburn.
I can definitely say it's working fine for me with just (ansi-color-for-comint-mode-on). FWIW you can browse my emacs config, but it's fairly big :)
https://github.com/aufflick/emacs.d

In Emacs how to prevent the same buffer from showing up in different windows in the same frame?

I'm not sure how to comprehensively accomplish this.
Currently I build my own bzr Emacs on Windows, so I can see that `display-buffer' now takes a SPECIFIERS option, which could be interesting, but I couldn't find concrete examples of how to use it.
But this problem really has to be solved before display-buffer is called.
For example a Help window previously was visiting Buffer-A, but I've visited Buffer-A in another window while reading the help. Now when I quit the Help window, Buffer-A appears there as well. I want some other useful buffer to appear there.
I have some experimental code that appears to work here.
I emphasize experimental. This could melt your Emacs.
I'd appreciate it if you could contact me on github or here to let me know your experiences with this.
Emacs 24 is not yet released. They have changed the buffer-display/window behavior and Lisp interfaces several times over the release's development period. The current status of the release is pretest, so development is supposedly stopped, except for bug fixes.
However, ongoing emacs-devel#gnu.org discussions show that things are still in flux wrt buffer display and windows.
Your best bet is to check the latest doc and code (which might not correspond exactly, at this point).

Emacs image support

I have interest in using the image support in Emacs, as described here http://www.gnu.org/software/emacs/elisp/html_node/Images.html
I have Emacs 23.2, but none of the image commands I've tried have been available, including display-images-p. (Or I'm trying to run them wrong; I'm using the typical M-x thing.)
Any idea what I'm missing? If you get me to point I can run create-image I'll be happy.
What's weird is that I DO see the fancy splash screen (with this image http://www.ee.ryerson.ca/~elf/powerbook/images/emacs-aa.png) so it does have some measure of support apparently.
Additional info:
My Emacs was custom-compiled and supposedly configured mostly default. (`./configure --without-sound` basically, plus some stuff for the directory layout here.)
If you hit "up" a couple times from the manual link I gave above, it says that version of the manual is for 23.2, so I think the versions should match.
The Linux distro is RHEL 5.
Only commands -- functions which call (interactive) -- can be run with M-x.
All functions (commands or otherwise) can be evaluated in other ways, however. Mickey posted a handy summary recently at his Mastering Emacs blog, so I'll just point you to that:
http://www.masteringemacs.org/articles/2010/11/29/evaluating-elisp-emacs/
You could also be missing some image libraries, but when you ran ./configure before compiling, it would have told you whether or not those libraries were present. If you're unsure, you could repeat that process.