From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KJGkLlTPx2OrOAEAbAwnHQ (envelope-from ) for ; Wed, 18 Jan 2023 11:52:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2DKoLlTPx2OjdAEA9RJhRA (envelope-from ) for ; Wed, 18 Jan 2023 11:52:04 +0100 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 56C782A48A for ; Wed, 18 Jan 2023 11:52:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pI62V-0003TE-Kv; Wed, 18 Jan 2023 05:51:31 -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 1pI62T-0003Qx-4Q for emacs-orgmode@gnu.org; Wed, 18 Jan 2023 05:51:29 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pI62Q-0002uo-B9 for emacs-orgmode@gnu.org; Wed, 18 Jan 2023 05:51:28 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B15492404DA for ; Wed, 18 Jan 2023 11:51:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674039080; bh=OYcIv3299qJl520Y5Inv6aj2AyMLZFNNVLR243djwWs=; h=From:To:Cc:Subject:Date:From; b=OAyFiL4UohWE1mWF2LczB/5qgfvGsHN9OpCqXbbmUgZWkGmETw8TuloYUnJqLgGsq R8I4Hl/mppTx3fkdsRsz9GrrMaO/OyrKOy9hGS7JUbwXDdMAL/gLu/8pZPpOACwuvO zqA2qIBiQWDavUbiaLt5unWgG2xJkzCbTHe/kVxyMAhrnlqIry+FBLvKG98rtwGKXL MKTMPv6DoilYDe7a3gDilmMMmmCpkzi5oTlkKR0EKYE0abFURsVTK0yJN5dXs/c/AV ZGY69OfeEtzbInvBx+VJOjrS9cHpmW3G3SQM+A1AiIsoBKM15SUE8DZu1GB847D2MW 9ineT4p1g+k+Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NxjHC6ByCz9rxH; Wed, 18 Jan 2023 11:51:19 +0100 (CET) From: Ihor Radchenko To: alain.cochard@unistra.fr Cc: emacs-orgmode@gnu.org Subject: Re: .org.bak files are in Org mode -- intended? In-Reply-To: <25543.50706.554658.6937@gargle.gargle.HOWL> References: <25543.50706.554658.6937@gargle.gargle.HOWL> Date: Wed, 18 Jan 2023 10:51:51 +0000 Message-ID: <87mt6g6rp4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674039124; 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=OYcIv3299qJl520Y5Inv6aj2AyMLZFNNVLR243djwWs=; b=pUZwAjoJ9IH4MkohKIePF/m1gFLmwvUxxIJWrm2AnPC92ZCgfrh1NeXdkT6d3Ooa36erCx jtOaQL6LAVKRWTy4YusG4+/xGxTJ2JvuSP6bNgQEKQlEBpIXvUlhpFgleeGiYHcE0PVnNY XnI9wDQCjrp6cD7i3vBF/LAIoE+VaVqImfjgVYhWVLwIsQkFN/zt5j406h4XefhpHPErh+ kmatmzZIh4YQtB2HoQAlVPTYZDYYoMUJtHaBILzXEDr/feBo5u2zS6GCqQxUjbSnJobg3C NDZQxTnLaVNug5dFMU4BfcvvE8DLchHZ+O0aO5P95pG8ABabN9/t8ImH79XM/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OAyFiL4U; dmarc=pass (policy=none) header.from=posteo.net; 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-Seal: i=1; s=key1; d=yhetil.org; t=1674039124; a=rsa-sha256; cv=none; b=aKn4LtJiqxMaKLRdL1JltIp9r9GAjZyma7db9YfnNiBhkLrA5AZyuXykDPGhcoQp+ba1HK y3PD9kMxxSbg3RTSDEXIN1dykZ8PLiXbJrUi8A/JGaOVIBSOry4VlqAbYL/t9F5v9BJSwq Ntj2w7LLOXsp1tiAP3ylfY+S3jBXWl5grW92uUThblybcCFpFvaDZiplljiBB+VvBBaLBz EOJrQqMPZECaxXkfzCG0k2rR7kuLEpNGRQDpTNDmrTINiOlTh1an14e/40Yr3zT1ELUihG U9jZyqJGd6xt9/KyL+mNj8mNdZX/Cql9lrXU/augeH8vUutZDnLgjGh98lKe0Q== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.58 X-Spam-Score: -3.58 X-Migadu-Queue-Id: 56C782A48A Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OAyFiL4U; dmarc=pass (policy=none) header.from=posteo.net; 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" X-TUID: bYjt3hHwQPea Alain.Cochard@unistra.fr writes: > I have noticed by chance that files with the .org.bak extension are in > Org mode by default. > > If one does not pay attention, it can lead to mistakes. > > If it is really intended, why not mention it in the manual? (In 1.3, > where it is said that "Files with the =E2=80=98.org=E2=80=99 extension us= e Org mode by > default.") > > Are there other similar cases? Any backup file is opened as if the file name did not contain the backup suffix: `auto-mode-alist' contains: ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t) meaning "if file name matches, strip the match and try determining major mode again" > Also, the names of files generated upon export, although making sense, > cannot be anticipated: while 'foo.org' is latex exported as 'foo.tex' > (as said in the manual), 'foo.org.bak' becomes 'foo.org.tex'. I guess we could fix this. Though, I'd prefer if Emacs provided basic functionality to strip backup suffix: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60929 --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at