Commit Graph

16468 Commits

Author SHA1 Message Date
Andrew Burgess 587280ea68 org-capture: Better indentation when creating a new list
lisp/org-capture.el (org-capture-place-item): When starting a new list
use org-indent-line to establish the correct indentation rather than
just using 0.

Creating an entry in org-capture-templates of type item adds entries
into a list, however, currently, if the list is empty then the first
list item will always be indented to depth 0 (so hard on the left),
which looks like this:

  * Top Level
  ** Second Level
  - item #1
  - item #2
  - item #3

This is fine if org-adapt-indentation is nil, however, with the
default value of t lists should be indented more like this:

  * Top Level
  ** Second Level
     - item #1
     - item #2
     - item #3

The patch below changes org-capture-place-item so that, when starting
a new list, the items are indented as above.

Care is taken to preserve two features of the existing behaviour,
first, when adding to an existing list, new items are indented to
match the items already in the list.  And secondly, when there is some
introductory text before the list new items are inserted after the
text, like this:

  * Top Level
  ** Second Level
     This is some introductory text:
     - item #1
     - item #2
     - item #3

TINYCHANGE
2014-10-14 22:24:30 +02:00
Nicolas Goaziou bc342011e9 org.texi: Tiny fix
* doc/org.texi (An example): Tiny fix.
2014-10-14 12:14:55 +02:00
Nicolas Goaziou 39963a61d4 ob-clojure: Silence byte-compiler 2014-10-13 22:05:12 +02:00
Nicolas Goaziou ce2090ccfd Fix indentation in lists
* lisp/org-list.el (org-list-item-body-column): Take into
  consideration empty items and bullets followed by two spaces.

* lisp/org.el (org--get-expected-indentation): Fix return value for
  items in lists.
(org-indent-region): Fix infloop when indenting some types of plain
lists.  Also fix error when region starts with blank lines at the
beginning of the buffer.

* testing/lisp/test-org.el (test-org/indent-region): Add tests.
2014-10-13 19:03:14 +02:00
Nicolas Goaziou 352118bf7f Merge branch 'maint' 2014-10-13 18:16:04 +02:00
Jorge A. Alfaro Murillo 3d690a6a11 Improve functionality of org-passwords.el
* contrib/lisp/org-passwords.el (org-passwords-default-password-size):
  New variable.
(org-passwords-default-random-words-number): New variable.
(org-passwords-copy-username, org-passwords-copy-password): Use
`org-entry-get' to obtain the property value.
(org-passwords-open-url): New function.
(org-passwords): Can be called with universal argument.
(org-passwords-generate-password): Use default size given by
`org-passwords-default-password-size'.
(org-passwords-random-words): Use default number given by
`org-passwords-default-random-words-number'.
(org-passwords-concat-this-with-string): Fix bug.

The patch adds several functionality:

Open the URL property directly from the mode. URLs can be inherit.

Universal argument in org-passwords allows for longer browsing. Two
arguments is used for editing.

There is a default password size and random-words number for faster
password generating.

Fix bug in C-u M-x org-passwords-generate-password.

Commentary in file has more information.
2014-10-13 00:32:51 +02:00
Marco Wahl fdd9b18598 [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
  display function.  Drop the usage of the obsolete diary-display-hook.

fancy-diary-display has been dropped in Emacs 25.  diary-fancy-display
is the long known replacement of fancy-diary-display.

diary-display-hook has been marked obsolete before Emacs 23.2.
2014-10-13 00:19:07 +02:00
Nicolas Goaziou 0025a0b1c7 ox: Fix failing test
* testing/lisp/test-ox.el (test-org-export/footnotes): Fix test.
2014-10-12 23:18:40 +02:00
Nicolas Goaziou 89f5ad36d7 Merge branch 'maint' 2014-10-12 22:55:38 +02:00
Nicolas Goaziou a0ac1344fc ox: Fix 88457acff4
* lisp/ox.el (org-export-async-start): Limit first argument to lambda
  expressions.
* lisp/ox-publish.el (org-publish, org-publish-all,
  org-publish-current-file): Replace `ignore', per limit stated above.

Due to a hack allowing to provide quasi-quoted lambda expressions,
symbols are not allowed as result handler.  This limitation is not
much of a problem as `org-export-async-start' is only meant to be used
internally.
2014-10-12 22:53:01 +02:00
Aaron Ecay bc9a582f1e [export] Raise an error if footnote definition is not found.
* lisp/ox.el (org-export-get-footnote-definition): Raise an error if
footnote definition is not found.
2014-10-12 16:47:09 +01:00
Aaron Ecay 5f423f1208 Warn about unexpanded macros on export
* lisp/org-macro.el (org-macro-replace-all): Add optional `finalize'
argument.
* lisp/ox.el (org-export-as): Use it.
2014-10-12 16:47:09 +01:00
Jonathan Leech-Pepin 56256a09df org-passwords.el: Fix `org-passwords-generate-password-with-symbols` to not insert password
* org-passwords.el (org-passwords-generate-password-with-symbols): Do not insert password,
this matches how `org-passwords-generate-password-without-symbols` behaves.
2014-10-12 14:35:34 +02:00
Thierry Banel 4753bfa3bf Enable multiple files in :includes header
* ob-C.el (org-babel-C-expand-C, org-babel-C-expand-D): Let
:includes, :defines, :imports accept several items separated by
blanks without enclosing them in parenthesis.

