From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 yGhoAvfTKWPPXAAAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 16:53:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mINQAvfTKWPOpgAAauVa8A (envelope-from ) for ; Tue, 20 Sep 2022 16:53:43 +0200 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 B2261188DA for ; Tue, 20 Sep 2022 16:53:42 +0200 (CEST) Received: from localhost ([::1]:39330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaed3-0004nS-N9 for larch@yhetil.org; Tue, 20 Sep 2022 10:53:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oac9v-0001QT-4v for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 08:15:36 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:43640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oac9s-0008Ax-He for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 08:15:26 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d82so2534997pfd.10 for ; Tue, 20 Sep 2022 05:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=4eYgypYuY+O6DE3JuaJA5FR5CQlWgEYEMjo9YhjDWSk=; b=qaAysvBcWluMf3ECRch1OS+hQtIfUXBrZTotkiNhb8iNfDe4h5sgSXNY0YIm2Bn4EP 2qTLO7rDARlPgBLas05j9sMZ//gBZzFbkm7/JehHp4HLXJ843AQX6LkQTL3bCYuEAkyX cliUyv4ORYzVty/AA+FKYaMCbXJsTQ2PSbzJi677uWEgKs9DN6kXD/FxMS+VVxTp48Qy kIg9+o2YbmpqUWQ4aXMzro+Hea3pzgZWAy7NrQjm9T6JMqzTRmycUd4vRB68dVZDEo9I 7cNdIkvrsjlW1hr2u6ofwJolkoPInFA7mkAEudK3adMnVco7/Q5/mGWB1rUs4eKK1FOZ vVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=4eYgypYuY+O6DE3JuaJA5FR5CQlWgEYEMjo9YhjDWSk=; b=PxK7sjM+qqmG1ofGyjdryzUWIloUCXMBX3Qy9S6Mh7rK7fj0PophaJM+OghVeTFXCV aI3awiPYaqerjyGX/t9FIXDXFnVuCc+ttikUQJkh4IwEgLUzyWvwfWZjb/tJncr+H8gl CnST8Qc007PAvNRy/PIUEfzpdnaijnpe9qciaAzKPMBYfIH28UpygU3Dg6WViXugNLiC pyA2ZG8WK6QqlBbCyExjG7mqbPWCCUx11hjaNCDdIETWTO0mBNdF9DdiiRmqD09LuK00 4Ger+xsbSwfqbNB1a98EPhBlSagmlrtEWRiXZHNm6YKPCO2KKoV41NHUUavpqVpO7RQr mCKQ== X-Gm-Message-State: ACrzQf0ZDkzLpHZodWUfIAJASGxWdYcRH/fQy0KNUHmrmCIPFbmJqwgW wnpPLB8yGYzAXMDIhCKyNrAnq+/4FNNAWA== X-Google-Smtp-Source: AMsMyM4ZkEZJSRtg4TcyjC215zikMQKvwErSS3tse0iz1nrpo+G0HDnQC/PADkwGCpTZTjfApyPyPw== X-Received: by 2002:a65:6cc7:0:b0:42a:4d40:8dc1 with SMTP id g7-20020a656cc7000000b0042a4d408dc1mr20177039pgw.321.1663676121458; Tue, 20 Sep 2022 05:15:21 -0700 (PDT) Received: from localhost ([2409:8a70:2b5:ad00:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id i131-20020a628789000000b0053b850b17c8sm1530031pfe.152.2022.09.20.05.15.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 05:15:20 -0700 (PDT) From: Ihor Radchenko To: Visuwesh Cc: emacs-orgmode@gnu.org Subject: Re: FR: support hard-newlines [9.5.5 (release_9.5.5 @ /home/viz/lib/ports/emacs/lisp/org/)] In-Reply-To: <87pmftqkf1.fsf@gmail.com> References: <87pmftqkf1.fsf@gmail.com> Date: Tue, 20 Sep 2022 20:16:13 +0800 Message-ID: <87mtauz1f6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663685622; 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=4eYgypYuY+O6DE3JuaJA5FR5CQlWgEYEMjo9YhjDWSk=; b=IuZiT+6+bFjkQ3E43emXcelBLL4/MV4Br7VGnTjxJXu1YJLJTcwFaeVYZi2oHoezRWudgT CLC/c5w6nMtDiqebKXfXzlignlOn23D8PRTMC5luFbbLJAhA8eMIAvvayRjZhU6rBjqSQf k70iv0ndOg+a5lEYZA2QMO9y5RERyDBov6O/HGOZ5I0lg7PlqIoE4LrjK6RvrwRoiST0Q7 n63cQNY20mTAySkkRrwFjqdqtdF7V0ufuGogPTDan8IjlVPguF+PuwB4/XkG0a5QagXR/d lHLum5q9H7m5vsDo1duRgckRavxyoLrJEi6MZ0/DbJQcGjsDYLC1yWoZFGcTaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663685622; a=rsa-sha256; cv=none; b=SgSeocmKv4+6j10f1cifkkZm0PAcSBy4iFblkUb+37sM1OUHl4rJ4GwbH8VOImSaCxnUfB nFXuwCKTU03Iq47GVA0URDMh+tj3YQbnFlBoZyqOfnlNTfh4P36cE6vp5BWxajuwt+bAro JRSV786XWjNso9esn+skssMT4Q5N5uxnPes4VZS1g30tz1Lk/KdI4uBlh8OXSs+hCDmuTQ tJpcEcOv1Mtou3Rrsf+Hoe49JhnEiGUYI5arc71Uz4rdJcoQOMJyi5x1pgJ1t2WyT0P42a IAkRpLaxvEWSAL93xVNZAhWGq9goZSh+6EBE26l14heyTr70IkjveXzc8qp3xQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qaAysvBc; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Spam-Score: -1.83 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qaAysvBc; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: B2261188DA X-Spam-Score: -1.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: Pg++SrZKtUaA Visuwesh writes: > Hard-newlines [1] are an excellent way to inform Emacs to stop refilling > lines. In a way, this serves a similar purpose to org's \\ but with a > major difference being that hard-newlines are not saved to file. There > are several cases where this is the desired behaviour: > 1. When you want to end a line with a link and continue text in the > next line. You don't care about the export since it will be > taken care of properly. > 2. When reflowing text with inline latex in them. You adjust the > line width so that it looks like 80 columns are present in a > single line. With hard-newlines, this becomes a very easy job > without with you have to isolate the line of interest into a > separate paragraph, then do the manual reflow, rinse and repeat. This sounds as a reasonable use case. However, the Emacs definition of hard newlines also involves re-defining paragraph breaks. I do not think that it is a good idea for Org to alter Org paragraph syntax depending on `use-hard-newlines' - it will create too much confusion when Org documents are opened outside Emacs. > 3. When writing a list, you give a short description at the top. > Then continue writing down below like this without the need to > insert a empty line after the first line. Note that _not_ having an empty line after the first line can be misleading. In Org syntax, absence of line will merge description and the text below into a single paragraph. It will, for example, affect export. > My point is that there are several instances where you need a solution > that is less aggressive than \\ and hard-newlines hit that sweet spot > perfectly. All in all, I feel that fully respecting `use-hard-newlines' in Org is not a good idea. We can do it partially (for filling), but I am afraid that it may create some confusion. I'd like to hear what others think about this. > - (fill-region-as-paragraph c end justify) > + (fill-region c end justify) There are 3 calls to `fill-region-as-paragraph' inside `org-fill-element'. If we decide to support `use-hard-newlines' partially, all 3 calls should probably be replaced. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92