From unknown Mon Aug 18 11:22:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2017 21:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27775@debbugs.gnu.org X-Debbugs-Original-To: Emacs Bug Reporting Received: via spool by submit@debbugs.gnu.org id=B.150058546932253 (code B ref -1); Thu, 20 Jul 2017 21:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jul 2017 21:17:49 +0000 Received: from localhost ([127.0.0.1]:50085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYIpR-0008O8-7u for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:17:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYIpP-0008Nv-UR for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:17:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYIpJ-0000XE-Sm for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:17:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYIpJ-0000X5-P6 for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:17:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYIpI-0004Hs-MY for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYIpD-0000Tw-MH for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:17:40 -0400 Received: from mout.gmx.net ([212.227.15.19]:50006) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYIpD-0000Sg-BJ for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:17:35 -0400 Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MKqOW-1dYIp8428e-000189 for ; Thu, 20 Jul 2017 23:17:31 +0200 Date: Thu, 20 Jul 2017 17:17:26 -0400 From: Boruch Baum Message-ID: <20170720210849.GJ803@E15-2016.optimum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:4hRUm7pr1jkpvK7p0PwlgCF7VW/Tj1JW4GggL76tcvAyfo6AC+x lOoE3AatrbiGTs1fxKbWZfAJ/FAkacwfX/m6teau0uGxlIQQset1u0AU05SKy0Yo6W9JnTb lqU7T2cLIDF9CzPl7Z1LBH12QcCAyyfG6ds3Ow2f8AyKdnLpzxnRlOqX2RZv9rKlBPaOap4 t3k86mJOWr83bMQh9Jl8w== X-UI-Out-Filterresults: notjunk:1;V01:K0:WCZvI6ojqFA=:2R5hUYjd7v4WlhswHIifS6 FokfyARMY4a1JCjKbtFUjkFy/AnQea+wFd9LR3UDXUnnbH3Jl3RlsKPmvH5FpGbjasXEPoTEp Cb9gadknvRswKGZlFa9l+qCkl1k/5mvb6I1PlqxXJEsYYjLrZsrHEXN7kACe64xV/DTFTtfKa W+hbndPp39CQ/BypQ0zu0Yy5J/BtXy6k2vHf6Bgr5VVWLhwJDSsT4X6wB835XKrFn9AMVmPhg iPpV7VywOx5KF5Ii+FQxa05Gal3F4cKOYbsUB2lTXOfSw9P71VOQ+iIiubd/csqrZ3M/Cst3Y zRR7djmuLXqOE5IrHiJ+gaqu8gPLHhPQZTJs8YdwuVxplxFUU4MP8M+5hDHnJl9GC4WpmOFHQ 79Af/5okXlVoUabiOfKfkupVO4zRViLT/rfERIpL5P3BnuHIZJYc1MXMKnja8nuzSEI6GATUH msez4XQYB/ZKLss8uJfs0/NgPSlQ9JORFto2LU4M1uZbq8j6/C4Vd35qKhIaeIZMD0xHjQFpP YCeCx5tf07k6y0ew29dvoTPzeP8kUBY0FUmg6vqzKCa4GrVrzLH62jFsO4XhvfMrhILjzbyuE o1rQaeJiOEodTlYty4fRk+DtMHxU/uxzDiD9fDkrNV5Ln0JYGLNVEPCod9aDqmJN3oVOVMj/b PYFKnfEzynDvwHQ+5059YrUYZe47Y2DjE7GoQjA9YQ4SnpOwx+pUMisDwA512X51AMbDP3GSv Gc67wCZrI/G3a1V0A8L+v/e9dRHrig5pjf7kh7/HGoF3j7c68C0KRyoCO8cWWTFmBZ7fmM0+0 RTRg6N2erCl+s09K3lhPX8aL+oMsQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) 1] I find it preferable to have footnote text always left-justified to the beginning of the first character of text, while emacs auto-fills by default to column 1 and would require unwieldly toggling set-fill-prefix whenever moving between text body and footnotes. Here's what I've done for myself, so far, and if you like it in principle, you can have it. I'm available to tweak it some per your suggestions and my ability (eg. modify the footnote functions themselves instead advising after them). 2] Function `Footnote-add-footnote' in emacs25 defines an optional `arg', but it is never used. 3] The current default value for variable `footnote-body-tag-spacing' is 2, which is visually appealing, but doesn't persist upon `fill-paragraph'. I've tried replacing the space character with a non-breaking space (integer value 160), which you might want to consider, but it visually looks like an underscore which is un-appealing. #+BEGIN_SRC emacs-lisp (setq Footnote-align-to-fn-text t body-auto-fill-prefix nil) (defun Footnote-calc-fn-alignment-column() (+ footnote-body-tag-spacing (length (concat footnote-start-tag footnote-end-tag (Footnote-index-to-string (caar (last footnote-text-marker-alist))))))) (defun Footnote-align-to-fn() (when Footnote-align-to-fn-text (setq body-auto-fill-prefix fill-prefix fill-prefix (make-string (Footnote-calc-fn-alignment-column) 32)))) (defun Footnote-align-to-body() (when (not Footnote-align-to-fn-text) (setq fill-prefix body-auto-fill-prefix))) (defun Footnote-toggle-alignment() (interactive) (setq Footnote-align-to-fn-text (not Footnote-align-to-fn-text)) (when footnote-text-marker-alist (if (>= (point) (cdr (first footnote-text-marker-alist))) (if Footnote-align-to-fn-text (Footnote-align-to-fn) (Footnote-align-to-body)))) (if Footnote-align-to-fn-text (message "Footnotes will left-align to footnote text") (message "Footnotes will left-align to body text"))) (define-key footnote-mode-map (kbd "q") 'Footnote-toggle-alignment) (defadvice Footnote-add-footnote (after update-auto-fill-prefix activate) (interactive) (Footnote-align-to-fn)) (defadvice Footnote-back-to-message (after restore-auto-fill-prefix activate) (interactive) (setq fill-prefix body-auto-fill-prefix)) #+END_SRC -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From unknown Mon Aug 18 11:22:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jul 2019 14:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 27775@debbugs.gnu.org Received: via spool by 27775-submit@debbugs.gnu.org id=B27775.15637201385436 (code B ref 27775); Sun, 21 Jul 2019 14:43:01 +0000 Received: (at 27775) by debbugs.gnu.org; 21 Jul 2019 14:42:18 +0000 Received: from localhost ([127.0.0.1]:59264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpD2Y-0001Pc-6N for submit@debbugs.gnu.org; Sun, 21 Jul 2019 10:42:18 -0400 Received: from quimby.gnus.org ([80.91.231.51]:58856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpD2W-0001PU-5R for 27775@debbugs.gnu.org; Sun, 21 Jul 2019 10:42:16 -0400 Received: from [80.169.244.84] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpD2R-0004i8-P5; Sun, 21 Jul 2019 16:42:14 +0200 From: Lars Ingebrigtsen References: <20170720210849.GJ803@E15-2016.optimum.net> Date: Sun, 21 Jul 2019 16:42:11 +0200 In-Reply-To: <20170720210849.GJ803@E15-2016.optimum.net> (Boruch Baum's message of "Thu, 20 Jul 2017 17:17:26 -0400") Message-ID: <87o91n5u0s.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Boruch Baum writes: > 1] I find it preferable to have footnote text always left-justified to > the beginning of the first character of text, while emacs > auto-fills by default to column 1 and would require unwieldly > t [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Boruch Baum writes: > 1] I find it preferable to have footnote text always left-justified to > the beginning of the first character of text, while emacs > auto-fills by default to column 1 and would require unwieldly > toggling set-fill-prefix whenever moving between text body and > footnotes. This seems to have changed since this bug was filed -- when auto-filling, things seem to work as expected in the footnotes. However, `M-q' didn't work in any sensible fashion: Footnotes: [1] Foo bar and then hit `M-q' would result in Footnotes: [1] Foo bar so I've added a new fill-paragraph function to the Emacs trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 21 10:43:29 2019 Received: (at control) by debbugs.gnu.org; 21 Jul 2019 14:43:29 +0000 Received: from localhost ([127.0.0.1]:59268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpD3e-0001RS-H4 for submit@debbugs.gnu.org; Sun, 21 Jul 2019 10:43:27 -0400 Received: from quimby.gnus.org ([80.91.231.51]:58874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpD3c-0001RK-86 for control@debbugs.gnu.org; Sun, 21 Jul 2019 10:43:24 -0400 Received: from [80.169.244.84] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpD3Z-0004iK-E7 for control@debbugs.gnu.org; Sun, 21 Jul 2019 16:43:23 +0200 Date: Sun, 21 Jul 2019 16:43:20 +0200 Message-Id: <87muh75tyv.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #27775 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 27775 fixed close 27775 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 27775 fixed close 27775 27.1 quit From unknown Mon Aug 18 11:22:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2019 01:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Lars Ingebrigtsen Cc: 27775@debbugs.gnu.org, Boruch Baum Received: via spool by 27775-submit@debbugs.gnu.org id=B27775.156384389124933 (code B ref 27775); Tue, 23 Jul 2019 01:05:01 +0000 Received: (at 27775) by debbugs.gnu.org; 23 Jul 2019 01:04:51 +0000 Received: from localhost ([127.0.0.1]:33763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpjEZ-0006U5-82 for submit@debbugs.gnu.org; Mon, 22 Jul 2019 21:04:51 -0400 Received: from mail-io1-f43.google.com ([209.85.166.43]:44842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpjEX-0006To-GH for 27775@debbugs.gnu.org; Mon, 22 Jul 2019 21:04:50 -0400 Received: by mail-io1-f43.google.com with SMTP id s7so78095534iob.11 for <27775@debbugs.gnu.org>; Mon, 22 Jul 2019 18:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+8TPp10jGiCsjcOLurpgAv6tD11yBQJchlDOWxwjeJ8=; b=Vbnojbv9jgDUNt818pGXtGdbLly4Rtcu6aiLGSyW5lWi9e8qopz0IlocAkQgBwj1To zjhSC7rO1riPv0S/8WRlL0wNsYrWrvPlQtCu+UJc7h1tijHeMsqjnsUhXEDXF3s/L1sV G0s1Gll8iv2R9ELoy7LAzVnnLtbHgXn+sm/6U8NXtKcgcIGbBBY5yEW8iIOe3itreZ/z TBQqyMIBD0DpaifDkYL3szz1SijmZhwDhSWyUnD1Khi68tvTEe6qnylycVh5VhCyel8P IASWBBfW24fv+1DDyeg2yZjuvGJ93r5TnLlhBV+TYlQqayezvA0XO6CpM+pde7hTnXXS YkkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+8TPp10jGiCsjcOLurpgAv6tD11yBQJchlDOWxwjeJ8=; b=RjtJlzYkirKgZp3FbFSlPtjrXqb3DufrmLiNes7wKOr3L0blift7GABeSsSQM0Ha88 smDIYLkB77yVTsU5f8Cu8N7HtWfP+mOvt7dxjbJLD6ZRtzLbSFZtsBlxiWKjeAx3A+Y1 f/LYg5ukwZ16VW9YHlulMOxp1Swt56wFAVXZVuYNi2g2ncPLa57iJY8aoTakgpEKdUhw zZsFk13LswGTQqpDl5BxD5zBvFKbqwYaFjzOzrO6VckSzMsEipZ+NDiGi/PCazM49zLd zkjBZZH76ZyPKHDW5DFtOodRkV8nLrN5/fmytbM1bL4hTFgBOITFLekOV1YEgWgDNYWQ zspw== X-Gm-Message-State: APjAAAWXvgtvPyodiutfwmswH6ZA/RtYOsrq6brI0S8zzQ2EKfU5Rc2I MaKnN9JVY10pEvUUzY4VutTTJGbe X-Google-Smtp-Source: APXvYqwm9MYFUJZyYapkx2OKyh1V/G6EN8831eqWwbGNwZRr8gL0A+zNvrKan7BHpApG08/G3/v4+g== X-Received: by 2002:a6b:d809:: with SMTP id y9mr70356823iob.301.1563843883850; Mon, 22 Jul 2019 18:04:43 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id c81sm63921902iof.28.2019.07.22.18.04.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2019 18:04:43 -0700 (PDT) From: Noam Postavsky References: <20170720210849.GJ803@E15-2016.optimum.net> <87o91n5u0s.fsf@mouse.gnus.org> Date: Mon, 22 Jul 2019 21:04:42 -0400 In-Reply-To: <87o91n5u0s.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Sun, 21 Jul 2019 16:42:11 +0200") Message-ID: <87wog9wogl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > so I've added a new fill-paragraph function to the Emacs trunk. Hmm, you did (define-minor-mode footnote-mode ... (setq-local fill-paragraph-function #'footnote--fill-paragraph) But since footnote-mode is a minor mode, isn't it a mistake to just take over fill-paragraph-function like that? What if the major mode has installed some fill-paragraph-function? From unknown Mon Aug 18 11:22:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2019 11:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Noam Postavsky Cc: 27775@debbugs.gnu.org, Boruch Baum Received: via spool by 27775-submit@debbugs.gnu.org id=B27775.156387982612418 (code B ref 27775); Tue, 23 Jul 2019 11:04:02 +0000 Received: (at 27775) by debbugs.gnu.org; 23 Jul 2019 11:03:46 +0000 Received: from localhost ([127.0.0.1]:34105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpsa9-0003ED-S1 for submit@debbugs.gnu.org; Tue, 23 Jul 2019 07:03:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpsa8-0003E3-1X for 27775@debbugs.gnu.org; Tue, 23 Jul 2019 07:03:45 -0400 Received: from [80.169.244.84] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpsa0-0007v1-Lj; Tue, 23 Jul 2019 13:03:40 +0200 From: Lars Ingebrigtsen References: <20170720210849.GJ803@E15-2016.optimum.net> <87o91n5u0s.fsf@mouse.gnus.org> <87wog9wogl.fsf@gmail.com> Date: Tue, 23 Jul 2019 13:03:35 +0200 In-Reply-To: <87wog9wogl.fsf@gmail.com> (Noam Postavsky's message of "Mon, 22 Jul 2019 21:04:42 -0400") Message-ID: <87wog9108o.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Noam Postavsky writes: > Lars Ingebrigtsen writes: > >> so I've added a new fill-paragraph function to the Emacs trunk. > > Hmm, you did > > (define-minor-mode footnote-mode > ... > (setq-local fill-paragra [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Noam Postavsky writes: > Lars Ingebrigtsen writes: > >> so I've added a new fill-paragraph function to the Emacs trunk. > > Hmm, you did > > (define-minor-mode footnote-mode > ... > (setq-local fill-paragraph-function #'footnote--fill-paragraph) > > But since footnote-mode is a minor mode, isn't it a mistake to just take > over fill-paragraph-function like that? What if the major mode has > installed some fill-paragraph-function? Oh, yeah, that's true. How are minor modes supposed to do the paragraph filling? Hm... For adaptive fill footnote does: (unless adaptive-fill-function ;; nil and `ignore' have the same semantics for adaptive-fill-function, ;; but only `ignore' behaves correctly with add/remove-function. (setq adaptive-fill-function #'ignore)) (remove-function (local 'adaptive-fill-function) #'footnote--adaptive-fill-function) [...] (add-function :around (local 'adaptive-fill-function) #'footnote--adaptive-fill-function) and I guess it could do the same for fill-paragraph-function? (It seems like a mouthful, though -- perhaps there should be a helper function to do all this?) Hm! Or will using fill-forward-paragraph-function do the right thing both for adaptive filling and paragraph filling? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 18 11:22:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2019 12:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Lars Ingebrigtsen Cc: 27775@debbugs.gnu.org, Boruch Baum Received: via spool by 27775-submit@debbugs.gnu.org id=B27775.15640570239090 (code B ref 27775); Thu, 25 Jul 2019 12:18:01 +0000 Received: (at 27775) by debbugs.gnu.org; 25 Jul 2019 12:17:03 +0000 Received: from localhost ([127.0.0.1]:38479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqcgA-0002MY-QJ for submit@debbugs.gnu.org; Thu, 25 Jul 2019 08:17:02 -0400 Received: from mail-io1-f54.google.com ([209.85.166.54]:42010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqcg8-0002M0-KU for 27775@debbugs.gnu.org; Thu, 25 Jul 2019 08:17:01 -0400 Received: by mail-io1-f54.google.com with SMTP id e20so66342370iob.9 for <27775@debbugs.gnu.org>; Thu, 25 Jul 2019 05:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=UzFBKywqSyn31BgBVHqNq+zv9Unz0lDVhsnE3cqtdJM=; b=Gxm1PMHOpwCQTMiAeXJjfiZtFG7xZwSoQn+Pbk/03P5JqRsRP/hORXVAy677BzitWV Q3zDZM8Kg+dfcFklfsfbpx42RGSygR5cj3fBhyxgJhct3cezkolACgtBnwHj8Sb6NDMW Fot8d3W9alhsYyQ6uPc3vpDloMiHxov8fYi+70hftT//LbC0tr9KCjhxYkIlUDDDCTtm W2WEUOHzz62WmX2lsd6ZSoljVih0bKt1JL4P9ta1VSFEHpAi0HjBcjCyU9fSY8W3a2jP u6WyW6NqlszKZ7HsCHiVPVv0tIIHDvWKd1PctyfzZGM+jK0bbiRVahBw4tvy90NVQyno 4qCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=UzFBKywqSyn31BgBVHqNq+zv9Unz0lDVhsnE3cqtdJM=; b=gEfMl296xdPIvtJsFovEu0tWmdZIr1mEa8TYs0SutoADT4vADgid88bVaOy92KKvzX Cm/+FUerhePPZUZogYsA9MQdeN3gG7RzjcCUobuPFT4sysqsfarbG6SXwUlLenKnjjDU HUazEWxJxlIjOgiLVCGqFNQSoaC0oIJHuf7o0dyDi3ubjT4sqXTB4vmgHUIcvkJlkhh2 rIyMvBvBj3cC2N+0Z8mxnh1haEEcQgjNqQ4kUc6LWUZwhHS8eiHnld8LMkhp1YT42737 SLhgkRwUkyI3Wss7KUN42W5gDDujlM1ToVHyDKjUtSJrOx+9haAIif+N1jDe9SwejYOD cP5g== X-Gm-Message-State: APjAAAUxwOczCzo6rHLwquXDH9RALzGiiJMR8br1XMACXTn517O0MFcY Ed66hLN+xIVsVevizNB7qSk= X-Google-Smtp-Source: APXvYqw7rsRQILbzf4+ZQyUL9Cv/l0ONPdL6ypawtQ9WJbMFhe2tIh9FNv7XSAiznD35VhfQnL+s3Q== X-Received: by 2002:a5e:8e42:: with SMTP id r2mr690991ioo.305.1564057015069; Thu, 25 Jul 2019 05:16:55 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id k2sm42638871iom.50.2019.07.25.05.16.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jul 2019 05:16:54 -0700 (PDT) From: Noam Postavsky References: <20170720210849.GJ803@E15-2016.optimum.net> <87o91n5u0s.fsf@mouse.gnus.org> <87wog9wogl.fsf@gmail.com> <87wog9108o.fsf@mouse.gnus.org> Date: Thu, 25 Jul 2019 08:16:53 -0400 In-Reply-To: <87wog9108o.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Tue, 23 Jul 2019 13:03:35 +0200") Message-ID: <87d0hywbpm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Hm! Or will using fill-forward-paragraph-function do the right thing > both for adaptive filling and paragraph filling? I think the footnote--adaptive-fill-function would still be needed, because fill-forward-paragraph-function can't choose the fill prefix. From unknown Mon Aug 18 11:22:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2019 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Noam Postavsky Cc: 27775@debbugs.gnu.org, Boruch Baum Received: via spool by 27775-submit@debbugs.gnu.org id=B27775.156407638717622 (code B ref 27775); Thu, 25 Jul 2019 17:40:02 +0000 Received: (at 27775) by debbugs.gnu.org; 25 Jul 2019 17:39:47 +0000 Received: from localhost ([127.0.0.1]:40403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqhiU-0004a9-46 for submit@debbugs.gnu.org; Thu, 25 Jul 2019 13:39:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:47322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqhiS-0004Zz-4g for 27775@debbugs.gnu.org; Thu, 25 Jul 2019 13:39:44 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hqhiK-0006fv-SZ; Thu, 25 Jul 2019 19:39:40 +0200 From: Lars Ingebrigtsen References: <20170720210849.GJ803@E15-2016.optimum.net> <87o91n5u0s.fsf@mouse.gnus.org> <87wog9wogl.fsf@gmail.com> <87wog9108o.fsf@mouse.gnus.org> <87d0hywbpm.fsf@gmail.com> Date: Thu, 25 Jul 2019 19:39:36 +0200 In-Reply-To: <87d0hywbpm.fsf@gmail.com> (Noam Postavsky's message of "Thu, 25 Jul 2019 08:16:53 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Noam Postavsky writes: > Lars Ingebrigtsen writes: > >> Hm! Or will using fill-forward-paragraph-function do the right thing >> both for adaptive filling and paragraph filling? > > I think the footnote--ada [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Noam Postavsky writes: > Lars Ingebrigtsen writes: > >> Hm! Or will using fill-forward-paragraph-function do the right thing >> both for adaptive filling and paragraph filling? > > I think the footnote--adaptive-fill-function would still be needed, > because fill-forward-paragraph-function can't choose the fill prefix. Right. I've looked through the code to see if I could find any other minor modes that does stuff with these variables, and I couldn't find them. So I've just refactored out the dance footnote-mode does with adaptive-fill-function into its own macro and done the same with fill-paragraph-function. If this is deemed generally useful, then we can move it somewhere more central. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no