Thanks to Will Everett for reporting this.
2014-10-12 14:00:51 +02:00
Thierry Banel 0e07eb5665 Ascii and Gnuplot key-bindings
* org.el (org-mode-map): change key-binding from C-c p to C-c " a add
C-c " g key-binding for Gnuplot
(org-tbl-menu): add sub-menu for plotting featuring Gnuplot and ascii
plot
* org-table.el (orgtbl-setup): add sub-menu for plotting featuring
Gnuplot and ascii plot
2014-10-12 11:25:51 +02:00
Dima Kogan 1c1f91811d org-table: Field formulas can now create columns as needed
* org-table.el (org-table-formula-create-columns): New variable.
(org-table-recalculate): Use the new org-table-formula-make-new-cols
customization to control whether org creates new columns when
a formula explicitly targets them.
2014-10-12 11:11:57 +02:00
Bastien Guerry c5016d55b6 Merge branch 'maint' 2014-10-12 07:03:23 +02:00
Christopher Schmidt 9c3d22f864 org.el (orgstruct-make-binding): Do not use loop in interpreted code.
* lisp/org.el (orgstruct-make-binding): Do not use loop in
interpreted code.
2014-10-12 06:57:35 +02:00
Christopher Schmidt 2b98cd6554 org.el (orgstruct-make-binding): Do not use loop in interpreted code.
* lisp/org.el (orgstruct-make-binding): Do not use loop in
interpreted code.
2014-10-11 21:40:45 +02:00
Marco Wahl 4a872ae3a0 [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
  display function.  Drop the usage of the obsolete diary-display-hook.

fancy-diary-display has been dropped in Emacs 25.  diary-fancy-display
is the long known replacement of fancy-diary-display.

diary-display-hook has been marked obsolete before Emacs 23.2.
2014-10-11 18:16:36 +02:00
Nicolas Goaziou 39eb7796e8 org-table: Fix :raw parameter in radio tables
* lisp/org-table.el (org-table--to-generic-cell): Use
  `org-element-interpret' data when parameter :raw is non-nil so
  pseudo elements and objects are not ignored.

* testing/lisp/test-org-table.el (test-org-table/to-latex): Add test.

Thanks to Giuseppe Lipari for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91559
2014-10-11 17:10:05 +02:00
Aaron Ecay fcce67cdeb ob-R: fix interaction with ESS for new sessions
* lisp/ob-R.el (org-babel-R-initiate-session): Properly wait on a new
ESS process.
2014-10-10 12:35:57 -04:00
Nicolas Goaziou fac4677e51 Merge branch 'maint' 2014-10-10 11:11:06 +02:00
Nicolas Goaziou 88457acff4 ox: Fix "void-variable ignore" error when publishing
* lisp/ox.el (org-export-async-start): Allow to use symbols as
  function.

Thanks to Julien Cubizolles for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91532
2014-10-10 11:05:06 +02:00
Rainer M. Krug 780db69cdf ob-R.el: Add package name to read.table call
* lisp/ob-R.el: (ob-R-transfer-variable-table-with-header)
(ob-R-transfer-variable-table-without-header): Add package name to
call of R function `read.table'.

Thus, it now reads `utils::read.table'.  This clarifies the call as
well as avoids "could not find function" error in R with the devtools
package.  See
<https://github.com/hadley/devtools/issues/336#issuecomment-23517837>.
2014-10-10 00:16:31 -04:00
Alan Schmitt c6c1a05894 org-mac-link.el: Fix malformed message links
* contrib/lisp/org-mac-link.el (org-mac-message-get-links): Fix and use the `org-mac-paste-applescript-links' helper.

The existing code inserted links which should have been "[[message:ABC][the subject]]"
as "[[essage:ABC][the subjec]]".

Based on a patch by Steve Purcell <steve@sanityinc.com>.
2014-10-09 14:12:05 +02:00
Steve Purcell 0a720605d9 org-mac-link.el: Fix multi-line file description
* contrib/lisp/org-mac-link.el: Shorten the file description, which shouldn't span lines.

TINYCHANGE

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
2014-10-09 13:42:49 +02:00
Steve Purcell e207062a87 org-mac-link.el: Don't fail on machines without Growl installed
* contrib/lisp/org-mac-link.el (org-as-get-flagged-mail): Don't assume Growl is installed.

Applescript can't run if it refers to uninstalled apps, so since Growl is not universally
installed, references to it should be dropped. This change also provides a less cryptic
message when `org-mac-mail-account' is unset at the time flagged messages are grabbed.

TINYCHANGE

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
2014-10-09 13:39:00 +02:00
David Arroyo Menéndez 2900f18a2b orgguide.texi: break lines after @noindent
* doc/orgguide.texi: to avoid troubles with po4a, I've added break lines after @noindent
2014-10-08 15:06:42 +02:00
Marco Wahl 8e13592510 org-eww.el: Special kill in eww for Org for keeping the links
* contrib/lisp/org-eww.el(org-eww-copy-for-org-mode): Realization of
  the kill.
  (org-eww-goto-next-url-property-change,
  org-eww-no-next-link-p, org-eww-url-below-point): Auxiliaries
  for accessing a eww buffer
  (org-eww-extend-eww-keymap): Add the new kill to eww keymap

The code has emerged from the very similar org-w3m.el.
2014-10-07 16:07:15 +02:00
rasmus 004332b9b6 Fix 464cd96
* OrgOdtStyles.xml: Fix error introduced in 464cd96.
2014-10-07 15:20:43 +02:00
Nicolas Goaziou 06944507f1 Merge branch 'maint' 2014-10-07 12:29:35 +02:00
Mike McLean d5c531725a org-agenda.el: Update docstring
* org-agenda.el (org-agenda-time-grid): Change docstring.

TINYCHANGE
2014-10-07 12:28:51 +02:00
Bastien Guerry 942eb607e6 ob-clojure.el: Fix compatibility issue
* ob-clojure.el (org-babel-execute:clojure): Fix compatibility
issue with cider >0.7.0.  This breaks compatibility with Cider
<=0.7.0.

Thanks to Daniel Szmulewicz for the suggested fix.
2014-10-06 15:47:40 +02:00
Bastien Guerry e54cf318ee Merge branch 'maint' 2014-10-06 14:29:01 +02:00
Bastien Guerry 9c64957609 Merge branch 'master' of orgmode.org:org-mode 2014-10-06 14:25:40 +02:00
Bastien Guerry e81b911c46 ob-clojure.el: Remove nrepl.el support
* ob-clojure.el (org-babel-clojure-backend)
(org-babel-execute:clojure): Remove nrepl.el support.
2014-10-06 11:56:04 +02:00
Bastien Guerry df3b24fe8a Backport typo fixes from Emacs 24 branch 2014-10-06 11:52:30 +02:00
rasmus b54ad32a79 ob-table: Updated documentation.
* ob-table.el (org-sbe): Updated documentation.
2014-10-04 12:10:49 +02:00
Rasmus 7ad281c2c7 Merge remote-tracking branch 'origin/master' 2014-10-04 12:06:14 +02:00
Rasmus 5e3e1ad700 ox-koma-letter.el: Update docstring.
* ox-koma-letter.el (org-koma-letter-prefer-special-headings): Change
docstring.
2014-10-04 12:00:22 +02:00
Rasmus 2399f15514 Merge remote-tracking branch 'origin/master' 2014-10-04 11:47:17 +02:00
Nicolas Goaziou a526ee3b82 Fix 464cd96
* lisp/ox-html.el (org-html-link):
* lisp/ox-md.el (org-md-link): Fix errors introduced in
  464cd965cb.
2014-10-03 22:23:25 +02:00
Rasmus 464cd965cb ox: Support unnumbered headlines via property
* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support unnumbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
2014-10-03 22:06:34 +02:00
rasmus 4412fed850 test-ox.el: Fix test-error from 986037a.
* test-ox.el (test-org-export/expand-include): Updated tests.
2014-10-02 21:05:10 +02:00
Nicolas Goaziou cf77a8e878 Fix `org-edit-special' on file names with spaces
* lisp/org.el (org-edit-special): Fix function when INCLUDE or
  SETUPFILE keyword points to a file name with spaces.
2014-10-02 19:23:03 +02:00
Rasmus 986037a538 ox: Allow file-links with #+INCLUDE-keyword
* org.el (org-edit-special): Handle file-links for INCLUDE.
* ox.el (org-export--prepare-file-contents): Handle links and
add option no-heading.
* ox.el (org-export-expand-include-keyword): Resolve headline
links and add option :only-contents.
* orgguide.texi (Include files)
org.texi (Include files): Updated.
* testing/examples/include.org: New examples.
* test-ox.el (test-org-export/expand-include): New tests.
2014-10-02 18:51:37 +02:00
Rasmus 8f7c85f85b Merge remote-tracking branch 'origin/master' 2014-10-01 23:23:19 +02:00
Marco Wahl 58d95c3a4f org-eww: Org-module to store url from eww
* contrib/lisp/org-eww.el: New file
* contrib/README: Added org-eww.
* lisp/org.el (org-modules): Add org-eww to the pool of org-modules.

The hook gets hooked in the module.

The file is more or less a fraction of the org-w3m module with 'w3m'
replaced by 'eww'.
2014-10-01 13:48:55 -04:00
Rasmus ec216e2953 Merge remote-tracking branch 'origin/master' 2014-09-30 23:47:03 +02:00