Commit Graph

370 Commits

Author SHA1 Message Date
Paul Eggert c86a10b0bc Backport commit 284c470 from Emacs master branch
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Kyle Meyer 4ef2c0e439 org-footnote-action: Handle nil context
* lisp/org-footnote.el (org-footnote-action): Check whether context is
  non-nil before trying to move to the end of the element.
2015-08-24 00:10:54 -04:00
Nicolas Goaziou 6a0454e4f0 org-footnote: Fix consistency between footnotes and links
* lisp/org-footnote.el (org-footnote-action): Mimic `org-open-at-point'
  behavior for consistency.
2015-08-14 16:22:13 +02:00
Nicolas Goaziou 65ded0c7ed org-footnote: Fix f8c4102cc6
* lisp/org-footnote.el (org-footnote-new): Fix
  f8c4102cc6.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.
2015-08-14 16:17:18 +02:00
Nicolas Goaziou 8500501984 org-footnote: Fix location after moving to definition
* lisp/org-footnote.el (org-footnote-goto-definition): Move to location
  appropriate for further editing.
* testing/lisp/test-org-footnote.el (test-org-footnote/delete): Update
  test.
2015-08-14 16:15:09 +02:00
Nicolas Goaziou f8c4102cc6 org-footnote: Fix positioning when inserting footnotes
* lisp/org-footnote.el (org-footnote-new): Fix point when a new footnote
  triggers sorting.

Reported-by: Gerald Wildgruber <Gerald.Wildgruber@unibas.ch>
<http://permalink.gmane.org/gmane.emacs.orgmode/99997>
2015-08-14 01:05:40 +02:00
Nicolas Goaziou a0c1e490b3 Silence byte-compiler
* lisp/org-footnote.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-src.el:
* lisp/org.el: Silence byte-compiler.
2015-05-30 14:28:35 +02:00
Nicolas Goaziou c76006a42c org-footnote: Make `org-footnote-create-definition' non-interactive
* lisp/org-footnote.el (org-footnote-create-definition): Remove
  `interactive' status.  Allow to insert definitions outside of
  narrowed part of buffer.  Preserve position.  Return beginning
  position of created definition.
(org-footnote-new):
(org-footnote-action): Apply changes above.
2015-05-06 23:47:16 +02:00
Nicolas Goaziou 360c4633e2 org-footnote: Rename `org-footnote-goto-local-insertion-point'
* lisp/org-footnote.el (org-footnote--goto-local-insertion-point):
  Renamed from `org-footnote-goto-local-insertion-point'.
(org-footnote-normalize): Use function above.  Small refactoring.

* testing/lisp/test-org-footnote.el (test-org-footnote/normalize-in-org):
  Small refactoring.
2015-05-06 23:47:13 +02:00
Nicolas Goaziou f6492d953c org-footnote: Add optional argument to `org-footnote-goto-definition'
* lisp/org-footnote.el (org-footnote-goto-definition): Add an optional
  argument in order to avoid duplicating calls to
  `org-footnote-get-definition'.  Return non-nil when move was
  successful.
2015-05-06 23:15:42 +02:00
Nicolas Goaziou 8f394624b8 org-footnote: Fix type error when creating a new footnote
* lisp/org-footnote.el (org-footnote-get-definition): Fix type error
  when creating a new footnote.

When footnote definition is new, contents are nil.
2015-05-04 09:38:32 +02:00
Nicolas Goaziou c8e3873a5e org-footnote: Offer to widen buffer when trying to move to a definiton
* lisp/org-footnote.el (org-footnote-action): Offer to widen buffer if
  definition is outside of narrow part of buffer.
2015-05-02 16:45:54 +02:00
Nicolas Goaziou 5b49f18941 org-footnote: Fix `org-footnote-get-definition'
* lisp/org-footnote.el (org-footnote-get-definition): Footnotes
  definitions are global, so ignore narrowing right from the start.
  Also skip false positives.
2015-05-02 16:45:54 +02:00
Nicolas Goaziou 510fc3761b org-footnote: Fix 5954f6aa25
* lisp/org-footnote.el (org-footnote-goto-definition): Better check
  for narrowed scope.
