emacs

emacs

tramp sudo syntax

The syntax is:

C-x C-f /ssh:you@remotehost|sudo:remotehost:/path/to/file RET

So to connect to a remote host centos01.internal.glynn.xyz as the current user, sudo to root and open /etc/nginx:

C-x C-f /ssh:centos01.internal.glynn.xyz|sudo:root@centos01.internal.glynn.xyz:/etc/nginx

remove newlines from a region

stackoverflow source

Select region

shift-option-%

C-q C-j

return

return

Or to put it another way, query replace region, ctrl-q to get extended characters, ctrl-j to put in a newline, replace with nothing, all of them.

named frames

First name the frame:

set-name-frame notes

Then select it:

(select-frame-by-name "notes")