Commit Graph

354 Commits

Author SHA1 Message Date
Nicolas Goaziou 155ab73f77 org-footnote: Small fix to previous commit
* lisp/org-footnote.el (org-footnote-normalize): Do not normalize
  labels when sort-only is non-nil.
2012-03-03 13:07:59 +01:00
Nicolas Goaziou daa687411d Merge branch 'maint' 2012-03-03 13:01:59 +01:00
Nicolas Goaziou c8020dd42e org-footnote: Clean-up `org-footnote-normalize'
* lisp/org-footnote.el (org-footnote-normalize): Remove an useless
  part of the function.
(org-insert-footnote-reference-near-definition): Remove function.
2012-03-03 13:00:46 +01:00
Nicolas Goaziou baa7321d17 Merge branch 'maint' 2012-03-02 22:38:26 +01:00
Nicolas Goaziou 6b91eb9e65 org-footnote: Fix normalization of inline footnotes with no footnote section
* lisp/org-footnote.el (org-footnote-normalize): Fix normalization of
  inline footnotes with no footnote section.
* testing/lisp/test-org-footnote.el: New test file.

Thanks to Samuel Wales for reporting this.
2012-03-02 22:37:12 +01:00
Nicolas Goaziou f0af36a348 Merge branch 'maint' 2012-02-29 23:06:17 +01:00
Jambunathan K f6727a9dde org-footnote: Workaround a limitation in the ODT exporter
* lisp/org-footnote.el (org-footnote-normalize): Force a paragraph
break after the last footnote definition.  This is an an
implicit assumption made by the org-lparse.el library.  With
this change, footnote definitions can reliably be exported
with ODT backend.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg01013.html.
2012-02-29 22:48:17 +01:00
Nicolas Goaziou 9ae171a86e org-footnote: Allow footnotes in verse blocks
* lisp/org-footnote.el (org-footnote-forbidden-blocks): Allow
  footnotes in verse blocks.
2012-02-24 09:44:36 +01:00
Nicolas Goaziou a356059f38 org-footnote: Allow footnotes in verse blocks
* lisp/org-footnote.el (org-footnote-forbidden-blocks): Allow
  footnotes in verse blocks.
2012-02-24 09:42:15 +01:00
Nicolas Goaziou c4b233453c Merge branch 'maint' 2012-02-07 08:43:41 +01:00
Nicolas Goaziou b3721c2a66 org-footnote: Fix bogus defvar declares
* lisp/org-footnote.el (org-blank-before-new-entry,
  org-export-footnotes-seen, org-export-footnotes-data): Fix bogus
  declarations.

This fixes bug #10745.  Thanks to Steve Revilak for the report and to
Glenn Morris for the solution.
2012-02-07 08:43:09 +01:00
Nicolas Goaziou e30e13b8c7 Merge branch 'maint' 2012-02-02 21:26:21 +01:00
Nicolas Goaziou d10792510f org-footnote: Better blank lines control when inserting a footnote
* lisp/org-footnote.el (org-footnote-create-definition): Fix space
  insertion when creating a new footnote. This fixes newline munching
  when `org-footnote-section' is nil and blank lines stacking when it
  isn't nil.

Thanks to Eric Abrahamsen for reporting this.
2012-02-02 21:22:17 +01:00
Nicolas Goaziou 6de9f14cf5 Merge branch 'maint' 2012-02-02 20:41:20 +01:00
Nicolas Goaziou acd743bdc0 org-footnote: Fix export bug introduced by previous commit
* lisp/org-footnote.el (org-footnote-normalize): Make sure that
  footnotes are moved to a single place during export.
2012-02-02 20:39:40 +01:00
Nicolas Goaziou 36cc7b4983 Merge branch 'maint' 2012-02-02 10:03:42 +01:00
Nicolas Goaziou b032a6d51b org-footnote: Fix normalization when no footnote section is defined
* lisp/org-footnote.el (org-footnote-normalize): Ensure footnote
  definition will be inserted at the end of the section corresponding
  to to its first reference.
