From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19812: 24.4; suggest `shell-mode' not interactive Date: Wed, 28 Aug 2019 01:13:25 +0300 Message-ID: <874l22w91a.fsf@mail.linkov.net> References: <87bnl5qc50.fsf@blah.blah> <87v9vfmjke.fsf@mouse.gnus.org> <83tvayemrf.fsf@gnu.org> <87v9uod7dy.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="264535"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: user42_kevin@yahoo.com.au, 19812@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 28 00:17:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1i2jmE-0016fW-64 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Aug 2019 00:17:22 +0200 Original-Received: from localhost ([::1]:59156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2jmC-0003SN-I9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Aug 2019 18:17:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41196) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2jlv-0003S5-HE for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2019 18:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2jlu-0001ZT-1L for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2019 18:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2jlt-0001ZM-Ua for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2019 18:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i2jlt-0002er-MR for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2019 18:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2019 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19812 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 19812-submit@debbugs.gnu.org id=B19812.156694418310149 (code B ref 19812); Tue, 27 Aug 2019 22:17:01 +0000 Original-Received: (at 19812) by debbugs.gnu.org; 27 Aug 2019 22:16:23 +0000 Original-Received: from localhost ([127.0.0.1]:49538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2jlF-0002dc-JO for submit@debbugs.gnu.org; Tue, 27 Aug 2019 18:16:23 -0400 Original-Received: from bonobo.birch.relay.mailchannels.net ([23.83.209.22]:1478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2jlC-0002dN-UD for 19812@debbugs.gnu.org; Tue, 27 Aug 2019 18:16:20 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B785B2C2EB0; Tue, 27 Aug 2019 22:16:17 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a50.g.dreamhost.com (100-96-88-96.trex.outbound.svc.cluster.local [100.96.88.96]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4620C2C2FF0; Tue, 27 Aug 2019 22:16:17 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a50.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Tue, 27 Aug 2019 22:16:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Soft-Language: 5bd6d7230307cc48_1566944177547_2312147548 X-MC-Loop-Signature: 1566944177547:1483905431 X-MC-Ingress-Time: 1566944177547 Original-Received: from pdx1-sub0-mail-a50.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a50.g.dreamhost.com (Postfix) with ESMTP id 90A817F4D4; Tue, 27 Aug 2019 15:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=9z6lrmGiYJRE6JlMqtY8BqTcEvE=; b= As/rP3vbrCiqWEZk0zRGIgH9CvzE6jD4Yqa463Lwosfj5msqOMAUkMJ+yOwt+lfM QMuI09xD/rAy0lBtV2kaPS5FA4eB0dY3KiEB7mdf0cT2N8PKNyputBHm1H/yLELj IYaX/QTHbcuWOhFzJb+bl/Mr9DVGlvsQT49Q0PMlkG8= Original-Received: from mail.jurta.org (m91-129-108-240.cust.tele2.ee [91.129.108.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a50.g.dreamhost.com (Postfix) with ESMTPSA id 739177F49F; Tue, 27 Aug 2019 15:16:09 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a50 In-Reply-To: <87v9uod7dy.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 22 Aug 2019 17:59:05 -0700") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudehledgtdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtkedrvdegtdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdekrddvgedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesmhhouhhsvgdrghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165985 Archived-At: > If I read the comments correctly, nobody had a use case for using `M-x > shell-mode'. It was proposed that it could possibly be useful for > working in log files and the like, but that shell-mode doesn't currently > actually support that, so I went ahead and applied the patch to disable > the interactive use of the mode. I confirm that `M-x shell-mode' can't be used in saved log files. I tried: (defvar shell-log-font-lock-keywords ;; `shell-prompt-pattern' can't be used: it finds too many false matches '(("^\\([^#$%>\12]*@[^#$%>\12]*:[^#$%>\12]*[#$%>] *\\)\\(.*\\)$" (1 'comint-highlight-prompt) (2 'comint-highlight-input))) "Shell prompts to highlight in Shell Log mode.") (define-derived-mode shell-log-mode shell-mode "Shell-Log" "Font-lock for shell logs." (put 'shell-log-mode 'mode-class nil) (setq-local font-lock-defaults '(shell-log-font-lock-keywords t))) (add-to-list 'auto-mode-alist '("\\.log\\'" . shell-log-mode)) but `shell-prompt-pattern' matches too many false positives, and replacing it with a customized regexp is too ad-hoc and unreliable.