Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Catalyst-proof
May 11, 2011

better waste some time with you
code:

      ..      .                                                  .x+=:.   
   x88f` `..x88. .>                                             z`    ^%  
 :8888   xf`*8888%     ..    .     :                               .   <k 
:8888f .888  `"`     .888: x888  x888.        u           .      .@8Ned8" 
88888' X8888. >"8x  ~`8888~'888X`?888f`    us888u.   .udR88N   .@^%8888"  
88888  ?88888< 888>   X888  888X '888>  .@88 "8888" <888'888k x88:  `)8b. 
88888   "88888 "8%    X888  888X '888>  9888  9888  9888 'Y"  8888N=*8888 
88888 '  `8888>       X888  888X '888>  9888  9888  9888       %8"    R88 
`8888> %  X88!        X888  888X '888>  9888  9888  9888        @8Wou 9%  
 `888X  `~""`   :    "*88%""*88" '888!` 9888  9888  ?8888u../ .888888P`   
   "88k.      .~       `~    "    `"`   "888*""888"  "8888P'  `   ^"F     
     `""*==~~`                           ^Y"   ^Y'     "P'                

What is Emacs?

Well, that's kind of a difficult question to answer. No answer anyone gives will be the complete one -- or even the right one -- because Emacs is a lot of things to a lot of people.

So let me give you my definition. Emacs is a layer over your operating system that allows you to work in a consistent, unified, inter-connected manner -- and a piece of software which contains the curious property that you can continually improve it, and use those improvements to continue improving it. It is a technological singularity in and of itself.

Emacs isn't just an improvement to how you edit text -- be it for screenplays, source code, or scientific papers. Emacs is an improvement to how you improve.

What is Emacs fundamentally? That's a bit easier. Emacs is a text editor that exposes its internals. This allows you to modify how it works to fit your needs, and extend it when it doesn't fit your needs. These improvements are made in Emacs Lisp, a decent programming language that revolves around the modification of text in places called buffers. The layman may mistake buffers as files in a word processor, or tabs in a web browser: simply a means to collect content in one place. But buffers are blank slates -- you can do whatever you need to in them, and modes allow you to change the behavior of your input in that buffer.

The Most Important Part

The most important part about Emacs, overarching anything you may have possibly heard about it, is that it is self-documenting. What this means is that all of its possible behavior is exposed to you in such a way that you can understand it, be it a manual, or the source code itself. It also means that you can learn the name of anything you can do, even if you don't know you want to do it yet. It also means you can find out what will happen if you do anything.

This is all rather nebulous, could you give me something concrete?

