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
h_double
Jul 27, 2001

Zombywuf posted:

I can only assume your keyboard is a really weird shape. Even the mac has the option to remap your capslock in the keyboard preferences these days. Also emacs keybindings seem to work in most text entries, makes me wonder if Steve was a secret Emacs user.

Those keybindings are pretty universal in Unix-type operating systems (they work in bash too), and OSX is basically BSD Unix under the hood.

Adbot
ADBOT LOVES YOU

h_double
Jul 27, 2001
I hope this isn't too boneheaded a question but it has me scratching my head.

I'm trying to build emacs 24 from sources on a Mac (Snow Leopard) and when I run the configure script, it warns

code:
configure: error: The following required libraries were not found:
     libjpeg libgif/libungif libtiff
Maybe some development libraries/packages are missing?
If you don't want to link with them give
     --with-jpeg=no --with-gif=no --with-tiff=no
Thing is, as far as I can tell those libraries are installed (via brew) in /usr/local/lib. I've tried various permutations of './configure --libdir="/usr/local"' but it doesn't recognize them. libgif, libjpeg, and libtiff all appear to be /usr/local/lib. Thoughts?

h_double
Jul 27, 2001
Okay I gave up on completely building emacs from sources, given I found a nice build of emacs 24 as a .dmg package, and it does everything I need it to, and I've built plenty of stuff from source before.

Getting back into emacs partly because I've missed using it the past couple of years (I've mostly been using Eclipse or FlashDevelop to write code and something like Scrivener for text), partly because I'm working through the excellent Land of Lisp (which was recommended in a couple of threads here), and SLIME is very handy for lisp hacking.

I do have one question so far. I'm using the color-themes extension (and solarize-light color scheme) and the Cocoa version of emacs looks fantastic. But I like to run emacs -nw from a shell sometimes, only color-themes doesn't work right in Terminal and I don't really want it to because I like my default Terminal color scheme. Is there a way to have a bit in my .emacs that would run by the windowed version, but not when run in a terminal window? The version and emacs-version variables are the same either way.

h_double
Jul 27, 2001
Thanks for the suggestions everybody. The dmg builds of v24 from emacsformacosx are exactly what I'm using and they work great.


Kim Jong III posted:

ps solarize sucks zenburn ftw ;)

Ha, zenburn is what I use in Eclipse, but for anything other than code (text or org-mode or whatever) I prefer a lighter background for whatever reason.

h_double fucked around with this message at 19:53 on Mar 7, 2012

h_double
Jul 27, 2001
No clue, but Aquamacs struck me as sort of janky and I am much happier running a build of GNU Emacs 24 from http://emacsformacosx.com/builds

h_double
Jul 27, 2001

JetsGuy posted:

Does it let me use keyboard commands like apple-c apple-v for copy and paste, or apple-s for save?? I really prefer those to the emacs command set. Aquamacs provides a nice medium for me to have a nice light editor to do my coding in, while providing nice emacs functions that are awesome (like rect kills).

Yes, and you can open files with Command-O or dragging them from Finder into an Emacs window. From what I remember, the main differences are that Aquamacs has pictorial toolbar icons, and has a few more things you can configure from the Options drop-down menu.




vvv d'oh, so it does.

h_double fucked around with this message at 12:43 on Mar 29, 2012

h_double
Jul 27, 2001
This might be common knowledge, but I just learned you can 'C-x C--' and 'C-x C-+' (or 'C-x C-=') to make the font size in a buffer smaller or larger.


(Also, whoever decided that emacs subscreens should be called "windows", and OS-level windows should be called "frames", deserves to have a Windows NT server dropped on their knuckles. Screen divisions within a window should be "panels" or something.)

h_double fucked around with this message at 18:29 on Apr 4, 2012

h_double
Jul 27, 2001
Well, yes and no. The first public release of GNU Emacs was a few months after the Macintosh and DRI's GEM windowing system (and before those there was Xerox PARC and the Apple Lisa). I don't know when split-screen was added to Emacs, but for a long time it was a reasonable supposition that most people were using the editor on a TTY, and so calling the subscreens "windows" made sense. But GNU Emacs didn't add support for multiple frames (under X) until 1994, and by that time X workstations (and GUI OS on home computers) were common enough that it would have been sensible to rethink the terminology. I can't imagine it would involve a lot of code change, and there could always be an enable-legacy-window-mode variable so as not to break preexisting scripts.

I don't really blame any single individual of course and it's not a huge deal, but it just feels like something which unnecessarily requires clarification and a mini context switch even when talking to other people who are emacs-literate.

