unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Jim Porter" <jporterbugs@gmail.com>,
	Visuwesh <visuweshm@gmail.com>, "Eli Zaretskii" <eliz@gnu.org>,
	"Dmitry Gutov" <dgutov@yandex.ru>,
	gerd.moellmann@gmail.com, emacs-devel@gnu.org,
	"Mattias Engdegård" <mattiase@acm.org>
Subject: Re: EBrowse obsolete?
Date: Sat, 23 Jul 2022 17:04:24 +0200	[thread overview]
Message-ID: <87mtczj2fb.fsf@gmx.de> (raw)
In-Reply-To: <jwv35er7vi8.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 23 Jul 2022 10:36:17 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

>>> Indeed, I don't think we can hope to get good performance with an
>>> approach like that of Tramp which works hard to try and avoid requiring
>>> installation of a "Emacs server" on the other end.
>>
>> FTR, there are proposals to use a remote Emacs instance as server. This
>> approach sounds interesting, but due to the disadvantages, and the
>> amount of work, I've never tired a prototype.
>
> The issue is not just what's running on the remote host, but what's the
> protocol between the two (not just at the byte-level but in terms of
> what kinds of operations/data/events go back and forth).

I've discussed this a while ago with Mattias Engdegård. His proposal was
to have a protocol on sexp level, that means the client sends

(file-exists-p localname)

and the remote server responds with

t

On both sides, the Lisp reader would be active.

> Tramp's flexibility depends on the design of `file-name-handlers-alist`.
> In some cases (such as a quick edit to a very large remote file), that's
> a very significant restriction.

Sure, but we're able to extend the file-name-handler-alist protocol. For
example by a function which is activated by a remote default-directory,
and sends local file names, being relative or absolute, back and forth.

This wouldn't even need a remote Emacs server, but only a proper
implementation in Tramp and other file name handlers.

> I was taking it for granted that the remote host would be running some
> Emacs-specific server, yes.  I think that'd be the easy part :-)
> The harder part is to decide which operations should take place on which
> side, and what information to send when between the two sides.  [ And of
> course, actually writing the code to make it work without breaking too
> much existing uses nor significantly slowing down the normal local
> use case.  ]

Yep. But we could do it iteratively: Add magic functions as needed. To
be honest, I do it already internally. Tramp's list of magic functions
is extended by (taken from tramp-sh.el)

    (tramp-get-home-directory . tramp-sh-handle-get-home-directory)
    (tramp-get-remote-gid . tramp-sh-handle-get-remote-gid)
    (tramp-get-remote-uid . tramp-sh-handle-get-remote-uid)
    (tramp-set-file-uid-gid . tramp-sh-handle-set-file-uid-gid)

Simply, because there are different implementations for different Tramp
backends, and the mechanism is available :-) Other, non-Tramp file name
handlers are not affected, because every file name handler, which is
called for a function it doesn't know, falls back to the default
implementation.

So if you have a function `my-own-bulk-operation', which looks for a
handler of it in case of a remote default directory, it would do. (Well,
Tramp is a bit of picky for the functions, and it shall at least know
that there is such a magic function -- otherwise, it moans).

>         Stefan

Best regards, Michael.



  reply	other threads:[~2022-07-23 15:04 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21  6:16 EBrowse obsolete? Gerd Möllmann
2022-07-21  6:44 ` Akib Azmain Turja
2022-07-21 12:46   ` CEDET obsolete? (was: Re: EBrowse obsolete?) Stefan Kangas
2022-07-21 13:00     ` CEDET obsolete? Po Lu
2022-07-22 10:26     ` Jose E. Marchesi
2022-07-22 13:26       ` Stefan Kangas
2022-07-23 11:44     ` CEDET obsolete? (was: Re: EBrowse obsolete?) Lynn Winebarger
2022-07-21  6:49 ` EBrowse obsolete? Po Lu
2022-07-21  7:26 ` Eli Zaretskii
2022-07-21  7:56   ` Bozhidar Batsov
2022-07-21 12:16     ` Zhiwei Chen
2022-07-21  8:16   ` Po Lu
2022-07-21 11:12   ` Gerd Möllmann
2022-07-21 11:44     ` Po Lu
2022-07-21 12:21       ` Dmitry Gutov
2022-07-21 12:28       ` Gerd Möllmann
2022-07-21 12:33       ` Akib Azmain Turja
2022-07-21 17:02         ` Yuri Khan
2022-07-21 12:15     ` Eli Zaretskii
2022-07-21 12:19       ` Dmitry Gutov
2022-07-21 12:28         ` Eli Zaretskii
2022-07-21 15:21           ` Stefan Monnier
2022-07-21 16:16             ` Visuwesh
2022-07-21 16:51               ` Stefan Monnier
2022-07-21 17:07                 ` Visuwesh
2022-07-21 17:16                 ` Jim Porter
2022-07-21 17:39                   ` Stefan Monnier
2022-07-21 21:26                     ` Jim Porter
2022-07-22  2:01                       ` Tim Cross
2022-07-23 10:18                         ` Michael Albinus
2022-07-24 23:25                           ` Tim Cross
2022-07-22 14:29                       ` Brian Cully via Emacs development discussions.
2022-07-22 17:22                         ` Jim Porter
2022-07-23 10:35                           ` Michael Albinus
2022-07-23 10:28                         ` Michael Albinus
2022-07-23 10:13                       ` Michael Albinus
2022-07-23  9:57                     ` Michael Albinus
2022-07-23 14:36                       ` Stefan Monnier
2022-07-23 15:04                         ` Michael Albinus [this message]
2022-07-23  9:51                   ` Michael Albinus
2022-07-22  1:06                 ` Po Lu
2022-07-22  4:55                   ` Gerd Möllmann
2022-07-22  5:15                     ` tomas
2022-07-22  6:52                     ` Eli Zaretskii
2022-07-22  1:35             ` Tim Cross
2022-07-21 12:58       ` Gerd Möllmann
2022-07-21 13:04         ` Eli Zaretskii
2022-07-21 13:16         ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtczj2fb.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=jporterbugs@gmail.com \
    --cc=mattiase@acm.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=visuweshm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).