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:21:37 +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="11558"; 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:22:24 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 1la57w-0002sJ-B5 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 01:22:24 +0200 Original-Received: from localhost ([::1]:52136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la57v-0006GM-Ek for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Apr 2021 19:22:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la57F-0006DS-VX for help-gnu-emacs@gnu.org; Fri, 23 Apr 2021 19:21:41 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:44611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la57E-0006nY-0F for help-gnu-emacs@gnu.org; Fri, 23 Apr 2021 19:21:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619220098; bh=CqK2AGVfoSVESfkhgHugMgRlCKFjLuvwqFARxSwxKTY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=P5P6ybwvcck0n1MptJlvjBqn9LwFSJ3OnCqsVVsaDcwUS04WzdVEXQp5FfblV1hgq UdiZm6ne++UfOjX57SoQ+P3yqCbETGIheAcDRF3BORuh2fYBgEJDlUGAAWXFZ50tGl x528xF6ne4is2obPyR/JgPBIJ0GBx47tEE9w7bTs= 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:21:37 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:5A5uOyias+E/fL+S+xk0AWZG5N7Gk4qKHcz78z3iTaCPM6ZLzFteurhUK1kNaeNc0LVCZ R6h95ps9LEBn+EcHguzcGepGt3M9ARwXTbCxdiFtHNkM+m9SEjQDkOa9g4l6pZZ9Ho0rB4TRTPrf sQyzm4+39kvGyPwW9TZ2TpL2NVVoXxa+csCq9h5uP7YjKC6iaYnSvOS0i33jmzgosOJw2asjeNwo RFlEj29YDtzE9jR/HQ69TN8/Dd6McyO9hLVG0hOQpJueDrSZjH0CVwIIFXVvw0IvnJNYiY66vqQ+ 7g= X-UI-Out-Filterresults: notjunk:1;V03:K0:EKOMiIVZsEc=:ioChoOK3C8egciwJ8y9jnf VXSOWMwNLbcSi7uYiaCvPf1TR7jtzzQNzZuLBfG9C/1QlQ9CsJ7HLV5X//nKsdlFesLdoZmY7 m02xE7Ha4UBjPdrBIocqW99+xvelj/plEOOwE0lSMoHmSRexMnIvRtGEqr61ntM4DvUFKLcmO ZCmPZOu9txxGAyH8ov7pO6gtOnrAZwb3iiViDNQURhO8INBNw9QXBerPoOHD4JipZ+OdD1qvw LU8Hhoi4FdKwkMmt8zdhwLmFi2Iyi0tWi2St5Wmj30Z7JEC6FdEwb4JeLZPzZC4RVz6ok0p/i 4IbbCmVCYePHmhlpnw1W7a7TtyV+I1/D9aLhKhbivqX9kRIk8MpCMbbJuq3uxuY1FAgWqxsWy SlkRtEHnO4nacTWrFDrjTddliMCt34CYZBfvGM39HVf/+1MrC/mACKUSZ7lB5eySpePwlTywr MR5oXoj1rfWc8N5RnQ2wWtB3WrbbHs7OhcAG89PZBKln9rCS0flPe+lFB6hUL9m8Z1d1cwrcP 2ckWR65nSlFmmJQD0cT9r/cG+evSEGkIWveHGeqIp/i/goZk9FXAkKCsik1XsafPsAux/vJtQ 8vbaX+eBY8Rtxz9Eu/v1Enn7uz0PpNbJnuIFSc6coZEgM+b8xe7TKspHVC0I+QFgGITo5DhRA Fn3+j4E31nGd3M+UACHbtsrKT+UhzqY6qS56mJQqXT99/Ztufh0xEN1gE+Ns7uZuFatB13HZN 9p84l5LvYNFKNfpzFt+KjMELl/+BlbKyqEeBHQztspfelsmefDRgOK1QtmS/05JyMmrL3RuK Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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_LOW=-0.7, 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:129137 Archived-At: 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" behav= iour. > > Things get very confusing. When I comment out "(setq-default auto-fill-= function 'do-auto-fill)", "auto-fill-mode" will still break comments even = 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) > > >