From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.bugs Subject: bug#9961: Subject: 24.0.91; shell prompt doubled Date: Tue, 25 Aug 2020 14:26:37 +0100 Message-ID: <87r1run9f6.fsf@yandex.com> References: <4EB55A72.4050905@online.de> <87mu2i98ce.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4883"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: 9961@debbugs.gnu.org Cancel-Lock: sha1:B2UHkQHzUTr2tikbYCG+P5gHxzs= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 15:31:10 2020 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 1kAZ2c-0001Bt-A6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 15:31:10 +0200 Original-Received: from localhost ([::1]:54290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAZ2b-00059e-A7 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 09:31:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAZ2U-00059M-Dk for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAZ2U-0005Ph-4h for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAZ2U-0006KF-0a for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:31:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <4EB55A72.4050905@online.de> Resent-From: Colin Baxter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 13:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9961 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159836221121388 (code B ref -1); Tue, 25 Aug 2020 13:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Aug 2020 13:30:11 +0000 Original-Received: from localhost ([127.0.0.1]:60756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZ1f-0005Ya-0i for submit@debbugs.gnu.org; Tue, 25 Aug 2020 09:30:11 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:32796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZ1c-0005Uz-Kc for submit@debbugs.gnu.org; Tue, 25 Aug 2020 09:30:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAZ1c-0004Tb-EN for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:30:08 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:35808 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAZ1a-00056f-Kq for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:30:08 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kAZ1V-000AQm-UC for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 15:30:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T Face: iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeBAMAAAAodabAAAAAB3RJTUUH1wQdAAY04/L8hgAA AAlwSFlzAAAewQAAHsEBw2lUUwAAAARnQU1BAACxjwv8YQUAAAASUExURc7OzpwAAAAAAP////8A AGNj/2aqqTQAAAA8SURBVHjaYzA2NnEBAmdj01D8wNgYpM7F2JiBgYFREAgEGJiU8AMGBpA6QaCG UVtGbRm1ZdSWUVsGjS0Aq20lJnMawnkAAAAASUVORK5CYII= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/25 09:30:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:186283 Archived-At: >>>>> Lars Ingebrigtsen writes: > (I think I sent this one prematurely once already; sorry.) Glenn > Morris writes: >> This issue occurs since at least Emacs 21.1. If you have a >> non-empty ~/.emacs_bash file, eg one that contains just: >> >> #comment >> >> and do M-x shell with the bash shell, then you get an extra N >> copies of your prompt, as the N lines of ~/.emacs_bash are fed to >> the shell by comint-exec. > This bug is still present in Emacs 28, although it looks a bit > different now: > I poked around to see whether there's any easy way to fix this: > Like a way to say to comint "send this to the process, but discard > the output", but there doesn't seem to be? This works for me. Create a ~/.emacs_bash as: # -*- mode: sh; -*- # echo "" printf '\r\n%.0s' {1..50} ## This clears screen and puts prompt at bottom There will only be one prompt. For csh, touch the file ~/.emacs_csh but keep empty. Best wishes, Colin Baxter.