unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27777: Footnotes: only allow creation when in text body [Code included]
@ 2017-07-20 21:40 Boruch Baum
  2019-07-21 14:13 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Boruch Baum @ 2017-07-20 21:40 UTC (permalink / raw)
  To: 27777

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#27777: Footnotes: only allow creation when in text body [Code included]
  2017-07-20 21:40 bug#27777: Footnotes: only allow creation when in text body [Code included] Boruch Baum
@ 2019-07-21 14:13 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-21 14:13 UTC (permalink / raw)
  To: Boruch Baum; +Cc: 27777

Boruch Baum <boruch_baum@gmx.com> writes:

> 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.

I think adding footnotes when you're in a footnote is fine -- it's often
used for humorous effect.  So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-21 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 21:40 bug#27777: Footnotes: only allow creation when in text body [Code included] Boruch Baum
2019-07-21 14:13 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).