From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ABGJAcetV2CiegAA0tVLHw (envelope-from ) for ; Sun, 21 Mar 2021 20:34:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OPnvOMatV2AhVgAAB5/wlQ (envelope-from ) for ; Sun, 21 Mar 2021 20:34:14 +0000 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 BAC2E28727 for ; Sun, 21 Mar 2021 21:34:13 +0100 (CET) Received: from localhost ([::1]:45690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO4m4-0008Ky-SR for larch@yhetil.org; Sun, 21 Mar 2021 16:34:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO4lS-0008Ko-BA for emacs-orgmode@gnu.org; Sun, 21 Mar 2021 16:33:34 -0400 Received: from out1.migadu.com ([91.121.223.63]:32962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO4lO-0005pE-Pf for emacs-orgmode@gnu.org; Sun, 21 Mar 2021 16:33:34 -0400 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=kyleam.com; s=key1; t=1616358806; 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=LDW+r62GNuuFkvy0nVHqIFUWw/Buyc8A6jebva8MYOg=; b=btOp5G3XHz7xYhcCDj+HgR7lspKzXfnwKCBbnqnGSdTaZTbq1o/61oPm22c6973jvu6v48 rEGu0pt9xd8ej3QQ/VcVp4to1yRgnKUNHmcQZc4h0wPgeP4ErN8aqsiUVI14RMo86CHoK+ iO73SOokJWEzNEqL7uHZHLUIEiD8dVsiQMJiWVdtsrZURyXfgykQRTx5C6HCab9FiUh9PS +NNnp40Qp27bdKEWXXQ3+5asaKJhQNHO5UaRrW1cTxdxufHNDb1vh9BNetOFM8kg840Cx7 +H+NGO3M3sDu4vvcLTapHJ6A6nLSc1K0DHnQxacHXlkXui7T6Wu9/JDRtutYzw== From: Kyle Meyer To: pillule Subject: Re: [PATCH] org-src.el Do not ask to revert unmodified buffers In-Reply-To: <87blbtxnho.fsf@host.localdomain> References: <87blbtxnho.fsf@host.localdomain> Date: Sun, 21 Mar 2021 16:33:25 -0400 Message-ID: <87wnu0tffu.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=91.121.223.63; envelope-from=kyle@kyleam.com; helo=out1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616358854; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LDW+r62GNuuFkvy0nVHqIFUWw/Buyc8A6jebva8MYOg=; b=VnB/MxgTE5NQaHi6WGsls+lWJHBfd0tAh4rtQdTPyYebYi3ctk8Brx+w7/jfU+d6wz/UHX Y/SIrIugkfjDs8VYINITUoUPY/V1xZY0KZQFXlor0fWv4FBzdgZsoIIXgRIC6OhpnAC7g2 w9ndExCQmd7qNoGQpcXlinupm1yeTg+b92XwREyiVTY7H66HiLybYr+9iApzBm+YVRyEEX JfFx9y1CAYDYLbv9qnV0yNQgL7Mx7nG2EJnSw8VV5mVsyvvVmXwD7UWgyNjUnvYNv5aems gOBApiXB87gre7ylpg2zuXEvJPAMmLKSs+aBB+T+1RQsEId73JrqcWpKdCQedg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616358854; a=rsa-sha256; cv=none; b=Jp1Wk04cUT/3V4cL7jsSqZJ3fZ/QvyL87LbolVxmscWvY2iEuyLUAwOtulx6/znPbcvr9i 6k4/AoTKuHI4GhuqWlICzSgtXzVN88ScJPB6TpytyyxsIwb8DdBqWFE3/KKA3bp0rPRGsq p6K7vxrVJ+E97E7X1LxMmWEgWPZ8zSFL6knIWs3rtwU+QdbWuYzRnUT9A4v/3Z9EuBQdRb zqgA3dNedwu4ohj+I6LR/RSfMo9PwOhO/HKkQ1QOpAKbXx4TCLMsfGXysciiZDqo0agdkZ wCZEVAPDu7sPZWYFaWxSlZ22rIB0pK2waKOLgYdEZPVXoIYqrPXnJVqpl0pWrg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=btOp5G3X; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=btOp5G3X; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: BAC2E28727 X-Spam-Score: -2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8GGyHjIwiJZK Thanks for the patch. pillule writes: > Hi, it is asked to the user if we want to revert changes when > re-entering in a org-source buffer. > Even if the buffer have no modifications. Hmm, that description seems to be focusing on the prompt's parenthetical note. When org-src-ask-before-returning-to-edit-buffer is non-nil and there's an existing source buffer, the caller is asked whether to return to it or regenerate/overwrite it. The message warns that the second option (i.e. answering "no, don't return to existing buffer") will discard changes. It looks like this patch assumes that, when the buffer is unmodified, the answer to the above question necessarily becomes "yes, return to the existing buffer", but it's not clear to me why that should be. With an unmodified buffer, I suppose there's less of a difference between the two answers, but at least with the default org-src-window-setup value, there's still a user-visible difference in terms of window organization.