[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some developement questions

From: hw
Subject: Re: Some developement questions
Date: Wed, 29 Aug 2018 22:52:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: hw <address@hidden>
>> Cc: address@hidden,  address@hidden,  address@hidden,  address@hidden
>> Date: Tue, 28 Aug 2018 22:42:25 +0200
>> > Read about that in the manual, nodes "TCP Emacs server" and the
>> > description of the --tramp-prefix= option under "emacsclient Options".
>> I don't understand this documentation.  It's a good example for why
>> people turn to a search engine.
> Feel free to submit bug reports about any unclear documentation,
> explaining what part(s) confused you.

The whole section about the --tramp-prefix= option confused me.

>> And I don't remember how to get back when following links in info
>> documentation
> You can type 'l' (for "last"), or use the left arrow button on the
> tool bar, or click on "Info" in the menu bar and select "Back in
> History", or click on Info->History and select any node you visited at
> random.

Ah!  I remembered something about arrows and tried to use the cursor
keys --- how about making it so that you can go back and forth in info
with Alt+<Cursor> like you can do in web browsers?

I have menu and toolbar disabled ...

>> This documentation is really difficult to read.
> You mean in general, or this specific feature description?

It's the combination of both, i. e. the description didn't make sense to
me and fighting with how to use the info browser because the description
made me follow the reference about tramps prefixes, and I couldn't get
back.  I ended up getting stuck in the help documentation of info and
actually had to kill the buffer to be able to start over because I
couldn't get anywhere else from there.

>> Anyway, why would I need to forward the port via ssh?
> I don't really know what you are after, exactly: you never described
> that in enough detail.  The features I pointed to allow one to use
> emacsclient to access remote machines in several different use cases,
> and I hoped one of them is yours.

Well, that's what I'd like to do, and you've probably pointed me the
right way.

>> And what file is there to access when I want an X frame?
> When you invoke emacsclient, you usually ask it to visit a file,
> right?

Wrong; the files are usually already loaded, either because Emacs keeps
running on the server, or because desktop-mode has already restored

>> The example in the documentation is the wrong way round: The server is
>> running on the remote machine.  If I wanted to run emacs locally on my
>> workstation, I could just do that, but I want it to run on the server
>> because I don't shut the server down but my workstation.
> It depends on the direction from which you look at the connection.
> Files local to the remote host are remote files for you when you sit
> at the other end.

That depends.  Files local to the server are not really remote to the
client because the client has them mounted via NFS.  But the virtual
terminal would be a file remote to the server.  Hence I'm guessing that
the Emacs server would somehow need to use tramp to access them, but in
order to do so, the Emacs server would need to ask me for my password,
and it can not do that because it can not open a terminal without that
password.  Even if it had the password, SELinux might prevent it from
accessing a device file like that.

>> But I'd like to use the Emacs server without such detours.  Can remote
>> Emacs not simply be simple?  Why doesn't the locally running emacsclient
>> allow the remote Emacs server to access the terminal transparently?
> Now I'm confused: which terminal would you like the remote Emacs to
> access, and how is that relevant to your original question?

So you see how this is confusing :)

I'd like to use the Emacs server that runs remotely on the server from
my workstation with an emacsclient running locally on the workstation
directly without X11 forwarding via ssh for the frames, and I'd like to
be able to also use 'emacsclient -nw' on the workstation, using the
emacs server on the server.  I am wondering if I need the X server
running on the workstation to listen on a TCP port for that to work for
the frames; I guess not because the emacsclient would run locally.

Basically, I want to use the Emacs server the usual way how you use any
server, like a web server or an ssh server or an XMPP server.

I understand that the Emacs server can not open the virtual terminal
when using 'emacsclient -nw' because from its perspective, that is a
remote file.  Apparently, it might able to use tramp to open it if I
supply an appropriate --tramp-prefix= option, provided I could enter the
password for the log in, and provided that SELinux doesn't get in the
way.  However, emacsclient is running locally, so it should be able to
use the console.

I am wondering what remote file the Emacs server would need to open to
create a frame in the X session running on the workstation.  And I am
finding the idea of remotely opening files representing virtual consoles
within a tmux session somewhat strange and not looking like a good idea.

So, yes, I kinda understand the documentation, but it's confusing, and I
couldn't get it to work yet and am not sure that I can.  Even if I
could, I can not enter the password.

I've downloaded the 26.1 release sources and am using that version
because the server runs Centos, which comes with Emacs 24.x which seems
a bit old.  So I have most of the cool new features now, and this should
be a really easy thing to do :)  I need to give it more time and
experimentation, maybe this weekend.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]