From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jorge Morais Neto Subject: Is it generally better practice to specify local variables at the first line for Org files? Date: Tue, 4 Oct 2016 17:36:45 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brWSH-00077p-KV for Emacs-orgmode@gnu.org; Tue, 04 Oct 2016 16:36:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brWSF-0008Dx-JB for Emacs-orgmode@gnu.org; Tue, 04 Oct 2016 16:36:48 -0400 Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]:34521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brWSF-0008DZ-FU for Emacs-orgmode@gnu.org; Tue, 04 Oct 2016 16:36:47 -0400 Received: by mail-qt0-x22c.google.com with SMTP id 38so98965945qte.1 for ; Tue, 04 Oct 2016 13:36:46 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: org mode Hi. In most of my Emacs files, I set any file local variables using a loca= l variables list near the end of the file. However I just realized a pitfall= . Emacs, according to its manual, only recognizes this local variables list i= f its location fulfills two criteria: 1. It starts no more than 3000 characters from the end of the file. 2. It is on the last page if the file is divided into pages. This means that if I refile some Org subtree to another Org file, and the refile target is below the local variables list (e. g. if I refile to the t= op level, so that Org chooses the end of the file) then the local variables li= st may start failing one of the criteria and thus silently stop working. Ther= e may be other problematic scenarios. Therefore it seems that, for Org files, it is good practice to avoid this pitfall by specifying any file local variables via the other method, i.e. o= n the first line. I ask for confirmation that this is a general Org Mode goo= d practice before I adopt it for all my existing Org files and any future one= s. And if this is in fact a general Org Mode good practice, I propose document= ing it in both manuals: the Emacs manual at [[info:emacs#Specifying File Variab= les]] and the Org manual somewhere. Regards --=20 =E2=80=A2 I am Brazilian. I hope my English is correct and I welcome corre= ctions. =E2=80=A2 Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM a= nd 7z. =E2=80=A2 Free (as in free speech) software for Android: https://f-droid.or= g/