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
Soricidus
Oct 21, 2010
freedom-hating statist shill

h_double posted:

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.
Take a look at (display-graphic-p).

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Kim Jong III posted:

Is there a way to tell emacs "hey I don't want to split any of those three windows, split at the root"?
I don't think this is built in, but it's a trivial function to write.
code:
(defun split-all-windows-right ()
  (interactive)
  (split-window (frame-root-window) nil t))
(Note that this doesn't do everything split-window-right does; fully imitating that function is left as an exercise for the reader. Bonus credit: why can't we do (with-selected-window (frame-root-window) (split-window-right))?)

Soricidus fucked around with this message at 21:11 on Apr 27, 2012

Soricidus
Oct 21, 2010
freedom-hating statist shill

Beef posted:

Dynamically scoped variables + threads = oh balls.

They will have to completely switch over to lexically scoped vars.
The people who are actually working on implementing threads don't think so. See e.g. the patchset Tom Tromey posted to emacs-devel just yesterday.

Beef posted:

Or just write emacs in CL already.
If dynamic binding is the problem, then I'm not clear on how it would help to switch from one Lisp that provides both dynamic and lexical binding to another Lisp that provides both dynamic and lexical binding ...

Soricidus
Oct 21, 2010
freedom-hating statist shill

BusError posted:

It turns out that Emacs has trouble accurately calculating column width if your default font is not set to one of the officially supported sizes. In my case, I had Ubuntu Mono set at 17pt, which I guess was getting scaled up from 14pt. Emacs was figuring out columns based on 14pt.

I set the default font to 18pt, which IS a provided size, and now everything is peachy.
How strange. Did you report it as a bug? Because Emacs isn't supposed to have any concept of "officially supported sizes". It's supposed to handle scalable fonts correctly at any size you like. (Provided they're monospaced, which I assume something called "Ubuntu Mono" is!)

(FWIW I can't imagine what the problem is. I tried to duplicate your result, but I get correct width calculations regardless of the font or size I choose. I'm not running Ubuntu, though, so I don't know if there might be something weird with that one specific font?)

Soricidus
Oct 21, 2010
freedom-hating statist shill

tazjin posted:

You can have a snippet like this to keep local configuration (e.g. secrets, OS specific stuff) to a machine. I do this so that I can always keep the rest of the config public.

code:
(let ((local-file "~/.emacs.d/init-local.el"))
  (if (file-exists-p local-file)
      (load local-file)))

You can save yourself a bit of effort if you notice the optional arguments to load:
code:
(load "~/.emacs.d/init-local" t)

Soricidus
Oct 21, 2010
freedom-hating statist shill
I'm getting a thing where sometimes M-: takes forever even for trivial arithmetic expressions. It's so unpredictable that I have no idea how to reproduce it for debugging. Anyone happen to know what might be causing it?

Soricidus
Oct 21, 2010
freedom-hating statist shill

pgroce posted:

I got nothing, but the link in the post above yours on the Emacs profiler might be helpful.

yeah, seeing that was what made me think of it ... but I have no idea how to trigger this issue at will, it's really intermittent (more a weekly thing than hourly), and I don't think the profiler has an option to never retain more than the last minute of data :/

guess I'll just carry on watching out for it and hope to spot a pattern for when it occurs.

e:

pgroce posted:

That would be prettier if Emacs had function composition but welp.

first google hit for "emacs curry": https://gist.github.com/eschulte/6167923

Soricidus fucked around with this message at 23:08 on Oct 2, 2015

Soricidus
Oct 21, 2010
freedom-hating statist shill

lemonslol posted:

Would that program work if I was ssh'd into a box somewhere else? I haven't figured out yet how to do M-x SSH, or tramp mode yet so I wouldn't be running emacs locally.

tramp mode is the easiest thing in the world. you literally just need to do find-file normally and then enter a filename like /user@hostname:/path/to/file and emacs will handle the ssh connection stuff transparently.

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

lemonslol posted:

what about if I want to just be on the other box not just open a file?

Open a directory instead, you get a remote dired buffer and any commands you execute are run on the other end

  • Locked thread