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
orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

I mean, the package stuff in Emacs 24 is completely rudimentary because they don't know what direction to take it in yet

If they added in upgrading already installed packages it would be more or less there for basic use. Ideally I'd like to see them provide more of a QuickLisp interface for the packages. Nothing stopping me from writing one I guess (except laziness)

Fren posted:

The Emacs Starter Kit I lambasted in one of the OPs has actually switched...

This just made it from completely horrid to mostly terrible. Other than a few things (like Yegge's effective emacs tips) I really think most people would best served by learning Emacs as is and making configuration changes organically. I admit I'm probably just being geezerish but I'm from the school of 'You should know what the hell that poo poo in your .emacs does'.

Fren posted:

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?)

I'm glad I'm not the only one who doesn't care for nxHtml. I have some mental block when trying to use that drat thing. For just multiple mode support without alot of the extra cruft check out MultiWebMode (https://github.com/fgallina/multi-web-mode) Basically to use it you just setup a plist where the label is the name of the mode you want to use and the value is a regex telling it how to recognize the region for that mode. This is all documented. As a plus you can use whatever major-mode you want for each thing easily. Want js2-mode for javascript? Go for it. Want some funky custom mode for css? Sure, why not. Etc.


For an actual contribution to the thread I present for the thread's pleasure: Common Lisp in Emacs.



For the 2 of you (am I being generous? Probably) who give a crap about Lisps (or Schemes, what have you) you will find no better environment than Emacs + SLIME. In that screenshot I'm also using AutoCompleteMode with the AC-Slime backend for the code completion stuff. And if you like your parentheses to look like fruity pebbles may I point you to rainbow-delimiters.

Incidentally, AutoCompleteMode has a Semantic (part of CEDET) powered backend that does a good job offering code completion for C/C++ and a great deal else. There's also GCCSense which involves you compiling a customized GCC compiler of all things. That's a bit more hardcore.

There's other options for completion but most of them involve crap like completions showing up in a separate buffer or in a tooltip or some such nonsense. Autocomplete works the way I want it to work (and as a bonus works without X).

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

orphean fucked around with this message at 04:02 on Oct 23, 2011

Adbot
ADBOT LOVES YOU

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

pgroce posted:

Tramp is awesome -- just read the manual. I really like the rest of emacs, but even if I hated it, I'd have to hate it a LOT to leave Tramp behind.

Pretty much this. Tramp is super powerful and can do a lot of stuff that might not be obvious at first glance.

One of the things I use Tramp for all the time is opening read-only files. So normally you'd need to hop into a terminal, use sudo, open the config file, edit, save, etc. With Tramp you can do this without leaving emacs and without running an emacs with elevated privileges.

Let's say we want to edit our /etc/hosts file. In Emacs we use C-x C-f to open a file as normal. But instead of just opening /etc/hosts (which will be read only since we're not retarded and don't run as root) we pass in the following for the file name:
code:
/sudo::/etc/hosts
This will use tramp to open the file. It will prompt you for your password and boom, you can edit and save /etc/hosts in emacs. The double colons tell tramp to use the default user/host string (root@localhost) which will pretty much work fine but if you needed different credentials put the user@host between them.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

Sup, SBCL+Emacs+Slime buddy!
:frogc00l::respek::chord:

I can't get into ParEdit either. The electric parens and stuff just skeev me out. I keep trying every now and then hoping something will click.

Also, good luck on your honorable quest. I've gotten connecting to a remote lisp image figured out but honestly that whole chunk of SLIME is basically represented in my mental map with an elaborate 'Here be dragons' sign.

Fren posted:

[img-xah-lee]

When i look at computer keyboards, saliva drools from the corner of my mouth.

You know how girls do window-shopping as a life-long regular activity? and some guys do window-shopping of cars? I don't need another keyboard, i already have plenty. But, i look at them, look for them, stare at them for hours, every week.

orphean fucked around with this message at 17:38 on Oct 24, 2011

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
RIPL> ( )

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
code:
;; Set default font.
(set-default-font "DejaVu Sans Mono-10")
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10"))
Literally my only font settings. What version of Emacs are you running? Pre Emacs 23 it didn't do any kind of antialiasing when rendering fonts or use whatever subpixel font rendering the host was using (ie, ClearType, whatever) so it looked sort of looked like jaggy rear end.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
Yeah if you use a truetype/opentype font you can leverage Emacs' new font rendering. A bitmap is a bitmap, that's always going to look the way it does. I find that DejaVu font to be the One True Font (crossplatform, huge amount of unicode codepoints included, etc) but try out a few!

