Emacs config script for Lisp - emacs

What are some of the choices for pre-made Emacs config scripts? e.g. Lisp-centric keybindings, auto-complete / "intellisense", bracket matching, code formattting, etc.
So far I've only found:
emacs-starter-kit
redshank

There is also Prelude, which I can recommend. It has clean structure and code, and is regularly updated to include new interesting and useful packages or settings.
Do not use configurations from EmacsWiki. Most of what is posted there is very old, has never been updated since, and is hence rather out-dated now. Many of them will not work in modern GNU Emacs versions.
Instead, also look at the Github accounts of people who write Emacs packages, and you'll find many Emacs configurations. Some of these are created to be re-used by other people, for instance https://github.com/purcell/emacs.d.

See http://emacswiki.org/emacs/CategoryDotEmacs, especially under "Some complete InitFiles" and below.

This is my configuration script:
https://github.com/huseyinyilmaz/emacs-config

Related

Emacs django-mode does not detect virtualenv

I am new to emacs, but I know how to navigate the basics.
I simply want Django integration with emacs 24 on ubuntu.
Django-mode seems to be the only game in town, but is there a tutorial that is written with more complete steps? A typical use case would be someone who is not an expert in emacs, but wants to add Django support to emacs.
I have virtualenv and virtualenvwrapper all set up properly. But django-mode is not detecting my virtualenv no matter what I do.
I have a great deal of trouble with the quoted paragraph below on Directory local variables as the documentation is poorly written.
Is this file .dir-locals.el optional? Many of his explanations are confusing. Do I need iPython? I would think not, but I'm guessing the python-shell-interpreter is not optional.
I have made a .dir-locals.el file and added my virtualenv path, but django-mode is not detecting my virtualenv. In emacs it says: virtualenv none.
There are also screenshots of a menu bar that allows alot of neat stuff like running ./manage.py collectstatic, etc....but no mention of how to activate the menu. Maybe this is a basic emacs command but I don't know it and would appreciate it if someone could show me how to set up emacs with django.
Are there any other alternatives or is django mode the way to go? Did I miss a huge chunk of documentation (like is it hiding inside emacs)
Thanks!
Directory Local variables Now we have all set there's a really
important topic to talk about and that's Directory Local Variables.
python.el is directory local variables aware and is in favor of
directory based configurations, that's why understanding this topic is
that important. So I suggest you to read the relevant part of the
manual with M-: (info "(emacs)Directory Variables").
The .dir-locals.el is a file which contains an Association List, but
don't let the name scare you, the following is a quite complete
example of what I'm using to open the current project.
((python-mode (python-shell-interpreter . "python")
(python-shell-interpreter-args .
"/home/fgallina/Code/Projects/anue-site/anue/manage.py shell")
(python-shell-prompt-regexp . "In \[[0-9]+\]: ")
(python-shell-prompt-output-regexp . "Out\[[0-9]+\]: ")
(python-shell-completion-setup-code . "from IPython.core.completerlib
import module_completion")
(python-shell-completion-module-string-code .
"';'.join(module_completion('''%s'''))\n")
(python-shell-completion-string-code .
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
(python-shell-extra-pythonpaths
"/home/fgallina/Code/Projects/anue-site/anue/apps/")
(python-shell-virtualenv-path . "/home/fgallina/.virtualenvs/anue")))
http://from-the-cloud.com/en/emacs/2013/01/28_emacs-as-a-django-ide-with-python-djangoel.html
There was recent a question at Help-gnu-emacs#gnu.org whose answers pertains to your case also
http://lists.gnu.org/archive/html/help-gnu-emacs/2013-06/msg00425.html
WRT this answer only replace Pymacs by django-mode.
For the moment, just use Emacs as editor. Otherwise see some risk to end up in frustration.
IPython is great to learn Python itself, basically it provides an enhanced interactive shell. On IPython is built Enthought -- a Python Distribution providing scientists with a comprehensive set of tools to perform rigorous data analysis and visualization.
Don't see it related to Django so far.

Emacs setup for fortran

I currently work on a big Fortran project with emacs, but I have the feeling that my current setup is inadequate to the task.
I use f90-mode with auto-complete (without fortran-specific setup, so I only have completion for opened files), and I really miss function header information on hover (as in elisp code), code-folding, lists of subroutines in the current buffer, lists of included files, info on the origin of subroutines and used variables (C-xC-f to open the source file?), …
How can I best add modern supporting functionality for fortran in my emacs?
Mostly I need tools which help me understanding the projects code.
The project uses its own build tool and copies files from different directories into a build directory before building, actually overwriting some files with different versions of the code, so I need a quite flexible tool which can cope with that.
There's a small Emacs plugin called Fortran-tags. It can find the definition of any variable or procedure under the cursor, so it's similar to Ctags, except that it is able to correctly identify all local and global variables and has some additional features. Also, it is developed with the focus on modern Fortran.
Using fortran-language-server (after installation simply start fortls in the terminal) and lsp-mode in emacs works perfectly.
I now found the f90-interface-browser in elpa.
If you use emacs 24 or later, you can just use
M-x package-list-packages
and then search for f90-interface-browser.
You write (or work on) large, modern fortran code bases. These
make heavy use of function overloading and generic interfaces. Your
brain is too small to remember what all the specialisers are
called. Therefore, your editor should help you.

What is the short-cut key to jump to declaration in Emacs?

In visual studio it 's easier to push F12 button to jump to a declaration of a function or variable when editing C/C++ code.
Is there a short-cut key in emacs to do that?
Well, it's a bit more involved than that.
By default, Emacs doesn't "know" about function declarations for C or C++ code. First, obtain Exuberant Ctags. Then, use command etags (ctags for Emacs) on your source code. A file named TAGS will be generated.
Then, while editing your source code, when you want to jump to a declaration, press M-. (meta and dot, or alt and dot on modern keyboards). At first, Emacs will ask you for location of your tags file. Point it to the one you generated and afterwards navigation will be automatic.
I'd suggest reading Emacswiki article about tags for a better understanding of this functionality.
The newest version of Emacs (23.2) comes with CEDET integrated, which has more advanced features for C and C++ navigation, but it can be a bit difficult to set up right, so read more about it if you're interested.
M-. key will take you to the function definition emacs.
As others have said there is no built-in universal solution for this in emacs. That said, after having this functionality in IntelliJ I wanted it in emacs too so I made Dumb Jump.
Right now Dumb Jump has basic support for:
JavaScript
Emacs Lisp
Python
Go
PHP
Ruby
Faust
and more... (over 20 now)
It's available via MELPA and is actively being developed.
There are multiple ways to do this. As darioo mentioned, Ctags is one, but it goes to the definition by default (which might work for you). Looking further, though, you can see that prefixing M-.(ie, C-u M-.) will take you to the next tag match (which is often the declaration). There is also a --declarations option, but Exuberant Ctags doesn't seem to support it.
CEDET is another option, but in my experience, it's still not ready for production. Often times in C++ semantic-ia-fast-jump will go to forward declarations instead of the definition or the declaration.

'Project' support for Emacs

A while ago I saw something go by for 'search in project' etc support in Emacs where the definition of a project was simply looking from the current directory up til a .git or other source control directory was found.
I unfortunately didn't bookmark the project as I was off in Smalltalk land and didn't need Emacs at the time. I'd really appreciate pointers to the specific project I'm vaguely referencing or one that does the same thing. I've looked at eproject which seems close, but isn't quite what I'm remembering.
So what I was looking for, I finally found.
Textmate minor mode:
https://github.com/defunkt/textmate.el/
Have a look at this SO question. It sounds like what you're looking for is find-file-in-project.el. The EMACS Wiki is usually a good source for this kind of question.
You are probably looking for eproject and its eproject-find-file and/or eproject-grep functions.
I use TAGS for my project, and recently wrote this answer for igrep-in-tags, which does a regexp search through all the files in the TAGS and gives the output in a compilation style buffer.

How to Make Eclipse More Like Emacs

I am very familiar with emacs--and I realize that there is nothing that it cannot do--but there are some things that it does not do well or efficiently. So, being between projects I am open to the idea of switching to a full-featured IDE such as Eclipse.
With muscle-memory being what it is, I would like to make Eclipse as emacs-like as possible. I have already discovered the excellent Emacs+ plugin which gets me about halfway there. However, I am still missing the following features of emacs which I routinely rely upon:
shell: It's not just a shell, it's also a buffer.
occur: Search->File... is close to what I want, but I just want it to search the current file--which might be a text file, a logfile, or a shell buffer, or whatever.
align-regexp: This awesome little command in emacs helps me make files more readable, and alignment helps with keyboard macros.
What plugins would you recommend to solve these issues? Are there any other emacs features you miss in Eclipse or plugins you would recommend?
Please, no emacs/vi zealots asking why on Earth I would do such a thing.
For the shell you have WickedShell
Ctrl+F is enough to trigger a Search within the current file. (does not create a new buffer with matched lines)
Only Mark Occurrences is about highlighting occurrences, but that is not as advanced as the Emacs function.
Formatter options can emulate "align-regex" function, as described here.
Preferences -> Java -> Code Style -> Formatter.
Click 'Edit' on the profile (you may need to make a new one since you can't edit the default).
In the indentation section select 'Align fields with columns'.
Then, in your code Ctrl+Shift+F will run that formatter.
I can confirm Brian's suggestion (Emacs key-bindings). What I do to resolve this dilemma is to use both Emacs and Eclipse simultaneously. They are both very good at reporting external changes to files so there is minimal chance of tromping on edits (but it can happen). More to the point, you can leverage the strengths of both tools without having to give up either one. The combination of using both tools and Eclipse having Emacs key-bindings makes this quite satisfactory for me.
IIRC (It's been a while since I've used eclipse) eclipse has a "use Emacs key-bindings" mode. I believe that there's also the option to tell eclipse to use emacs as its own editor...