From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: Syntax highlighting for eshell scripts? Date: Wed, 4 Sep 2024 13:29:11 -0700 Message-ID: <6950a5f1-45c7-4553-8382-a5959626c006@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26801"; mail-complaints-to="usenet@ciao.gmane.io" To: the_wurfkreuz , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 04 22:30:00 2024 Return-path: Envelope-to: ged-emacs-devel@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 1slwda-0006q9-W4 for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Sep 2024 22:29:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slwcw-0000o8-UD; Wed, 04 Sep 2024 16:29:18 -0400 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 1slwcv-0000hI-6e for emacs-devel@gnu.org; Wed, 04 Sep 2024 16:29:17 -0400 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slwct-0001Qj-3v for emacs-devel@gnu.org; Wed, 04 Sep 2024 16:29:16 -0400 Original-Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7cd8d2731d1so49213a12.3 for ; Wed, 04 Sep 2024 13:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725481753; x=1726086553; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=BJcEPn9WyqRGZTxHdKXY2R2dEBAIn0QST/yl/bVrQwc=; b=WZY9TG86ko4ZwhU/F5lFrC0q+lSAgJaBy24665hyl60x6zMOMefD1RmsGHMeK9vrUj Ol8VQAVH4fRr3lxlpKbqz8Y7oHraK1wAPfaVW79YpunAcQRY9gXhxeE8umJz6ABZz4Da 0SjDAzdnZsyfq+4HeV/RGHj1X7E2rjtvcqwMY2CvxeGVcsERMKI95n0hs3gJ+3ZWKQYs Eq3uuT2L3a5NLBwuaYMlb9rEiWqLtt8ZOQPfH0QAHHcLQbV2FTlbs7UiapU1CIGJfZX+ Ng+IfDDq0ZO8KV9OB6jy5r2Wp7LZ3dE/jA+2KNpfkw2nJaJrt0JrzHDw4nkbEoF0xadI wtXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725481753; x=1726086553; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BJcEPn9WyqRGZTxHdKXY2R2dEBAIn0QST/yl/bVrQwc=; b=w6sCQg+46NkuRLgqVVXJvDU6dvfNHz6CxiHR5gN83Pe88yO2d7FjA64W7636l58bye oGb+AjfvDUZpIMAqoRrN1YbSprnESSl9xWaQvmsv4fvnpd1b1NUjcXaxEBO00EfFbSVB FR9zedm7VMsFXwjIh1zC7vVvmSyIdsDqAvoOzK7TxK4rjX59Gw4k8hqbXvp9QXzTM5kh 2rKJKz/VpvJ7WNbOVAbHGwQQYNqladfa2GuAQRckXN2asum32WiaHtyFWSV7pY7aKU5j 23H3/TuWiXjuEv92hteKvrBIXC1tBMtqjQ079iZ626nDZ57ggWpdwNiEEfxUXNNnAFh9 uhRQ== X-Forwarded-Encrypted: i=1; AJvYcCWdN3Ujqds151ryu63OTmPwOorTSVJwbha2SM88QIm0BQl6SUoWBASnILdt9Z2YYhjL8oG4Y9ViyUeqNw==@gnu.org X-Gm-Message-State: AOJu0Yw8PR86kBcBUtF+XwjpPRY5QgT5RCY21i9DktbyHTRBp/dLXMwP ia7fb+DPimuc6SaXWei8jd10cTMIqxTP3fA59UxFxjS6PhLWJu0g X-Google-Smtp-Source: AGHT+IH1RZiroMsLgIMqK8zK/KuOcv2zYNok01XL1w1oAIbw40hcgxYGIObRdlaFexRiT3+vyQ6Isw== X-Received: by 2002:a05:6a21:6b0c:b0:1c2:8d33:af69 with SMTP id adf61e73a8af0-1cece5d1678mr16665507637.41.1725481753103; Wed, 04 Sep 2024 13:29:13 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-71783bf2638sm966144b3a.128.2024.09.04.13.29.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Sep 2024 13:29:12 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x536.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323370 Archived-At: On 8/24/2024 11:46 PM, the_wurfkreuz wrote: > Considering new recent additions to eshell syntax and the ability to run > eshell scripts using the batch mode, maybe it makes sense to introduce > some sort of a highlighting mode for writing eshell as a scripting language? Yeah, this would be a nice feature (bonus if it fontifies the command entered at an interpreter prompt too). I wonder if it would be feasible to use the existing Eshell parser to help with fontification too; unlike a lot of other major modes, Eshell already has a full parser for its language in Emacs. That might necessitate a big refactor of the Eshell parser (so that it more cleanly splits out parsing and codegen), but that could also be useful for improving some of the annoying corner cases in the existing grammar.