Commit Graph

3567 Commits

Author SHA1 Message Date
Titus von der Malsburg 6779f8f424 Fix detection of latex fragments
* org-element.el (org-element-latex-fragment-parser):
* org.el (org-latex-regexps): Fix the detection of latex
  fragments.  Uses syntax tables to detect whitespaces and punctuation
  marks following the final $ sign.

In order to qualify as a math delimiter, the final $ sign of a LaTeX
fragment has to be followed by a whitespace or punctuation mark but the
regexp used in the previous code matched only a small number of
punctuation marks and therefore missed some latex fragments.
2015-05-09 09:36:53 +02:00
Nicolas Goaziou b27e630bab org-capture: Fix "org-find-olp: Wrong type argument: stringp, nil"
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults
  to `org-default-notes-file'.
* lisp/org.el (org-default-notes-file): Do not fallback on
`remember-data-file' since "org-capture.el" is not based off
"remember.el" anymore.

Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97448>
2015-05-08 11:32:35 +02:00
Nicolas Goaziou 6ac8db9dba Fix TBLFM line handling
* lisp/org-table.el (org-table-TBLFM-begin-regexp): Take into
  consideration that table lines are not required to end with "|".
(org-table-calc-current-TBLFM): Properly clean markers at the end of
the process.
(org-table-TBLFM-begin): Small refactoring.
* lisp/org.el (org-at-TBLFM-p): Prevent false positives.

Suggested-by: Oleg Sivokon <olegsivokon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97461>
2015-05-08 10:46:07 +02:00
Nicolas Goaziou 4980a9dbb8 Fix indentation in empty items
* lisp/org.el (org--get-expected-indentation): Fix indentation on
  in empty items.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97454>
2015-05-08 10:08:11 +02:00
Nicolas Goaziou 0b7721322a Fix `org-next-block'
* lisp/org.el (org-next-block): Use Element API.

* testing/lisp/test-org.el (test-org/next-block):
(test-org/previous-block): New tests.
2015-05-01 14:03:26 +02:00
Luke Amdor 14f5b13218 org.el: Fix use of org-open-at-point with shell and midnight cleaning
* lisp/org.el (org-open-at-point): Make sure org shell output buffer
  is a string of buffer name before appending to
  `clean-buffer-list-kill-buffer-names' for cleaning later.

TINYCHANGE
2015-04-29 23:37:18 +02:00
Konubinix 6f0cf14383 Fix `org-refresh-category-properties'
* lisp/org.el (org-refresh-category-properties): Prevent the `put-text-property'
  to change the point in order to take into account the CATEGORY
  property in subtrees also.

* testing/lisp/test-org.el (test-org/entry-properties): Add test.
2015-04-28 09:40:03 +02:00
Nicolas Goaziou ca2b398396 org-src: Allow editing footnote definitions
* lisp/org-src.el (org-src--element-contents-area): Make a special
  case for footnote definitions.
(org-edit-footnote-reference): New function.
* lisp/org.el (org-edit-special): Use new function.
2015-04-26 11:44:35 +02:00
Charles Berry c1f515840d org-cycle: Cycle visibility when point is at the end of a folded headline
* lisp/org.el: (org-cycle): Ignore invisible newlines and cycle
  visibility when point is visibly on a headline.

Requested by: Nikolaus Rath <Nikolaus@rath.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/97125>
2015-04-25 11:23:59 -07:00
Kyle Meyer 63a3153842 org.el: Remove org-timer-cancel-timer binding
* lisp/org.el (org-mode-map): Remove binding for deleted command
  org-timer-cancel-timer.

The command org-timer-cancel-timer was removed in 173b0cb6d6.
2015-04-24 21:43:07 +02:00
Rasmus 2bdc661fde org.el: Handle nil org-latex-to-mathml-jar-file
* org.el (org-create-math-formula): Handle nil
  org-latex-to-mathml-jar-file.
2015-04-23 12:39:52 +02:00
Nicolas Goaziou ce4e647c21 Tiny refactoring
* lisp/org.el (org-iread-file-name): Refactor.

`read-file-name' already applies `read-file-name-function' when
available.
2015-04-22 14:30:59 +02:00
Nicolas Goaziou e040ad58a1 Rename `org-export--registered-backends'
* lisp/ox.el (org-export-registered-backends): Renamed from
  `org-export--registered-backends'.
(org-export-get-backend):
(org-export-register-backend):
(org-export-insert-default-template):
(org-export--dispatch-ui):

* lisp/org.el (org-export-registered-backends):
(org-export-backends):
(org-get-export-keywords):

* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):

* testing/lisp/test-ox.el (test-org-export/define-backend):
(test-org-export/define-derived-backend):
(test-org-export/derived-backend-p):
(test-org-export/get-all-transcoders):
(test-org-export/get-all-options):
(test-org-export/get-all-filters):
(test-org-export/with-backend): Apply renaming.

Since the variable is copiously used outside of "ox.el", there's no
reason to mark it as internal.
2015-04-22 10:27:24 +02:00
Nicolas Goaziou 9290395405 Silence byte-compiler
* lisp/ob-shell.el (org-babel-sh-evaluate):
* lisp/org-clock.el (org-x11idle-exists-p): Do not use last
  `call-process-shell-command' arg.

* lisp/org-mouse.el (org-mouse-show-context-menu): Ignore
  `redisplay-dont-pause'.

* lisp/org.el (org-icompleting-read): Fix typo.  Small refactoring.
2015-04-22 09:51:52 +02:00
Rasmus 797023b84c org.el: Fix 7ec8ced
* org.el (org-icompleting-read): Correct bug introduced previously.
2015-04-20 14:18:34 +02:00
Rasmus d8494b5668 org.el: Respect read-file-name-function
* org (org-iread-file-name): Respect read-file-name-function.
2015-04-16 19:41:26 +02:00
Rasmus b80ed6124f org.el: Refactor org-file-complete-link
* org.el (org-file-complete-link): Refactor.
2015-04-16 19:41:13 +02:00
Rasmus 7ec8ced5d6 org.el: Small refactor
* org.el (org-icompleting-read): Support completing-read-default.
2015-04-16 17:28:10 +02:00
Oleh Krehel acf7f47ecd Use `completing-read-function' for completion
lisp/org.el (org-icompleting-read): When `completing-read-function' is
the default one, use `ido', otherwise, use `completing-read-function'.
2015-04-16 16:22:11 +02:00
Nicolas Goaziou 9debffbe0f Fix wrong type error with %l in `org-agenda-prefix-format'
* lisp/org.el (org-scan-tags): Fix type.

Reported-by: Dominik Schrempf <dominik.schrempf@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96823>
2015-04-11 00:15:04 +02:00
Nicolas Goaziou edeb7fd8e1 Fix visibility issue when inserting a heading
* lisp/org.el (org-insert-heading): Fix visibility issue.  Remove
  unused binding.

Reported-by: Daniel E. Doherty <ded-law@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/96732>
2015-04-07 01:39:10 +02:00
Nicolas Goaziou 033847070e Fix b4f9ee4eba
* lisp/org.el (org-at-property-p): Fix typo.
2015-04-07 01:36:29 +02:00
Nicolas Goaziou b4f9ee4eba Fix `org-at-property-p'
* lisp/org.el (org-at-property-p): Return nil when at the beginning of
  the properties drawer.
2015-04-07 00:08:31 +02:00
Nicolas Goaziou 94c7619579 Small refactoring
* lisp/org.el (org-read-property-name): Small refactoring.
2015-04-07 00:02:54 +02:00
Nicolas Goaziou e69c4e7a1b `org-open-at-point' follows links in keywords
* lisp/org.el (org-open-at-point): Follow links in keywords.

* testing/lisp/test-org.el (test-org/open-at-point-in-keyword): New test.
2015-04-05 14:17:58 +02:00
Nicolas Goaziou 707d52cff7 Fix diary sexp indentation
* lisp/org.el (org--get-expected-indentation): Diary sexps are to be
  indented at column 0.
* testing/lisp/test-org.el (test-org/indent-line): Add test.
2015-04-02 10:31:58 +02:00
Nicolas Goaziou ca08453cc9 Update defcustom
* lisp/org.el (org-cycle-hook): Update version and package-version.

Commit 03e81f0d24 modified default
value.
2015-04-02 00:23:57 +02:00
Nicolas Goaziou 03e81f0d24 Fix cycling ARCHIVE trees with inline tasks loaded
* lisp/org-inlinetask.el (org-inlinetask-hide-tasks): New function.
* lisp/org.el (org-cycle-hide-inline-tasks): Remove function.
(org-cycle-hook): Apply removal.

Reported-by: "Francesco Pizzolante" <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/89563>
2015-04-02 00:06:49 +02:00
Nicolas Goaziou 22bf1b8ae3 Fix 80bccca4e2
* lisp/org.el (org-refresh-category-properties): Extract default
  category before entering `with-silent-modifications', as
  `buffer-file-name' is then bound to nil.

Reported-by: John Hendy <jw.hendy@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96620>
2015-04-01 22:41:41 +02:00
Nicolas Goaziou 33e2e375df Small optimization
* lisp/org.el (org-find-property): Small optimization.

Since VALUE is included in the regexp, it doesn't need to be found
again with `org-entry-get'.  However, we still need to make sure match
really is a node property.
2015-03-31 16:34:51 +02:00
Nicolas Goaziou 80bccca4e2 Fix `org-refresh-category-properties'
* lisp/org.el (org-refresh-category-properties): Ignore false
  positives when setting category.  Also, deprecate old CATEGORY
  keyword behaviour: new keywords override old ones.
2015-03-31 16:22:10 +02:00
Nicolas Goaziou c1a744659d Fix "Before first headline" error in `org-refresh-property'
* lisp/org.el (org-refresh-property): Ignore function when before
first headline or inlinetask.  Small refactoring.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96552>
2015-03-31 15:57:54 +02:00
Florian Beck 7a717f8f04 Allow searching for specific property value
* lisp/org.el (org-re-property): New optional argument.
(org-find-property): Use it.

See <http://permalink.gmane.org/gmane.emacs.orgmode/96316>.

TINYCHANGE
2015-03-31 11:57:43 +02:00
Rasmus 70d828af3a org.el: Fix org-copy-subtree at inlinetask
* org.el (org-copy-subtree): Include the end of an inlinetasks.

Previously, the end of an inlinetask would be left in the buffer.
2015-03-29 15:30:43 +02:00
Nicolas Goaziou 98ec17e204 Fix `org-backward-sentence' and `org-forward-sentence'
* lisp/org.el (org-backward-sentence):
(org-forward-sentence): Properly move at the boundaries of an element.

* testing/lisp/test-org.el (test-org/forward-sentence):
(test-org/backward-sentence): New tests.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/96377>
2015-03-29 14:14:32 +02:00
Nicolas Goaziou 2e9a1d9c84 Fix code comment
* lisp/org.el (org-fontify-entities): Fix comment.
2015-03-27 18:14:59 +01:00
Nicolas Goaziou 22f732c255 Fuzzy links to headlines ignore COMMENT keywords
* lisp/org.el (org-link-search): Ignore COMMENT keyword.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add test.

Reported-by: Martin Carlé <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96413>
2015-03-26 21:05:27 +01:00
Nicolas Goaziou d4785381ec Change "\..." entities into "\_ "
* lisp/org-element.el (org-element--set-regexps):
(org-element-entity-parser): Update regexps.

* lisp/org-entities.el (org-entities): Modify syntax for space
  entities.

* lisp/org.el (org-fontify-entities): Update comment.

* lisp/org-clock.el (org-clocktable-indent-string): Apply syntax
  change.

* etc/ORG-NEWS (title): Update announce.

Use a less verbose syntax, which cannot interfere with file paths.
2015-03-22 21:45:00 +01:00
Nicolas Goaziou 22f942b481 Implement new entity family "\...."
* lisp/org-element.el (org-element--set-regexps):
(org-element-entity-parser): Update regexps for entities.

* lisp/org-entities.el (org-entities): Add new entities.

* lisp/org.el (org-fontify-entities): Add comment.

* etc/ORG-NEWS (title): Introduce new entities.

"\..." are used to insert an arbitrary number of spaces in various
back-ends.  In particular, this family can be used to introduce
leading spaces within table cells.

Also, unlike to other entities, these can be used mid-word, e.g.,

  wo\....rd

Curly brackets can still be added before a dot, e.g.,

  This is the end\...{}.
2015-03-22 09:55:20 +01:00
Gustav Wikström 8562bd09ec org: Nesting grouptags
* lisp/org.el (org-tags-expand): Nesting grouptags.

  Allowing subtags to be defined as groups themselves.

  : #+TAGS: [ Group : SubOne(1) SubTwo ]
  : #+TAGS: [ SubOne : SubOne1 SubOne2 ]
  : #+TAGS: [ SubTwo : SubTwo1 SubTwo2 ]

  Should be seen as a tree of tags:
  - Group
    - SubOne
      - SubOne1
      - SubOne2
    - SubTwo
      - SubTwo1
      - SubTwo2

  Searching for "Group" should return all tags defined above.
2015-03-16 22:27:38 +01:00
Gustav Wikström ee45258cfe org: Grouptags not unique and can contain regexp
* lisp/org.el (org-tags-expand): Grouptags can have regular expressions as
  "sub-tags".

  The regular expressions in the group must be marked up within { }.
  Example use:

  : #+TAGS: [ Project : {P@.+} ]

  Searching for the tag Project will now list all tags also including
  regular expression matches for P@.+.  Good for example if tags for a
  certain project is tagged with a common project-identifier,
  i.e. P@2014_OrgTags.

* lisp/org.el (org-tag-alist) : New symbols for grouptags when the
  tags in the group don't have to be distinct on a heading.

  Grouptags had to previously be defined with { }.  This syntax is
  already used for exclusive tags and Grouptags need their own,
  non-exclusive syntax.  This behaviour is achieved with [ ].  Note: {
  } can still be used also for Grouptags but then only one of the
  given tags can be used on the headline at the same time.  Example:

  [ group : sub1 sub2 ]

  Grouptags also are not filtered when setting up tags.  This means
  they can exist multiple times in org-tag-alist list.  It will be
  usable if nesting of grouptags is ever to become reality.

  There is a slightly annoying side-effect when setting tags in that a
  tag which is both a part of a grouptag and a grouptag of it's own
  will get multiple key-choices in the selection-UI.

* lisp/org.el (org--setup-process-tags): Adaption for the added syntax
  for non-distinct grouptags.

* lisp/org.el (org-fast-tag-selection): Add support for the added,
  non-unique, grouptag-syntax.  Minor (if ...) to (when ...) refactor.
2015-03-16 22:27:26 +01:00
Nicolas Goaziou 7b450bc7bb Fix `org-delete-property-globally'
* lisp/org.el (org-delete-property-globally): Ignore false positive.
2015-03-15 16:53:58 +01:00
Nicolas Goaziou 84d6ff4ec1 Fix `org-entry-delete' with accumulated properties
* lisp/org.el (org-entry-delete): Remove all occurrences of
  accumulated properties, too.  Return a non-nil value when some
  property was removed.

* testing/lisp/test-org.el (test-org/entry-delete): Add test.
2015-03-15 16:53:42 +01:00
Nicolas Goaziou 8cdb2eef0f Fix `org-find-entry-with-id'
* lisp/org.el (org-find-entry-with-id): Ignore false positive ID
  properties when looking for a specific ID.
2015-03-15 15:49:05 +01:00
Nicolas Goaziou 269b680900 Fix CUSTOM_ID search
* lisp/org.el (org-link-search): Avoid false positives when searching
  CUSTOM_ID property.

* testing/lisp/test-org.el (test-org/custom-id): Add test.
2015-03-15 15:49:05 +01:00
Nicolas Goaziou 7072dba04d Implement `org-find-property'
* lisp/org.el (org-find-property): New function.
* testing/lisp/test-org.el (test-org/find-property): New test.
2015-03-15 15:49:05 +01:00
Rasmus cf4145db02 org.el: Declare org-element-update-syntax
* org.el: Declare org-element-update-syntax.  Required by org-add-link-type.
2015-03-14 00:39:54 +01:00
Nicolas Goaziou 1de825df31 Fix CATEGORY property
* doc/org.texi (Special properties): Remove "CATEGORY"

* lisp/org.el (org-special-properties): Remove "CATEGORY".
(org-property-get-allowed-values): Ignore "CATEGORY".
(org-entry-get): Make sure to get CATEGORY value using
`org-entry-properties'.

* testing/lisp/test-org.el (test-org/entry-put): Add test.

"CATEGORY" is not a special property as it can also be set using
a properties drawer.
2015-03-11 17:12:49 +01:00
Nicolas Goaziou 375c831418 Tiny refactoring
* lisp/org.el (org-timestamp--to-internal-time): New function.
(org-timestamp-format): Use new function.
(org-timestamp-split-range): Fix docstring.
2015-03-08 18:34:09 +01:00
Nicolas Goaziou 9e3c3ec0b3 Fix LaTeX fragment display from remote documents
* lisp/org.el (org-toggle-latex-fragment): Fix display from remote
  documents by creating images in temporary directory.

Reported-by: Dustin Paluch <dustinpaluch@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95712>
2015-03-07 10:01:27 +01:00