Can't hurt.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

emacs.rb

:aaa: A dark day indeed.

Anyone running emacs-head know if its possible to make a color theme buffer local using the new theming stuff? I want a different color theme for my terminal buffers but don't want to change the theme globally.

\/\/\/ :allears:

orphean fucked around with this message at 17:38 on Oct 29, 2011

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
The second Emacs 24 pretest was released today. If you're still on 23.x or the earlier pretest (and you don't track HEAD) now's a good time to check it out. From my experience, its stable for day to day use in both linux and win environments.

The best new feature is obviously animated gif support. Gonna bling my buffers like geocities, yo. :slick:

Edit: haha it's terrible glorious...

orphean fucked around with this message at 06:34 on Oct 31, 2011

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Beef posted:

I've got a deadline on Thursday and I need to soothe my conscience that it will be worth the switch

:raise:

Anyway, for a more serious post for once one of the best new features in Emacs 24 is that Elisp now supports lexical binding. This is a massive improvement and fast-forwards Elisp a couple decades in terms of lisp development. Closures, in my Emacs?

For now dynamic binding is still the default (since packages will need to be rewritten) but Emacs 24 provides the buffer-local lexical-binding variable which lets you turn it on for your own stuff.

Here's a couple of IELM sessions showing it off:

Dynamic Binding
code:
*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (defun create-an-adder (x)
         #'(lambda (y) (+ x y)))
create-an-adder
ELISP> (setf adder3 (create-an-adder 3))
(lambda
  (y)
  (+ x y))

ELISP> (funcall adder3 9)
*** Eval error ***  Symbol's value as variable is void: x
ELISP>
Lexical Binding
code:
*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (setq lexical-binding t)
t
ELISP> (defun create-an-adder (x)
         #'(lambda (y) (+ x y)))
create-an-adder
ELISP> (setf adder3 (create-an-adder 3))
(closure
 ((x . 3)
  t)
 (y)
 (+ x y))

ELISP> (funcall adder3 9)
12
ELISP> (funcall adder3 2)
5
ELISP>
This has been in HEAD since April so its not brand new or anything but if you're an elisp programmer and you aren't using Emacs 24 you're missing out!

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

Holy poo poo ... How the gently caress did I not know that?!

emacs.txt

(IELM rocks!)

Fren posted:

Could you shed some light on that?

The basic idea is pretty simple. Right now every variable in Emacs is basically a Global variable. This is why you see everything named like <package-name>-<foo>-<bar> because if they didn't include the package name there's a good chance whatever the variable/function/whatever is is going to clobber another one.

Now imagine multiple threads all accessing the same globals variables at once. It is non-trivial to make a threaded system in such a way that no thread will try to access the same variable at once, or get into cycles where one thread is waiting for another thread which is in turn waiting back on the first thread and they're just deadlocked forever (Incidentally this is what happened to the Mars rovers, a race condition got left in. Its a very hard problem to solve! They could debug it because they had a REPL since they were using lisp~)

So what lexical binding does is make it so functions can "close over" their own private variables so that nothing else can access them AND so they retain their state. Its much easier to do concurrency when you don't have a huge bramble of global variables getting in the way.

Edit: Felt like I needed an example.

In the lexical binding thing I posted earlier there was this snippet:
code:
ELISP> (setf adder3 (create-an-adder 3))
(closure
 ((x . 3)
  t)
 (y)
 (+ x y))
You can see that create-an-adder returned something sort of like a lambda but we have this (x . 3) put in. That's Elisp "closing over" the x variable for the lambda code's x. It makes that x a private variable for the lambda that's always going to be set to 3.

Now we can create multiple adders. We could have an adder6, an adder12, whatever and it'll just work. With only dynamic binding (what Emacs has had until now) to do something like this you'd need to store the value of x somewhere since we saw that in dynamic binding x=3 isn't saved and its nil when we try to call our adder. Since everything is global that means only one x at a time and we're back to the problems with that.

Zombywuf posted:

Asynchronous callbacks? Please say it's asynchronous callbacks. Then I can do flymake in tramp.

Not yet, but it's an important step on the way to asynchronous callbacks.

orphean fucked around with this message at 19:43 on Oct 31, 2011

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
With Elisp you got to remember that it predates Common Lisp and is a derivative of MACLisp. Its a really old fashioned lisp that's being dragged kicking and screaming into something more modern.

Heck there's still really powerful lisp features that Elisp still doesn't do. Things like reader macros and even packages.

Personally I'd like ELisp to be Common Lisp, but RMS hates common lisp so that's never going to happen. :)

\/\/\/ Climacs is a horrible tease.

orphean fucked around with this message at 21:12 on Oct 31, 2011

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
The problem isn't necessarily writing emacs in common lisp. Not that that's easy but it's not the main chunk.

The main chunk is getting all the elisp rewritten in CL which is a monumental undertaking.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
What happens if you pass -d <DISPLAY> to emacsclient? It sounds like the basic mechanism is working and you just need to tell emacs which xserver gets the frame.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
So emacs is running on the server, emacsclient can connect to it. Since passing in the display didn't work I'm thinking that the server emacs doesn't see your local display.

There needs to be a connection between your server's Xserver and your local workstations Xserver. What does (x-display-list) return on the server emacs? If your local workstation's display isn't in there then its not going to work I don't think.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

The first Emacs mode I've written has been released. It's a gopher client for Emacs, and it's called gopher.el.

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.

orphean fucked around with this message at 20:45 on Nov 8, 2011

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Zombywuf posted:

Seems I have some lovely default ubuntu version of org where this doesn't work. Hmm, time to upgrade perhaps.

It may seem daunting (its not!) but you could always build your emacs from source. I tend to track the bleeding edge but there's nothing stopping you from just downloading the officially released source tarball and using that.

The trick here is to use /usr/local as your installation prefix. That's reserved for you, the end user/sysadmin, to do with as they please and no packages you have or install will muck with it. Luckily, its also the default prefix when you run configure. If you trust yourself you can setup /usr/local so your user account has full access to it so you don't ever have to elevate privileges to install things in there. Ubuntu comes with a group named 'admin' that works well for this purpose. Do something like the following:
code:
sudo useradd -G admin <your username>
sudo chgrp admin /usr/local
sudo chmod 775 -R /usr/local
And that'll give you (and whoever else you put into the admin group) full access to the /usr/local tree.

For something like Emacs I hate being held prisoner to the whims of the distribution. If you want to do this and need more info let us know.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
https://launchpad.net/~ubuntu-elisp/+archive/ppa That's probably your best bet. Will get you the newest release in Lucid.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
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.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

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

Sorry it was linked off Lisp for the Web Part 2 :downs:

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
It depends on what sorts of things you care about, really. One of the big differentiators is emacs is focused on being a platform while Vim is focused on being a really good text editor.

This manifests itself in all sorts of ways but here's a good example of the difference. Let's say you want to integrate debugging with your editor. With Vim you just can't do it using functionality built into the editor, and it's a design decision not a flaw. Vim has very poor integration with external tools. That's why you have all these projects like Clewn, Agide, VimGdb, etc which all provide their own weird little program that acts as an intermediary layer between vim and the debugger.

Emacs on the other hand embraces integration with external programs and tons of stuff is built off it: GUD, Slime, FlyMake, FlySpell, anything using comint, etc etc.

This is why you see the Vim dev guys doing stuff like implementing their own embedded version of grep. They want Vim to be largely self-contained.

Emacs wants you to live in it, extend it, improve it. Other people like Yegge talk about this far better than I can but the gist is that since emacs is a platform improvements added to it benefit everything and it forms this self-reinforcing improvement cycle.

Vim's a great text editor. Emacs is a great environment assembly kit.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
I do all my web browsing using wget and a cron job. :shepface:

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
CEDET is alot better in Emacs 24 now that's it's an official part of Emacs. It's definitely your best bet. I like to configure AutoComplete to use a semantic backend (which interfaces into CEDET).

Once that's setup and AutoComplete knows to auto-start completion on '.', '::',and '->' it's pretty much IntelliSense inside your emacs.

There's other completion modes for Emacs but I like AutoComplete the best since it doesn't use tooltips or something asinine for completion.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
Icicles is quite nice I think if a bit sprawling. Like alot of other emacs modes the rabbit hole goes pretty deep but even ignoring 98% of it's features still adds alot to the emacs experience.

It does auto-completion of course but it does it on EVERYTHING in emacs. And you do crazy stuff like 'show me a list of every function and info article containing the words buffer, frame, and point'. The once you have this list you can filter it, you can save some items for review later, etc etc.

If Icicles seems like a bit much (and honestly, it probably is a bit much :v:) maybe checkout ido-mode for a more focused autocompletion experience.

Also this probably doesn't apply to most people but running emacs on the cli (like through an SSH connnection or whatever) half-breaks icicles. It really wants to be in a windowed gui environment for all of its features to work. Just something to keep in mind.

I tend not to use icicles because I like to run a bleeding edge emacs and icicles typically gets broken often enough its not worth the hassle. This shouldn't be a problem for most people though.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

JetsGuy posted:

I don't remember ever having to do this, am I just forgetful, or did Aquamacs just decide to change default settings?

I can't speak to this specific case but Aquamacs changes a whole bunch of poo poo.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
I don't know if any one else has been following this but watching 'the community' pile on this Batsov guy who did the horrible thing of stating clearly what a huge pile of poo poo emacswiki has become is pretty entertaining. He deleted his reddit post after the 15 people in /r/emacs ganged up on him. Now he's started an :frogsiren: EmacsWiki Competitor :frogsiren: that's totally going to be better in every way.

There hasn't been this much excitement in emacs land since the last time someone suggested replacing elisp with CL on emacs-devel :munch:

Edit: For the truly interested bored planet emacs has a bunch of back and forth blog posts between Batsov and kensanata

orphean fucked around with this message at 05:52 on Mar 31, 2012

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

h_double posted:

Well, yes and no. The first public release of GNU Emacs was a few months after the Macintosh and DRI's GEM windowing system

The first EMACS (lit. Editor MACroS) was released about 8 years prior to this don't forget. So it had already built up almost a decades worth of cultural cruft and baggage.

Alot of the terminology literally comes out of MITs AI lab which is the culture that spawned RMS and Emacs itself. That's why crap like the cursor is called 'point' because in TECO (the editor said macros were written for) what the cursor represents was represented by the '.' command.

I'm not defending this stuff per se just trying to show that this is so deeply embedded in the Emacs culture this stuff isn't going away. It's not a technical problem, its a people problem.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

beoba posted:

However I expect in practice this just leads to newcomers confusing which one's the "mark" and which one's the "point".

And even this confusion is going to be a legacy concern (if it isn't already) since they flipped on transient-mark-mode by default now.

This news is a little older but I just read about it and wanted to share it with our unloved little thread here.

Guile Scheme ELisp Compatibility Mode Matures

This is pretty huge. Guile's elisp compatibility layer can basically run all elisp that doesn't muck with buffers. They released a screencast showing guile running dunnet.el which is pretty rad.

This might be ready to go for Emacs 25. We'll have a full, modern lisp (well scheme) in Emacs! Multithreading ahoy.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Fren posted:

Just gonna post in this thread til someone stops me
Never going to stop posting in this thread. Just you and me riding Emacs into the sunset. :shepface::respek::dukedog:

Weirdly enough I was just coming in here to ask if rcirc or ERC were actually decent clients. I've only really tried ERC and just found it a bit too weird even for me. What do you like about rcirc Fren?

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
Yeah I'm definietly not an IRC poweruser unless idling for the past ten years on freenode counts. Thanks for the info, I'll turn it on and see what I think.

For some Thread Content, check out the latest episode of emacsrocks. Talks about this killer thing called ace-jump-mode. I installed this thing about half a second after watching that video. Never looking back. It's awesome.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
Storing data as lisp instead of text is very nearly always the correct decision.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Mr. Fish posted:

Am I missing something or is there a reason to "require" stuff every time you need something from it? I thought the initialization slowed for every require.

The main idea is that it makes your init files easier to maintain if you break them up into logical pieces and then require them.

For example here is the entirety of my '.emacs':
code:
            1 ;;; Package Load Paths ;;;----------------------------
            2 ; 3rd Party Packages
            3 (add-to-list 'load-path (expand-file-name "~/.emacs.d/vendor"))
            4 (progn (cd (expand-file-name "~/.emacs.d/vendor"))
            5        (normal-top-level-add-subdirs-to-load-path)
            6        (cd (expand-file-name "~/")))
            7
            8 ; Local Configuration
            9 (add-to-list 'load-path (expand-file-name "~/.emacs.d/config"))
           10
           11 ;;; Load Configuration ;;;---------------------------
           12 (require 'my-function-config)
           13 (require 'my-general-config)
           14 (require 'my-package-config)
           15 (require 'my-hooks-config)
           16
           17 ;;; Emacs Server ;;;-----------------------------------
           18 (unless (fboundp 'server-running-p) (load "server"))
           19 (unless (server-running-p) (server-start))
Do the requires slow down initialization? Sure probably a little bit. But I'd argue that if this is an issue for someone they are using emacs incorrectly (ie, like vim, opening and closing it all the time rather than just leaving it open).

Extra bonus tip:
Emacs looks inside .emacs.d on startup for a file called init.el if it can't find .emacs. This is handy if you want to consolidate all your emacs configuration into one folder (ie, to push all of it to a git repo or what have you)

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
You can sort of half rear end this with gnus-daemon-* and friends if you haven't checked it out.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
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.

Results show up in the minibuffer, errors show up as emacs windows, you want a javascript repl in emacs? You may have one my son, etc etc.

It's kind of like swank-js but quick and easy to setup and play with.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional
ansi-term isn't horrible and it's VT-100 state machine is robust enough to run vim or something.

But yeah, not really.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

WHOIS John Galt posted:

Competent newsgroups provide a header. List-ID: <vagrant-up.google.com> or the like. This is the split rule I used to use to have Gnus automatically sort them into folders.

Lisp code:
 ("List-Id" ".*<\\(.+\\)\\.google\\.com>.*" "list/\\1")

Opera mail and thunderbird pay attention to that these days. :q:

don't use opera or thunderbird for email

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

Suspicious Dish posted:

If by this you mean C-x C-SPC, yeah, I know about it, but it doesn't help me, because it goes back to the last place I set the mark. So, I have to think before I navigate: "am I going to be coming back here any time soon?", and I'm not one to calculate and think before I go.

Behold! Ace Jump Mode to the rescue. This thing makes hopping around an emacs buffer insanely fast.

Here's a little webcast showing it off so you don't even have to install it to see its amazing self.

This seriously is a great package.

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

PlesantDilemma posted:

In the videos for Emacs Rocks, what feature is he using to show where the file ends? It's a grey line along the left of the buffer where other editors would put line numbers. Actually, it would be below where the line numbers stop in other editors.



Any other cool modes you emacs masters run that do little tweaks like this?

That area is called "the fringe" just to help you find stuff about it in the future. If you want those empty indicators in every buffer slap the following somewhere in your init files:
code:
(setq default-indicate-empty-lines t)
As for tips and tricks, ummm, I kinda like using powerline to make my mode line look a bit prettier.

Edit:
Just to add to this the two biggest things you can do to make emacs look a lot better is a) use a decent font and make sure you're using a build that can antialias the fonts (any recent), and b) use a nice color scheme. More advanced would be hiding the menu (and scroll bars honestly).

And a general list of 'modes' that I like:
  • ace-jump-mode
  • ace-jump-buffer-mode
  • ace-jump-window-mode (highly recommended if you work with multiple emacs windows. If you're not familiar with Emacs Jargon 101 windows in this case are what you'd call frames or panels in any other app. Emacs calls what you think of as windows, frames. Yay.
  • winner-mode
  • helm

orphean fucked around with this message at 23:36 on Sep 15, 2014

Adbot
ADBOT LOVES YOU

orphean
Apr 27, 2007

beep boop bitches
my monads are fully functional

PlesantDilemma posted:

Just used tramp mode for the first time and it's amazing. On my linux box it works great without extra setup and I'm anxious to setup putty so I can remotely edit and browse folders from my windows 7 emacs install.

But I'm confused as to if it is keeping a connection open for a long time or just making connections as needed? When I close a file and all the dired buffers, does that close the ssh connection? I also see a tramp-cleanup-all-connections function, do I need to call that with M-x when I am done?

It depends, it does both. If you're worried about leaving them open then cleaning them up now and then doesn't hurt. There are a few functions available for that (in addition to the one you found): https://www.gnu.org/software/emacs/manual/html_node/tramp/Cleanup-remote-connections.html

Another neat thing to do with tramp is use it to get elevated privileges locally to edit root owned files or whatever.

code:
C-x C-f
/sudo::/path/to/file

  • Locked thread