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#27777: Footnotes: only allow creation when in text body [Code included] Date: Thu, 20 Jul 2017 17:40:02 -0400 Message-ID: <20170720214002.GK803@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 1500587095 30732 195.159.176.226 (20 Jul 2017 21:44:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 21:44:55 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) To: 27777@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 20 23:44:51 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 1dYJFW-0007Zl-H8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 23:44:46 +0200 Original-Received: from localhost ([::1]:40107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJFc-0001TA-5F for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 17:44:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJBy-0006iS-8T for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJBv-0001Ax-6r for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:41:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47425) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYJBv-0001Aq-2h for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dYJBu-0000W0-NK for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:41: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:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27777 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.15005868201915 (code B ref -1); Thu, 20 Jul 2017 21:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2017 21:40:20 +0000 Original-Received: from localhost ([127.0.0.1]:50102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYJBD-0000Up-MI for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:40:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYJBC-0000Ud-6F for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:40:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJB6-0000Yo-BQ for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:40:13 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34733) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYJB6-0000YO-7g for submit@debbugs.gnu.org; Thu, 20 Jul 2017 17:40:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJB5-000613-5e for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:40:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJB2-0000Ua-3r for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:40:11 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:57137) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYJB1-0000Sm-PT for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 17:40:08 -0400 Original-Received: from E15-2016.optimum.net ([108.6.168.221]) by mail.gmx.com (mrgmx002 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MNYxW-1dWgLX1SB8-007E5G for ; Thu, 20 Jul 2017 23:40:05 +0200 Content-Disposition: inline X-Provags-ID: V03:K0:DApnwwOYkbLfaObWfVQuP5W7K2Sad+cgbJIni/hbU3ylr9kqhi4 tKEZsF4pHpezW2H47asuLxtAQlWOZ7AgEREvW18kHDZsiw30qnbEUkxUTSyw+F3FSK0UOx4 7rVo4b7WsxZZJmNePZmN7yTEoQb7mU6MtYSqXWn7tsSrz2QBFXMAlh21Dt0KsRFzPPeTckA vzymWAt2US8blyxOxUbRQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:QQP7ByCybXQ=:WNk8noKRIh6W7AV5dxeH5g S7CnuGpz7HW6oSTJp6A5Zey8oR8p25kUOqNXV76dpMNo38yzOL2sqlH/xlJH/Qvz3mT6uwn9C K7ZIeEfu9UOTHQWu1l39ReiCBKtrp7cGcxZqcAA1n96CxEOSyGc5o+ih5pwwQ2we0sQED937b ekchVDxxku6zfg8WiY0pviJHxkMybiUPpZWWqwSKW2wGVLvaEs2mWXfuUX2UsQixpmnsF7LtC oH+XsoJ5yvdo+o5q2M/+ML1XR3Ae+CO1YQS1/sMH0uBf/YMYRUn+1lLs0fMqr1rwTzpJpFwQZ MbzdKHZIuiTwZ28G5lysGWMmuhvGGBPd/6SkY4jl7MJsAWgtkwhjTEsiXYBlxdOxZD+PUmFKJ 6FefTvaYv9AygRu5GNDeIFyw9Y8WEf6FBk+D+vroj7aBqdZpYoBQ7XTW6kL3Qg7qz9+ikxs1Q iYs4TOqAHjhF1PPwbuL+ueeWr+FjNQUVasLlDUrb++Mlt4fd8bq5+xqD+ECcXikPs+fktHsMX bbUq+S9Yz0z01WxjXeWR5ycApTzdd4Fwt8574z3y8Dnj87W0m1N23Wau4ZUbTrmoeY7UV4hLU MNHbOcNfMETG2ZcF0WSThYlaekEF7pKoOJ7We3F4HQXxthqikhb+qtJaawnQdXu/qbm8aH+ky S34qvtkdtF8cb2EtEznmBz0LS8Xa3BdIWBtccXaEeM8vE9OrXeeJwNo+6R+3CBLwWsNbGFMnw wS3R1OjN6I6lJlQq0v9ULMtkUdHDHtLm+OqC40GRdUvKzowDyTrAKyRwKWQGGBBa7ys9KQF5 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:134802 Archived-At: I'm experiencing a bug in that emacs is allowing me to add a footnote when I am already in the footnote region. In that case, emacs blithely adds a footnote text marker at point within the footnote region. Of course, it also then adds a footnote reference marker. Here's my fix, for your consideration. #+BEGIN_SRC emacs-lisp (defadvice Footnote-add-footnote (around abort-when-in-fn-area activate) (interactive) (if (or (not footnote-text-marker-alist) (< (point) (cdr (first footnote-text-marker-alist)))) ad-do-it (message "Add footnotes only while in text body"))) #+END_SRC -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0