From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 23 12:25:10 2021 Received: (at submit) by debbugs.gnu.org; 23 Sep 2021 16:25:10 +0000 Received: from localhost ([127.0.0.1]:55671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTRX4-0004HP-60 for submit@debbugs.gnu.org; Thu, 23 Sep 2021 12:25:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:57296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTRX2-0004HG-Kx for submit@debbugs.gnu.org; Thu, 23 Sep 2021 12:25:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTRX2-0007z3-BB for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 12:25:08 -0400 Received: from kamnitnik.top ([2001:19f0:5001:bf2:5400:2ff:fee0:2626]:50292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTRWz-0000Nm-G6 for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 12:25:07 -0400 Received: from localhost (unknown [IPv6:2a00:ee2:e04:9300:e18:5d33:4bd1:d3a4]) by kamnitnik.top (Postfix) with ESMTPSA id 070189C704 for ; Thu, 23 Sep 2021 16:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1632414302; bh=KQpje+5zAure8fYsTvXmMcGoHXcp8UTxc92BBP3qDEA=; h=From:To:Subject:Date:From; b=ugx7p4/S3p+671xwNm38qozy2X96uEVksvejJG52yPpb7klZBKltXkJKi2VUvwK5u bujgb14uoBX/oRskOs4kyv1I4Govp1x5tvEPooTdW8jqyfrRuDsZ97OG4d9ZDcALPs LVjauO7lJAhykjhDv8/hBjuUr8xKy/cwXjjmi6xQicjs8OdDMd0nH0DOaG5j3mPFHD 7/iHmD0tAepG9Fw5Hsn6Z3LhnHfrTimyjw5qBUJ+V3ZWAPwVH55Q+p7pkZuaKd2hi0 fHQrLO10smxpqOJRLK4DXYpsmqDsjHh6KZV2AfRwUNDXCkioVwqVjsisWIb6cMhd7U R7dKr0+bYDr1A== From: miha@kamnitnik.top To: bug-gnu-emacs@gnu.org Subject: 27.2; [PATCH] Fix problems with 'C-c C-n' in sh-script-mode Date: Thu, 23 Sep 2021 18:28:21 +0200 Message-ID: <8735pv8dei.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:19f0:5001:bf2:5400:2ff:fee0:2626; envelope-from=miha@kamnitnik.top; helo=kamnitnik.top X-Spam_score_int: 25 X-Spam_score: 2.5 X-Spam_bar: ++ X-Spam_report: (2.5 / 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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.997, GAPPY_SUBJECT=0.1, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Scenario: we are editing a buffer in 'shell-script-mode' and a *shell* buffer doesn't exist yet. In Emacs 27, pressing 'C-c C-n' creates a shell buffer and displays it in a separate window by default. This is less annoying than displaying it in the selected window, which is what Emacs 28 currentl [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=miha%40kamnitnik.top; ip=209.51.188.17; r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] 0.1 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t 0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 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: 0.2 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Scenario: we are editing a buffer in 'shell-script-mode' and a *shell* buffer doesn't exist yet. In Emacs 27, pressing 'C-c C-n' creates a shell buffer and displays it in a separate window by default. This is less annoying than displaying it in the selected window, which is what Emacs 28 currently does by default, so this patch reverts that. It also fixes a subtle bug, where a local variable is set in an incorrect buffer. Best regards. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-problems-with-C-c-C-n-in-sh-script-mode.patch Content-Transfer-Encoding: quoted-printable From=2084cdc5fd707baa2537cc57a77cec4ea537c4f308 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miha=3D20Rihtar=3DC5=3DA1i=3DC4=3D8D?=3D Date: Thu, 23 Sep 2021 18:03:24 +0200 Subject: [PATCH] Fix problems with 'C-c C-n' in sh-script-mode * lisp/progmodes/sh-script.el (sh-shell-process): If a *shell* buffer doesn't exist, 'C-c C-n' creates one and displays it. This patch prevents it from being displayed in the selected window. Additionally, it ensures that the local `sh-shell-process' variable is set in the correct buffer. =2D-- lisp/progmodes/sh-script.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index cccd70f06c..3b6774aa14 100644 =2D-- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1396,8 +1396,15 @@ sh-shell-process (or found (and force (get-buffer-process =2D (let ((explicit-shell-file-name sh-shell-file)) =2D (shell))))))))) + (let ((explicit-shell-file-name sh-shell-file) + (display-buffer-overriding-action + '(nil . ((inhibit-same-window . t))))) + ;; We must prevent this `(shell)' call from + ;; switching buffers, so that the variable + ;; `sh-shell-process' is set locally in the + ;; correct buffer. + (save-current-buffer + (shell)))))))))) =20 (defun sh-show-shell () "Pop the shell interaction buffer." =2D-=20 2.33.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmFMqyUTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP6AHD/4sYmyVL9nTKvrCao7DxrQH7KLDTRUd gLEkp2ev7eCexuTFszutgAYGKBQZG/WQx1cZMBI0TBZQe8hsClBpVB1J9Uil7STh fmFCKvjzil2V2Cmyfl3BoUncUvHdwlfvINIaz95Km6sLTfGObRf8BvSYj9TC5S5C FfeiRPQcW76xCVSEHYZHFtmIN/u0VSaelI7Cv/w6Jeeas/qBiRhS6vbKvXmPM5s6 7rJf+4F9j+M5QSFpMEjLReIKFKfanepKg+XEjTukQR0v38Y5QNg2Sd2SzgTKr2sJ Z0O9ysnPFz+OvPoMXQaVRoa2XzTv+tjPEKbtVw6brI8X/4Ja0CXb7+7XsY54sOOD ENC6v/4wqTYZa0C3kpKcS71umyY+iFipZWdPpNTTmu/v0uFNkWoTaAA3xJZ0Q5LI 85lOCLWN5MGHpAAUpiymdHFZ1OnG4R8qd6VeepxXWxA9wOp+3KDvigV8v8v2VL3g uW7dHEtaXOn4+8ezoIz7XgAdZm221ebAL6/9zDXSeElRDHmx8q3u3YoGCIMIYAT8 O71wm5mILw/av/07ertBUD0cIyynD44gOHzJX7WuF3hFV5cgGJMS5Kdnm5KSkzNX 6v1Qjcury7A5kXg+RyLhjAL/BbXFHlruc8DODibZlSyyMskftH6oyh+U9DJTEwEU F7hTHSAqjx9KFg== =ZeGz -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 23 17:19:08 2021 Received: (at 50765) by debbugs.gnu.org; 23 Sep 2021 21:19:09 +0000 Received: from localhost ([127.0.0.1]:56035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTW7Y-0004QZ-Mx for submit@debbugs.gnu.org; Thu, 23 Sep 2021 17:19:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTW7W-0004Pw-Mo for 50765@debbugs.gnu.org; Thu, 23 Sep 2021 17:19:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7GAWC58u1poPm4tAi5KEqV3zlbJeCkdgilQbJgPps54=; b=P14+n7oIl06pttFoFHjsQLGdlN kWpmanLX7D0ZKXXHCMs8myNNDf9H4neMuNN9NGXt7uBGEuK/a+FPrHHctYlSaoyAZSX6izcnQB81Y /ZAxhHbx39pxm/dYcAA+9geos0UW2F32SeUD0Dgwx7cnEf7zjlG63SELm02H0JLN0h3U=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTW7N-0006z6-5E; Thu, 23 Sep 2021 23:19:00 +0200 From: Lars Ingebrigtsen To: miha@kamnitnik.top Subject: Re: bug#50765: 27.2; [PATCH] Fix problems with 'C-c C-n' in sh-script-mode References: <8735pv8dei.fsf@miha-pc> X-Now-Playing: Magnus Granberg & Skogen's _Let Pass My Weary Guiltless Ghost_: "Let Pass My Weary Guiltless Ghost" Date: Thu, 23 Sep 2021 23:18:56 +0200 In-Reply-To: <8735pv8dei.fsf@miha-pc> (miha@kamnitnik.top's message of "Thu, 23 Sep 2021 18:28:21 +0200") Message-ID: <877df7xa67.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: miha@kamnitnik.top writes: > In Emacs 27, pressing 'C-c C-n' creates a shell buffer and displays it > in a separate window by default. This is less annoying than displaying > it in the selected window, which is what Emacs 28 cu [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 2.0 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 50765 Cc: 50765@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.2 (-) miha@kamnitnik.top writes: > In Emacs 27, pressing 'C-c C-n' creates a shell buffer and displays it > in a separate window by default. This is less annoying than displaying > it in the selected window, which is what Emacs 28 currently does by > default, so this patch reverts that. Makes sense to me, so I've pushed it to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 23 17:19:13 2021 Received: (at control) by debbugs.gnu.org; 23 Sep 2021 21:19:13 +0000 Received: from localhost ([127.0.0.1]:56038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTW7c-0004Qs-UE for submit@debbugs.gnu.org; Thu, 23 Sep 2021 17:19:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTW7c-0004QS-5d for control@debbugs.gnu.org; Thu, 23 Sep 2021 17:19:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=u0Xe7PZjTorgT30LiyLifQ/13J6JdmtXUtqYIRlUVZU=; b=axfJvitDbDSIwpbiUPYYr9Qja0 huu/3CgkNDC9Xw75dfBUDn5GzJ35ToaI+Zoqzn56ZLuTjUYAiFYv5f4009TIZ0LtNITpKHD0FJvBG VmmccAD4XNGcmJHLU7BWuN1IeKzpXY7GWln7LFw336jJV1ZkLrsRjG9nWKtCPrCFPtk0=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTW7U-0006zJ-4o for control@debbugs.gnu.org; Thu, 23 Sep 2021 23:19:06 +0200 Date: Thu, 23 Sep 2021 23:19:03 +0200 Message-Id: <875yurxa60.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50765 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 50765 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 50765 28.1 quit From unknown Wed Sep 10 13:55:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Oct 2021 11:24:08 +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