From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id eDYQHmaSZGcdAgAAqHPOHw:P1 (envelope-from ) for ; Thu, 19 Dec 2024 21:38:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eDYQHmaSZGcdAgAAqHPOHw (envelope-from ) for ; Thu, 19 Dec 2024 22:38:46 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=breatheoutbreathe.in header.s=key1 header.b=OdF+4hDA; dmarc=pass (policy=none) header.from=gnu.org; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734644326; 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:dkim-signature; bh=r4Z0vY73I/K4ogl1gRPAq5D1v6hkDKmgCBFWmuf/uGY=; b=TZ5X1aRMwxDYqmSlCHpYrGRod/3+0iwzEhc3GkSw0LN6k7ujKv2F5lCC/MlOb4XSViIgeD taCZn05mBoC1j+b/NzLBZM5RSd4c7Thn3P6/AuJ4lRWZOh9YQ1ORnoSPPDfFANrzwy67rA e8ypKMX0wgJ4pGfU8jAholUtWZc706k/f70epChkh2izbtFGFGL3aAn44JLuR4dkxD4176 EPyte538fdrEAOjuWIrDAdzYBo2nn20MKQxWhBA0gJP+HXRkCRgeKGwgoqi70KYJklfjea JBdR1uIAr4BEB3c2KV54zixmES0ZwLIQNNMrlf3G0VcTnD1z20QabnMfnP/kbg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734644326; a=rsa-sha256; cv=none; b=gK175FqL+95oUI6+NxC04dslfNEEgvQ3ERrz2lTmYCZqGbt/xAi16pqqJ7r1wwkY0XEm/i HUKalVWEuWK+E6Nleq1mRcSpVZV+St+n+YfGRpWVt1dWnJlkaFCxWzKNeXgTghVaJzzxX2 ZQbYVt5vtqLVi+afd1UTc2h7tV7pB4fFVJk2UIWIjQJqhzGWE6W9ZkSe3+xypWhJCZ9baN q8pSTfd4xNwKky1+HI9JIcqXq3R4rgPoWaoQ2455mumB82EYpQN2yOVi9nKsl8C+b6mZ5a eSwPSg0cnCmCBR2vC7PZ69XEcrKm5rZEGcn9kInqrBI4AJ5AtVJkB6fpA+uzbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=breatheoutbreathe.in header.s=key1 header.b=OdF+4hDA; dmarc=pass (policy=none) header.from=gnu.org; 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" 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 22F9091505 for ; Thu, 19 Dec 2024 22:38:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOODV-0005Dc-Bc; Thu, 19 Dec 2024 16:37:57 -0500 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 1tOODS-0005Co-3g for emacs-orgmode@gnu.org; Thu, 19 Dec 2024 16:37:54 -0500 Received: from out-174.mta0.migadu.com ([2001:41d0:1004:224b::ae]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOODO-0002kf-TD for emacs-orgmode@gnu.org; Thu, 19 Dec 2024 16:37:53 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1734644267; h=from:from: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; bh=r4Z0vY73I/K4ogl1gRPAq5D1v6hkDKmgCBFWmuf/uGY=; b=OdF+4hDAtxmGf+H4Pp3i0ucmhZbwl102lH5kY4xuDuOg/+LuveEdliRoUPP+CtljsaEGQe Nqqmwmrkj7OazWXlrPyCddz0mPcU5Af5Dsg8ku8SgAc8vblX0I6tTvhEzHQ7fE7o5LuBCi uFwLeK88Lb+Z6Hoev7e7wJw2pFhxxes= To: emacs-orgmode@gnu.org Cc: bohonghuang@qq.com, Max Nikulin Subject: Re: Ignore Local Variables list in source blocks In-Reply-To: (Max Nikulin's message of "Thu, 19 Dec 2024 00:16:05 +0700") References: <87ldwdeih6.fsf@breatheoutbreathe.in> Date: Thu, 19 Dec 2024 13:37:43 -0800 Message-ID: <87zfkr4amw.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:41d0:1004:224b::ae; envelope-from=joseph@breatheoutbreathe.in; helo=out-174.mta0.migadu.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Joseph Turner From: Joseph Turner 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.72 X-Spam-Score: -6.72 X-Migadu-Queue-Id: 22F9091505 X-TUID: bf4zS4tYdES3 Max Nikulin writes: > On 18/12/2024 11:13, Joseph Turner wrote: >> Is there a way to make Emacs ignore Local Variables lists which >> appear >> inside of source blocks? >> For example, is there a way to include the following content in an >> Org >> file without Emacs attempting to locally set foo to bar? >> #+BEGIN_EXAMPLE >> # Local Variables: >> # foo: 'bar >> # End: >> #+END_EXAMPLE > > Have you tried to create a comment block below? > > #+begin_comment > Deactivate local variables above in the example block: > Local Variables: > End: > #+end_comment In my testing, in order to make Emacs ignore the `foo: bar' binding, the empty Local Variables list actually needs to go first. > If it is not enough (and breaking the example into 2 parts is not > acceptable) then ask Emacs developers. I do not think, Org should (and > has a chance) to deal with this feature Yes, I agree that Org should not deal with this feature. Splitting the example into two parts results in "File mode specification error: (user-error Local variables entry is missing the prefix) " upon opening the file. You can test with this: --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC org # Local Variables: #+END_SRC #+BEGIN_SRC org # org-srs-review-new-items-per-day: 30 # org-srs-review-max-reviews-per-day: 100 # End: #+END_SRC --8<---------------cut here---------------end--------------->8--- > (info "(emacs) Specifying File Variables") By the way, is there a built-in command to copy that (info ...) sexp when viewing that info page? > Thanks, I just re-read that page more carefully, and I see this: If some unrelated text might look to Emacs as a local variables list, you can countermand that by inserting a form-feed character (a page delimiter, *note Pages::) after that text. Emacs only looks for file-local variables in the last page of a file, after the last page delimiter. In the org-srs README.org, I think we can just throw a at the bottom of the file (or before a Local Variables list which we do want to use). Problem solved! Thank you, Max! Joseph