From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jai-bholeki@gmx.com Newsgroups: gmane.emacs.bugs Subject: bug#46193: Enabling Auto Fill mode Date: Mon, 1 Feb 2021 12:59:25 +0100 Message-ID: References: <87tuqwp2k0.fsf@gnus.org> 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="14737"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46193@debbugs.gnu.org, Philipp Stephani To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 01 13:00:12 2021 Return-path: Envelope-to: geb-bug-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 1l6XsK-0003jN-DM for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Feb 2021 13:00:12 +0100 Original-Received: from localhost ([::1]:57758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6XsJ-0005ja-E0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Feb 2021 07:00:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6XsA-0005jL-SH for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 07:00:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6XsA-0006qt-KW for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 07:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6XsA-0007lt-Jl for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 07:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: jai-bholeki@gmx.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2021 12:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46193 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 46193-submit@debbugs.gnu.org id=B46193.161218078329806 (code B ref 46193); Mon, 01 Feb 2021 12:00:02 +0000 Original-Received: (at 46193) by debbugs.gnu.org; 1 Feb 2021 11:59:43 +0000 Original-Received: from localhost ([127.0.0.1]:59249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Xri-0007kT-KB for submit@debbugs.gnu.org; Mon, 01 Feb 2021 06:59:43 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:38685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Xrg-0007k7-2y for 46193@debbugs.gnu.org; Mon, 01 Feb 2021 06:59:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612180765; bh=zgzjdk4KlseGbOz7I4hZ6emsIu79inpCrFg/UbbmUmQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=CgfN0VxeufFlsBm4iOAbygmr3UNjNqheHiS7GS38NeN9UnR4Ef25NOuW0gLWPfq6N eeG+Dk/5Tlc7yGS301HDIQKOghWwH1723FD+3rE9EiU9p3rSZs4fhJ/RZlbR/USdFk pMaE6bg7Ed/F8Cfn5hgc7tDydvDHmABVFqRNQo+w= 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-bs14.server.lan [172.19.170.182]) (via HTTP); Mon, 1 Feb 2021 12:59:25 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87tuqwp2k0.fsf@gnus.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:qEzB0ddsFc7Z5ISDBpMlenG4zqrO1hW/aPVk170ZblZC/y7g76+AofPq4K4v2s1d4Lav0 6SOcCd+pXnj6aez42TbSU/rCC1sUltVeHql+bkiuNM9sJCrNub4zvyfWFwyQJS1QCwRz/pFuGukM +rp0AC8jvifyI5ksBK7fY4Ay+Zr3br85Ia2Evc4SKyHFn6U0BWMKSGIO3T1xko9UAExfw/Vqp7We yG8SXTItlcIhJ2OVnfInBG+iC0XwgsL8f1RS6tEjBs52z1IOpkGvXYA715ZOSrUY9CFqnO4f07sU vQ= X-UI-Out-Filterresults: notjunk:1;V03:K0:LTR+1og+oBc=:9aSNCPxsSaDb5izlKZ0fNR QcORr0BNw9ubWw9TacDs6mctg0wvTGcRzRnz4udD5YaTXsAj4TdSdI/rgJaeXF2ahvokiIKR3 SfWi/qmsrLw6XHC9yzTDXaEGxRGqZT8fJ/j7j98ta1xXXNEAhMJHo2qc85SSq5hspHK04C8qm TSBerT26LYj5FmMUPMMh6V5pFbKHm1kzjiq/NSye4x1YMSv4zj9g899EAWkTd4N6Suy/5M1/8 xO+PA+maZxIzvqGmE4xeNHrtEyHJuzUUA867SwIbvvmHwy6ggsX0YaqSszxSc7cYngFDkzeZj /hS08XBM2D6S1bA6zDX+9mi1L2SdypgZYC86HQQcfZ2IZ1GMfs7ycgD2mUAH/Bo2J/+oTUrAV NrA5wVvzm7KLtB+VZGfDynqyrE6kBgCyvJF3qLb8gTaJBTptlNYoAv+WqNGiKEfD/3x5lrDpO OM9NzeuCLJmbNTKGheia3xsr4JZ9c5x8DqTScuB2BkVkVnPNCrQxW9IAIyvknKl7hRQyWQC4c 5cdFQ3uYnm2nu+hGa87TnIhZNR/+yeJ4ndzPfEya6k1yxp7djuFEq4plHyVete0W71me/2Zvr Xa+W1rzqdtWsc= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199071 Archived-At: I have now made the following function. Would I better make the functionality to be buffer-local? (defvar dfv-break-long-lines-state nil) (defun cycle-break-long-lines-din () "Breaks long lines using auto-fill tool." (interactive) ;; (pcase dfv-break-long-lines-state ;; (1 (setq fill-column 72) (setq comment-auto-fill-only-comments t) (auto-fill-mode) (message "%s" "Enable: Break only comments") (setq dfv-break-long-lines-state 2)) ;; (2 (setq comment-auto-fill-only-comments nil) (message "%s" "Enable: Break all long lines") (setq dfv-break-long-lines-state 1)) ;; (_ (setq comment-auto-fill-only-comments nil) (auto-fill-mode 0) (message "%s" "Disable: Break long lines") (setq dfv-break-long-lines-state 0)) )) (defun break-long-lines-din () "Breaks long lines using auto-fill." (setq dfv-break-long-lines-state 1) (cycle-break-long-lines-din)) > Sent: Monday, February 01, 2021 at 9:20 PM > From: "Lars Ingebrigtsen" > To: jai-bholeki@gmx.com > Cc: "Philipp Stephani" , 46193@debbugs.gnu.org > Subject: Re: bug#46193: Enabling Auto Fill mode > > jai-bholeki@gmx.com writes: > > > I have noticed that enabling a minor-mode using texinfo-mode-hook fail= s after > > setting auto-fill comments using a hook. > > > > (add-hook 'texinfo-mode-hook > > (lambda () ((set (make-local-variable > > 'comment-auto-fill-only-comments) t))) > > (auto-fill-mode) > > > > ;; crucible-mode not enabled after setting comment-auto-fill-only-comm= ents > > (add-hook 'texinfo-mode-hook 'crucible-mode) > > (add-hook 'texinfo-mode-hook > (lambda () ((set (make-local-variable 'comment-auto-fill-only-comment= s) t))) > > That's not valid syntax -- you have one extra pair of () around the > `set' function call. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no >