From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#56796: 29.0.50; Hard newlines not respected in code comments? Date: Fri, 29 Jul 2022 21:46:16 +0530 Message-ID: <874jyzzygf.fsf@gmail.com> References: <8735ema73q.fsf@gmail.com> <83k07xaea1.fsf@gnu.org> <87fsikynn1.fsf@gmail.com> <87bkt8ynbh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32552"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: eliz@gnu.org, monnier@iro.umontreal.ca To: 56796@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 29 18:17:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oHSft-0008C5-Vy for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 18:17:18 +0200 Original-Received: from localhost ([::1]:58384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHSfs-0004kh-Ab for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 12:17:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHSfe-0004jf-ND for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 12:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHSfe-0005Xo-F8 for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHSfe-0002i9-8D for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2022 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56796 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: eliz@gnu.org, Stefan Monnier , 56796@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165911139510368 (code B ref -1); Fri, 29 Jul 2022 16:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Jul 2022 16:16:35 +0000 Original-Received: from localhost ([127.0.0.1]:33332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHSfD-0002hA-Ck for submit@debbugs.gnu.org; Fri, 29 Jul 2022 12:16:35 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHSfB-0002gz-JO for submit@debbugs.gnu.org; Fri, 29 Jul 2022 12:16:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHSfB-0004il-F3 for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 12:16:33 -0400 Original-Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:42734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHSf8-0005LW-G2; Fri, 29 Jul 2022 12:16:32 -0400 Original-Received: by mail-pg1-x542.google.com with SMTP id l193so3974614pge.9; Fri, 29 Jul 2022 09:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc; bh=cjmfhnP3k/YlTAZVGiOWA1SaPtp6FyZLjyVkeYBEFVk=; b=U7q+Wi5FkRghIwN7pIi1Sa/Q9KXn+r8Jgkdv5pnMMAnJd26pInS4y3nFi4ajvMlhPa f8NranAGaJRm9f2reZWHKgBs/2jmp3HJmC4uGT7sLGk6b0ORaT7qkXjn2OnTzZHjbQsw +S+yKbL9/qX36AMo4pJ/LDlw9GYFT5dPUUoGEOxRAJtb3q8wEZQ5X1jGjcKB27lX+8qf Ur+uahVdml+usd9Fa4+Vk9ncolMEXps81pzpJpDS5X5Kdwb3jbB514891jLeLlLftX+q 7bbpnTyxT7mDV8rSJ7gUmF6YEaqDnJnhkEjrjvwEOyZJXG5WH7rl9dhE/UbXITcM0QIn pLhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc; bh=cjmfhnP3k/YlTAZVGiOWA1SaPtp6FyZLjyVkeYBEFVk=; b=qFxPL5EYSydYgDskzs4wPCsP38Mkp29+uvE5VqNOXoQN8LpuB34i1LiZqM4Cyb7suN Y0jpL8Kqz5SwCp+uqFr6kBX5BOSE+LfghB261oNMWSGykMZnKyRHnzi93hzZJpsdatPp iQQ7DcyMnZK9ArhbkcEIr+BG2mPubjNWewHk6N8mD8zsHg/SvBjwyV56ziNsh3gNkYat ZzbWrjH4x4AlgmPOR9VPujvl1TPb8jHJ1fWxEfmRz2D1eXt6vlt+/BRxZrdjwEnmMf4L hDKSUtDhzOigBMgv7GWYriJfoZTm+Ec+nsH5TpZJ5wOcYsAsfl54hZiozV5M3/FycEy9 dn5w== X-Gm-Message-State: AJIora+uyskQWYq8TxOdE94juZYNC4jAN/7Sg3sFuJzqSob3N6JNcuzR 1y/TFMPs6yCwoQBFUIwOykncvThy54k= X-Google-Smtp-Source: AGRyM1t25SYFutVfW6oqnGl/Uv90sMJT5J03XeU5gVYNwSAcUFw3xV+2SE/0acFZicAS81kIL6WGug== X-Received: by 2002:a63:8542:0:b0:415:3194:cc76 with SMTP id u63-20020a638542000000b004153194cc76mr3542644pgd.431.1659111387557; Fri, 29 Jul 2022 09:16:27 -0700 (PDT) Original-Received: from localhost ([49.204.115.236]) by smtp.gmail.com with ESMTPSA id s4-20020aa78bc4000000b00528ce53a4a6sm3033506pfd.196.2022.07.29.09.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 09:16:26 -0700 (PDT) In-Reply-To: (Stefan Monnier via's message of "Fri, 29 Jul 2022 11:41:26 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=visuweshm@gmail.com; helo=mail-pg1-x542.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238198 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9C=E0=AF=82= =E0=AE=B2=E0=AF=88 29, 2022] Stefan Monnier via "Bug reports for GNU Emacs,= the Swiss army knife of text editors" wrote: >> More generally: I'm not sure how common this pattern is but I tend to do >> >> ;; TODO/FIXME: Something... >> ;; Ideas and thoughts on how to clear it here. >> >> Now if you do M-q there, your neatly arranged text is destroyed. (I am >> probably biased) I also catch this pattern in the Emacs source tree as >> well. > > It never occurred to me to use hard newlines for such cases. What I use > instead is either: > - add extra newlines to mark the paragraph boundaries to use > (that's just as easy as adding hard newlines, but requires removing > those extra newlines afterward). This is what I did but frankly I am really tired of this pattern since when you go back to revise the text, you have to do the thing yet again. (Granted, you only avoid this when you haven't killed the buffer or Emacs but we don't do that here, do we? ;-) > - Select the intended paragraph rather than rely on M-q's automatic > decision of what's a paragraph. I always forget that M-q takes an active region, this is a viable option as well. I think the first option is quicker though. > Hard newlines are a good idea, for this use-case, indeed, tho it would > be even better if we could somehow represent that info in the text > itself so it's properly saved into the file. You're not the first one: https://yhetil.org/emacs-devel/CAArVCkQHmwqHvcOEu= rBYLcWS74nov8OAH4fnX8XbUr2JY2nCKA@mail.gmail.com/ [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=9C=E0=AF=82= =E0=AE=B2=E0=AF=88 29, 2022] Stefan Monnier via "Bug reports for GNU Emacs,= the Swiss army knife of text editors" wrote: >> But maybe me using hard newlines to tame adaptive-fill-mode is the wrong >> approach: I would like to write lists such as >> >> . blah blah blah >> . blah blah blah > > I'm not sure "." should be accepted by default, but... Indeed, it's a bit too "out there" if you know what I mean. >> I can't blame adaptive-fill-mode for it: it can only be ever so smart >> and hard newlines seemed like the solution for "when I say newline, I >> MEAN IT". > > I do think it's worth a bug report, because we should handle at least > some "common" cases of itemized lists in ELisp comments, and AFAIK we > currently don't handle any at all. When I was searching for discussions on adaptive-fill-mode in emacs-devel to make sense of it, I found the past you agreeing with me in the wild. The discussion can be found here: https://yhetil.org/emacs-de= vel/jwvk5wvx5jv.fsf-monnier+emacs@gnu.org/ but I'm not sure what happened afterwards. Hmm... but now that I re-read it, it is not the same problem but it is a problem that often bites me in the back.