From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eLWkKDhXI2RAsgAASxT56A (envelope-from ) for ; Tue, 28 Mar 2023 23:08:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KCVdKDhXI2TcQAAAauVa8A (envelope-from ) for ; Tue, 28 Mar 2023 23:08:08 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4FDC31755D for ; Tue, 28 Mar 2023 23:08:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phGX8-0001lt-IG; Tue, 28 Mar 2023 17:07:10 -0400 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 1phGX5-0001lk-Gd for Emacs-orgmode@gnu.org; Tue, 28 Mar 2023 17:07:09 -0400 Received: from sender4-op-o12.zoho.com ([136.143.188.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phGX3-000462-Vi for Emacs-orgmode@gnu.org; Tue, 28 Mar 2023 17:07:07 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1680037622; cv=none; d=zohomail.com; s=zohoarc; b=G5MCYNNgPhAZs3mIhMLkA81rs7F9sRY7vGndxxh6jBpefnXiOZNOhMTXyc0/XVn3jl8zmuqzztTboD+b10qGrt2LZPSd1pKqZDM4SXbE51GgI7NptZ4OHc8V8PDXL/diR6C1rbwVhAmsst0ckiqZkhui6lrKdCZ7m//poQZ037M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680037622; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=XbK1XUONLz4IJYI8qrLrrHtT7WbDjWyQkDX+126eb50=; b=OENuLLAb5eKvnNN8UoPlnY2oFHtRp/bymlyBuJ3UYc27z4xYPljgf8C9UKMppq6T21+t3rUAM6WjqwZlBdynmYECDFzsqluJyhAdG0pos1hONp7v/MRr5fCjVh1wyikMqgq9KQG7/Hy2TJwpJUXBsI9fD1lRxu3Ir5DLxrxTXG0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1680037622; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=XbK1XUONLz4IJYI8qrLrrHtT7WbDjWyQkDX+126eb50=; b=M4CbKRmSLKD1FMbPuNy+V+6EC0EtqaJz1GnACxeh4BKi1r5bW9hjEMggcSOTt13A 7xIqyeB/5bLvbuCwECLYHAfpGBKIBhWiks8QL/pJqacrwbudPdMUqeava4xxjFQWQ/9 /ooedbNBJlvFo+b6n/TLIGmeZyipzRXv/S2A0h14= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1680037620195221.59464091356972; Tue, 28 Mar 2023 14:07:00 -0700 (PDT) Date: Tue, 28 Mar 2023 17:07:00 -0400 From: Matt To: "Derek Chen-Becker" Cc: "Emacs-orgmode" Message-ID: <1872a0ba9d3.ecc1ea6b412263.1693292189426769869@excalamus.com> In-Reply-To: References: Subject: Re: Font lock for org-babel shell scripts? MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.12; envelope-from=matt@excalamus.com; helo=sender4-op-o12.zoho.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=2; s=key1; d=yhetil.org; t=1680037688; a=rsa-sha256; cv=pass; b=MDg+lim1S5P2E56lBOyXe4Cp+9GisPTFTVjDtN7qtQCDnIN18RAnF0q0m2nd8uo06YKvNo s5jzyPQrV6OX0n4v1QLQIlt7h1vWYSeHyNeUQc+S2oe7ptqddP4xyVUuOFSz7OvGFB4/Ap WYdhqGKmnf2Xn+vXjy/PcdC4Et7KkwCza4yXBBqNpih3d4KX+DeJfXZlJqpMMRkhHT9rlM X5dYqpZC1mbnbp4nA7Ac4nFvSl68s6sjm5TXm8VNMFtFjl5rzgbXR4yH3vrc4BE7/rPC5O Z809DHTJZxaSHEGHDoljuQJGHbAZgjhy2nqG/47ErSwW+GK1o3/9MKBKbRS+pA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=M4CbKRmS; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; arc=pass ("zohomail.com:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680037688; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XbK1XUONLz4IJYI8qrLrrHtT7WbDjWyQkDX+126eb50=; b=dKFHs9j1BrC4S20CmjWIJBFfbUHN6VXIkeEJUxVZ1CmPlQNEWTWuFwkbdDL11hPUCz0fz9 rEm+odTKWG3MfQxLVeKYbdQcIfy78G2XHxV5uIBcQT30POE52w+jyCAHMLDgDDsp4VwIdO WWlm/mGMRT+KNCPO3jWYuBEPnUe0Sq+SzHQ7V1jl4ri+co5VV4NbphZf1lAqLOq1pdNm5y lnTbUA9iJ4jKtkgooZCIyeRe23ur2L2FQJWuj4EOfij48u274qcMapap225vju9iTA1/31 zVE7X1T5BoI7glNFhiNOXaMLnCrSU0Tm1MPA7e3rOmf/cOLTdFJHREb6FIxqOQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=M4CbKRmS; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; arc=pass ("zohomail.com:s=zohoarc:i=1") X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.44 X-Spam-Score: -4.44 X-Migadu-Queue-Id: 4FDC31755D X-TUID: f+oConF/L57d ---- On Tue, 28 Mar 2023 13:24:39 -0400 Derek Chen-Becker wrote --- > I'm trying to figure out whether there's a bug or just a misconfiguration on my end with font lock for org-babel shell source blocks. If I run emacs 28.2 (with -q) and open the following org file, I can evaluate both source blocks but only the "bash" block has syntax highlighting. I've confirmed that opening a zsh script (e.g. with a zsh shebang) highlights correctly. If this list isn't the right place to ask about this issue, does someone know where I could look for help? This is the right place to ask. And thanks for asking! I'm able to reproduce it. I'm not familiar with how Org handles the font lock. However, I notice that calling C-c ' (`org-edit-special') results in the error: No such language mode: zsh-mode I suspect that without a language mode, Org has no way to know how to color the block. As a quick work around, you can define zsh-mode as shell-script-mode to get coloring: (defalias 'zsh-mode 'shell-script-mode)