From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GDRKAMCGOmMMjwAAbAwnHQ (envelope-from ) for ; Mon, 03 Oct 2022 08:52:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wB5JAMCGOmO7+wAAauVa8A (envelope-from ) for ; Mon, 03 Oct 2022 08:52:48 +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 9D17432291 for ; Mon, 3 Oct 2022 08:52:47 +0200 (CEST) Received: from localhost ([::1]:49476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofFJm-0000hx-KU for larch@yhetil.org; Mon, 03 Oct 2022 02:52:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofFHu-0000Hd-3Q for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 02:50:50 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:35565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofFHs-0002aQ-B3 for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 02:50:49 -0400 Received: by mail-pf1-x432.google.com with SMTP id i6so9436708pfb.2 for ; Sun, 02 Oct 2022 23:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=68nXZ6aOuwuaUGnex6WRzI98JJF0qltAn7ukktstNLU=; b=Y00XskPh/i8XxMBDiGAcrKbXhxftCoyIRB88AOqqo9yb+/AREl4YkMalMeubZJlh5V Jn/C1QtCaXT7sQ7mYku58qCwzPtDIDhT9g2xE9f0BQVgL5zmQkiUWlf1ydH68SXJ4wHl J2XEywuVvSJ9Zz8tLYv3o/HsBAyAba5P1nt5L+6sQIbHG5EJlJnuIUgXHVML7lYZY23n 3f9TWuHvj3lruLxxZFJFvTGgAtPss57X8skq3iIT5gqoICXMwWmEMtjwid+p6/CcqvAY 2fliaYHz4wP+A/NLWLEJt/4vtPRmUG3thOp1mKN/djZpWAt/RVWqdY0gg7ksKOcdSGKF rPjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=68nXZ6aOuwuaUGnex6WRzI98JJF0qltAn7ukktstNLU=; b=4F6LOaW3qnwLHP++4Q0ArtDQ9yYK5KTrUVv9w8sa6r7OiCx8uCBstFnZGhBE+2Lrlg 4sajbR8dAvrZ/ZJRKv1RMAAOWr2maU7r61a7hL1gMGHBA6tRcGwNSfxDg2lt4S1dOXDU 7yh2D9BNrP1hwOadcxTzd6+9C6FYUV3kj6K01X8+fuXbL8l2mA3awDDKPZAabsdizEl5 Sio+xQbL4c5S3p/8pDLgFcMn0tonCjhor665Nse9Y0TOPgS9SjeJlr7xo+6FC687IKpv +4qkWIxf+tUbXjA3cOrW6EGxsmF8Lt7k8LFVt/rtqtUXvvLmN6s/gQRh8D8f6tgXu99d MDMg== X-Gm-Message-State: ACrzQf1q5L6Og4PlaB3HSPmDORs8PIaytXQ/bQg7Yk7d+ytPrwMen/Bt XE3gpYg5UFR+XGkmdebjuY8= X-Google-Smtp-Source: AMsMyM5LYNtyVzj1+gzdzjjYCtC5Ty03GSaulr4QXt0a9s2wOwxDxRw+4z/7S5m0u/n2MMsO38Rh5Q== X-Received: by 2002:a63:dc54:0:b0:44c:ce26:fa35 with SMTP id f20-20020a63dc54000000b0044cce26fa35mr4980734pgj.374.1664779846405; Sun, 02 Oct 2022 23:50:46 -0700 (PDT) Received: from localhost ([1.83.154.214]) by smtp.gmail.com with ESMTPSA id o71-20020a62cd4a000000b0056154a0bb3dsm1986326pfg.160.2022.10.02.23.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Oct 2022 23:50:45 -0700 (PDT) From: Ihor Radchenko To: sebastien.miquel@posteo.eu Cc: Fabio Natali , emacs-orgmode Subject: Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks In-Reply-To: References: Date: Mon, 03 Oct 2022 14:51:38 +0800 Message-ID: <87y1txwgat.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=yantar92@gmail.com; helo=mail-pf1-x432.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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664779967; 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=68nXZ6aOuwuaUGnex6WRzI98JJF0qltAn7ukktstNLU=; b=ESvqhmdEvcsAgDAvMRu1+zAf8/sH9Dv2HntxJPt/odcOxI0NausnHVEV+EQAFfrPauGd74 kCXeoKwsuouxGc59h5AgzpbgwDadSMiHbpZmClb6hbd18Pf/+xAnjWU2/7hQJCqtmVumei KjKOeNh8S1HgXa7wP7XLLF8uxXJX7q2Q0dVSSnvzY+mwA3KP+tnmjJf3tqb7gpT5x1Nupf Rith4j/falRa9Mt8vJhjX9F5ed7/PBLWbeEPGMZTxOGMUsS0/aA5vNir9eg88AjNxXWphw 6Rh+Radu8Xlx+SkEvZ9kOMbXSz4da2MWWJ5ewyn5YizPpKAtxtTS86wIWesccg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664779967; a=rsa-sha256; cv=none; b=dmqY8rWSBX6BHzznuzlQdRCrinA6jR67ktDtKZozrTINoH/fEXE0XQinhgAqz/a6aWBzZD 4Mrf3RD22Dlv12VgtLaqDCJz8znttCVu5mXf/CJlSbw57Ydx69XIPnzPdlNB9Ips0kFZum 3fc6B9nOIgchwb7uU0EYloIFjUil4AOVo5hQr4XcMhSNxlkhTAIjfWMTBuarHMiD0jGhuB bFo4rfy4A1IHqoBvUE2Um1Gfx/ShlOjjidAHGi6Yz0BT6f1ZxQBUP02tuyhmS2Vo2XgAqa 8ycTB6vmXdtJJFrZ8FKc5BT5w46V66iLVJdhiPjJO3dN2uKE+xLL6LK2GhErbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Y00XskPh; 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: -3.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Y00XskPh; 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: 9D17432291 X-Spam-Score: -3.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: v0d31YOK6/tJ S=C3=A9bastien Miquel writes: > Fabio Natali writes: >> Thanks for getting back to me and thank you very much for the code >> snippet, which I think I'm going to integrate in my configuration. > > Thank you for the report. With regard to the snippet, It seems the > advice function needs ~(&optional justify region)~ as arguments rather > than (). I am still getting the described behaviour. However, it does not happen in Org mode itself. `fill-paragraph' in emacs-lisp-mode does exactly the observed behaviour. Try 1. emacs -Q 2. insert ;; A comment (+ 2 2) 3. M-h M-q Is it emacs-lisp-mode bug? Or is it illegal to fill-region in source code buffers? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at