From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 ULuDG3CDZWcXxgAA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Dec 2024 14:47:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id ULuDG3CDZWcXxgAA62LTzQ (envelope-from ) for ; Fri, 20 Dec 2024 15:47:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; none 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 5EC7992CB3 for ; Fri, 20 Dec 2024 15:47:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOeGh-0008N4-DH; Fri, 20 Dec 2024 09:46:19 -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 1tOeGd-0008Me-QZ for emacs-orgmode@gnu.org; Fri, 20 Dec 2024 09:46:15 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOeGY-0003lw-4Q for emacs-orgmode@gnu.org; Fri, 20 Dec 2024 09:46:15 -0500 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-3022484d4e4so22147771fa.1 for ; Fri, 20 Dec 2024 06:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734705965; x=1735310765; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=zmu24SmHH8Lc+j+rAXDGimdsXk/G9bTcdTZ+lnbqZw4=; b=AltYYR90knRDqmym4VMIbEBiEXzoRlBB63L7s3sf0uVLe0r2X+jWHVEcTFiXnkCq8A +8Mdk3PAXvcxm95BnotfvuAO3tHNmj8iddJQqVfRL/USl8+KYXnMjFPFECi6xyD8Ve7O J5XtOuAZCO85krj8eEqTQ/dIn7v75d1Q7bnuzuA64V7ij3M4PxBAgqu5ZQ9H7gmUGFKF lOj9Ei1eVoJioYMc1vNVc2Xdpgr5xtmQSXzrYZHhG2qYCVXZhnm3nJpmeNmNIhSS6JnN ru/oi4Yb/SKBO5bz0jgGtT1VcfKi2SBAMDoDxXeuRYZjif6mitQv7aruwsw0xcEj+NZp g75A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734705965; x=1735310765; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zmu24SmHH8Lc+j+rAXDGimdsXk/G9bTcdTZ+lnbqZw4=; b=aXXWAk9oaFFxhPCaA9dKOzj/N3EBrYkpcbQvPdiQQMZneWaGOQ1DUMr4JIZqRkD7F2 m1Xl/xULQnaiYXjoCxZ6K/6vpGWNMla5yFKGSzSEbZfDwm8Mnt5gDqNbVzcl4IM7WKJO NQ0aNAD8k60B4kVkm1s+/ILNlXCx36HwuUt0VWIXXxGnLUm+v083NV4ulfIcl6dXdCAi h0ATDXhCTjDxXxzmnB5KertNdacyqTCAOlXRibOzZwmFuJFnUWeXVseeNFhyUV/04e0Q NcXIuz6C65Jm7dKuhFwp+O1tsnihUvG7QXY0g5gt+xVoglq6wSTDYkru/7Vq7U1v392A WntA== X-Forwarded-Encrypted: i=1; AJvYcCXIn7VfEohO3vn3OMmt7xYMGSogDWC2gn0gX8B3iP9JHdQPznfb09hePsz2LhOkzmgHWNzQDvHWld83Y0Ew@gnu.org X-Gm-Message-State: AOJu0YwCtq3OBcGCVAMh+Sf8Y4slTj8FDNWtoWXhjlyZFn8Q+OOePjAy RcIIAFPdZkY2QolgD+LVKDGnBK3uT/PDdioCkxcdeL8z7eClevHXW8k2vw== X-Gm-Gg: ASbGncuE0tnWCrgC5bywr4nYVa2Eg+dpWUKIxa91n+Ajv16VpAZarGrO2gj2uxODqC1 QgpEOAR9JILv2j5AEip+/jGQNm2S4MzFpwwEYk2znxONHJao8fZ11NQmvVSaO/8ZgFYS2AV0MaE S+fohCRlb2IpztnQmHcInNYzWYBszXtJ9hMd9P6EHcO/81/YrKUIs4XAxAZztJZzomtmkchbzpk louK+RdsoP2cvvWau0jme3fktTtko5CsT9g1fwCDgTEq/Xoeci0HpVKQoYld39Kb+0IF486ny5R 5+0u X-Google-Smtp-Source: AGHT+IHi7yWD50hPwQxYl/Z6EVxlT33NdmopDcnKWrGscGkmYBiCzKUqew8yEolTeNMlqugzbF6Gug== X-Received: by 2002:a2e:be1f:0:b0:302:2bd8:2662 with SMTP id 38308e7fff4ca-304685f5977mr9589461fa.27.1734705964756; Fri, 20 Dec 2024 06:46:04 -0800 (PST) Received: from [192.168.1.149] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id 38308e7fff4ca-3045ad99d1esm5240191fa.38.2024.12.20.06.46.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2024 06:46:04 -0800 (PST) Message-ID: Date: Fri, 20 Dec 2024 21:46:03 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Ignore Local Variables list in source blocks To: Joseph Turner , emacs-orgmode@gnu.org Cc: bohonghuang@qq.com References: <87ldwdeih6.fsf@breatheoutbreathe.in> <87zfkr4amw.fsf@breatheoutbreathe.in> Content-Language: en-US, ru-RU From: Max Nikulin Mail-Followup-To: Joseph Turner , emacs-orgmode@gnu.org, bohonghuang@qq.com In-Reply-To: <87zfkr4amw.fsf@breatheoutbreathe.in> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=manikulin@gmail.com; helo=mail-lj1-x235.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=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: , 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: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: 5EC7992CB3 X-TUID: voY7IZUyWj8g On 20/12/2024 04:37, Joseph Turner wrote: > Max Nikulin writes: >> 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. Then it is more fragile in the case of complex documents, but still may be viable for simple ones with single example. > 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. I expected that the code looking up for local variables is reasonably shy. > You can test with this: > #+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 Unfortunately : # Local Variables: #+BEGIN_EXAMPLE # org-srs-review-new-items-per-day: 30 # org-srs-review-max-reviews-per-day: 100 # End: #+END_EXAMPLE Causes a warning as well: "Local variables list is not properly terminated" >> (info "(emacs) Specifying File Variables") > > By the way, is there a built-in command to copy that (info ...) sexp > when viewing that info page? A short answer "C-0 c" or "C-0 w". Maybe I will send a longer one, dropping bohonghuang from Cc. >> > > 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. I do not like non-printable characters. E.g. Thunderbird rendered your message with confusingly large vertical space in the middle. Outside of Emacs, kludges like ";;; org.el ends here" are not common. I would not be surprised by some issues on attempt to edit the README.org file on the GitHub site directly.