h_double
Jul 27, 2001
Yeah, it's mostly conspicuous in Emacs because other programs (like irssi or screen or whatever) don't involve a lot manipulation at both the subscreen level AND the OS-window level.

h_double
Jul 27, 2001

orphean posted:

Here's a cool thing that's just been released. It's called skewer-mode and it uses simple-httpd and js2-mode to run a webserver from inside emacs and let's you execute and work with javascript from inside emacs with the browser doing the javascript execution.

That looks pretty awesome, but I'm not quite sure how to install it.

The MELPA package repository says "To add the repository put this before the call to package-initialize in your init.el file:

code:
(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)
EDIT: I figured it out. This is the relevant chunk of my .emacs:

code:
(require 'package)
(add-to-list 'package-archives
	     '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(unless package-archive-contents
  (package-refresh-contents))
I also had to manually run M-x package-refresh-contents for some reason to get it to update the package list, but now all the melpa stuff shows up when I run package-install.

h_double fucked around with this message at 05:08 on Nov 7, 2012

h_double
Jul 27, 2001

Jarl posted:

EDIT2:
I couldn't find any help on the net, but fixed it myself by messing a bit around with the .emacs file.
Without having manipulated the .emacs file by hand it starts out with a call to custom-set-variables and custom-set-faces. It doesn't matter if my call to load-theme comes before or after these calls, but if I remove them entirely the theme will be loaded correctly. So I did. Afterwards I set the default font to dejavu sans mono and size to 12 and saved the options using the GUI menu. These changes was added to the .emacs file, but haven't messed with the theme being loaded correctly.

Weird. Here's the relevant bits in my .emacs, I'm running 24.2.1 on MacOS but theme support works great.

code:
(custom-set-variables
 '(erc-server "irc.freenode.net")
 '(safe-local-variable-values (quote ((folded-file . t)))))

(custom-set-faces
 '(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil 
	:overline nil :underline nil :slant normal :weight normal :height 140 :width normal 
	:foundry "apple" :family "Monaco")))))
 
(cond ((eq window-system 'ns) (require 'color-theme) ; stuff only for gui (not from a term) version
       (eval-after-load "color-theme"
	 '(progn
	    (server-start) ; server for emacsclient
	    (menu-bar-mode 1)
	    (color-theme-initialize)
	    (color-theme-solarized-dark)))))

h_double fucked around with this message at 22:12 on Mar 6, 2013

h_double
Jul 27, 2001

yaoi prophet posted:

What are some general-purpose really neat things emacs has? So far I've really only been using it as a simple text editor with some weird key bindings by default, but I'd like to use it more. Stuff like column-number-mode, ido-mode, etc.


org-mode is an outline/organizational mode that's outstanding for any kind of note taking, brainstorming, project planning, etc. I use it pretty much daily, it makes it really easy to navigate large amounts of information.

h_double
Jul 27, 2001
I don't have gnuplot installed, but I can do the following just fine:

code:
for FILE in foo/* { echo "processing $FILE "; cat $FILE 1> /dev/null 2> /dev/null }
What happens if you leave out the 1> and 2> redirects? Does gnuplot STDOUT/STDERR report anything interesting?


Running GNU Emacs 24.2 on MacOS 10.6.8 here.

h_double
Jul 27, 2001
I haven't used CEDET, but it reportedly does offer intellisense-style completion.

Compiling and running from within emacs is always possible, you don't need CEDET or anything special. You can do something as simple as 'M-x compile', or something a little more sophisticated.

Adbot
ADBOT LOVES YOU

h_double
Jul 27, 2001
Hopefully simple question here. I'm starting to learn R (the statistics language) and naturally my first stop is to look for Emacs support, which comes in the form of the ESS (Emacs Speaks Statistics) package. The package works great except for one thing, I would like to be able to scroll back through my command history in the R console. Running R directly from the command line does this (same way as using up arrow to scroll back through command history in bash), but up arrow in ESS moves the cursor up and down lines around the buffer.

I found this article with a good intro and some customizations, including this code snippet:

code:
(add-hook 'inferior-ess-mode-hook
    '(lambda nil
          (define-key inferior-ess-mode-map [\C-up]
              'comint-previous-matching-input-from-input)
          (define-key inferior-ess-mode-map [\C-down]
              'comint-next-matching-input-from-input)
          (define-key inferior-ess-mode-map [\C-x \t]
              'comint-dynamic-complete-filename)
     )
 )
which I stuck in my .emacs, eval'd, but it doesn't seem have any effect. C-up and C-down don't do anything and emacs tells me "C-x t is undefined" in the ESS/R buffer.

Am I missing something simple/stupid?

  • Locked thread