From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 28 07:22:23 2022 Received: (at submit) by debbugs.gnu.org; 28 Dec 2022 12:22:24 +0000 Received: from localhost ([127.0.0.1]:57226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAVRv-0006dK-Gb for submit@debbugs.gnu.org; Wed, 28 Dec 2022 07:22:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:56384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAVRu-0006dD-HN for submit@debbugs.gnu.org; Wed, 28 Dec 2022 07:22:22 -0500 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 1pAVRu-0001aE-AY for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 07:22:22 -0500 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAVRs-0006z6-Ni for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 07:22:22 -0500 From: Eshel Yaron DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1672230139; bh=kFb8D9+YgqQMWVLpOcboMGMMvp6N1ExdfJVktPbjPoc=; h=From:To:Subject:Date:From; b=Td+Cs3w826TtWGoWwIt7Qa/G1tmjBicNAhrmI/q2K0zRhbWu+9Tqrzmz9rhgDDgoI 6Dttxkw4nVV32i4iNV7S0Z7vK4QnerHYbfOV9V+G77V9zR7ERMwxCIdtN/mfw/BbCx mvtOpaDUvRFo1vxDiwYs3h7Tz3RADzpiG3cFU1JomN7GG5/gaGjEdCbAvmB83HdBhJ mLWfkgAqOM8e080A5M6vyi2nyLIb6RWIEhM3yMFh4htD7qPR3wjwrHHyZ+9iXMubCq EF+b8NXfp8Uy1V81EiYIH0Mkm3+bC7XLUFE0K5xaKovhxE9awkfWr+WzlXp6iIqdd7 fWyCr2x8hbIHw== To: bug-gnu-emacs@gnu.org Subject: [PATCH] Eglot: don't use "nil" as minibuffer initial input Date: Wed, 28 Dec 2022 14:22:17 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch Hello, Currently, doing emacs -Q and followed by M-x eglot in the scratch buffer results in a prompt for major mode to manage with LSP, but the initial minibuffer input as well as the default value for the completing-read call are both set to the string "nil", which is not very helpful as that's not a valid input. This patch tweaks the prompt a little and avoids this issue by leaving the minibuffer's initial input empty and making sure we don't set the default value to "nil" either. Thanks, Eshel In GNU Emacs 30.0.50 (build 19, x86_64-apple-darwin22.1.0, NS appkit-2299.00 Version 13.0 (Build 22A380)) of 2022-12-26 built on esmac Repository revision: cc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c Repository branch: master Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.0 Configured using: 'configure --with-native-compilation --enable-link-time-optimization --with-json --with-xwidgets --with-mailutils --with-imagemagick --without-dbus' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Eglot-don-t-use-nil-as-minibuffer-initial-input.patch >From 66d17efabaca0f3d08b78529c8d64fc65dc799e2 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 28 Dec 2022 13:59:53 +0200 Subject: [PATCH] Eglot: don't use "nil" as minibuffer initial input Doing M-x eglot in a buffer for which buffer-file-name is nil, prompts the user for a major mode to manage by invoking completing-read. The way completing-read was called would end up with the string "nil" as the initial minibuffer input, which is not very useful nor is it a valid input. * lisp/progmodes/eglot.el (eglot--guess-contact): tweak prompt for major mode. --- lisp/progmodes/eglot.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 15cb1b6fad..57f9be718f 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 @@ -998,9 +999,10 @@ eglot--guess-contact (not guessed-mode))) (intern (completing-read - "[eglot] Start a server to manage buffers of what major mode? " - (mapcar #'symbol-name (eglot--all-major-modes)) nil t - (symbol-name guessed-mode) nil (symbol-name guessed-mode) nil))) + (format-prompt "Start LSP server for major mode" + guessed-mode-name) + (mapcar #'symbol-name (eglot--all-major-modes)) + nil t nil nil guessed-mode-name nil))) ((not guessed-mode) (eglot--error "Can't guess mode to manage for `%s'" (current-buffer))) (t guessed-mode))) -- 2.38.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 04:31:09 2023 Received: (at 60379) by debbugs.gnu.org; 12 Jan 2023 09:31:09 +0000 Received: from localhost ([127.0.0.1]:44672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFtvR-0006w0-9L for submit@debbugs.gnu.org; Thu, 12 Jan 2023 04:31:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFtvL-0006vU-MF for 60379@debbugs.gnu.org; Thu, 12 Jan 2023 04:31:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFtvG-000753-7q; Thu, 12 Jan 2023 04:30:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZXLMU5tr8KvzOxP7N70a8YsJLV/yaHa7VRl83m1tKWQ=; b=W8/oBPLSrzcju4u29rpW 2u9psqSUNkH8tXnklf/lvq7XcFlJNxPDLrC5RbnDYSQ/gJweMXTniungzkfGmUYaYps1DAt7RGWxR dTzW9YaUYNvHqBhopIK9xZu+jX0hnXNCiMsPYQiWbhLB9ufy0A6pxBRKxiGeziYTFUkvNaI5V6+si po4fLmzEJNulGrvgoB1VAwBiytgx7Mg3JaVJDa9ycjpkmejLfoEqfC5qjoKnuYlAhwnrRnr9oZlmG Ajw6qHpUpubVsVI+6X2kgRXHxxaPcl49ekwBppjwI5jRDIgvMCSAR3htw0aBLqByVLjRgFsIznj1u yjhK0dBkDWDYug==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFtv5-0006Vx-IT; Thu, 12 Jan 2023 04:30:57 -0500 Date: Thu, 12 Jan 2023 11:31:21 +0200 Message-Id: <83ilhcksk6.fsf@gnu.org> From: Eli Zaretskii To: Eshel Yaron , =?iso-8859-1?Q?Jo=E3o_T=E1vora?= In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input References: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60379 Cc: 60379@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 28 Dec 2022 14:22:17 +0200 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Currently, doing emacs -Q and followed by M-x eglot in the scratch > buffer results in a prompt for major mode to manage with LSP, but the > initial minibuffer input as well as the default value for the > completing-read call are both set to the string "nil", which is not very > helpful as that's not a valid input. > > This patch tweaks the prompt a little and avoids this issue by leaving > the minibuffer's initial input empty and making sure we don't set the > default value to "nil" either. João, are you looking into this? WDYT? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 05:19:03 2023 Received: (at 60379) by debbugs.gnu.org; 12 Jan 2023 10:19:03 +0000 Received: from localhost ([127.0.0.1]:44753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFufn-0008Aj-Au for submit@debbugs.gnu.org; Thu, 12 Jan 2023 05:19:03 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:53168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFufj-0008AD-HI for 60379@debbugs.gnu.org; Thu, 12 Jan 2023 05:19:02 -0500 Received: by mail-wm1-f50.google.com with SMTP id ay40so12838405wmb.2 for <60379@debbugs.gnu.org>; Thu, 12 Jan 2023 02:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tR5oOXRgd3umAzBiEI+iVyeAeh/mb8yam/X+k0lbfkA=; b=UxqN9HjnCjRw83xlje9dBoqSLg427NIzkNQd8RLYdPQMBD1NM/6oDT7ktFDcQSYEW/ vqPV22f6lN6pxi4KUI9GTf5ztGACuZsLo3l3ujfZpbN8gH9HvujMs+eSUaEoDtgy7arI cs1I6sfGX2wY9akoc8TX45RM0DoK/6b7qrCgwPeGxvqwFMksVFR8Ebk91bQZlGcixaXQ 1YDvVgpL3HF08HC/uEvBYR1eX1V89rNt1wJekQxNPkoepI3HGvUz+r7IuvNYRU7YtPFF JOjUf8MCYtvC/bQayTOn9vCQO6C5Ff6+6X5Re+5yC4DXPR+3pUrOiuKm0S1RHQhkaYuI o8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tR5oOXRgd3umAzBiEI+iVyeAeh/mb8yam/X+k0lbfkA=; b=gpsjLKW6+rUC7Q7+hyKzIFgDnEe6fZxo4HN98sU8el9jVDyRipywtz9Sf6ydU7hmFy mdAC/I/haoKbEdPUboYCn3cXcnGBVzZNYWYA184PXMDq59b8xMJeIZ4oKT9zMQG/LrG1 K/0hkiUAGH5litETzJBpvSnyQXO1vXR1MybMzPZuChVAQMeHxURw9N5GGLglwu/dRPg9 7tsP1a5JgHW0YKZBjuUiw5tuErPwZ9Lg8bIdQqcQjfsaG7z2ImyyNlU/k6gxCzLXPG50 MsPnRf468K7bkttw3oPPpJAwav6uLGhv0kgTiJg0wAAKK66Zf30yE89ZC8CcXyaOG9+S lJjQ== X-Gm-Message-State: AFqh2kqRGtQHY+7qkuanF8/HiRqXLm8iNG41qcSvPNPVdndWYcvXJxH6 iqKfuM86vSHr8/GWJ+aEtLo/iBufWpM= X-Google-Smtp-Source: AMrXdXvTowtlRf6bWf1JlY3GuoiA8JvF3wJahmwnxFimUUz1ppi/AIoZzfz278Eq73ED4q0NsDlqEg== X-Received: by 2002:a05:600c:4f12:b0:3d9:f9ef:3d23 with SMTP id l18-20020a05600c4f1200b003d9f9ef3d23mr6943677wmq.23.1673518733238; Thu, 12 Jan 2023 02:18:53 -0800 (PST) Received: from krug (87-196-72-225.net.novis.pt. [87.196.72.225]) by smtp.gmail.com with ESMTPSA id v8-20020a05600c444800b003c21ba7d7d6sm23137298wmn.44.2023.01.12.02.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 02:18:52 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input In-Reply-To: <83ilhcksk6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 Jan 2023 11:31:21 +0200") References: <83ilhcksk6.fsf@gnu.org> Date: Thu, 12 Jan 2023 10:20:27 +0000 Message-ID: <878ri8t5p0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60379 Cc: Eshel Yaron , 60379@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Date: Wed, 28 Dec 2022 14:22:17 +0200 >> From: Eshel Yaron via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> Currently, doing emacs -Q and followed by M-x eglot in the scratch >> buffer results in a prompt for major mode to manage with LSP, but the >> initial minibuffer input as well as the default value for the >> completing-read call are both set to the string "nil", which is not very >> helpful as that's not a valid input. >>=20 >> This patch tweaks the prompt a little and avoids this issue by leaving >> the minibuffer's initial input empty and making sure we don't set the >> default value to "nil" either. > > Jo=C3=A3o, are you looking into this? WDYT? No, I wasn't until now. 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: 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 mode= ? " (mapcar #'symbol-name (eglot--all-major-modes)) nil t - (symbol-name guessed-mode) nil (symbol-name guessed-mode) ni= l))) + guessed-mode-name nil guessed-mode-name nil))) ((not guessed-mode) (eglot--error "Can't guess mode to manage for `%s'" (current-b= uffer))) (t guessed-mode))) Other than that, it's fine to commit. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 03:16:12 2023 Received: (at 60379-done) by debbugs.gnu.org; 14 Jan 2023 08:16:12 +0000 Received: from localhost ([127.0.0.1]:53250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGbi0-0003OL-6x for submit@debbugs.gnu.org; Sat, 14 Jan 2023 03:16:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGbhy-0003O7-Bm for 60379-done@debbugs.gnu.org; Sat, 14 Jan 2023 03:16:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGbhs-0005s9-S8; Sat, 14 Jan 2023 03:16:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=QRnwVMce0vnlPZ6S1VkPMxPGnx5ujI/XNphkAD4eMG8=; b=ZfGng4U2URGnYf3T8ywc 5R/kU6EUKUcok5VSWdlu+/YPDU3nVgV6ptefcjTU5Hh5+sD9UoceN5S1rWNsDKJ16gEQjVbqdh+7Q 4AUt9E5SI2tM4WOjQGUZY1Qw+05vWXQG1F+TRndOU16BOGJyQpM9sy3q2GXKJBpKa1l9wvXKpSs+3 aQ65ePn262RgRZVt+P1kVb/yjrtCy5Bjzz1NVqFyay2MO897SGalMEWGSzQKZk7dvnnaUPvK3r/hu xgZ9jS+jkNhdUlIkuJV2Q2ms6M+r4SZp3XmdH0k/vqDn1+EpacChir3I2StkfcxCr4kDmoeTpqqmj TSMA9MKn62nK6g==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGbhr-0008DS-Kf; Sat, 14 Jan 2023 03:16:04 -0500 Date: Sat, 14 Jan 2023 10:16:03 +0200 Message-Id: <83edrx8rb0.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <878ri8t5p0.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Thu, 12 Jan 2023 10:20:27 +0000) Subject: Re: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input References: <83ilhcksk6.fsf@gnu.org> <878ri8t5p0.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60379-done Cc: me@eshelyaron.com, 60379-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Cc: Eshel Yaron , 60379@debbugs.gnu.org > Date: Thu, 12 Jan 2023 10:20:27 +0000 > > 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: > > 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 mode? " > (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'" (current-buffer))) > (t guessed-mode))) > > Other than that, it's fine to commit. OK, done, and closing the bug. 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. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 04:33:35 2023 Received: (at 60379-done) by debbugs.gnu.org; 14 Jan 2023 09:33:35 +0000 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 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 From: Eshel Yaron 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== To: Eli Zaretskii Subject: Re: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input In-Reply-To: <83edrx8rb0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Jan 2023 10:16:03 +0200") References: <83ilhcksk6.fsf@gnu.org> <878ri8t5p0.fsf@gmail.com> <83edrx8rb0.fsf@gnu.org> Date: Sat, 14 Jan 2023 11:33:27 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60379-done Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 60379-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 05:52:16 2023 Received: (at 60379-done) by debbugs.gnu.org; 14 Jan 2023 10:52:16 +0000 Received: from localhost ([127.0.0.1]:53448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGe92-0007lr-6f for submit@debbugs.gnu.org; Sat, 14 Jan 2023 05:52:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGe90-0007lf-DK for 60379-done@debbugs.gnu.org; Sat, 14 Jan 2023 05:52:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGe8u-00072x-Rl; Sat, 14 Jan 2023 05:52:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=6ie7aSt2Sjyt/n7SeA1Gcbr4rSexVz2enTXDZjnEv+M=; b=dB/ec90/ucHtTk+8z3BM tSzxeKhHNtwsbB4uYS6jWRo+6K0OeSYI7U3iHF8pXSIrkl9PltXFxe5WdLTzJ775ZqUQz3+QGPP+Q KRwpg5sGpsEhCyjjh/AieNklmjg3J6b4rvs1zN+OYsba33C6oN2ObHwV/YfmpCwmZd53e2uRCikj2 LfUO5J4P8WgWHapjtv3nq56+Fva5D4ztYcJh8WZ6wBzcDpSOy5P1Hof4mD2iXqRL+taipW/4K963M v4hDBFxP+GKMlwfQmq6PpNWusTLqLEDzLti1E00RhM6E8xXmedmwB1ynU2Z9Te+CXDC8kFuFob6t/ Y09Wa6VERcCDBw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGe8u-00080j-9Q; Sat, 14 Jan 2023 05:52:08 -0500 Date: Sat, 14 Jan 2023 12:52:11 +0200 Message-Id: <83zgal75ic.fsf@gnu.org> From: Eli Zaretskii To: Eshel Yaron In-Reply-To: (message from Eshel Yaron on Sat, 14 Jan 2023 11:33:27 +0200) Subject: Re: bug#60379: [PATCH] Eglot: don't use "nil" as minibuffer initial input References: <83ilhcksk6.fsf@gnu.org> <878ri8t5p0.fsf@gmail.com> <83edrx8rb0.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60379-done Cc: joaotavora@gmail.com, 60379-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Eshel Yaron > Cc: João Távora , > 60379-done@debbugs.gnu.org > Date: Sat, 14 Jan 2023 11:33:27 +0200 > > > 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. Form sent off-list. From unknown Sun Aug 17 22:12:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Feb 2023 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator