Commit Graph

242 Commits

Author SHA1 Message Date
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01: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
Bastien Guerry 090634584e org-mouse.el: Don't use `org-flet'
* org-mouse.el (org-mouse-timestamp-today)
(org-mouse-set-priority, org-mouse-popup-global-menu)
(org-mouse-context-menu): Don't use ̀org-flet'.
2012-08-10 14:57:19 +02:00
Eric Schulte 63b5f8f2e8 replace flet/labels with org-flet/org-labels
This patch ensure Org-mode will build on all supported versions of
Emacs, after the renaming of the cl macros behind the cl- prefix in the
recent Emacs trunk.

* lisp/org-compat.el (org-flet): Compatibility function now that flet
  has been removed from cl-macs.
  (org-labels): Compatibility function now that labels has been removed
  from cl-macs.
* lisp/ob-R.el (org-compat): Require org-compat.
* lisp/ob-comint.el: Require org-compat.
* lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility
  function.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to
  compatibility function.
* lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility
  function.
  (org-babel-lob-execute): Switch to compatibility function.
* lisp/ob-python.el (org-babel-python-evaluate-session): Switch to
  compatibility function.
* lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility
  function.
* lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility
  function.
* lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility
  function.
  (org-babel-tangle): Switch to compatibility function.
  (org-babel-spec-to-string): Switch to compatibility function.
* lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility
  function.
  (org-babel-execute-src-block): Switch to compatibility function.
  (org-babel-edit-distance): Switch to compatibility function.
  (org-babel-switch-to-session-with-code): Switch to compatibility
  function.
  (org-babel-sha1-hash): Switch to compatibility function.
  (org-babel-balanced-split): Switch to compatibility function.
  (org-babel-join-splits-near-ch): Switch to compatibility function.
  (org-babel-get-rownames): Switch to compatibility function.
  (org-babel-format-result): Switch to compatibility function.
  (org-babel-insert-result): Switch to compatibility function.
  (org-babel-examplize-region): Switch to compatibility function.
  (org-babel-merge-params): Switch to compatibility function.
  (org-babel-noweb-p): Switch to compatibility function.
  (org-babel-expand-noweb-references): Switch to compatibility function.
* lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility
  function.
  (org-bibtex-fleshout): Switch to compatibility function.
  (org-bibtex-read): Switch to compatibility function.
  (org-bibtex-write): Switch to compatibility function.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to
  compatibility function.
* lisp/org-exp.el (org-export-format-source-code-or-example): Switch to
  compatibility function.
* lisp/org-macs.el (org-called-interactively-p): Indentation fix.
* lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility
  function.
  (org-mouse-set-priority): Switch to compatibility function.
  (org-mouse-popup-global-menu): Switch to compatibility function.
  (org-mouse-context-menu): Switch to compatibility function.
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to
  compatibility function.
  (org-plot/gnuplot-script): Switch to compatibility function.
* lisp/org.el (org-entry-get): Switch to compatibility function.
  (org-fill-paragraph): Switch to compatibility function.
  (org-auto-fill-function): Switch to compatibility function.
2012-07-25 09:23:57 -06:00
Nicolas Goaziou 54e34cca0d Merge branch 'maint' 2012-04-22 18:44:45 +02:00
Nicolas Goaziou 805f3fd92d org-mouse: Do not move point when clicking on a footnote reference
* lisp/org-mouse.el (org-mode-hook): Do not move point when clicking
  on a footnote reference.
2012-04-22 18:43:55 +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
Bastien Guerry c24fa194a6 Fix global dynamic variables prefixes in org-mouse.el.
Thanks to Martyn Jago for the patch.
2012-03-30 21:48:15 +02:00
Bastien Guerry 8931636eae Copyright, license, and header fixes.
Thanks to Glenn Morris for this fix in Emacs trunk.
2012-01-05 09:43:21 +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
Bastien Guerry e62574f70b org-mouse.el: Remove useless commented functions. 2011-12-26 14:39:57 +01:00
Nicolas Goaziou dfcb6faef1 Provide more consistent regexps for headlines
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
2011-10-23 09:30:13 +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
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
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
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00: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
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Eric Schulte a034526448 more small compiler errors
* lisp/org-mouse.el (org-agenda-earlier): Declaring previously unknown
  function.
  (org-agenda-later): Declaring previously unknown function.
  (org-agenda-mode-map): Declaring previously unknown variable.
* lisp/org.el (org-read-date-analyze): Explicitly ignore the return
  value of a function.
2011-06-14 12:51:13 -07:00
Eric Schulte 94b325839c Replacing '(λ...) with #'(λ...).
* lisp/org-ascii.el (org-export-as-ascii): Replacing '(λ...) with #'(λ...).
* lisp/org-attach.el: Replacing '(λ...) with #'(λ...).
  (org-attach-commit): Replacing '(λ...) with #'(λ...).
* lisp/org-exp.el: Replacing '(λ...) with #'(λ...).
  (org-export-handle-include-files): Replacing '(λ...) with #'(λ...).
* lisp/org-html.el: Replacing '(λ...) with #'(λ...).
  (org-export-as-html): Replacing '(λ...) with #'(λ...).
* lisp/org-mouse.el: Replacing '(λ...) with #'(λ...).
  (org-mouse-popup-global-menu): Replacing '(λ...) with
  (org-mode-hook): Replacing '(λ...) with #'(λ...).
  (org-agenda-mode-hook): Replacing '(λ...) with #'(λ...).
* #'(λ...).Replacing '(λ...) with #'(λ...).
  (org-mouse-context-menu): Replacing '(λ...) with #'(λ...).
* lisp/org-src.el: Replacing '(λ...) with #'(λ...).
  (org-src-mode-configure-edit-buffer): Replacing '(λ...) with #'(λ...).
* lisp/org-table.el: Replacing '(λ...) with #'(λ...).
  (org-table-fix-formulas-confirm): Replacing '(λ...) with #'(λ...).
* lisp/org.el: Replacing '(λ...) with #'(λ...).
  (org-confirm-shell-link-function): Replacing '(λ...) with
  (org-category): Replacing '(λ...) with #'(λ...).
* #'(λ...).Replacing '(λ...) with #'(λ...).
  (org-time-stamp-rounding-minutes): Replacing '(λ...) with #'(λ...).
2011-06-14 12:01:04 -07:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Nicolas Goaziou 215d3fa030 Improve usage of `org-in-item-p'
When the function needs to know if cursor is in a plain list and move
to item beginning if it is the case, a fast way is to ignore errors on
(goto-char (org-in-item-p)).
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 9230df2e0d org-list: rewrite of org-apply-on-list
* lisp/org-list.el (org-apply-on-list): use new structures. Function
  is now applied in reverse order so modifications do not change
  positions of items in buffer.
2011-02-18 12:45:08 +01:00
Bastien Guerry 846a2d13d3 Code cleanup: use (org-mode-p) when possible. 2011-02-15 05:18:22 +01: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
Julien Danjou 0d0edd6d21 org-agenda: rework ndays and span handling
* org-agenda.el (org-agenda-custom-commands-local-options):
Allow org-agenda-span to be a symbol.
(org-agenda-ndays): Make obsolete.
(org-agenda-span): New variable superseding org-agenda-ndays.
(org-agenda-menu): Use org-agenda-current-span.
(org-agenda-current-span): New local variable storing current
span.
(org-agenda-list): Take a span instead of ndays as argument.
This function is now responsible for computing the ndays based
on span.
(org-agenda-ndays-to-span): Return span only if number of days
really matches.
(org-agenda-span-to-ndays): New function.
(org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
(org-agenda-goto-today): Use org-agenda-compute-starting-span.
(org-agenda-later): Do not give compute a new span, use the
current one.
(org-agenda-day-view, org-agenda-week-view)
(org-agenda-month-view, org-agenda-year-view): Stop touching
org-agenda-ndays.
(org-agenda-change-time-span): Only compute starting-span.
(org-agenda-compute-starting-span): New function derived from
the old org-agenda-compute-time-span.
(org-agenda-set-mode-name): Compute mode based on
org-agenda-current-span.
(org-agenda-span-name): New function.

* org-mouse.el: Replace Replace org-agenda-ndays by
org-agenda-current-span.

* org.texi, orgguide.texi: Replace org-agenda-ndays by
org-agenda-span. Add a paragraph about org-agenda-span and say that
org-agenda-ndays is now deprecated.

This patch is pretty huge, so I'll give a bit of context about it.

I'm weird, but I used org-agenda-ndays set to 14. Unfortunately, this
settings was interpreted as a month view. Pressing 'f' key to see later,
would show me the next month, which was not at all what I wanted.

On the same idea, day view or week view would change my org-agenda-ndays
settings, which I think is not a good idea. Changing user setting is *bad*.
:-)

So I rewrote the things this way:
- Rename org-agenda-span to org-agenda-current-span
 Which has the same meaning has before, except it can be numeric.
- Rename org-agenda-ndays to org-agenda-span
 I think the name is better choosen. You can set it to a symbol instead of
 only a numeric value. That means you can set it to 'month and it will show
 you the number of days of the current month in your agenda. Better than
 30. But you can still set it to 30, or 31, or whatever you want.
- Do not change org-agenda-span. Never.
- Use org-agenda-current-span for navigation.
 That means if you press 'f', it will shows you really the next
 org-agenda-current-span ndays, and not something based on "I think you
 want a weekly view".
2010-12-03 13:07:31 +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
Nicolas Goaziou 60fcd2fa7e Replace non-interactive use of `org-next-item' and `org-previous-item'.
* org.el (org-skip-over-state-notes): do not compute bottom point at
  each item.
* org-mouse.el (org-mouse-for-each-item): use `org-apply-on-list'
  instead of moving to each item.
2010-09-12 18:53:18 +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
Philip Rooke ebf808f9aa Correct some docstrings [part 4]
Same rationale as previous patches in this series.

Phil
2010-07-16 21:00:36 +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 56ba0892e5 Simplify XEmacs key bindings 2010-04-21 08:38:09 +02:00
Carsten Dominik 43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +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 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 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