From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Strange behaviour of auto-fill Date: Sat, 24 Apr 2021 01:36:19 +0200 Message-ID: References: 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="36572"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: michael-franzese@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 24 01:36:55 2021 Return-path: Envelope-to: geh-help-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 1la5Lz-0009Ph-9q for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 01:36:55 +0200 Original-Received: from localhost ([::1]:36326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la5Ly-0003Vo-DW for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 19:36:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la5LU-0003T8-1e for help-gnu-emacs@gnu.org; Fri, 23 Apr 2021 19:36:24 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:60751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la5LS-0007J9-7P for help-gnu-emacs@gnu.org; Fri, 23 Apr 2021 19:36:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619220979; bh=T+R8qTQYYlMnFDlt9eUZHsaA5HdJ2vZ36kpOA5D5QS0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=bgZBph9b/JRq/wnOFX/GjupU2rmELBYdb5g1zgze+RrQTEP3WfRgUlbSxCXnTWT/r Dy/UcKMP+enJEjqzornd4d8x7g77o9N/tTX/Afh79ervUdKKcfzw43WghFo3UwMzm6 8LRB+Q14FcQc5DOOWXLa+GycGUNV69ekytG6l84M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs03.server.lan [172.19.170.169]) (via HTTP); Sat, 24 Apr 2021 01:36:19 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:+PbsyBRw/Hla+xrpvD+QSQ6fXbn9hvU6/G5kNhVZ1ZUht1ZWLVoVZorkzC3oXV1/x9TSa IUZFsaz0bjvYPxcXtUjieLWiDdAvu0h3TcYimgaGW6shXpDSXYJF9RLF0J3nqR9NIer3pQ+t/EdV 8yD427cNL8arU6eNi5ymu7pQwlLiAW4s9pxrzjQA0Uv9OjOThnd7X9Q7ba4MDMHOSS7vlJIjE6ih +uqFRL+CkDnQwqkvbj1eRYudCOqdxJeD+KLlVTPQD8pSkwiLHHR1xtP6pjdSXP/KYstH16onTJ/A QU= X-UI-Out-Filterresults: notjunk:1;V03:K0:O2q2tx0EGPs=:92gZVw3jZRsnEzdqKSz4tB y3eEQpr217asJAyCvuUdY+1v70Q4T3gyXmJQeQLUQwmHlFiCR8W68UaMeUE9luIE0QCcN67Br FSHVCfReOi1RR3cYOb1rA6YsNM+6kx83pAvL8oJV21J2XjH37/ERxjnX+7SV9RIuQIiH3uFEn EIrNf+vJdfnVRd9mwcJxNQAZsfmiCv1tXJmMPBChlUg5ANF2x60OTBoJGiZjpEJXdU7q5k3KV IEhQu4yxKzTo6UqsJesoIUSXnxOLAjYp+GVwSMEsaFh+E5zZY93N/WXr4s2bE3vqMxjGCT7PC zBsHP3gvW0PAVKEiJ9XQDFcI4QQerXX8Gd9kvz75QXs80hr/tyEZw70Xdp8apT4DOkCPvPQrD SwZMz508Lgq1nXp+MMJdSh8Kzi6kLsLdFRXGJJV8kNs/q05cz3gNNz1u/DzNTMfLaZPKWLoIV buV7+UzYs1SGgKJkGSeSHy0wk6T2zM75W2jfAQy4Alz2V9PgRDVDqR9Jq0+EK7MOnfhZyO+M+ IiE46Nl/vEvgHdC3qYuci5ZTN1gf8fu8GYyCcODI+Zra6qukl4xEEe7QYRcEAnzcc6/Si1trf SDSk7CoodIuP+dTYFSTKrpoWZTegDxT3SPA+egMzVsmsqUciwUCdLEUVmQBJS4HJtalBVl0jq mYCQTIitz7ho+dg45XaobM+W3rXED5/whxEJO0SFA2hl/0nTrse0k2dYjcTEWg4QkMJUgJF3/ YPxL69Tj1ML/ui4T5ctNNMd6VPXQ+T0WFfUyNJ8eKF+vUnY4IgBDafUuhYI0jw0bxt1MsDsv Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129139 Archived-At: You are right, I meant to say that turn-off-auto-fill does not respond as it should when you use (setq-default auto-fill-function 'do-auto-fill) > Sent: Saturday, April 24, 2021 at 11:23 AM > From: michael-franzese@gmx.com > To: "Christopher Dimech" > Cc: "Help Gnu Emacs" > Subject: Re: Strange behaviour of auto-fill > > Actually, when I call (turn-off-auto-fill) after calling > (setq-default auto-fill-function 'do-auto-fill) does tell > turn the mode off. > > > Sent: Saturday, April 24, 2021 at 11:21 AM > > From: "Christopher Dimech" > > To: michael-franzese@gmx.com > > Cc: "Help Gnu Emacs" > > Subject: Re: Strange behaviour of auto-fill > > > > > > Have had another go and noticed that calling > > > > (turn-off-auto-fill) > > > > will not break lines if the following is present > > > > (setq-default auto-fill-function 'do-auto-fill) > > > > My impression would be for developers to take a closer look at the > > code, so that it's use would be simplified. Or perhaps some good > > examples on how to use it, as it does not look so clear to me. > > > > > Sent: Saturday, April 24, 2021 at 9:42 AM > > > From: michael-franzese@gmx.com > > > To: "Help Gnu Emacs" > > > Subject: Strange behaviour of auto-fill > > > > > > I am trying to set "auto-fill", with some tools to change "on-off" b= ehaviour. > > > > > > Things get very confusing. When I comment out "(setq-default auto-f= ill-function 'do-auto-fill)", "auto-fill-mode" will still break comments e= ven though "break-line" is "0" > > > and one sets "(auto-fill-mode 0)". > > > > > > > > > > > > (setq-default auto-fill-function 'do-auto-fill) > > > (defvar break-line 0) > > > > > > (defun break-line-ddd () > > > "Breaks long lines using auto-fill tool." > > > (interactive) > > > > > > (pcase break-line > > > ((or 'nil 0) > > > (setq comment-auto-fill-only-comments nil) > > > (auto-fill-mode 0) > > > (message "%s %s" > > > "Disable: Break line; " break-line) > > > (setq break-line 1)) > > > (1 > > > (setq fill-column 72) > > > (setq comment-auto-fill-only-comments t) > > > (auto-fill-mode 1) > > > (message "%s" "Enable: Break only comments") > > > (setq break-line 2)) > > > (_ > > > (setq comment-auto-fill-only-comments nil) > > > (auto-fill-mode 1) > > > (message "%s" "Enable: Break all long lines") > > > (setq break-line 0)) )) > > > > > > (defun break-line-set () > > > "Breaks long lines using auto-fill." > > > (break-line-ddd) > > > (global-set-key (kbd "H-b") #'break-line-ddd) ) > > > > > > (break-line-set) > > > > > > > > > > > >