* testing/lisp/test-org-footnote.el (test-org-footnote/goto-definition):
  Add test.
2015-04-25 11:09:05 +02:00
Nicolas Goaziou 5954f6aa25 org-footnote: Do not move point if definition is unreachable
* lisp/org-footnote.el (org-footnote-goto-definition): Throw an error
  when definition is outside narrowed part of buffer.  Do not move
  point either.

* testing/lisp/test-org-footnote.el (test-org-footnote/goto-definition):
  New test.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/97158>
2015-04-25 10:36:35 +02:00
Nicolas Goaziou 7584200bb8 org-footnote: Allow new footnotes in headlines
* lisp/org-footnote.el (org-footnote--allow-reference-p): Allow new
footnotes in headlines.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.

Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96843>
2015-04-12 00:25:33 +02:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Nicolas Goaziou 176681bc65 org-footnote: Be more strict about location for new footnotes
* lisp/org-footnote.el (org-footnote--allow-reference-p): New
  function.
(org-footnote-new): Use new function.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): New test.

In particular, Org now refuses to add a footnote reference in
a keyword, e.g., TITLE.
2015-02-15 21:56:57 +01:00
Aaron Ecay f1dcbfe79c org-footnote: Use a simpler method to generate random labels.
* lisp/org-footnote.el (org-footnote-new): Improve generation of
random labels.
2015-01-18 23:46:02 -05:00
Achim Gratz 2b980a4257 Merge branch 'maint' 2014-06-01 14:23:18 +02:00
Achim Gratz 814188ac7e org-footnote: forward declare functions
* lisp/org-footnote.el: Forward declare `org-element-context',
  `org-element-property' and `org-element-type'.

Introduced with 51e1131ff8.
2014-06-01 14:21:58 +02:00
Nicolas Goaziou 51e1131ff8 org-footnote: On C-c C-x f, offer menu instead of returning an error
* org-footnote.el (org-footnote-action): When point is at a position
where no footnote can be inserted, offer the menu instead.
2014-06-01 08:42:09 +02:00
Nicolas Goaziou 857222323b Revert "org-footnote.el: Allow to inline external footnotes"
This reverts commit 8738f173e5.
2014-05-31 11:26:37 +02:00
Bastien Guerry 8738f173e5 org-footnote.el: Allow to inline external footnotes
* org-footnote.el (org-footnote-new): When point is at a
position where no footnote can be inserted, offer the menu
from `org-footnote-action' instead.
(org-footnote-inline-footnotes): New command.
(org-footnote-action): Make the new command accessible through
the menu.

Thanks to Leonard Randall for the suggestion.
2014-05-30 14:54:11 +02:00
Bastien Guerry f768629404 Simplify comments matching functions
* org.el (org-fontify-entities): Use `org-at-comment-p'.
(org-in-commented-line): Delete.
(org-in-indented-comment-line): Delete.
(org-at-comment-p): Also match indented comments and save
match data.

* org-footnote.el (org-footnote-in-valid-context-p): Use
`org-at-comment-p'.
2014-05-26 17:33:24 +02:00
Bastien Guerry f8e1745440 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +01:00
Bastien Guerry 7d9a883b50 Update copyright years again.
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Nicolas Goaziou 36c8d8b4d2 org-footnote: Fix dual `org-load-hook' run
* lisp/org-footnote.el (org-footnote-section): Do not require
  `org-element' when initializing the variable, since `org' is not
  provided yet.
2013-11-17 09:52:54 +01:00
Nicolas Goaziou 4223af978a org-footnote: Fix void `org-element-cache-reset' symbol error
* lisp/org-footnote.el (org-footnote-section): Fix void
  `org-element-cache-reset' symbol error.
2013-11-05 20:47:29 +01:00
Nicolas Goaziou 0cecf32a0a org-element: Implement caching for dynamic parser
* lisp/org-element.el (org-element-use-cache, org-element--cache,
org-element--cache-sync-idle-time,
org-element--cache-merge-changes-threshold, org-element--cache-status,
org-element--cache-opening-line, org-element--cache-closing-line): New
variables.
(org-element-cache-reset, org-element--cache-pending-changes-p,
org-element--cache-push-change, org-element--cache-cancel-changes,
org-element--cache-get-key, org-element-cache-get,
org-element-cache-put, org-element--shift-positions,
org-element--cache-before-change, org-element--cache-record-change,
org-element--cache-sync): New functions.
(org-element-at-point, org-element-context): Use cache when possible.
* lisp/org.el (org-mode, org-set-modules): Reset cache.
* lisp/org-footnote.el (org-footnote-section): Reset cache.
* testing/lisp/test-org-element.el: Update tests.