Sure. Download Emacs from your friendly package manager (apt-get install emacs on Ubuntu and Debian, brew install emacs from Homebrew on OS X, search the internet for Windows.

The globally accessible chord for learning about Emacs is C-h. Hit it twice to see all the available help options. Hit C-h t to start a tutorial.

Wait, what the gently caress? What's a chord?

A chord (though not a widely used term) is still the best way to describe entering commands in Emacs. They're not keyboard shortcuts, they're chords. Entering a chord doesn't necessarily mean something happens. Another chord may be required to actually perform an action. For example, the universal version control chord in Emacs is C-x v -- which means holding down the Ctrl key, pressing 'x', releasing both, and pressing 'v'. But all that does is give you access to another set of chords: pressing 'g' after the fact shows you a blame. Pressing 'v' does the next logical action, like adding a file to source control or commiting the existing changes. Therefore, the total chord to do the next logical action is C-x v v.

I am overwhelmed!

You shouldn't be. Most Emacs zealots start proselytizing the wrong way, describing all the wonderful things you can do in it, showing off their extensions and customizations. That belies a necessary truth: that none of us knew how to do any of that off the bad. You road to Emacs enlightenment starts with learning how Emacs itself works, and then applying that knowledge to the things you wish to do.

Don't download any starter kits! I'm serious. The crap you find online is, just like it says on the tin, usually crap. Customizing Emacs is like building a lightsaber: the meaning is in doing it yourself. You'll find the things that you need to change, and you'll learn how to do it, and in doing so, will improve how you do everything in Emacs -- which, if you're like me, includes quite a lot.

Well, are there any standouts?

Yes. Working in Python in Emacs is a joy due to great modes, on-the-fly pep8 and pylint checking, ipython support, and a debugger that works with open files to point out your current breakpoint.

Org mode is something special, a set of tools that you can use to create your perfect scheduling, e-mailing, todo-list making, agenda aggregating, blog writing juggernaut. I work in it extensively.

If you work in LaTeX, auctex is miraculous. It can render parts of your paper inline so you can see how they'll look.

So, what's this thread for?

It's for getting people on the right track to Emacs, and for users to discuss their awesome setups, idioms, and stories.

And it starts now!

Catalyst-proof fucked around with this message at 22:15 on Oct 7, 2011

Adbot
ADBOT LOVES YOU

Catalyst-proof
May 11, 2011

better waste some time with you
Where do I start?

Start with the tutorial I mentioned above. It may be a bit underwhelming but it's important you start learning how to operate Emacs before you learn how to do what it is you want to do. Once you get there, come back to the thread, ask a question, and we'll see what direction you need to go in.

Some useful information

Emacs 24 is the current version of Emacs in development. I am using the HEAD release of Emacs 24 to no disadvantage.

Emacs provides fantastic utilities out of the box for:

* Editing files (even on other computers
* Navigating directories (even on other computers)
* Writing in nearly any programming language under the sun
* Reading e-mail
* Input completion in drat nearly every aspect of Emacs
* Tiled window management

and countless many more.

Emacs 24 adds package management to this list, making it easier than ever to extend Emacs to do the things you want. If you are using Emacs 24, make sure to add the Marmalade repo to your list of available repositories. It contains a lot more packages than the GNU package server, and allows you to upload your own.

Don't use Emacs until you map Caps Lock to Control!

Seriously. when was the last time you needed Caps Lock? This will prevent a lot of pain and agony known as 'Emacs pinky' in the future.

How do I use all this self-documentation stuff?

Use C-h. The following characters, after it, will do the following things:

* a will enter apropos mode, which means you can type in any part of a variable name, function name, or any other symbol in Emacs, and get its definition.

* m will enter mode help, which shows you the available interesting chords in the current buffer you are in.

* k will enter chord help. It expects another key command immediately after the chord, and it will tell you what that chord does in the buffer you are in.

* i will enter info mode, an interface to your system's Info pages, including (typically) the entire manual for Emacs, and a primer and full reference to Emacs Lisp, the language used to extend Emacs.

Where do I start?

Start with the tutorial I mentioned above. It may be a bit underwhelming but it's important you start learning how to operate Emacs before you learn how to do what it is you want to do. Once you get there, come back to the thread, ask a question, and we'll see what direction you need to go in.

Where can I learn more?

As above, you can learn more about Emacs from using Emacs and activating its help system. If you want a friendlier approach, I've heard good things about Meet Emacs, though a video-cast and costs 12 dollars to view. I am not affiliated with Peepcode, I've never even seen the thing myself.

Well I'm not paying 12 bucks to learn an editor. What else?

Steve Yegge has written some pretty good posts about Emacs, including (in increasing order of difficulty):

* http://sites.google.com/site/steveyegge2/my-dot-emacs-file
* http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html
* http://sites.google.com/site/steveyegge2/effective-emacs

For a kind of long-winded primer about Lisp, see: http://www.defmacro.org/ramblings/lisp.html

I'm looking for some specific feature for a language!

Notorious b.s.d. posted:

There are a ton of these projects to talk down a pipe to a language-specific process. They're usually minor modes, rather than major modes. SLIME is an exception to that rule, if i recall correctly

For example, in ruby, there is a major mode to handle syntax highlighting and indentation (enh-ruby-mode), then a minor mode (robe-mode) to talk down a pipe to get completion and code re-loading and so on.

You should always be using the major mode for every language -- there's pretty much no cost/effort. The minor modes are more effort to set up, but they get you more IDE-like features: code analysis, completion, refactoring

The ones I use on a regular basis:
  • Ruby

    enh-ruby-mode -- major
    robe-mode -- minor

  • Perl

    cperl-mode -- major, built into emacs
    Sadly, I don't have a minor mode to provide perl reflection.

  • Scala

    scala-mode2 -- major
    ensime -- minor

  • Java. There are lots of options for java, but this is what I use.

    java-mode -- major, built into emacs
    eclim -- minor


Awesome contributions from other posters

vlack posted:

Addendum: If you're new to Emacs and you keep hearing about how it's got an email client and a web browser, some caution. Those things won't replace Safari and Mail (or whatever you use) for anything approaching "normal use". If youre curmudeony enough to be able to stomach using Emacs as your MUA, you're probably already doing it. Even jwz doesn't read his email in Emacs anymore. If you're aware of all this and want to experiment, then do so by all means... just don't expect GNUS to be a drop-in Gmail replacement. Like. At all.

OTOH if you're way beyond this and just can't get enough Emacs, I recommend checking out conkeror. It's a browser based on Mozilla XULRunner, which means you get fancy new features like JAVASCRIPT and even BROWSER PLUGINS (unlike emacs-w3m), in a mostly Emacs friendly way. I've tried it several times and I think it's just not for me, but it's at least a step in the right direction. (Unlike, IMO, emacs-w3m.) You might also be interested in stumpwm, which is an X11 window manager written in Lisp in an Emacsy way with an Emacsy UI. When I tried it last, it was pretty nice, but I don't run Linux on the desktop any more so I never use it.

Comedy option: Don't do any of that but instead use SXEmacs. In addition to being a mail and IRC client, SXEmacs can also be your X11 window manager and login shell! (Though apparently not at the same time; "We wouldn't recommend trying to run an X session from it" as your shell.) Terrifying.


Fake edit: also, I have had caps lock mapped to control for years and I have some serious Emacs pinky right now (for the first time in my life). It loving sucks.

Real edit: some binaries links for the OP, if you want them:

On Windows, I used to get them from here. These binaries work, but they're old. They are the only ones to come with a workable installer. If you're brand new, you should probably start here... just click the "Download latest EmacsW32+Emacs patched" button from the download page. If you want Emacs24, you'll have to get it without the installer (which does stuff like register file associations and such) from the official alpha builds distribution point.

On Mac OS X the situation is all so much simpler. You can get some good pre-built packages from https://emacsformacosx.com, including pretest releases such as for Emacs24 from the builds page. (The brew install method may also work very well, I've just never used it for Emacs.)

Catalyst-proof fucked around with this message at 12:06 on Feb 16, 2015

Catalyst-proof
May 11, 2011

better waste some time with you

Bonus posted:

I use vim but I just wanted to say that's a cool avatar.

Thanks it's from Interplays Lord of the Rings, the game that lets you be a horse

Catalyst-proof
May 11, 2011

better waste some time with you
quote not edit

Catalyst-proof
May 11, 2011

better waste some time with you
The main reason to start learning Emacs coming from other editors is that once you discover "Does Emacs do X", and you stop doing X, you can keep using Emacs to do other things. For example, I could quit my job writing software and never program again, and I will still use orgmode and check my email and chat with people in Emacs. And I don't need to learn anything new, jumping from doing X to doing Y. Emacs will probably do fine doing Y, whatever Y is, even if I stop doing X.

Catalyst-proof
May 11, 2011

better waste some time with you

shrughes posted:

Emacs is great if all you want is to play a lovely tetris game, run a lovely IRC client, and work in a lovely IDE. MS Visual C++ is way better for developing C/C++/C# apps than Emacs is.

great, thanks, we've all seen the light, what were we thinking. your job is done, you can leave

Your Computer posted:

I mostly program in Java using Netbeans :downsgun:

Another question; I've never actually tried emacs, though I've dabbled in vim. Are there any good* reasons why emacs is better? As I said I mostly program in Java, though I also use Python frequently. I get from what you've said that emacs is good for Python? Also important: colorschemes. Need me some nice zenburnish colors.

*For my use

e: I'm one of those people who program in Java using an IDE on Windows. Should I even bother with stuff like vim and emacs?

Here's some screenshots showing how I work in Emacs with Python.



Using flymake to run pep8 and pylint on code and point out errors.



Using ido to jump quickly from method to method using incremental search.



Hitting C-c to execute the current Python block in a shell, making it available for use.

There are some other things like completion, and live information on debug position, but I don't use those as much. This seems to be a reasonable guide to getting some of those other things working, but it's over a year old, and some of these things may be easier/harder to do, or be done in different ways.

EDIT: Oh yes, and Zenburn :-)

Catalyst-proof fucked around with this message at 14:55 on Oct 2, 2011

Catalyst-proof
May 11, 2011

better waste some time with you

Zombywuf posted:

I haven't seen this one, how's it done?

nm, seems to be from here http://nflath.com/2009/09/emacs-fixes/

Here's how I'm doing it on my system. I should add that while I can't guarantee any of my code works in < Emacs 24, this should be fine in 23. https://gist.github.com/1257532

Catalyst-proof fucked around with this message at 03:11 on Oct 3, 2011

Catalyst-proof
May 11, 2011

better waste some time with you

PlesantDilemma posted:

emacs is pretty drat awesome. I tried to learn vim but I kept getting confused about what mode I was in. The extensibility of emacs is inspiring. You can customize it to do anything.

I'm very much a emacs newbie, so I'll have plenty of questions for this thread. My first one is about using the shell in emacs. I've been using eshell over the normal M-x shell because it remembers past commands, but eshell doesn't support aliases. Is there a way to do that in eshell or is there a better shell I can use within emacs?

Also, it seems I can only have one instance of eshell running at a time, is there a way around that? On my school accounts I can't use screen, ortherwise I'd use that for all my cool multitasking stuff.

Right off the bat: the shell situation in Emacs is unfortunate, simply because there's no one solution for everybody's needs. You may want to look at what other shells are available: ansi-term and nterm. If you want to use your shell's history ansi-term might be the best choice for you, until you find something else that doesn't work. It's a vicious cycle.

It appears you can't open multiple eshells because every time you try Emacs checks to see if you already have a buffer called *eshell* and just redirects you to it. The best way around this is to use M-x rename-buffer to give one shell one name, then call eshell again.

There also appears to be this, a small library to dynamically manage that pesky renaming for you: http://www.cims.nyu.edu/~stucchio/software/elisp/multi-eshell.el.html

EDIT: I should add that a competent shell configuration does wonders to smooth over the rough patches between Emacs's terminal modes. I'm using the grml config for zsh (grml is a linux live-CD known for their kickass zsh configuration and precious little else) and it contains logic to check the $TERM variable for things it understands. In this case, you can set your $TERM variable to "dumb", and the grml config will disable some conflicting features.

Catalyst-proof fucked around with this message at 03:13 on Oct 3, 2011

Catalyst-proof
May 11, 2011

better waste some time with you

tripwire posted:

Why do
you keep
writing
your
posts
this way?

Up until just now, emacs-w3m was wrapping input in text areas to 80 columns, which meant that lines of text with bbcode got even shorter to accomodate the characters making up the tags. It should be fixed now.

Catalyst-proof
May 11, 2011

better waste some time with you
I'm not enough of a sperg to browse in Emacs regularly; it was just something I was trying for this thread, so I hadn't played with any of the options. I'll go back and fix it so it doesn't bother anyone else.

Catalyst-proof
May 11, 2011

better waste some time with you

PlesantDilemma posted:

So whats a good way to sync up my configuration across various computers? I've got a windows laptop that I use emacs on, a school account that I ssh into, and another class is suppose to set me up with another ssh account whenever the professor gets his act together. I'm not the most experienced guy on the command line so I was thinking of putting a config that I like on a webserver and have a little script wget it and move it to the proper place for .emacs to be. Maybe you experts know of something better?

What most people appear to be doing is saving their configuration in source control, typically on GitHub. This allows them to pull down their configuration on each machine, update it and recommit it, and distribute those changes.

The other thing is that you can use Emacs to separate out parts of your configuration depending on the machine that you're on, based on its operating system and name.

code:
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))

