From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wIfzALm3JmNqywAAbAwnHQ (envelope-from ) for ; Sun, 18 Sep 2022 08:16:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2H30ALm3JmNZhAEA9RJhRA (envelope-from ) for ; Sun, 18 Sep 2022 08:16:25 +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 9C4B5859 for ; Sun, 18 Sep 2022 08:16:24 +0200 (CEST) Received: from localhost ([::1]:52550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZnbK-0002lc-SR for larch@yhetil.org; Sun, 18 Sep 2022 02:16:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZnZ4-0002lD-3C for emacs-orgmode@gnu.org; Sun, 18 Sep 2022 02:14:03 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:44828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZnZ2-0001cP-8x for emacs-orgmode@gnu.org; Sun, 18 Sep 2022 02:14:01 -0400 Received: by mail-pl1-x642.google.com with SMTP id k21so14634961pls.11 for ; Sat, 17 Sep 2022 23:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date; bh=YI8nNs7igx2+BRGr25tf1ea2YeEDIqkXE+PIW4ZeL/I=; b=Mettx/J/o544a4ay5BpXoduNeCaUKnFXrAHmbVRYFSsBbTK+K+y+45SlLlK7kMUZCj JrYy18pEfahAgrriFoiLfJdiooklZbgP3tybSJsJV2NBIdPykiDcp+DxKXgIMcyhNf8x 7Jtm8/iJsr4+Z6RC8CT0oB0g417LgIXXeGqAdjXutpKr3prAOXDrJoRaLsUlzwpFOcaC bGgR0jhXsMN5sLZb8mw8x00E/UgJwb5xjE3EsCS/rSTfkmqUe++8XlszJY60bl+SntOb 26TmFpyT298YyJrZVH7uhB+LOn7ub7CnzmFeIbJaEBR8gPcsWoaa7j29w2hQIoJFqYHf SMyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date; bh=YI8nNs7igx2+BRGr25tf1ea2YeEDIqkXE+PIW4ZeL/I=; b=4Vvf93ZVIg0i7aRm96KjzjZqwy5yF/L4xOUkrud4/EDFpTk5N3pZgfqPSrxLDWUjpb uH38ZbJpBTcO7aDDy8ZPbcbrttrQWjNQuOJlRHQuSuFKH4V6WRnsY3/yPtuxw4E6aANq NwqvT+XFVxUP60NKdBD6oPr311GkhtY6RaG/xBPOh32Vie8cm0c8E7ypq0mzIFgp3vDa bp2hNp9SM7CsOyiDKOA98B/vb9/4VkDXGvscoi1eEatQwiK9C+L59DC1SZWkythFDT+K GIb64AktRqMrznqYPA36wegJN1eOc3WLfYONNq1b5g5+SqgYRZUSCaWx/615rqHFtpMq csog== X-Gm-Message-State: ACrzQf2kt0azXr7zdLSOUOuzksLPB9a33Xe3ScYv2q3i2wIw0jU9OhUK 07KxKMlcJxMGlWPkajZbidBcTmfU9oY= X-Google-Smtp-Source: AMsMyM5GSrIzNINY/ryOzG7piHi/vaxoCxbMLVM3OyDTmF2S50vdorYaW+ODiKuDWHBleKCNxHgw8w== X-Received: by 2002:a17:902:ec85:b0:178:8a69:45fb with SMTP id x5-20020a170902ec8500b001788a6945fbmr7168655plg.130.1663481637513; Sat, 17 Sep 2022 23:13:57 -0700 (PDT) Received: from localhost ([14.139.216.98]) by smtp.gmail.com with ESMTPSA id k29-20020aa7973d000000b00537ff911a89sm17480428pfg.105.2022.09.17.23.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Sep 2022 23:13:56 -0700 (PDT) From: Visuwesh To: emacs-orgmode@gnu.org Subject: FR: support hard-newlines [9.5.5 (release_9.5.5 @ /home/viz/lib/ports/emacs/lisp/org/)] Date: Sun, 18 Sep 2022 11:43:54 +0530 Message-ID: <87pmftqkf1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x642.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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=1663481784; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YI8nNs7igx2+BRGr25tf1ea2YeEDIqkXE+PIW4ZeL/I=; b=l14ALSIlMhtFOG4CyXiPFptnZcLB7Vkslb3criHoUrwisMzMG5Pm+1w3TIWKkS2rRkbgVx Cuk1L02MewRPIP0W6CX/gu9Q9fH9/05H9NyYmhOjPvXHhPQLizDkVZ/PfH9qJwsqYtlLb/ hEsv8nDEvahTu4Ny2/pvruLXiQdrLJKJzQpATRpkkhtGhRjVH5nCwUpZ4DhW+bT1JTlMpN H50QW1MNNrk1dejZuT4nEmZH3Om3KNaDR3xMDeI9s3zXo2FPxPUD2NoTWctvo4yCY2wWkK poaMOU+wMJPirHyYiz31rFVlK9bKh+z8LItYxWfuHvFw5j//bM1Dp29p+VHB2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663481784; a=rsa-sha256; cv=none; b=p5rcSOAlKmTs1bZCu4UJ7EpScK60tOlqCi151yNp5jFF4l11CaOBaoztZ844WUBzBRcerN TQUhzE1QLWlu6YTSQb7+0c4xkSC98YeA2GSa6CLvVEtRHKPcNoJGygpdPl5gk5Te3qRmnc V1qukcPwKT3+PUY6eaU0OJjbXsChMfmovoQffCmmyK/CE3ZmVAMfXvEsyitfybVnsdFLaN D+xJ/SkUWr9u43EzmSciKE4GGXTbotRBof8LSl4BwgQBXutIsLepsVhKg0gQNNGb0O9PJF 0W86j1pCG0GdgirDbb/ao5hv7U9ny5g20jDDj9WlQXs4Ek+52f6mtH4zBuZIug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Mettx/J/"; 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: -4.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Mettx/J/"; 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: 9C4B5859 X-Spam-Score: -4.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: UPiD/O4LZ4Ug Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ 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. 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. 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. I currently don't have a git checkout of org-mode handy so cannot produce a patch wrt master branch but changing `fill-region-as-paragraph' to `fill-region' does the job, as in diff --git a/lisp/org/org.el b/lisp/org/org.el index 6f92cdeab5..d53c8c0243 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -19580,7 +19580,7 @@ org-fill-element (org-element-context)))) (push (point) cuts))) (dolist (c (delq end cuts)) - (fill-region-as-paragraph c end justify) + (fill-region c end justify) (setq end c)))) t))) ;; Contents of `comment-block' type elements should be 1. See C-h f use-hard-newlines RET Emacs : GNU Emacs 29.0.50 (build 12, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2022-09-17 Package: Org mode version 9.5.5 (release_9.5.5 @ /home/viz/lib/ports/emacs/lisp/org/)