From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input Date: Sat, 14 Jan 2023 11:33:27 +0200 Message-ID: References: <83ilhcksk6.fsf@gnu.org> <878ri8t5p0.fsf@gmail.com> <83edrx8rb0.fsf@gnu.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2079"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 60379-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 14 10:34:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGcvb-0000OO-LO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Jan 2023 10:34:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGcvT-0006CS-Ta; Sat, 14 Jan 2023 04:34:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGcvK-0006C5-8o for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 04:34:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGcvK-0002Rn-0i for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 04:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGcvJ-0005So-Sp for bug-gnu-emacs@gnu.org; Sat, 14 Jan 2023 04:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Jan 2023 09:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60379 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60379-done@debbugs.gnu.org id=D60379.167368881520957 (code D ref 60379); Sat, 14 Jan 2023 09:34:01 +0000 Original-Received: (at 60379-done) by debbugs.gnu.org; 14 Jan 2023 09:33:35 +0000 Original-Received: from localhost ([127.0.0.1]:53390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGcut-0005Rx-BK for submit@debbugs.gnu.org; Sat, 14 Jan 2023 04:33:35 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:41516 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGcuq-0005Ro-V4 for 60379-done@debbugs.gnu.org; Sat, 14 Jan 2023 04:33:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1673688812; bh=4hO1RFPe4uuTd+DRDu167qWboh9wLRAGqRLCIsi119o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Qk1yOKJiCaXzS7IWxWKzSNmGBZKkz1Y4bqOkFODVAzxaW2xnnA5yPHlDsIS+qJ2M+ 2Y3eUw8id5QHLlf+O9CPrNXCkwADBxGBJVGAtVgP/oT1hlP3ePRDtpbRfa9hyk358w /0zDs9E/RYVVdI1qZYLTZ28h4kBK6EZOplM2Fa7kyVvThGYhLKpDN2J5ntpbFbOism 8TB4jxn7LpOJy+R6BlQXGexHSF1p5FSVwEbFQpTjS4ptObD8DKbhWomaCpr2uUbe6S CG6OuyQ6m1siZ4WTHj6wt1rbaq3lXTsUlhlXnDEllpsyXyei6RCq00xmELVIG6jQ3r ZG7ascfL1EysA== In-Reply-To: <83edrx8rb0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Jan 2023 10:16:03 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253345 Archived-At: Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Cc: Eshel Yaron , 60379@debbugs.gnu.org >> Date: Thu, 12 Jan 2023 10:20:27 +0000 >>=20 >> The idea looks sane, but I think 'format-prompt' can't be used if Eglot >> is to continue supporting Emacs 26 and 27. Also I'd prefer if the patch >> is slightly less disruptive to whitespace, like this: >>=20 >> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el >> index 15cb1b6fad..eb3b51ed8b 100644 >> --- a/lisp/progmodes/eglot.el >> +++ b/lisp/progmodes/eglot.el >> @@ -991,6 +991,7 @@ eglot--guess-contact >> non-nil, maybe prompt user, else error as soon as something can't >> be guessed." >> (let* ((guessed-mode (if buffer-file-name major-mode)) >> + (guessed-mode-name (and guessed-mode (symbol-name guessed-mode= ))) >> (main-mode >> (cond >> ((and interactive >> @@ -1000,7 +1001,7 @@ eglot--guess-contact >> (completing-read >> "[eglot] Start a server to manage buffers of what major m= ode? " >> (mapcar #'symbol-name (eglot--all-major-modes)) nil t >> - (symbol-name guessed-mode) nil (symbol-name guessed-mode)= nil))) >> + guessed-mode-name nil guessed-mode-name nil))) >> ((not guessed-mode) >> (eglot--error "Can't guess mode to manage for `%s'" (curren= t-buffer))) >> (t guessed-mode))) >>=20 >> Other than that, it's fine to commit. > > OK, done, and closing the bug. Hello Jo=C3=A3o and Eli, Thanks for looking into it and applying the patch. > Yaron, this change was small enough to accept without copyright > assignment, but if you intend to continue contributing to Emacs (and > we hope you do), I recommend to start your copyright assignment > paperwork rolling at this time. If you agree, I will send you the > form to fill and the instructions to email it. Alright, please send it over. Eshel