(setq custom-file (concat dotfiles-dir "custom/" system-name ".el"))
(setq per-machine-config-file (concat dotfiles-dir "config/per-machine/" system-name ".el"))

(load custom-file 'noerror)

(if (file-exists-p per-machine-config-file)
    (load per-machine-config-file))
What this does is ensure any settings saved within Emacs's customization system automatically get saved to and loaded from ~/.emacs.d/custom/<name-of-that-computer>.el, and I can manually place other runtime settings or function definitions in ~/.emacs.d/config/per-machine/<name-of-that-computer>.el.

I have something similar for per-OS configuration:

code:
(let ((func-name (intern (concat "system-specific-" (symbol-name system-type)))))
  (if (fboundp func-name)
      (funcall func-name)))
What this does is execute a function by name if it exists, and it creates the name by appending the system-type variable to the string "system-specific-". Thus, if before this form I have a function called system-specific-darwin, then this will call that function on every machine I have running OS X.

Catalyst-proof
May 11, 2011

better waste some time with you
If you're on OS X Lion, smooth-scroll is a godsend. Make scrolling with the trackpad so much better. I should also add that any Emacs Lisp code you find on the Emacswiki (as smooth-scroll is) can be installed with auto-install. It also does installs from any URL, or any GitHub Gist.

Catalyst-proof
May 11, 2011

better waste some time with you
I might be starting to sperg.

A long time back I used to use Opera, and if I recall correctly it had a feature where it could sort of divine the navigation structure of a page, and find, say, "Next" and "Previous" page links in a forum thread. Then it had them bound to some simple shortcut so navigating a thread became scroll-scroll-scroll "next page"-shortcut without much hassle. The code below is just enough to accomplish the same thing in emacs-w3m:

code:

(defun w3m-somethingawful-navigate-next ()
  (interactive)
  (goto-char (point-min))
  (search-forward "Next ›")
  (w3m-view-this-url))

(defun w3m-somethingawful-navigate-previous ()
  (interactive)
  (goto-char (point-min))
  (search-forward "‹ Prev")
  (w3m-view-this-url))

(add-hook 'w3m-mode-hook (lambda ()
                           (define-key w3m-mode-map ":" 'w3m-somethingawful-navigate-next)
                           (define-key w3m-mode-map ";" 'w3m-somethingawful-navigate-previous))

Catalyst-proof
May 11, 2011

better waste some time with you
Could you be more specific in what you're looking for? Not sure what 'comment-aware search' means.

Catalyst-proof
May 11, 2011

better waste some time with you
Okay, here's a quick hack. What this does is walk through the output of a buffer like you'd get using M-x rgrep, and applies a filter function on the contents of the matching line to see if it's in a comment. If so, it removes it from the grep results. This is terrible, inefficient code but it gets the job done. It relies on the contents of comment-filter-functions to tell it how to figure out if part of a line of code is in a comment. py-in-comment-p comes with python-mode, which is available in ELPA in Emacs 24. You'd have to write your own predicates for the other modes you use. Then, just M-x rgrep, choose your criteria, then M-x comment-filter-commented-code on the *grep* buffer.

code:

(defconst comment-filter-functions
  '((python-mode . py-in-comment-p)))

(defun comment-get-filter (major-mode)
  (let ((filter-function (assoc major-mode comment-filter-functions)))
    (if filter-function
        (cdr filter-function)
      nil)))

(defun comment-filter-commented-code ()
  "Filter out all search results that exist in commented code."
  (interactive)
  (or (compilation-buffer-p (current-buffer))
      (error "Not in a compilation buffer"))
  (compilation--ensure-parse (point))
  (setq buffer-read-only nil)
  (goto-char (point-min))
  (let (commented-lines)
    (save-excursion
      (condition-case nil
          (while (compilation-next-error 1)
            (if (get-text-property (point) 'compilation-message)
                (let* ((loc (compilation--message->loc (get-text-property (point) 'compilation-message)))
                       (file-struct (compilation--loc->file-struct loc))
                       (lineno (compilation--loc->line loc))
                       (match-string-file-end (let ((beginning (save-excursion (line-beginning-position))))
                                                (next-single-property-change (point) 'font-lock-face nil)))
                       (match-string-column-end (next-single-property-change (1+ match-string-file-end) 'font-lock-face nil))
                       (match-string-match (let ((beginning (save-excursion (goto-char (1+ match-string-column-end)))))
                                             (text-property-any beginning (line-end-position) 'font-lock-face 'match)))
                       (column (- match-string-match match-string-column-end))
                       (filename (car (compilation--file-struct->file-spec file-struct)))
                       (search-line-number (line-number-at-pos)))
                  (goto-line lineno (find-file filename))
                  (goto-char (1- (+ (line-beginning-position) column)))
                  (let ((comment-filter (comment-get-filter major-mode)))
                    (if (and comment-filter (funcall comment-filter))
                          (push search-line-number commented-lines))
                    (bury-buffer)))))
      (error nil)))
    (mapc (lambda (line)
            (goto-line line)
            (kill-line)
            (kill-line)) commented-lines)
    (setq buffer-read-only t)))

Catalyst-proof
May 11, 2011

better waste some time with you

etcetera08 posted:

Okay, I figure this thread is as good as any to ask this question, since it's emacs related.

I'm using Aquamacs on OS X 10.5 and I'm trying to set stuff up like this guy for Python + emacs. Most of the stuff worked fine (I think I ran into issues with just ipdb which is probably another question entirely) and I skipped a few of the config steps for now (like I didn't bother installing the python documentation locally). However, I'm not getting IPython to work at all. Whenever I bring up the py-shell it displays the Python 2.5 shell which is the last thing I want. IPython works when I launch it in Terminal and seems to be installed fine to work with Python 3 but for some reason it won't come up in Aquamacs. Both python-mode.el and ipython.el are in my load-path.. I'm not sure what else to try.

Any ideas? Need more info to help?

ipython.el is a clusterfuck of not-working due to the various factors involved:

* the version of Emacs you're running
* the version of ipython you're running
* the version of python-mode you're using
* the version of ipython.el you're using
* whether you're using virtual environments
* whether your PYTHONPATH and PATH are getting applied correctly enough in between Emacs and your OS

Right now, the most recent versions of python-mode.el (6.0+) do *not* work with ipython.el. The older versions (5.2 or so) do work, but break in other ways. You can trick python-mode into running an ipython shell, but it doesn't provide you the completion and other features of ipython.el. In other words, unless you're experienced enough to try fixing some of the issues involved (serious understanding of comint modes) the only thing to do is wait or find a configuration that doesn't piss you off enough. It's kind of disappointing; I'm dealing with the same exact issue myself.

EDIT: The maintainer of python-mode.el is slowly working on getting ipython integrated into it, but it's probably going to be slow going for a while, and of course none of it is documented so there's no way to tell what even works.

EDIT 2: Actually, I take it back. python-mode.el 6.0.3. seems to have a nice ipython integration without ipython.el (just M-x ipython within a python-mode buffer, works for me for Python 2.6.5 and ipython 0.11). Completion doesn't seem to work yet but I'm playing with it now.

FINAL EDIT: Okay, yeah. The python-mode 6.0.3 is your best bet going forward. Looks like a whole bunch of things are going to be fixed in the coming versions, so it's just a matter of patience for the features you need, but I get the sense python-mode is going to become the de facto extension for interacting with Python/Ipython shells.

Catalyst-proof fucked around with this message at 15:32 on Oct 7, 2011

Catalyst-proof
May 11, 2011

better waste some time with you
Let me know what version of Emacs, python, python-mode, and ipython you're running, and the results of (getenv "PATH") and (getenv "PYTHONPATH"). If you're receiving an error, evaluate (setq debug-on-error t) and then provide the traceback produced by trying to open a shell. If you've been swapping out libraries live, you may need to restart Emacs. I've found unload-feature doesn't take care of all the crap that python-mode creates (I'm not even sure I'm meant to use unload-feature in that way :()

Catalyst-proof
May 11, 2011

better waste some time with you

Zombywuf posted:

Fren, do you know of any way for compilation mode to understand tracebacks? Having next error jump through every line in the traceback is annoying. Or even better to understand the whole output of unittest (and run tests on a save hook)?

Gonna assume you're talking about running Python test suites with M-x compile. For pdb support I seem to be able to just open up a shell (C-x M-m) and run my nosetests test suite at the prompt. When pdb open up it seems to figure out where files are and starts PDB mode. Maybe try that with your unittest test suite?

Catalyst-proof
May 11, 2011

better waste some time with you
etcetera08, is it possible that the uninstallation/installation of python-mode didn't go properly? python-mode 6.0.2 defines a variable py-python-command, that should be set the executable of the python you want to run, I think. Since it's in python-mode.el, it should have gotten evaluated when python-mode was required. The fact that there wasn't a variable for that means something didn't get loaded correctly. Trying to narrow down my versions of everything to help you more.

Could you post the value of your load-path variable? C-h v load-path RET

Catalyst-proof
May 11, 2011

better waste some time with you

Zombywuf posted:

Well, I'd also like for g++ "in file included from ..." chains to a appear as one error instead of half a dozen. Will give pdb a try for python though.

Ahh. Don't write much in C++ anymore so I haven't gone searching for anything like that. Sorry :(

Catalyst-proof
May 11, 2011

better waste some time with you

comedyblissoption posted:

It seems emacs really needs packages (or bundled modules) for specific language environments. I'm thinking of packages like http://common-lisp.net/project/lispbox/. There's a lot to be said for just having stuff work 'out of the box' instead of having to search down all the relevant basic modules and executables (that could be packaged) you need to make developing code in whatever environment easier and then having to figure out how to get emacs to load those modules and then make configurations that most users would want.

I mean, the package stuff in Emacs 24 is completely rudimentary because they don't know what direction to take it in yet, but people are already using it for just the thing you describe. The Emacs Starter Kit I lambasted in one of the OPs has actually switched to providing all its useful modules and configurations into plain old packages that are essentially metapackages for the settings and snippets they feel are useful. I could see Emacs distribution servers, each one containing all the packages, settings, and useful functions for doing some particular thing in Emacs (The starter kit, for example, is focused on Ruby and Javascript).

Catalyst-proof
May 11, 2011

better waste some time with you

vlack posted:

:words:

Thanks, vlack! Updating the OP now.

Catalyst-proof
May 11, 2011

better waste some time with you
Does anyone use a mixed mode for HTML and inline Javascript that's not a complete pain in the rear end to use and work with (i.e., nxhtml?)

Catalyst-proof
May 11, 2011

better waste some time with you

orphean posted:

:words:

Sup, SBCL+Emacs+Slime buddy! Writing Lisp in Emacs is such an unbelievable pleasure, and the functionality so immensely powerful, that using any other tool for any other language feels completely primitive. It's kind of sad. I use rainbow-delimiters, but Paredit still throws me off often enough that I can't really work in it yet. But I do have the Hyperspec linked up through Info-mode, as well as being able to lookup the current word in the Hyperspec instantly. Still trying to work on the holy grail, that is: having one version of slime and swank that works with SBCL locally, SBCL remotely, and Clojure. And thanks for the tip on multi-web-mode! Looks exactly like what I was looking for.

I agree on the geezerism of building your Emacs from scratch. Like I said in the OP, working with Emacs is like building your own lightsaber.

Finally,

orphean posted:

I'd much rather talk about Emacs with goons than random EmacsWiki weirdos.

[img-xah-lee]

Catalyst-proof
May 11, 2011

better waste some time with you

Beef posted:

I'm starting to hate aquamacs more and more. Last few versions were unstable as gently caress.

Now that it finally works in Lion it just freezes if I try to even change the font.

Time to configure the regular emacs?

Just install homebrew, and `brew install emacs --cocoa --use-git-head --srgb`. The purest, most OS-friendly Emacs build for Mac, period.

If you're feeling sassy you can even get integrated Lion fullscreen by adding this to the emacs formula:

code:

--- a/emacs.rb	2011-10-28 10:34:58.000000000 -0400
+++ b/emacs.rb	2011-10-28 10:36:26.000000000 -0400
@@ -40,6 +40,10 @@
       p << "https://raw.github.com/gist/1212776"
     end
 
+    if ARGV.build_head?
+      p << "https://raw.github.com/gist/1219862"
+    end
+
     if ARGV.include? "--cocoa"
       # Fullscreen patch, works against 23.3 and HEAD.
       p << "https://raw.github.com/gist/1012927"

It works like a dream, except I've found I've had to quickly enable and disable menu-bar-mode in order to hide a stubborn toolbar rectangle in the fullscreen mode.

Catalyst-proof
May 11, 2011

better waste some time with you

Beef posted:

Any changes that will make me more productive? I've got a deadline on Thursday and I need to soothe my conscience that it will be worth the switch :)

If you're not using Emacs already and you have a deadline, I would not recommend switching editors. Worst case scenario you won't understand what you're doing in time to get back all the momentum you lost (muscle memory, features, etc), then you're hosed and you'll blame Emacs. Practice Emacs in your free time before you bust it out in a Real Life setting.

Catalyst-proof
May 11, 2011

better waste some time with you
Holy poo poo.


...


Emacs has a REPL for Elisp? How the gently caress did I not know that?!

Also, the lexical binding stuff is pretty fantastic. I understand that this may be the beginning of writing code that doesn't block (i.e., waiting for the interface to respond after checking Gnus IMAP), though I'll admit I don't understand fully how the two concepts are related. Could you shed some light on that?

Catalyst-proof
May 11, 2011

better waste some time with you
There's always Climacs...

Catalyst-proof
May 11, 2011

better waste some time with you
I wonder how much work it would require to write a solid Emacs in Common Lisp, from scratch. Climacs looks like it sits directly on top of CLIM, which looks like a bunch of useless bullshit specifications that no one cares about. Make some easy decisions first: target one implementation (SBCL) and one windowing API (Cocoa :3:). Get a window, implement buffers and frames, and anything in Emacs's C foundation that's not already taken care of in CL. I smell a goon project.

Catalyst-proof
May 11, 2011

better waste some time with you
So with the new Google Reader experience I've imported my RSS feeds into Gnus. Suprisingly simple and effective, aside from some formatting issues in feed items. I love being able to use the same interface for mail as I do for feeds, and after I discovered group topics, everything's all neat and organized. Of course, now I need to write an nnatom backend because those imports didn't make it in :(

Catalyst-proof
May 11, 2011

better waste some time with you
Has anyone figured out a way to run an Emacs server on one computer, and connect the *actual* Emacsclient executable on another computer to it? I don't mean SSHing in and running a terminal emacsclient, nor do I mean SSH with X forwarding and running the graphical emacsclient. Native client, remote server is what I'm after.

Catalyst-proof
May 11, 2011

better waste some time with you
Update on this.

Server:
code:
(setq server-use-tcp t)
(setq server-host "Server.local")
(setq server-auth-dir "~/Dropbox/Sync/emacs")
(server-start)
Client:
code:
$ emacsclient -f ~/Dropbox/Sync/emacs/server -c
Result? A new frame is opened on the server. :ughh:

Catalyst-proof
May 11, 2011

better waste some time with you
Still no luck

Catalyst-proof
May 11, 2011

better waste some time with you
The first Emacs mode I've written has been released. It's a gopher client for Emacs, and it's called gopher.el.

Catalyst-proof
May 11, 2011

better waste some time with you
I can't imagine using line numbers in Emacs. I mean you have your modeline right there.

And org mode is loving amazing. I use it for everything. I actually recently published the code I use to publish my blog in org mode: http://msnyder.info/posts/2011/07/introducing-narcissus/

Also org-mode + deft = <3.

Catalyst-proof
May 11, 2011

better waste some time with you
Unfortunately, there aren't really any good tools for that sort of thing. But that's the benefit of them being in plain text -- just write some glue code and you can usually find a way to translate the information you need. For example! I wanted my OS X Address book contacts synced in Org, because I use org-contacts to autofill e-mail addresses. So I fired up Clozure CL (which has an Apple Foundation Framework bridge) and wrote some code to generate the Org file I wanted. (I have the bridge code for the address book up at https://github.com/ardekantur/nsclasp, but not the code that writes the Org file. I'll put that up in a bit.)

I really want to be able to provide a babel source like so:

code:
#+SRC lisp :filename ~/poop.lisp :lines 1 16
#+END_SRC
And it will automatically import those lines of that file into an exported version of the Org file. It's a shame Org's innards are unreadable poo poo. Case in point, org-export-as-html is basically worthless if you want to extend any of Org's HTML generation capabilities.

But anyway. If you want to get started slurping things *into* Org, there are a ton of Emacs libraries that can deal with web APIs, like http://www.emacswiki.org/emacs/http-post-simple.el.

Oh oh! I'm not a natural notetaker also, but Org-capture is the poo poo. From whatever buffer you're in, org-capture (which I think is C-c c by default), choose the template for your note, write it, and it gets filed away wherever you want it to go. Then at the end of the week or whatever you have some inbox.org filled with all your org-capture notes, and you can go through and refile/deal with them.

Catalyst-proof fucked around with this message at 21:01 on Nov 8, 2011

Catalyst-proof
May 11, 2011

better waste some time with you

orphean posted:

Holy poo poo. This is the greatest thing. When I'm jacking into the net to cruise the cyberlanes and scope out on netnews the latest ice advances to stop virtual reality system incursions now I don't need to leave emacs to access critical gopher sites run by eastern european guys named Vlad who really REALLY like techno.

My life... he is complete now.

Also linum-mode rocks, I don't care what you say. :colbert:

Edit: Have you checked out how gnus integrates with w3m? That's totally the way I'd go for HTML support in gopher.el. You got tables and even inline images should you want them. If a user wants fancy webkit-fied css'ed and javascripted experiences I'd argue they don't really "get" gopher.

I mainly did it to just write a major mode of *something*, figure out some of that machinery. I would love to use emacs-w3m, but that involves both the user installing w3m, and getting the emacs-w3m extension to work. If I can find something with lighter dependencies, perhaps.


Mr. Fish posted:

Does it annoy anyone else that no other programs for text editing has as easy isearch? Almost every time I use Chrome I press C-s and get a "save?" dialogue box :(

I love isearch, but I clearly don't know how to use it. I can never figure out what to press when, and I either end up: 1) finding exactly what I want, hitting the wrong keystroke, and ending back where I started the search, 2) searching for 'foo', then trying to search for 'bar', and ending up searching for 'foobar', 3) *just* passing the search result I wanted and having to loop through the whole file again, or 4) trying to clear the search query only to end up quitting isearch altogether.

Catalyst-proof fucked around with this message at 21:03 on Nov 8, 2011

Catalyst-proof
May 11, 2011

better waste some time with you
I don't know if it's from Marmalade or Elpa, but the package I have listed seems fairly recent:

code:
  org                20111108     available  Outline-based notes management and organizer
Also, I got ipython completion in 0.11 working :smugdroid:

Catalyst-proof
May 11, 2011

better waste some time with you

orphean posted:

A bit offtopic but there's no real lisp thread... Fren, thanks a bunch for linking to Land of Lisp from your gopher.el page. I checked it out and ended up buying it last night.

I just finished working through his loop example (the simple genetic algorithm simulation) and my head just exploded.

Holy poo poo, that's loving incredible. Can't thank you enough.

I'm glad you like the book, but where did I link to it? :confused:

Adbot
ADBOT LOVES YOU

Catalyst-proof
May 11, 2011

better waste some time with you
Ahhh, gotcha. Yeah, LoL is a fantastic book because it's just wacky enough and explains just enough to make some interesting projects. I kept trying to get into Practical Common Lisp but its 'practical' make an MP3 database out of plists is probably the second worst example in a programming book, next to Dive Into Python's fun and interesting "create an ODBC connection string" example.

  • Locked thread