From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: michael-franzese@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Strange behaviour of auto-fill Date: Sat, 24 Apr 2021 02:59:07 +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="5016"; 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 03:00:17 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 1la6ee-0001Cn-Me for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 03:00:16 +0200 Original-Received: from localhost ([::1]:33968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la6ed-0000md-Oi for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 21:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la6de-0000mP-9n for help-gnu-emacs@gnu.org; Fri, 23 Apr 2021 20:59:17 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:55253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la6dZ-0008PS-UO for help-gnu-emacs@gnu.org; Fri, 23 Apr 2021 20:59:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619225947; bh=K7Uf159w4xxPHuYJuoKPrXnRJTW8ZcBalpvzFVHc7RI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=VfVQ3ZJU8VFFN/Oue4xukAJi/AZNfIGk0vcuv/G6gKj+Mm9oDL39kzj4wXKlTgCIA 0kJIdsnnosqUWY8pTcUVWkFbV1ADIwULYPBpHinHLEibqh74+THj3bRVRfqRH+fjU/ aNm76WwWDZS9ThTiS9/7sfxvvEVAoInTPQNFjQsg= 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 02:59:07 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:2Ib2o2q2jE/vaE3DXUwrLefeSaDtv1eWWX/Uy2EPi35S8m3NEqWlRA8f6VT4fJdPJaodZ MwdVt+YnsJ0g8kOdpzf1gmQ2EOQxAZDLe3/wRdRpXwlGCRk4+0cH2cVPU4PMWGN7c9nQ4QaCiYv6 W9dNt/5+N+3oAflGYwA93BkUKhZ1RFLoTd/40u7wRx6nyWg6p/VQwZnfwWQ26o/QzFE2Bh8Z17kZ Kqb4KMeCCFaDiCl7wh8czTOfCk7ezj3swc5PuY3+Rgl80Q2IjxRphRyAQBoUbtTuvBwtrohIygyq hE= X-UI-Out-Filterresults: notjunk:1;V03:K0:/AM0YqzwtQo=:SnW+TVppF33eC2AS5QOeFW cCI6THbyzoC6MXX0nin7BSvop+3pC2Q36GTn6JRuNh8auE8h37vFr55mvjJjT0n1sWg6pXtN3 AwT8/NBQKHx0MNtXbozUcloh0v8btjuCE/03/tSBj7R8b/3ajfxZqxFX7ZhNDqp/CTy4Ccta/ LSY62W7jwXm1nKTzEfegUVYGeFnvlf1wuB/9HmRMvQFPuLcwMnAjH8VOOtN1uNqxKNwfBnk98 JRkT9tS8+EQqpLNSnAvlOEGdbf3rSpYK7qN0qhxwuCwa8+adIiIhpeAkbmeAdGfe76/WTXOcT Or7lKR7bueWcDSdZJujfDXN0bIpAhm4rVdd9colcPZ277SL6HYSerXOG67sOJiV9D0FQUDZI6 qpBMX7aoVcjOSFE2D5Zzn+sYU6/FKrPDLvg9Ho2OSrnYUO4bIDARMeKeb8s+uGgxmkOuB8kyY /B4WN4b5gTFzD+uyymBu7NP71DImRq3u08Ta/c3NrXES+wnFj6Lr8m8xvrmo8Hgeqxi+1NYbZ VEVU1D69u/l4VtmMnwXFworV4Aal3rPwcbgVaeNFlFR4q4fPXFmd1yATF9jPUQweJmQJJPm0x EqihRukcMXNHoyfNJfHn7+rfWvjiXt4g4LUWn8GGTv/MzqRPqMHKXwbd8BVCtYd8fhGn9//mw djswWnBupVM/ZPgEZbk8tcZlQMUHhjZsDCOqeinFcqDufQlLY7gWoQdFDWc+qsdeKoErvwbTp cOvhILf4fN22hZYslDd9W4mVbwryjop8VxL6Ko6CIkjS4a81YiA+oD6jBRFGb2OMgLrd2dLR Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael-franzese@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:129141 Archived-At: Have tried to do something but gets me error: Unknown string-match pattern: (string-match "on-off" s) =2D---- (defun break-line-order () (setq order "off-on") (pcase ((string-match "off-on" s) (setq break-line 0) (message "%s" "break-line-order: off-on")) ((string-match "on-off" s) (setq break-line 1) (setq-default auto-fill-function 'do-auto-fill) (message "%s" "break-line-order: on-off")) )) (break-line-order) > 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) > > > > > > > > > > > > >