2012-02-02 10:01:50 +01:00
Nicolas Goaziou 6c0da676af org-footnote: Fix definition ending retrieval with no footnote section
* lisp/org-footnote.el (org-footnote-at-definition-p): Make sure to
  move point at the beginning of the separator before skiping white
  spaces.  Refactor code.
2012-02-02 09:08:28 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Nicolas Goaziou d6898e589a org-footnote: Remove opportunity to have inline footnotes at beginning of line
* lisp/org-footnote.el (org-footnote-new): Cannot insert an inline
footnote at beginning of line anymore.
(org-footnote-at-reference-p): Don't recognize inline footnotes at
beginning of line.

It is technically possible to allow inline footnotes at beginning of
line, their syntax being different enough from standard references.
Though, after normalizing them, they will become standard footnotes
still at beginning of line, which will break them.
2011-11-06 14:14:36 +01:00
Nicolas Goaziou f2b3fe7318 org-footnote: Don't store text-properties of footnote definitions
* lisp/org-footnote.el (org-footnote-at-reference-p,
  org-footnote-at-definition-p): Don't store text-properties of footnote definitions.
2011-10-29 14:21:56 +02:00
Nicolas Goaziou 711b7d7d3a org-footnote: Remove text-properties from label
* lisp/org-footnote.el (org-footnote-at-reference-p,
org-footnote-at-definition-p): Remove text-properties from label.
2011-10-24 08:11:07 +02:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
Additionally, replace one

  (or (org-mode-p) (derived-mode-p 'org-mode))

with

  (derived-mode-p 'org-mode)

cause that is reflexive anyway (returns true, if the current mode is
org-mode).

Delete one check testing for org-mode or org derived mode
2011-10-22 11:29:24 +02:00
Carsten Dominik 54a9cb0d99 Maintain XEmacs compatibility
* lisp/ob-calc.el (featurep): Require calc-store.
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix regexp
special handling.
* lisp/org-compat.el (fboundp): Support for XEmacs.
* lisp/org-exp.el (org-export): Protect XEmacs from `(redisplay)' call.
* lisp/org-footnote.el (org-footnote-re): Optimize macro processing.
* lisp/org.el (org-set-autofill-regexps): Xemacs compatibility.

Patch by Michael Sperber, checked and slightly modified by Carsten.
2011-10-21 22:36:53 +02:00
Nicolas Goaziou 0fff59cd43 org-footnote: Small refactoring
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Small
  refactoring.
2011-10-01 08:57:33 +02:00
Nicolas Goaziou 0e9d401519 org-footnote: Fix an infloop
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Fix an infloop
  introduced by commit 1effad02be.
2011-09-29 22:53:45 +02:00
Nicolas Goaziou a77117ba80 org-footnote: Remove useless org-re
* lisp/org-footnote.el (org-footnote-at-definition-p): remove useless
  org-re.
2011-09-29 22:44:58 +02:00
Nicolas Goaziou 1effad02be org-footnote: Only renumber real footnotes references or definitions
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Verify point is
  at a real footnote reference or definition before renumbering it.
2011-09-29 22:34:15 +02:00
Tassilo Horn 2e2bd083da Fix renumbering for footnotes at BOL.
Hi all,

org-footnote-renumber-fn:N invalidates footnotes that appear as the
first thing on a line.  Here's a test file including the recipe.

--8<---------------cut here---------------start------------->8---
* Bla

  This is a line in which the following footnote that is inserted exactly
  [fn:1] is the first thing in that line.  And now invoke
  org-footnote-renumber-fn:N and see it breaking.

* Footnotes

[fn:1] Test
--8<---------------cut here---------------end--------------->8---

Note, that in larger org files, it's likely that you don't even notice
that the footnotes break.

Once I added a patch on patchwork that fixed this issue, and that's
shown as "accepted".

  http://patchwork.newartisans.com/patch/705/

I think, I've marked it as deferred or so myself because I've thought
the issue was fixed in the meantime, but that doesn't seem to be true.

Here's an updated patch.
2011-09-29 15:55:30 +02:00
Nicolas Goaziou c00fe037be org-footnote: Don't offer to create a footnote when it already exists
* lisp/org-footnote.el (org-footnote-goto-definition): This patch
  makes sure the function says when a definition has been found.
  Thus, moving from the reference to the definition doesn't offer to
  create the latter again.
2011-09-29 15:30:46 +02:00
Nicolas Goaziou c7abf641eb org-footnote: fix commit 774f9cb8e6
* lisp/org-footnote.el (org-footnote-create-definition): Explicitely
  move point after tag, if it has just been inserted.
2011-09-29 15:20:34 +02:00
Nicolas Goaziou 774f9cb8e6 org-footnote: ensure footnote tag is inserted after footnotes in non-Org buffers
* lisp/org-footnote.el (org-footnote-create-definition): When the tag
  is missing, it is created before any existing footnote, or at end of
  buffer.  In the latter case, the marker pointing at the position
  where the new footnote is going to be inserted (at end of buffer)
  stays before the tag.  This patch makes sure that the marker will be
  kept after the tag.
2011-09-28 19:07:38 +02:00
Nicolas Goaziou 1e1cde7546 org-footnote: check context around definition at a proper place
* lisp/org-footnote.el (org-footnote-at-definition-p): Context must be
  valid at the beginning of line, not at point.
2011-09-17 12:01:54 +02:00
Nicolas Goaziou ff4af45e68 org-footnote: no footnote in latex fragments
* lisp/org-footnote.el (org-footnote-in-valid-context-p): No footnote
  in latex fragments.
2011-09-04 16:45:39 +02:00
Nicolas Goaziou d6aa8ffa13 org-footnote: fix xhtml export
* lisp/org-footnote.el (org-footnote-normalize): be sure to separate
  the last footnote definition from the rest of the buffer.

Thanks to Jambunathan K for reporting this.
2011-08-29 13:05:57 +02:00
Nicolas Goaziou 4574cc11bc org-footnote: preserve narrowing when searching a definition
* lisp/org-footnote.el (org-footnote-get-definition): the function has
  to widen buffer if definition has not been found in the current
  narrowed part. Be sure to restore that restriction once the
  definition is found.
2011-08-25 21:12:07 +02:00
Nicolas Goaziou 065c5c3241 Make some files pass checkdoc test 2011-08-23 21:43:30 +02:00
Nicolas Goaziou 300b2e8f4e org-footnote: normalize function cleanup
* lisp/org-footnote.el (org-footnote-normalize): refactor, and fix
  some blank lines deletion.
2011-08-18 20:18:24 +02:00
Bastien Guerry a472bee33d org-footnote.el: silence byte-compiler. 2011-08-17 16:05:11 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Nicolas Goaziou 4178a154f3 org-footnote: do not suggest bindings outside Org
* lisp/org-footnote.el (org-footnote-goto-definition): don't send
  erroneous message: suggested bindings might not be set outside Org.
2011-08-16 23:20:33 +02:00
Nicolas Goaziou 6815e30b62 org-footnote: refactor code 2011-08-16 23:20:33 +02:00
Nicolas Goaziou a8d621c3da org-footnote: remove every footnote tag when normalizing non Org buffers
* lisp/org-footnote.el (org-footnote-normalize): effectively remove
  any footnote tag in non Org buffers, as detailled in
  org-footnote-tag-for-non-org-mode-files doc-string.
2011-08-16 23:20:33 +02:00
Nicolas Goaziou baf7dde28e org-footnote: allow non Org mode files to have no footnote tag
* lisp/org-footnote.el (org-footnote-tag-for-non-org-mode-files):
  notify the opportunity to set the variable to the empty string.
(org-footnote-normalize, org-footnote-create-definition): carefully
  check for inserted newlines and presence of the footnote
  tag.
2011-08-16 23:20:33 +02:00
Nicolas Goaziou cb906e4406 org-footnote: re-use global regexps when possible
* lisp/org-footnote.el (org-footnote-at-definition-p): re-use
  org-footnote-definition-re.
2011-08-16 23:03:04 +02:00
Nicolas Goaziou d053a72066 org-footnote: tweak footnote definition regexp
* lisp/org-footnote.el (org-footnote-definition-re): remove an useless
  group.
(org-footnote-at-definition-p): reflect removal of the group.
2011-08-16 23:03:04 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
Nicolas Goaziou 0bf0b75d51 org-footnote: keep byte-compiler happy 2011-08-14 10:52:14 +02:00
John Wiegley bb08fab804 org-footnote: Guard against `def' being nil, if footnote undefined 2011-08-06 19:00:06 -05:00
Nicolas Goaziou c2c7e88677 org-footnote: fix a doc-string 2011-08-06 12:11:07 +02:00
Nicolas Goaziou 2ea5f35fff org-footnote: fix function declaration 2011-08-06 11:56:15 +02:00
Nicolas Goaziou 1913f3f50c org-footnote: allow inserting inlined footnotes at column 0
* lisp/org-footnote.el (org-footnote-new): only forbid non-inlined
  footnotes at column 0, as only them can be confused with a footnote
  definition.
2011-08-06 11:56:14 +02:00
Nicolas Goaziou 795b7c5ca0 org-footnote: add speedups when prompted for a label
* lisp/org-footnote.el (org-footnote-new): use ido or iswitchb when
  available when prompted for a label. Also rename a local variable to
  avoid confusion with an existing function.
2011-08-06 11:56:14 +02:00
Nicolas Goaziou a41541c033 org-footnote: remove an unused variable
* lisp/org-footnote.el (org-footnote-label-history): removed variable
(org-footnote-new): remove call to that variable.
2011-08-06 11:56:14 +02:00
Nicolas Goaziou c3631aae7e org-footnote: prevent LaTeX export from catching footnotes in protect environment
* lisp/org-footnote.el (org-footnote-in-valid-context-p): check
  `org-protected' property before allowing to match a footnote.
(org-footnote-at-reference-p): remove an obsolete test. It's now done
in the previous function.
2011-07-30 12:38:06 +02:00
Nicolas Goaziou 520bd1feac org-footnote: don't move point for unsuccessful search of the next footnote
* lisp/org-footnote.el (org-footnote-next-reference-or-definition): if
  no more footnote is found, be sure to go back to the original
  position. Otherwise, point might be left on a footnote-like element
  that has been dished out.
2011-07-29 21:06:38 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Nicolas Goaziou 3b5132bf8f org-footnote: fix bug when inserting a footnote in a non-Org buffer
* lisp/org-footnote.el (org-footnote-create-definition): when skipping
  already written footnotes definition, the algorithme would assume
  each one was only one-line long.
2011-07-25 11:26:06 +02:00
Nicolas Goaziou ed685f8a7e org-footnote: in Message mode, do not allow footnotes in headers
* lisp/org-footnote.el (org-footnote-in-valid-context-p): avoid cited
  lines and headers in message-mode.
(org-footnote-at-reference-p): remove check for cited lines, this is
now handled by the previous function. Refactor.
2011-07-19 12:52:06 +02:00
Nicolas Goaziou 6278c73cdb org-footnote: add more checks to avoid false-positives
* lisp/org-footnote.el (org-footnote-at-reference-p): test if match is
  in cited text, when replying to a message.
(org-footnote-new): do not create a new footnote at bol, as it might
be seen as a definition.
(org-footnote-at-definition-p): ignore definitions in forbidden
blocks, as it is already the case for references.
2011-07-18 22:01:03 +02:00
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Bastien Guerry c3748fcd80 Don't use `outline-regexp' anymore.
Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
2011-07-18 09:42:11 +02:00
Nicolas Goaziou 4ae030e027 org-footnote: fix some comment strings 2011-07-16 10:45:40 +02:00
Nicolas Goaziou 6d9e90454f org-footnote: don't insert footnote section without footnotes
* lisp/org-footnote.el (org-footnote-normalize): footnote section
  should be inserted only if there are footnotes to insert.
2011-07-16 10:43:46 +02:00
Nicolas Goaziou 86418aad12 org-footnote: fix compiler warning
Thanks to Matthew Sauer for catching this.
2011-07-16 09:24:59 +02:00
Nicolas Goaziou b824725df1 org-footnote: fix problem with normalize in message-mode
* lisp/org-footnote.el (org-footnote-at-definition-p,
  org-footnote-normalize): do not grab signature in the definition of
  the last footnote.
2011-07-15 19:24:59 +02:00
Nicolas Goaziou 9495979cdd org-footnote: fix doc-string typo 2011-07-14 09:49:50 +02:00
Nicolas Goaziou 31e92984bc Correctly export lists in footnotes (take 2)
* lisp/org-exp.el (org-export-preprocess-string): add the possibility
  to call recursively the function. Also change order of some function
  calls. Comment export process for footnotes.
* lisp/org-footnote.el (org-footnote-normalize): change the export
  specific parameter to hold properties of export. Thus, the function
  can send every footnote definition in the buffer through
  `org-export-process-string'.
2011-07-13 18:15:52 +02:00
Nicolas Goaziou dc85f45194 More forbidden blocks for lists and footnotes
* lisp/org-footnote.el (org-footnote-forbidden-blocks): add missing
  exporter specific blocks.
* lisp/org-list.el (org-list-forbidden-blocks): ditto.
2011-07-10 10:33:25 +02:00
Nicolas Goaziou e98a2e4b4d org-footnote: refuse to insert a footnote in an inappropriate context 2011-07-08 18:08:34 +02:00
Nicolas Goaziou abe9550309 Forbid footnotes in some contexts
* lisp/org.el (org-in-block-p): new function.
* lisp/org-footnote.el (org-footnote-forbidden-blocks): new variable.
(org-footnote-in-valid-context-p): new function.
(org-footnote-at-reference-p): use new function. Allow inline
footnotes to start at bol.
2011-07-08 18:08:34 +02:00
Bastien Guerry 8567831ff8 org-footnote.el: silent compiler warning.
Declare  `org-bracket-link-regexp'.

Thanks to Achim Gratz for catching this.
2011-07-06 22:58:40 +02:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Nicolas Goaziou de0fcdffa4 org-footnote: distinguish footnotes from links
* lisp/org-footnote.el (org-footnote-at-reference-p): verify that what
  looks like a footnote doesn't belong to a link.
(org-footnote-next-reference-or-definition): check more strictly
footnote definitions.
2011-07-05 14:01:44 +02:00
Bastien Guerry 71eff05694 org-footnote.el: fix a few compiler warnings.
Thanks to Achim Gratz for catching them.
2011-07-03 21:32:41 +02:00
Nicolas Goaziou bab6c5bf5a org-footnote: find correct reference when two footnotes are side-by-side
* lisp/org-footnote.el (org-footnote-at-reference-p): first check if
  point is at the beginning of a footnote. Indeed `org-in-regexp'
  first checks backwards and might find an incorrect footnote if they
  are side-by-side.
2011-06-30 19:14:18 +02:00
Eric Schulte f06e712834 org-footnote: declare function for the compiler
* lisp/org-footnote.el (org-fill-paragraph): Declare function for the
  compiler.
2011-06-29 16:33:39 -07:00
Nicolas Goaziou 560804b4d8 org-footnote: better action on footnotes with no definition associated
* lisp/org-footnote.el (org-footnote-action): offer to create
  definition when none is found.
2011-06-29 15:26:22 +02:00
Nicolas Goaziou 66537c520c org-footnote: strenghten footnotes regexp
* lisp/org-footnote.el (org-footnote-re): avoid matching inactive
  time-stamps or check-box cookies.
(org-footnote-next-reference-or-definition): adapt to the new regexp.
2011-06-29 12:00:43 +02:00
Nicolas Goaziou 39d4bfa0e8 Rename org-export-footnotes-markers to org-export-footnotes-seen
* lisp/org-exp.el (org-export-footnotes-data): change docstring.
(org-export-footnotes-seen): renamed from
org-export-footnotes-markers.
* lisp/org-ascii.el (org-export-as-ascii): apply change.
* lisp/org-docbook.el (org-export-as-docbook): apply change.
* lisp/org-footnote.el (org-footnote-normalize): apply change.
* lisp/org-html.el (org-export-as-html): apply change.
* lisp/org-latex.el (org-export-as-latex): apply change.
2011-06-29 12:00:43 +02:00
Nicolas Goaziou 06a4c2c8d0 org-footnote: better normalization during export
* lisp/org-footnote.el (org-footnote-normalize): remember footnotes
  seen so far by the exporter when choosing the new marker.
2011-06-29 12:00:43 +02:00
Nicolas Goaziou 28bfc26024 org-footnote: update changes for odt exporter
* lisp/org-footnote.el (org-footnote-normalize): make use of
  `org-footnote-insert-pos-for-preprocessor'.
2011-06-29 12:00:43 +02:00
Nicolas Goaziou 30944f228e Add properties to footnotes during export
* lisp/org-footnote.el (org-footnote-normalize): add `org-footnote'
  property to footnote markers when preparing for exportation.
* lisp/org-html.el (org-export-as-html): read new property to decide
  when to export a footnote.
* lisp/org-docbook.el (org-export-as-docbook): read new property to
  decide when to export a footnote.
* lisp/org-latex.el (org-export-latex-preprocess): ensure footnote at
  column 0 cannot end a list containing it by adding
  `original-indentation' property to it.
2011-06-29 12:00:43 +02:00
Nicolas Goaziou ab9c52fd79 Improve footnotes handling in exporters
* lisp/org-exp.el (org-export-footnotes-markers,
  org-export-footnotes-data): new variables.
  (org-export-preprocess-string): use a more explicit argument.

* lisp/org-html.el (org-export-as-html): initialize new variables.

* lisp/org-docbook.el (org-export-as-docbook): initialize new variables.

* lisp/org-latex.el (org-export-latex-footmark-seen): new variable.
  (org-export-as-latex): initialize new variables.
  (org-export-latex-preprocess): allow to export two or more footnotes
  in a row. Also permit to have footnotes refering to previously
  defined footnotes.

* lisp/org-ascii.el (org-export-as-ascii): feed org-footnote-normalize
  with data so it can normalize footnotes before first headline, or
  footnotes with their definition outside exported region.
2011-06-29 12:00:42 +02:00
Nicolas Goaziou 9c31654077 org-footnote: remove unnecessary checks in footnotes regexps
* lisp/org-footnote.el (org-footnote-goto-definition): now,
  determining if point is at a footnote reference is entirely
  determined by `org-footnote-at-reference-p'. No need to check if
  pattern isn't at beginning of the line elsewhere.
2011-06-29 12:00:42 +02:00
Nicolas Goaziou c9d01b3bbd org-footnote: refactor code 2011-06-29 12:00:42 +02:00
Nicolas Goaziou 1eac25a438 Adjust fontification of footnotes
* lisp/org-footnote.el (org-footnote-next-reference-or-definition):
  new function.
* lisp/org.el (org-activate-footnote-links): activate the whole
  footnote, but only fontify its label.
2011-06-29 12:00:42 +02:00
Nicolas Goaziou 460d093da8 org-footnote: rewrite normalize function
* lisp/org-footnote.el (org-footnote-normalize): make use of changes
  to `org-footnote-at-reference-p' and creation of various functions..
  Also comment code.
  (org-footnote-get-next-reference, org-footnote-delete-references,
  org-footnote-delete-definitions): new functions
  (org-footnote-goto-previous-reference, org-footnote-all-labels,
  org-insert-footnote-reference-near-definition, org-footnote-delete):
  rewrite to use org-footnote-get-next-reference.
2011-06-29 12:00:42 +02:00
Nicolas Goaziou 62fe76b5dc org-footnote: parse footnotes references with more accuracy
* lisp/org-footnote.el (org-footnote-re): don't end an inline footnote
  at unrelated closing square brackets.
  (org-footnote-at-reference-p): improve accuracy of the function to
  determine if point is at a reference and to extract definition of an
  inline footnote.
  (org-footnote-all-labels, org-footnote-action, org-footnote-delete,
  org-footnote-auto-adjust-maybe): make use of previous function.
2011-06-29 12:00:42 +02:00
Jambunathan K fd2e471a6f Control insertion point for footnote definitions during pre-process
PATCH-5/5 org-odt compatibility patch

From 22c4feee78ff9a1ab7cc48275ec29d322a3472a1 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Thu, 23 Jun 2011 13:17:18 +0530
Subject: [PATCH 5/5] Control insertion point for footnote definitions during pre-process.

* lisp/org-footnote.el
(org-footnote-insert-pos-for-preprocessor): New variable.
(org-footnote-normalize): Use it.
2011-06-23 23:10:45 +02:00
David Maus da93c5d3f1 Declare function, silence byte compiler
* org-footnote.el (org-id-uuid): Declare function, silence byte
  compiler.
2011-06-01 08:30:52 +02:00
Puneeth Chaganti 078c01bf3b Tiny docstring fix in org-footnote.el
Hi,

A tiny docstring fix in org-footnote.el
2011-03-22 10:48:24 +01:00
Matt Lundin 743bb4e14f New option to create unique, random labels for footnotes.
* lisp/org-footnote.el: (org-footnote-auto-label): New random option
* lisp/org-footnote.el: (org-footnote-new): Create random footnote
  labels with unique ids
2011-03-17 09:25:10 +01:00
Matt Lundin 2444744985 Prevent creation of duplicate footnote sections.
* lisp/org-footnote.el: (org-footnote-create-definition): Allow for
  footnote sections above the current footnote insertion point.

Fixes bug in which org-mode will create a new footnote section if the
current footnote section is not beneath the current insertion point.
2011-03-17 09:24:30 +01:00
Matt Lundin 51244d5344 Goto correct footnote insertion point in org-mode buffers
* lisp/org-footnote.el: (org-footnote-create-definition): Don't search
  for last footnote when in org-mode file.

The recent changes to accommodate signatures in message-mode instruct
org-mode to search for the last footnote in the entire buffer when
inserting a new footnote definition. This causes problems in org
buffers, since org-footnote-goto-local-insertion-point already finds
the correct insertion point. (I.e., the insertion point is always
placed in beneath the last footnote in the buffer, even if
org-footnote-section is nil.) This patch invokes the search only if in
non org-mode buffers.
2011-03-17 09:24:02 +01:00
Matt Lundin f920974f43 org-footnote.el: Fix sorting of footnotes.
* org-footnote.el (org-footnote-create-definition)
(org-insert-footnote-reference-near-definition): Fix sorting
of footnotes.
2011-03-09 11:42:56 +01:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Tassilo Horn 21d4acf035 Place Footnotes section before signature in all message-mode derived modes.
* org-footnote.el (org-footnote-create-definition): Place Footnotes
  section before message-signature-separator also in modes derived
  from message-mode.
2010-12-10 07:34:27 +01:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
David Maus 671115426a Defvar to silence byte compiler
* org-footnote.el (message-signature-separator): Defvar to silence
byte compiler.
2010-10-24 20:43:44 +02:00
Tassilo Horn 145109dc4a Make footnotes work correctly in message-mode
* lisp/org-footnote.el (org-footnote-create-definition)
(org-footnote-goto-local-insertion-point): Add footnotes before
signature when in message-mode.
2010-10-24 18:19:57 +02:00
Noorul Islam 6e73bcbf44 Minor docstring bug: org-footnote-goto-previous-reference 2010-10-24 18:15:08 +02:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Carsten Dominik c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik 88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik 0d4883f7de Fix typos and add customization group for footnotes
Patch by Michael Fornius
2010-04-27 08:11:16 +02:00
Carsten Dominik 43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +02:00
Carsten Dominik a74a748d0f Search backward from a footnote definition to find reference.
With multiple definitions of a footnote with the same label in a
buffer, this has a higher chance to find the right one.

Request by Samuel Wales
2010-04-14 16:45:45 +02:00
Carsten Dominik 6f3026edf1 Release 6.35g 2010-04-08 20:15:15 +02:00
Carsten Dominik a589c7a22e Release 6.35f 2010-04-08 10:36:32 +02:00
Carsten Dominik 50e5924d8a Release 6.35e 2010-04-07 16:33:52 +02:00
Carsten Dominik f722763f8a Release 6.35d 2010-04-07 16:26:42 +02:00
Carsten Dominik d65ed03be6 Update copyright notices and fix wrong version tags 2010-04-07 16:26:10 +02:00
Carsten Dominik cafbe1d038 Release 6.35c 2010-04-07 08:58:25 +02:00
Carsten Dominik dcc445a027 Fix typo in docstring 2010-04-07 08:40:55 +02:00
Carsten Dominik b213c0f31e Release 6.35b 2010-04-07 07:54:14 +02:00
Carsten Dominik 08d0d2fa20 Release 6.35 2010-04-06 09:16:36 +02:00
Carsten Dominik 8fdf80bb5b Fix whitespace and compiler wanings 2010-04-01 13:11:54 +02:00
Carsten Dominik 2e53d9b137 Remove comma after means in many docstrings
Stephen Eglen says these commas should not be there.
2010-01-21 16:15:40 +01:00
Carsten Dominik 06e74afce3 Version number to 6.34trans 2010-01-20 10:13:21 +01:00
Carsten Dominik a1709ba641 Release 6.34c 2010-01-18 00:10:11 +01:00
Carsten Dominik 2f2f9441d4 Release 6.34b 2010-01-14 23:06:55 +01:00
Carsten Dominik c077142241 Release 6.34a 2010-01-12 08:53:44 +01:00
Carsten Dominik 288c724335 Release 6.34 2010-01-10 10:57:53 +01:00
Carsten Dominik 275b6627a6 Release 3.34 2010-01-10 10:54:52 +01:00
Carsten Dominik 177d69cd2c Keep byte compiler happy 2009-12-11 08:49:44 +01:00
Carsten Dominik c0d77694d2 LaTeX export. Fix footnote bug. 2009-11-29 01:22:19 +01:00
Carsten Dominik 88cf58802c Fix footnote problem with optional arguments to citation commands
Scot Beker writes:

> I cite my references in org like
> this.\autocite[231]{bibtexkey_2009}, where '231' is the
> relevant page number.  When exporting to LaTeX, Org thinks
> that the value in square brackets is a footnote number and
> produces a document with a "footnote definition not found:
> 231" error message at the bottom of the document.  My
> settings are below, and I've searched pretty hard through
> them to look for anything that might have caused it.  Any
> ideas?
2009-11-26 12:44:05 +01:00
Carsten Dominik 62a7301a5e Push release number to 6.33trans 2009-11-20 20:20:31 +01:00
Carsten Dominik 24061fddd1 Release 6.33f 2009-11-20 15:15:05 +01:00
Carsten Dominik 37e9b1c51f Release 6.33e 2009-11-20 13:58:31 +01:00
Carsten Dominik 24a49967f1 Release 6.33d 2009-11-20 12:34:50 +01:00
Carsten Dominik c7371cc7fe Push version number to 6.33trans 2009-11-15 09:46:43 +01:00
Carsten Dominik 6bc6379dfe Release 6.33c 2009-11-15 08:00:52 +01:00
Carsten Dominik 6c977c41c3 Release 6.33b 2009-11-14 16:25:31 +01:00
Carsten Dominik b8a6721a68 Release 6.33a 2009-11-13 23:22:18 +01:00
Carsten Dominik 5ca6635993 Push version number to 6.33a 2009-11-13 22:54:22 +01:00
Carsten Dominik 82ee0cc583 Release 6.33 2009-11-13 07:10:51 +01:00
Bernt Hansen 0042080e4c Fix spelling and grammar 2009-11-12 07:39:29 -05:00
Carsten Dominik 721bf5c3d3 Keep compiler happy 2009-10-29 16:34:33 +01:00
Carsten Dominik 7507bdd922 Allow footnote markers like [1] to occur in verbatim emphasis 2009-10-29 09:05:34 +01:00
Carsten Dominik 58562167b4 Version number to 6.32trans 2009-10-27 18:23:19 +01:00
Carsten Dominik e0949896f7 Release 6.32b 2009-10-27 18:22:28 +01:00
Carsten Dominik 037b685d50 Push version number to 6.32trans 2009-10-27 09:25:30 +01:00
Carsten Dominik fcd2ef541f Release 6.32 2009-10-26 08:57:21 +01:00
Carsten Dominik 6b0a251eea Push version number to 6.31trans 2009-10-01 11:57:17 +02:00