Uwe Brauer wrote:
> Nice to hear. It was sent to emacs-devel that time, later the
> assignment-question came across.
> As its a bug-fix for XEmacs too, maybe it should be taken here.
> Should be installed as a hook and always run first, if
> footnode-mode is switched on.
After a couple of days of testing I found 3 problems and have 2 suggestions.
I will attach my setting below, but I turn on footnode-mode in several
mayor modes, one of them LaTeX mode and so far the only problematic
one.
- when opening a typical latex file with all this headers etc
footnote-mode is not on, although it should according to the hook
setting. Not a big problem I just turn it on
manually.
(footnote-mode 1) instead of nil should do it
- (Footnote-init is called by the footnote-mode-hook) so it runs
when turning the mode on, however for some bizarre reason
footnote-init gets the footstyle wrong. Although default is
numeric[1] in latex mode footnote-init selects roman-upper.
footnote vars should be independent from latex-mode vars.
Probably it reads your footnote-default here.
footnote doesn't read latex-mode styles.
You may add a hook in latex-mode, setting footnode-mode style.
When
I substitute \documentclass[12pt]{article} by
\documentclass{article} and rerun footnote-init the style changes
to english upper. So how can I set style correctly?
Footnote-cyle-style does not help!
Probably thats a pure latex-issue.
Maybe something clashes beween latex- and footnote regexp.
Should the problem persist, please send some example code.
- the undo function seems to confuse footnote. Suppose I want
to
insert a footnote but then call undo, the next time I call
footnote-add-footnote the counter has proceed even if I call
footnote-init before and this is odd since I thought this
function would scan the buffer and set the counter accordingly,
but no.
Seems a bug. I'll dig into it. Thanks.
BTW when publishing new version of footnote-init, I intend to include some of your keys,
examples and explanation as intro for other users. Agreed?
Andreas
- I find the following useful: insert-footnote, that is [2] will be
changed to [2] this footenote will be inserted something of this
sort.
(defun my-insert-footnote ()
(interactive)
(Footnote-delete-footnote nil)
(yank 3)) or may be better to work with registers.
- the other generalisation would be to insert footnotes with
comment syntax, so something like having a (indent-for-comment)
before inserting a footnote, which would lead to % [2]
Uwe Brauer
Footnotes:
[1] which I prefer!
%%Footnotes:
%% [2] with comments
Here is my setting
(require 'footnote)
;(autoload 'footnote-mode "footnote" "" t)
(defun turn-on-my-footnote-mode ()
(interactive)
(footnote-mode nil))
(add-hook 'mail-mode-hook 'turn-on-my-footnote-mode)
(add-hook 'message-mode-hook 'turn-on-my-footnote-mode)
(add-hook 'matlab-mode-hook 'turn-on-my-footnote-mode)
(add-hook 'LaTeX-mode-hook 'turn-on-my-footnote-mode)
(add-hook 'text-mode-hook 'turn-on-my-footnote-mode)
(add-hook 'emacs-lisp-mode 'turn-on-my-footnote-mode)
(setq footnote-narrow-to-footnotes-when-editing t) ;does not work
(defun my-set-footnote-keys ()
(interactive)
(local-set-key [(control right)] 'Footnote-add-footnote)
(local-set-key [(control c) right] 'Footnote-cycle-style)
(local-set-key [(control c) left] 'footnote-init)
(local-set-key [(control c) f31] 'footnote-delete-footnote)
(local-set-key [(control f30)] 'Footnote-goto-footnote)
(local-set-key [(control left)] 'Footnote-back-to-message))
(add-hook 'footnote-mode-hook 'my-set-footnote-keys)
(add-hook 'footnote-mode-hook 'footnote-init)
(defun my-set-footnote-style ()
(interactive)
(Footnote-set-style 'numeric))
(add-hook 'footnote-mode-hook 'my-set-footnote-style);;[1]
(setq footnote-prefix [(control c) (control n)])
(require 'footnote-init)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta