help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: 24.1.50 + lexical-binding + server.el + server-visit-hook = problem


From: Stefan Monnier
Subject: Re: 24.1.50 + lexical-binding + server.el + server-visit-hook = problem
Date: Wed, 13 Jun 2012 11:13:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>>> Ideally, server.el would define a global dynamically-scoped variable
>>> `server-default-directory' that users could reliably reference to get
>>> the value of the -dir DIRNAME emacsclient option (instead of defining
>>> the internal lexically scoped `dir').
>> It's not quite ideal, tho, because you can have several active
>> emacsclients at the same time.
> True, but if you capture the value of the variable into a "safe place"
> when the hook is called, that's not an issue.

If that safe place is shared by emacsclients, then it won't always work
(tho it may be sufficient for your particular use case).

> On the other hand, why not have this variable be buffer-local, which
> would solve the problem of having multiple concurrent emacsclients?

No, making this buffer-local just pushes the problem to "local to
*which* buffer".  E.g. all emacsclient connections share the same
internal buffer.

>> A better solution is to store this `dir' into the process's
>> properties.

Because that's the only real "safe place".

> Thanks for your thoughts.  Given the lack of discussion in this
> thread, I get the idea I'm the only person doing anything like this.

Maybe, but I'd still accept a patch that makes it easier,


        Stefan


reply via email to

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