From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#27775: footnotes mode hanging indent [CODE INCLUDED] Date: Thu, 20 Jul 2017 17:17:26 -0400 Message-ID: <20170720210849.GJ803@E15-2016.optimum.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1500585493 11182 195.159.176.226 (20 Jul 2017 21:18:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 21:18:13 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) To: 27775@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 20 23:18:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYIpj-0002ch-Vh for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 23:18:08 +0200 Original-Received: from localhost ([::1]:40002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYIpp-0004QR-D5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 17:18:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYIpj-0004QM-CS for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:18:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYIpe-0000bH-BR for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:18:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47408) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYIpe-0000bD-7L for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dYIpe-0008Od-3C for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:18:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: Emacs Bug Reporting Original-Received: via spool by submit@debbugs.gnu.org id=B.150058546932253 (code B ref -1); Thu, 20 Jul 2017 21:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2017 21:17:49 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Content-Disposition: inline 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+ 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134800 Archived-At: 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