From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cLOvHWwMOWThpQAASxT56A (envelope-from ) for ; Fri, 14 Apr 2023 10:18:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uI3jHGwMOWSbhgEAG6o9tA (envelope-from ) for ; Fri, 14 Apr 2023 10:18:52 +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 112AB213EC for ; Fri, 14 Apr 2023 10:18:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnEcr-0008LE-0M; Fri, 14 Apr 2023 04:17:45 -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 1pnEcp-0008KN-CV for emacs-orgmode@gnu.org; Fri, 14 Apr 2023 04:17:43 -0400 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnEcH-0007es-Hw for emacs-orgmode@gnu.org; Fri, 14 Apr 2023 04:17:43 -0400 Received: from fw.net.yu.netyu.xyz ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 77734cb1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 14 Apr 2023 08:17:05 +0000 (UTC) References: User-agent: mu4e 1.9.22; emacs 30.0.50 To: Ruijie Yu Cc: emacs-orgmode@gnu.org Subject: Re: Major mode of orgweb/publish.sh? Date: Fri, 14 Apr 2023 16:15:04 +0800 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: , Reply-to: Ruijie Yu From: Ruijie Yu via "General discussions about Org-mode." 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=1; s=key1; d=yhetil.org; t=1681460332; a=rsa-sha256; cv=none; b=TmwSGfqpFiAmKccpICfs+BcQbqB3UWQt8tz85PzxqVzSCeGyNFQFmQ4pInGb8rOMvVlGZa pAZ7DNI19InTN4JjbS0pB5q86x5fx0iA2dw4M96WeN9u504wXZ+kfalT7oEdsOpno77545 Rtwse4mtNUQ/MB+uPbX4KP25aWk5KoyBSjFOAmuXFYgPGjE9wZc7GEnW/iDQtllZBlhxwF xgk2aRlJPVpIGh6axZiSmAm8dRm/JP+Fu6NoIjMd/KB1aIqtAwgE9OtkXWfZsVrobBV1mF DpYTpSj6i0nhVKrmGPRJ0TSiyumdE/Zog8wb9EeVvuRAlXq1eLSGr2zCwUvzQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681460332; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=DaFHImJcP/GG73f6vveAtxQC2UhqKTW0XphNPHhnz6A=; b=dwC7z0qOYE+fUyA/e1pguGRJl9QyLAdfD0tHcAjEuteuVyT850TphVAifaZrVAh94RjPEa HCY2sxbLSKPC91MYNTMhuvu46hZkiP0bLSLE9ngU8jmc8T9Cqf35cfnpkuuSRmnefRi6T7 vFVWy7vT33ZoGPHI0XyqCKkTX4ITc5peh2hsW/tBwpj+pBCn52S7aReBp4Zz6L9pNp583X N5hlrmp5z82pRk6kmGVqUgopzumL6R776w8vkOTf8UiHWmeF8OYjFbWcTWV0EUSZ6cCzlg LZXIKqjVOdmVw3W/VGdnvi83Zu9AZ/kxQ74fqQQYPVxRZYYZDe7J00y+XgnPkw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.02 X-Spam-Score: -1.02 X-Migadu-Queue-Id: 112AB213EC Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: XhiHX7AQ6dP1 --=-=-= Content-Type: text/plain Ruijie Yu writes: >> Hello, >> >> What is the expected major mode for orgweb/publish.sh? When I open it, >> I see it is in `shell-script-mode'. This is what I see in >> orgweb/publish.sh: >> >> --8<---------------cut here---------------start------------->8--- >> #!/usr/bin/env sh >> >> ":" ; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*- >> ... >> --8<---------------cut here---------------end--------------->8--- >> >> When I remove the empty line 2 and run `normal-mode', the file now opens >> in `emacs-lisp-mode'. I have a sneaking suspicion that >> `emacs-lisp-mode' is the expected major mode for this file, because >> there is also the `lexical-binding' variable declaration on the property >> line, which has no effects when the major mode is shell. > > In case I am right, I'll send a patch for this and another issue I find > for review shortly. Here attached is the patch for orgweb. The commit message describes the two issues I find regarding orgweb/publish.sh. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-publish.sh-fixed-major-mode-converted-load-into-requ.patch >From 90fd8ecc39cb279ee27e0db2f637f60c7b80af07 Mon Sep 17 00:00:00 2001 From: Ruijie Yu Date: Fri, 14 Apr 2023 16:04:27 +0800 Subject: [PATCH] * publish.sh: fixed major mode; converted load into require Major mode was erronously set to shell-script-mode because of the empty line. Converted the `load' into `require' because it allows someone working on a local repo to `eval-buffer' successfully, given that the individual installs these dependencies from GNU/NonGNU Elpa. Previously, due to the hard-coded path, `eval-buffer' would not be successful. --- publish.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/publish.sh b/publish.sh index f756ff6..b3911d2 100755 --- a/publish.sh +++ b/publish.sh @@ -1,13 +1,13 @@ #!/usr/bin/env sh - -":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*- +":" ; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*- (add-to-list 'load-path "~/org-mode/lisp/") (add-to-list 'load-path "~/org-contrib/lisp/") (require 'ox-html) (require 'ox-extra) (ox-extras-activate '(ignore-headlines)) -(load "/usr/share/emacs/site-lisp/elpa-src/htmlize-1.56/htmlize.el") +(add-to-list 'load-path "/usr/share/emacs/site-lisp/elpa-src/htmlize-1.56") +(require 'htmlize) (setq make-backup-files nil debug-on-error t) -- 2.40.0 --=-=-= Content-Type: text/plain -- Best, RY --=-=-=--