From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: master 73f37da: Disable undo in the process buffers of a JSONRPC connection Date: Fri, 13 Dec 2019 22:09:04 +0100 Message-ID: References: <20191213163543.19521.86114@vcs0.savannah.gnu.org> <20191213163544.A0FEF2111A@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004fd23a05999c460a" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="22342"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 13 22:09:32 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ifsBk-0005bn-NN for ged-emacs-devel@m.gmane.org; Fri, 13 Dec 2019 22:09:28 +0100 Original-Received: from localhost ([::1]:53456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifsBj-0004Df-Gg for ged-emacs-devel@m.gmane.org; Fri, 13 Dec 2019 16:09:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54940) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifsBb-0004DU-I0 for emacs-devel@gnu.org; Fri, 13 Dec 2019 16:09:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifsBa-0003sZ-8M for emacs-devel@gnu.org; Fri, 13 Dec 2019 16:09:19 -0500 Original-Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]:38638) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifsBa-0003qC-2d for emacs-devel@gnu.org; Fri, 13 Dec 2019 16:09:18 -0500 Original-Received: by mail-il1-x135.google.com with SMTP id f5so585334ilq.5 for ; Fri, 13 Dec 2019 13:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WbdMuz7rMYV8JpZc3MJHhGdQsc+GABeRrK4RjiEbWjA=; b=lgls+mfpvKrPJWYEb1SRvJ2KQocPl0/uXW1s6nNwe6uvbyCuieYiDDZwxVY1fM4L5m SKLsbmhYn+zWHbfR5f/loE9Wy4Pi16yOOqoxNGGuSx74bwyxYH4Fk/BTTsh7k0JhIH3p npHPRZu6MNcyD2SMHOlebcyqm4cyQ7l54S++lnmwRtfBvd9gXoOA5AaUIEiUYbbVdxrh /pVtB7FxZAmaUBteQf7Bji+3cwIX/xyW8b+RhqlMzQGojpE9qE3tmVBCLXdr5yx5EdSL Jbq0aPd8XXOW1e+3kGVwIAIL12zpKeTcpxhF8v6wvFLPOSF8S7NNGFZvT9DTLIVHTOe/ 2cjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WbdMuz7rMYV8JpZc3MJHhGdQsc+GABeRrK4RjiEbWjA=; b=a9HGLYbjG0++5eIkkHY2l515Jh1uDb3uxXhxZNpvnEkw5tXs195GZL896IxAeQpmdz /ouo0V6JW/ec3wDoearzc+/Y2BBkdlReDIxK6GcoQkDge0Cfrfg4DS2nS/NzT65YC9YF W7gHFQr7Xjggw1kz8t67DyfA/tFVV15lbGfa3OfrCnoNDaVdAEG0ADDES5ZR2UADs6cY eQdik9VZuOZ0g6BacG0iVml2lKApIkPhvH7G1NzP6v4//y9qysywQCAig3tWJulj5ODF lM+IDZhEDxGxgybNmQXkPdNe2JSIk16i0tPbUKF1hVmZLi30rKoBk+MO47m6ybotVsDo 9srA== X-Gm-Message-State: APjAAAWZyP8o8gcTcxVojhk0Q/PsUtolhBCYEVSDi8/jsDym3czDdJD5 WdFRArl/nFtQHWVMNiF3VpjWsMkStKcZJudixkg= X-Google-Smtp-Source: APXvYqxtc5hGQNnFfzyxcYuVZ/646Tt5+nd+1si43HVYrKK7q9iBEfnXI+RjXY+1wej/eD2ImIiTBHIkTBL8K19BtBg= X-Received: by 2002:a92:884e:: with SMTP id h75mr1322813ild.199.1576271357135; Fri, 13 Dec 2019 13:09:17 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::135 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243361 Archived-At: --0000000000004fd23a05999c460a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stefan, They are indeed intended to be seen by the user. They hold important communications between server and client, and I ask users to post their contents when making Eglot bug reports. Well I suppose the stdout one less useful than stderr. And this is more of an LSP requirement than an jsonrpc one. I could theoretically make Eglot tell. Jsonrpc to promote the buffer's visibility, but that seems like overkill right now. Jo=C3=A3o On Fri, Dec 13, 2019, 19:28 Stefan Monnier wrote= : > Hi Jo=C3=A3o, > > > Disable undo in the process buffers of a JSONRPC connection > > + (buffer-disable-undo) > > (set-marker (process-mark proc) (point-min)) > > (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t) > proc)) > > + (with-current-buffer stderr > > + (buffer-disable-undo)) > > Assuming those buffers are only used internally and are not intended to > be displayed to the end-user (other than for debugging purposes), then > using buffer names with a leading space should take care of this > (undo is disabled by default in those buffers). > > If you're already using a leading space in those buffers's names, then > I wonder how/why their undo was enabled in the first place. > > > Stefan > > --0000000000004fd23a05999c460a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Stefan,

T= hey are indeed intended to be seen by the user. They hold important communi= cations between server and client, and I ask users to post their contents w= hen making Eglot bug reports.

Well I suppose the stdout one less useful than stderr.

And this is more of an LSP requiremen= t than an jsonrpc one. I could theoretically make Eglot tell. Jsonrpc to pr= omote the buffer's visibility, but that seems like overkill right now.<= /div>

Jo=C3=A3o



On Fri, Dec 13, 2019, 19:28= Stefan Monnier <monnier@iro= .umontreal.ca> wrote:
Hi Jo= =C3=A3o,

>=C2=A0 =C2=A0 =C2=A0Disable undo in the process buffers of a JSONRPC co= nnection
> +=C2=A0 =C2=A0 =C2=A0 (buffer-disable-undo)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (set-marker (process-mark proc) (point-min)= )
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((inhibit-read-only t)) (erase-buffer)= (read-only-mode t) proc))
> +=C2=A0 =C2=A0 (with-current-buffer stderr
> +=C2=A0 =C2=A0 =C2=A0 (buffer-disable-undo))

Assuming those buffers are only used internally and are not intended to
be displayed to the end-user (other than for debugging purposes), then
using buffer names with a leading space should take care of this
(undo is disabled by default in those buffers).

If you're already using a leading space in those buffers's names, t= hen
I wonder how/why their undo was enabled in the first place.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--0000000000004fd23a05999c460a--