This patch gives a boost to `org-element-at-point' and, to a lesser
extent, to `org-element-context'.
2013-11-03 13:09:54 +01:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Bastien Guerry 596177cd5d org-footnote.el (org-footnote-auto-label): Minor docstring fix
* org-footnote.el (org-footnote-auto-label): Minor docstring fix.
2013-04-08 21:25:09 +02:00
Nicolas Goaziou ca060f7be7 Require 2 blank lines to separate footnote definition
* lisp/org-element.el (org-element-footnote-definition-parser):
  Require 2 blank lines to separate footnote definition.
* lisp/org-footnote.el (org-footnote-at-definition-p): Require 2 blank
  lines to separate footnote definition.
* doc/org.texi: Update documentation for footnotes.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-footnote.el: Add tests.

Footnote definitions can still be separated with other footnote
definitions and headlines. This change allows to have multiple
paragraphs in a footnote definition without resorting to the "\par"
trick.
2013-02-24 14:44:07 +01:00
Bastien Guerry 7a4d026b67 Remove references to the DocBook exporter
* org.el (org-emphasis-alist, org-protecting-blocks):
* org-src.el (org-edit-src-find-region-and-lang):
* org-list.el (org-list-forbidden-blocks):
* org-footnote.el (org-footnote-forbidden-blocks): Remove
references to the deleted DocBook exporter.

* org.texi (Top, Markup, Initial text, Images and tables)
(@LaTeX{} fragments, @LaTeX{} fragments, Exporting)
(Export options, JavaScript support, Beamer class export):
Remove references to the DocBook export, which has been
deleted.
(History and Acknowledgments): Mention that DocBook has been
deleted, suggest to use the Texinfo exporter instead, then to
convert the .texi to DocBook with makeinfo.
(Links in ODT export, Tables in ODT export): Fix indices.
2013-02-14 09:48:36 +01:00
Nicolas Goaziou 73ddb3c49c Remove references to `org-protected' `org-example' and `original-indentation'
* lisp/org-macs.el (org-if-unprotected, org-if-unprotected-1,
  org-if-unprotected-at): Removed macros.
(org-re-search-forward-unprotected): Removed function.
* lisp/org.el (org-format-latex): Remove reference to `org-protected'.
* lisp/org-list.el (org-list-struct): Remove reference to
  `org-example' and `org-protected'.
* lisp/org-footnote.el (org-footnote-at-reference-p): Remove reference
  to `org-protected'.
* lisp/org-capture.el (org-capture-fill-template): Remove reference to
  `org-protected'.
* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
  Remove reference to `org-protected' value.

These text properties were used by the old export framework. They are
not needed anymore.
2013-02-06 23:06:31 +01:00
Nicolas Goaziou a2f56264c9 Remove unnecessary linking to export framework
* lisp/org-clock.el (org-clocktable-defaults,
  org-clocktable-write-default): Avoid requiring the whole export
  framework just to check one variable.
* lisp/org-footnote.el (org-footnote-section): Update
  docstring.
(org-footnote-normalize): Remove all export related part from the
  function.
* lisp/org-inlinetask.el (org-inlinetask-export,
  org-inlinetask-export-templates): Removed variables.
(org-inlinetask-export-handler): Removed function.
* lisp/org-plot.el: Remove dependency on `org-exp' library.
* lisp/org.el (org-additional-option-like-keywords): Remove variable.
(org-get-export-keywords): New function.
(org-options-keywords): Update default list of keywords.
(org-remove-flyspell-overlays-in): Apply changes to keywords
compilation.
(org-highlight-latex-fragments-and-specials)
org-latex-and-specials-regexp,
org-export-html-special-string-regexps): Remove variables.
(org-compute-latex-and-specials-regexp,
org-do-latex-and-special-faces, org-remove-file-link-modifiers):
Remove functions.
(org-set-regexps-and-options, org-set-font-lock-defaults): Apply all
removals.
(org-use-sub-superscripts): Fix docstring.  Remove unused group.
(org-match-sexp-depth): Make it a defconst instead of a defcustom in
order to remove `org-export-translation' group completely.

The new export framework shouldn't be as much interleaved with Org
core as with the previous one.  For example, export options, which are
back-end dependent, shouldn't interfere with the display of the
buffer.
2013-02-06 23:06:31 +01:00
Bastien Guerry b425e2a2d6 org-footnote.el: Fix bug when using `electric-indent-mode'
* org-footnote.el (org-footnote-create-definition): Prevent
`electric-indent-mode' from inserting the definition at the
wrong place.

Thanks to Xue Fuqiao for reporting this bug.
2013-01-26 13:40:18 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry e4c31cf98b Use generated-autoload-file: "org-loaddefs.el" as a local variable. 2012-10-02 08:50:46 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Matt Lundin d59762b6fa Don't call org-footnote-unique label if using random labels
* lisp/org-footnote.el (org-footnote-new): Don't call
  org-footnote-unique-label if org-footnote-auto-label is set to
  random.

Calling org-footnote-unique-label calls org-footnote-all-labels, which
can dramatically slow down footnote creation in a buffer with many
footnotes.  This is unecessary if org-footnote-auto-label is set to
random.
2012-05-06 10:10:25 +02:00
Bastien Guerry 1c203d8d19 Match #+name/#+tblname/#+tblfm along with uppercase twins.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.

* org-table.el:
(org-table-store-formulas, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-edit-formulas)
(org-old-auto-fill-inhibit-regexp, orgtbl-ctrl-c-ctrl-c)
(orgtbl-toggle-comment, org-table-get-remote-range): Ditto.

* org-footnote.el:
(org-footnote-goto-local-insertion-point): Ditto.

* org-exp.el: Ditto.

* org-colview.el:
(org-dblock-write:columnview, org-dblock-write:columnview):
Ditto.

* org-colview-xemacs.el:
(org-dblock-write:columnview): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-capture.el (org-capture-place-table-line): Ditto.

* ob.el (org-babel-data-names, org-babel-goto-named-src-block)
(org-babel-src-block-names)
(org-babel-where-is-src-block-result, org-babel-result-end)
(org-babel-where-is-src-block-head)
(org-babel-find-named-result, org-babel-result-names): Ditto.
2012-04-23 12:48:33 +02:00
Bastien Guerry d5c0af72cf Use (derived-mode-p 'org-mode) instead of (eq major-mode 'org-mode).
* org.el (org-show-hierarchy-above, org-cycle)
(org-global-cycle, org-files-list, org-store-link)
(org-link-search, org-open-file, org-display-outline-path)
(org-refile-get-location, org-update-all-dblocks)
(org-change-tag-in-region, org-entry-properties)
(org-save-all-org-buffers, org-revert-all-org-buffers)
(org-buffer-list, org-cdlatex-mode)
(org-install-agenda-files-menu, org-end-of-subtree)
(org-speedbar-set-agenda-restriction): Use (derived-mode-p
'org-mode) instead of (eq major-mode 'org-mode).

* org-timer.el (org-timer-set-timer): Ditto.

* org-table.el (orgtbl-mode, org-table-align, orgtbl-mode): Ditto.

* org-src.el (org-edit-src-exit, org-edit-src-code)
(org-edit-fixed-width-region, org-edit-src-exit): Ditto.

* org-remember.el (org-remember-handler): Ditto.

* org-mouse.el (dnd-open-file, org-mouse-insert-item): Ditto.

* org-macs.el (org-get-limited-outline-regexp): Ditto.

* org-lparse.el (org-replace-region-by): Ditto.

* org-latex.el (org-latex-to-pdf-process)
(org-replace-region-by-latex): Ditto.

* org-indent.el (org-indent-indent-buffer): Ditto.

* org-id.el (org-id-store-link, org-id-update-id-locations)
(org-id-store-link): Ditto.

* org-html.el (org-export-html-preprocess)
(org-replace-region-by-html): Ditto.

* org-footnote.el (org-footnote-normalize)
(org-footnote-goto-definition)
(org-footnote-create-definition, org-footnote-normalize): Ditto.

* org-docbook.el (org-replace-region-by-docbook): Ditto.

* org-ctags.el (find-tag): Ditto.

* org-colview.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-colview-xemacs.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-capture.el (org-capture-insert-template-here)
(org-capture, org-capture-finalize)
(org-capture-set-target-location)
(org-capture-insert-template-here): Ditto.

* org-ascii.el (org-replace-region-by-ascii):  Ditto.

* org-archive.el (org-archive-subtree): Ditto.

* org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command)
(org-agenda-get-some-entry-text, org-search-view)
(org-tags-view, org-agenda-get-day-entries)
(org-agenda-format-item, org-agenda-goto, org-agenda-kill)
(org-agenda-archive-with, org-agenda-switch-to): Ditto.
2012-04-21 00:43:16 +02:00
Nicolas Goaziou d17761a05a Merge branch 'hotfix' 2012-04-20 11:16:33 +02:00
Nicolas Goaziou 8b18c50d4c org-footnote: Fix positionning in HTML export without a footnote section
* lisp/org-footnote.el (org-footnote-normalize): Fix positionning in
  HTML export without a footnote section.
2012-04-20 11:12:44 +02:00
Bastien Guerry 14e4d7ece9 Merge branch 'hotfix' 2012-04-09 12:47:58 +02:00
Mike Sperber 8dda2fc1ee Fix bug ion `org-footnote-normalize'.
* org-footnote.el (org-footnote-normalize): Correctly pass keyword
arguments to `org-export-preprocess-string'.

TINYCHANGE
2012-04-09 12:47:44 +02:00
Nicolas Goaziou d6faea24d4 org-footnote: Fix bug related to sorting and folded view
* lisp/org-footnote.el (org-footnote-delete-definitions): Remove blank
  lines before the footnote definition instead of removing those after
  it.
* testing/lisp/test-org-footnote.el: Adapt tests.
2012-04-08 12:01:57 +02:00
Nicolas Goaziou 4019559ee2 org-footnote: Don't grab trailing blank lines in a footnote definition
* lisp/org-footnote.el (org-footnote-at-definition-p): Don't grab
  trailing blank lines in a footnote definition.
(org-footnote-delete-definitions): Remove both footnote definition and
trailing blank lines.
* testing/lisp/test-org-export.el (test-org-export/fuzzy-links): Fix
  a docstring.
* contrib/lisp/org-element.el (org-element-footnote-definition-parser):
  Apply change to footnote definitions.
2012-04-06 19:14:51 +02:00
Nicolas Goaziou 6427c6aeaa Merge branch 'hotfix-7.8.06' 2012-03-24 20:35:31 +01:00
Nicolas Goaziou 6ad53828cc org-footnote: Fix LaTeX export error when a src block produces fake footnotes
* lisp/org-footnote.el (org-footnote-delete-definitions): Fix LaTeX
  export error when a src block produces fake footnotes.
2012-03-24 20:34:41 +01:00
Bastien Guerry 44bf4de900 Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org-agenda.el
2012-03-20 13:06:26 +01:00
Bastien Guerry fc717f3eb7 Fix compiler warnings. 2012-03-20 13:04:55 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Eric Schulte 07ac15ef72 Merge branch 'origin-maint'
Conflicts:
	lisp/org-src.el
2012-03-14 09:56:52 -04:00
Eric Schulte 4542824f2c fix compiler warnings
* lisp/ob.el (org-strip-protective-commas): Declared.
* lisp/org-agenda.el (org-agenda-filtered-by-category): Declared.
  (org-agenda-filter-apply): Capture free variable.
* lisp/org-footnote.el (org-skip-whitespace): Declared.
* lisp/org-mobile.el (org-agenda-filter): Declared.
* lisp/org-src.el (org-strip-protective-commas): Declared.
2012-03-14 09:55:04 -04:00
Nicolas Goaziou 6dab0cd71f Merge branch 'maint' 2012-03-03 13:08:35 +01:00
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