From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qOOsOl2O3GF1QgEAgWs5BA (envelope-from ) for ; Mon, 10 Jan 2022 20:51:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id II5kM12O3GE6FAAAG6o9tA (envelope-from ) for ; Mon, 10 Jan 2022 20:51:57 +0100 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 EB7193BF88 for ; Mon, 10 Jan 2022 20:51:56 +0100 (CET) Received: from localhost ([::1]:56470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n70hw-0001Uo-2u for larch@yhetil.org; Mon, 10 Jan 2022 14:51:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n70hN-0001NK-8E for emacs-orgmode@gnu.org; Mon, 10 Jan 2022 14:51:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]:38581) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n70hK-0001wS-UD for emacs-orgmode@gnu.org; Mon, 10 Jan 2022 14:51:20 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 472C0240103 for ; Mon, 10 Jan 2022 20:51:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1641844261; bh=fkya2TInCx4JBKvaesjNM0xrNthsaDDy4gazl7M80qk=; h=Date:Subject:To:From:From; b=YjOQ2hqnfz8ttQp5pY0WbVLT9Dzk2aC6wgd0PGdwmX+nVGYvVtKUMPzi5Df38y0Am /CgJgU3OU5nLBM+0Y0kG2H75I5x5QI6VnbEua5YfYkSJmZf2ND64mzoRVQ1L9K19vs j7eTsNc8oaouKlyX3ok7PBHRMdyFd72WaYWlg1YLcWnX5mzXl3cmQ4HUMyMkYGtJxT tYD+kUPUl+ecagatn13RTft0Ezp3Thl7WJM4EWdvCS5VBuUGzGK06xRxs1igOrpZR3 t2F9Yju9EL+WWsN/B8KBmZ5i/loKQF5WEn3ulU6cbF5HSJUYMQovY3gSk17aIyS6Wu w5YIa47kP8wIQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JXkw42j1pz6tmS; Mon, 10 Jan 2022 20:51:00 +0100 (CET) Message-ID: Date: Mon, 10 Jan 2022 19:50:59 +0000 MIME-Version: 1.0 Subject: Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks Content-Language: fr To: Fabio Natali , emacs-orgmode@gnu.org References: From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=sebastien.miquel@posteo.eu; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Reply-To: sebastien.miquel@posteo.eu 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=1641844317; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=+izLBCFnx+dVoyNwIPSAsHAtLO5vQ+qWGPPhTKTVnf8=; b=DB/SR5EOFM5+JHF5uZcXcz+MP6kfijL7rCbJXZyfEtGjqtvQA48M/+DcZmxtok5/Evfbub wPK/FffeIenFSL00vKTNWRysfIGiaqJakryUjm4qpFHPgpSNz29zjwOcGwf3VwDAKvHp9r iFLRBqPbcWNSi/52D2j9jWAXCKruRxgfelOHrGm2n+Y9flY6E9coHpxkcu8hwNHxIV72b2 q/2gVnsFqmIr9tB+TKhJ8N2Im3zaZfMSOu6Lsop1JZ0FSq4xAHEPwSMCmQYiaupWhMa0Vz T7JkoO2LslypE7lTI8DcwUETh4Cp/ht1dKsFk70wvRc3z2ZEy0p4NFFDrwV9Sw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641844317; a=rsa-sha256; cv=none; b=jbfPXKlCGSqEpuGxgV4kpBD63E02K7XIkFO9wikOhshsaKe9K96JJvPyeQvIeHJYfil9zr XCfkCrx+Zv/TyhUGPUXLqUwS1yxrtRFKqMsGL+cZi2kRGfxfHOfMw0164l8yj9HolwCB+f rZYtkB+MvGH/QHZ3t4xEJko/hX9t7ID1yLtnPSz+VWQP6Wlaq/jPlpQ1y/tsT9u0g3Arjt P+b7PLFnv0JlavBRyxjWS7eaWSMxGTKMUtyUAEDcaksmry78d44hUzIH9dzbSZhu9qrgMp zxovhgrh5SpTCPJC7iowNTWheW6baAv7/xdOWqSymZNcdx/MX5Sm0I61D0rFpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=YjOQ2hqn; dmarc=pass (policy=none) header.from=posteo.eu; 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: -6.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=YjOQ2hqn; dmarc=pass (policy=none) header.from=posteo.eu; 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: EB7193BF88 X-Spam-Score: -6.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: R77K0CJ5uQII Hi, Fabio Natali writes: > Is there anything obvious that you think I'm missing here? Is anyone > able to replicate the above behaviour and, if so, do you also find it > slightly problematic? Any thoughts and feedback on the above will be > greatly appreciated.:) It's not just you. I think org-fill-paragraph should try to act natively if called from inside a src block. As it happens, I've recently added the following advice to my init file. (defun my-org-fill-paragraph-natively-maybe ()   (let* ((element (save-excursion (beginning-of-line) (org-element-at-point-no-context)))          (type (org-element-type element)))     (if (and (eq type 'src-block)              (> (line-beginning-position)                 (org-element-property :post-affiliated element))              (< (line-beginning-position)                 (org-with-point-at (org-element-property :end element)                   (skip-chars-backward " \t\n")                   (line-beginning-position))))         (progn           (org-babel-do-in-edit-buffer (fill-paragraph))           nil) t))) (advice-add 'org-fill-paragraph :before-while #'my-org-fill-paragraph-natively-maybe) Regards, -- Sébastien Miquel