0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 18:10:43 +00:00
Commit graph

4168 commits

Author SHA1 Message Date
Carsten Dominik 73d361d844 Empty properties when cloning an entry
Patch by Mike Mc Lean
2010-12-06 10:03:04 +01:00
Carsten Dominik 970b2f7b88 Allow to jump to capture template after finalizing
* lisp/org-capture.el (org-capture-finalize): New prefix argument
STAY-WITH-CAPTURE.
(org-capture-refile): Improve docstring.
* doc/org.texi (Using capture): Document using prefix arguments for
finalizing capture.
2010-12-06 09:32:24 +01:00
John Wiegley 4d575c8a03 C-u B S now scatters tasks across weekdays only 2010-12-06 00:22:55 -05:00
Eric Schulte 01a2e1a545 ob-sql: Add msosql as optional sql engine -- Thanks Sébastien Vauban
* lisp/ob-sql.el (org-babel-execute:sql): Add msosql as optional sql
  interaction engine.
2010-12-05 07:23:59 -07:00
Carsten Dominik a7cc04be03 Use org-today again in org-habit.el 2010-12-04 00:31:30 +01:00
Carsten Dominik 8cdd4ff98a Revert "org-habit: Use org-today."
This reverts commit 1dcb374f48.
2010-12-04 00:23:30 +01:00
Carsten Dominik 238c815502 Revert "org: use org-today in habits auto repeat"
This reverts commit d1eb6cb25b.
2010-12-04 00:19:22 +01:00
John Wiegley 384e4f08e4 Added a bulk "scattering" command
B S will cause tasks to be rescheduled a random number of days into the
future, with 7 as the default.  This is useful if you've got a ton of
tasks scheduled for today, you realize you'll never deal with them all,
and you just want them to be distributed across the next N days.
2010-12-03 17:52:46 -05:00
John Wiegley beedff9a49 `org-agenda-bulk-mark' now accepts a numerical prefix arg 2010-12-03 17:52:46 -05:00
Carsten Dominik e10e6197e7 Fix forgotten function renaming
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-goto-today): Use `org-today'.
2010-12-03 23:37:55 +01:00
Carsten Dominik 316e7e5fbc Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org-agenda.el
2010-12-03 22:03:06 +01:00
Carsten Dominik d9cc075cb9 LaTeX export: Swap \begin{document} and the title/author definitions
* lisp/org-latex.el (org-export-latex-make-header): Swap \begin{document}
and the title/author definitions.

Patch by Sebastian Hofer.

TINYCHANGE
2010-12-03 21:02:33 +01:00
Carsten Dominik 5d74e1b754 Fix macro definition of with-silent-modification
* lisp/org-macs.el: Better backup definition for `with-silent-modifications'.
2010-12-03 20:53:34 +01:00
Eric Schulte 4081200ab0 ob-python: rename prefix to preamble
* lisp/ob-python.el (org-babel-execute:python): Rename "prefix" to
  "preamble".
  (org-babel-python-evaluate): Rename "prefix" to "preamble".
  (org-babel-python-evaluate-external-process): Rename "prefix" to
  "preamble".
2010-12-03 07:29:28 -07:00
Eric Schulte 201eb8ce23 ob: examplization of inserted results is smarter about markers
* lisp/ob.el (org-babel-examplize-region): Check if `end' is a marker
  or a point and handle appropriately.
2010-12-03 07:11:09 -07:00
Eric Schulte 6e450915a7 ob-sql: explicitly set \t as field separator on import -- Thanks to Joost Helberg
* lisp/ob-sql.el (org-babel-execute:sql): Explicitly set field
  separator to \t when importing tabular data.
2010-12-03 07:01:14 -07: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
Robert Pluim c3b2977de6 Fix a docstring
* lisp/org-agenda.el (org-agenda-toggle-deadlines): Fix docstring.

TINYCHANGE
2010-12-03 11:45:03 +01:00
Carsten Dominik 94c19c82b7 Make compiler happy
* lisp/org-clock.el (org-quarter-to-date): Define variables.
(org-clock-special-range): Defin variables.  Use org-floor*.
(org-clocktable-write-default): Define tcol.
* lisp/org-compat.el (org-floor*): New function.
* lisp/org-complete.el: Declare external functions and variables.
2010-12-03 10:20:41 +01:00
Carsten Dominik 61b2247631 Fix % formula in clock tables
* lisp/org-clock.el (org-clocktable-write-default): Fix the % formula.

Bug reported by Joost Helberg.
2010-12-03 09:50:38 +01:00
Matt Lundin 2ac751a6cb org-agenda: Fix category string for agenda
* lisp/org-agenda.el: (org-format-agenda-item) The value of
org-category is not converted to a string unless it is defined.

This fixes commit 3061c7083d, which
resulted in org-format-agenda-item always returning the symbol-name for
org-category even if it was not defined. I.e., in some instances,
org-format-agenda-item returned the string "nil", thus bypassing the
buffer-file-name method of deriving the category.
2010-12-03 09:13:11 +01:00
Eric Schulte cfd7d07adc ob-python: content of :prefix argument appended to code file during external evaluation
* lisp/ob-python.el (org-babel-execute:python): Pass the new "prefix"
  header argument through to external evaluation.
  (org-babel-python-evaluate): Pass the new "prefix" header argument
  through to external evaluation.
  (org-babel-python-evaluate-external-process): When specified prepend
  "prefix" to the file used in external evaluation.
2010-12-02 07:25:50 -07:00
Dan Davison 7687748128 babel: fix python pretty print bug
* lisp/ob-python.el (org-babel-python-evaluate-session): Change python
module name from 'pp' to 'pprint'
2010-12-01 16:55:21 +00:00
Eric Schulte 8e746c9afa ob: removing empty lines from R output
* lisp/ob-R.el (org-babel-R-evaluate-session): Removing empty lines
  from R session output, these are often the result of variable
  assignments.
2010-12-01 08:01:00 -07:00
Eric Schulte 2c81a4c142 ob-sql: fix compiler warning
* lisp/ob-sql.el (orgtbl-to-csv): Declaring an external function to
  fix a compiler warning.
2010-12-01 07:21:18 -07:00
Eric Schulte a9a77780dc change requirement order to ob-eval is always loaded
* lisp/ob-eval.el (require): No longer require ob.el to allow
  requiring by ob.el.
* lisp/ob.el (ob-eval): Require ob-eval.
2010-12-01 07:19:45 -07:00
Eric Schulte 232651a57e ob: mention code block name when ":eval query"
* lisp/ob.el (org-babel-confirm-evaluate): Show code block's name when
  it is available during evaluation query.
2010-11-30 22:02:02 -07:00
Eric Schulte beab6b4bfe ob-sql: added variable handling
* lisp/ob-sql.el (org-babel-expand-body:sql): Expand the body of a sql
  code block.
  (org-babel-execute:sql): Use sql specific body expansion function.
  (org-babel-sql-expand-vars): Insert variables into a sql code block.

* lisp/ob-sqlite.el (org-babel-execute:sqlite): Remove unused variable
  declaration.
2010-11-30 19:32:01 -07:00
Eric Schulte c4418fc472 ob: fixed insertion of result error
* lisp/ob.el (org-babel-insert-result): Using markers instead of
  points for more robust buffer anchors.
2010-11-30 19:22:34 -07:00
Julien Danjou 13f066d66d org-capture: use org-today
* org-capture.el: Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:50:08 +01:00
Julien Danjou 1dcb374f48 org-habit: Use org-today.
* org-habit.el: Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:49:37 +01:00
Julien Danjou d1eb6cb25b org: use org-today in habits auto repeat
* org.el (org-auto-repeat-maybe): Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:48:51 +01:00
Julien Danjou 2e08843369 Rename org-agenda-today to org-today.
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:48:28 +01:00
Carsten Dominik 12b153ed8b Implement clocktables for quarters
* lisp/org-clock.el (org-day-of-week): New function.
(org-quarter-to-date): New function.
(org-clock-special-range): Implement quarters.

Patch by Erwin Vrolijk
2010-11-29 11:27:47 +01:00
Sébastien Vauban 6d33af4a5c Fix documentation for global tag list during capture
* lisp/org.el (org-complete-tags-always-offer-all-agenda-tags): Fix
docstring.
2010-11-29 10:28:07 +01:00
Julien Danjou 9de7ad3593 Add org-agenda-todo-ignore-timestamp
* lisp/org-agenda.el: Add org-agenda-todo-ignore-timestamp.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
Honor org-agenda-todo-ignore-timestamp.
* doc/org.texi: Mention org-agenda-todo-ignore-timestamp.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-29 10:25:22 +01:00
Julien Danjou 3061c7083d org-agenda: convert category to string
* org-agenda.el (org-format-agenda-item): Convert category to a string
if it is a symbol. This fixes the following call to
org-agenda-get-category-icon which fails if category is not a string.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-29 10:23:31 +01:00
Eric Schulte 143292aab5 ob-clojure: fully qualified pprint -- thanks to Rick Moynihan
* lisp/ob-clojure.el: Updated requirements documentation to mention
  the minimum version of Clojure.
  (org-babel-expand-body:clojure): Fully qualified function name.
2010-11-28 20:58:34 -07:00
Nicolas Goaziou acd6126300 Exporting lists to LaTeX respects blank lines
* lisp/org-latex.el (org-export-latex-lists): do not add an
  unnecessary newline character after a list.
* lisp/org-list.el (org-list-bottom-point-with-indent): ensure bottom
  point is just after a non blank line.
2010-11-28 21:27:20 +01:00
Eric Schulte c3b7eca193 ob: fixed newly introduced empty result error
* lisp/ob.el (org-babel-examplize-region): Remove old assertion which
  no longer applies to the result insertion code.
2010-11-27 17:51:46 -07:00
Eric Schulte 994e1648e2 babel: python uses :return header argument
* lisp/ob-python.el (org-babel-execute:python): Use a :return header
  argument for external evaluation in which the code block body need
  be wrapped in a function

Thanks to Darlan Cavalcante for proposing this feature.
2010-11-27 23:59:51 +00:00
Eric Schulte 039f248092 ob-clojure: Fixed compiler warning, trapped free variable
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Trapped free
  variable.
2010-11-27 08:19:53 -07:00
Carsten Dominik 1123a5d48e Edit formulas with "C-c '"when in TBLMF line
* lisp/org.el (org-edit-special): Edit formulas when in TBLMF line

Conflicts:

	lisp/org.el
2010-11-27 08:05:00 +01:00
Carsten Dominik 74f6072d0c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-27 08:03:16 +01:00
Allen S. Rout f8e6119131 New hook to run after finalizing capture, suitable for deleting a frame
* lisp/org-capture.el (org-capture-after-finalize-hook): New hook.
(org-capture-finalize): Run the new hook.

TINYCHANGE
2010-11-27 07:55:21 +01:00
Eric Schulte 1aa92418da ob-clojure: support for pretty printing code and data
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Support for
  pretty printing of Clojure code and data.
2010-11-26 15:49:24 -07:00
Eric Schulte 01b4f63fe9 ob: no longer escaping results which will be wrapped in a block.
* lisp/ob.el (org-babel-insert-result): No longer escape results which
  will be wrapped in a block.
2010-11-26 15:48:22 -07:00
Eric Schulte 172a3b6532 ob: Fixed compiler warning
* lisp/ob-eval.el (org-babel-eval-wipe-error-buffer): Fixed compiler
  warning and added documentation string.
2010-11-26 13:28:44 -07:00
Eric Schulte a657b6f2a3 drastically simplified ob-clojure using slime for all evaluation
* lisp/ob-clojure.el (org-babel-execute:clojure): Remade using slime
  for all code evaluation.

  (org-babel-expand-body:clojure): Remade in the image of
  `org-babel-expand-body:emacs-lisp'.
2010-11-26 13:26:21 -07:00
Carsten Dominik b6f43d7c20 Minor fix 2010-11-26 19:08:13 +01:00
Carsten Dominik 80a6674178 BEAMER export: Allow overlay options for column environments
* lisp/org-beamer.el (org-beamer-sectioning): Allow overlay arguments for
the column as well.
* doc/org.texi (Beamer class export): Document that also overlay arguments
can be passed to the column environment.

Eric Fraga writes:

> I am trying to create a beamer slide which has two columns.  The second
> column should only appear after a while (the 6th uncovering operation).
> In latex, I would do:
>
> : \begin{column}<6->{0.4\textwidth}
>
> say.  In org, I would expect to be able to get this latex code generated
> by the following:
>
> --8<---------------cut here---------------start------------->8---
> ***** column heading			      :BMCOL:B_block:
>      :PROPERTIES:
>      :BEAMER_col: 0.4
>      :BEAMER_envargs: c<6->
>      :BEAMER_extra:
>      :BEAMER_env: block
>      :END:
> --8<---------------cut here---------------end--------------->8---
>
> according to the info documentation (Beamer class export).
>
> However, this does not work: the "c<6->" is placed verbatim in
> the \begin{block} that comes after the \begin{column}.  Furthermore, if
> I ask for the heading to be ignored (instead of defining a block), the
> envargs are lost completely!
2010-11-26 08:02:58 +01:00
Carsten Dominik 88bd7bbe89 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-25 22:32:16 +01:00
Eric Schulte 30b2d604c5 ob: more descriptive "Evaluation Aborted" message
* lisp/ob.el (org-babel-confirm-evaluate): More descriptive message
  when evaluation is aborted or disabled.
2010-11-25 10:28:04 -07:00
Carsten Dominik 341e9ce1d7 Date tree capture with prompt for date
* doc/org.texi (Template elements): Document the new entry type.

* lisp/org-capture.el (org-capture-templates): Add new option to customize
type and docstring.
(org-capture-set-target-location): Interpret the file+datetree+prompt
entry.
2010-11-25 17:00:57 +01:00
Carsten Dominik 9cc19e3919 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org.el
2010-11-24 23:44:04 +01:00
Eric Schulte b5f7b02814 "wrap" :results header argument wraps code block results
* lisp/ob.el (org-babel-insert-result): Responds to new "wrap" header
  argument.
  (org-babel-merge-params): Includes new "wrap" header argument in
  one of the results header argument exclusive groups.

* lisp/org.el (org-additional-option-like-keywords): Fontify begin and
  and results lines as comments.
2010-11-24 10:19:44 -07:00
Carsten Dominik 125edaf6ae Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-24 02:14:29 +01:00
David Maus 6e3f1e1175 Fix condition for with-silent-modification
* org-macs.el (with-silent-modifications): Fix condition for
with-silent-modification.
2010-11-23 21:31:54 +01:00
Eric Schulte 950bea36f8 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-23 09:39:41 -07:00
Eric Schulte d24b04d82f ob: cleaner parsing of header arguments
Thanks to Charles C. Berry for insisting on this issues existence

  This change is now secured with a unit test

* lisp/ob.el (org-babel-parse-header-arguments): Stripping trailing
  spaces off of header arguments (even the first one).
2010-11-23 09:39:26 -07:00
Eric Schulte 90bd46a6d5 ob-sh: robustification
* lisp/ob-sh.el (org-babel-sh-var-to-sh): Wrap end token of heredoc in
  single quotes which is the best practice.
  (org-babel-sh-table-or-results): Use `org-babel-script-escape' for
  more robust parsing of shell output.
2010-11-23 09:38:15 -07:00
Dan Davison fb008fdd88 Add some more keywords for completion
* lisp/org.el (org-additional-option-like-keywords): Add more keywords,
and colons to some old ones.
2010-11-23 15:11:14 +01:00
Dan Davison 666e6ed5e7 babel: Wipe error buffer clean at start of execution
* lisp/ob-eval.el (org-babel-error-buffer-name): Define new variable.

  (org-babel-eval-error-notify): Use new variable `org-babel-error-buffer-name'
  (org-babel-eval): Make temp error buffer invisible to the user with
		    initial space in name.
  (org-babel-eval-wipe-error-buffer): New function to wipe the error message buffer.

* lisp/ob-exp.el (org-babel-eval-wipe-error-buffer): Declare external function
  `org-babel-eval-wipe-error-buffer'.
  (org-babel-exp-results): Wipe error buffer clean at outset of execution

* lisp/ob.el (org-babel-execute-src-block-maybe): Wipe error buffer clean at
  outset of execution
  (org-babel-eval-wipe-error-buffer): Declare external function
				    `org-babel-eval-wipe-error-buffer'.
2010-11-23 13:26:31 +00:00
Eric Schulte b174975eb7 ob: safer conversion of results of scripting languages into elisp objects
* lisp/ob-python.el (org-babel-python-table-or-string): Using
  `org-babel-script-escape' for reading string input from scripting
  languages.

* lisp/ob-ruby.el (org-babel-ruby-table-or-string): Using
  `org-babel-script-escape' for reading string input from scripting
  languages.

* lisp/ob.el (org-babel-script-escape): Using
  `org-babel-script-escape' for reading string input from scripting
  languages.

* lisp/ob-haskell.el (org-babel-haskell-table-or-string): Using
  `org-babel-script-escape' for reading string input from scripting
  languages.
2010-11-22 18:51:00 -07:00
David Maus 803f6b0ceb Remove duplicate defcustom, introduced by 95bb1666 2010-11-22 21:32:22 +01:00
Achim Gratz 95bb16661b Fix byte compiler warnings
* org-macs.el (org-called-interactively-p): Wrap function call in
	with-no-warnings.
	(with-silent-modifications) Declare macro for Emacs < 23.2.

TINYCHANGE
2010-11-22 21:22:27 +01:00
Eric Schulte 3785722e92 ob: fix compiler warnings introduced by code-block list reading/writing 2010-11-22 07:21:18 -07:00
Eric Schulte e127899719 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-22 06:44:31 -07:00
Eric Schulte 6baa78b2da ob: no longer adding extra ":" to singleton first header args
* lisp/ob.el (org-babel-parse-header-arguments): Removed addition of
  ":" to singleton first header arguments as it was leading to errors.
2010-11-22 06:44:06 -07:00
Carsten Dominik 3ce2488f74 Better processing of headlines and the title in LaTeX export
* lisp/org-latex.el (org-export-latex-make-header): Run the title through
`org-export-latex-fontify-headline'.
(org-export-latex-fontify-headline): Do the protection of math
snippets also here
2010-11-21 10:22:09 +01:00
Carsten Dominik e1e916d659 Revert "Preserve math environments in title when exporting to LaTeX"
This reverts commit c579f08eee.
2010-11-21 10:03:07 +01:00
Richard Lawrence c579f08eee Preserve math environments in title when exporting to LaTeX
* lisp/org-latex.el (org-export-as-latex): Sent the section title
through the preprocessor.

Hi all,

This patch fixes the issue I originally described here:
http://article.gmane.org/gmane.emacs.orgmode/32281

It preserves math-mode delimiters (e.g. "$" and "\(") in the document
title when exporting to LaTeX.  (That is, it prevents them from being
escaped, by running the title through org-export-preprocess-string,
which marks them with the org-protected property.)  It should work
regardless of whether the title is pulled from a headline, from the text
before the first headline, or from an explicit #+TITLE declaration.

(This is my first time contributing a patch to a Free Software project
-- so please, let me know what you think!)

Best,
Richard
2010-11-21 09:51:52 +01:00
Carsten Dominik d637546804 Mark listitifed headings wiht custom id
* lisp/org-html.el (org-html-level-start): Mark listified headings
with a custom id.

Patch by Jambunathan
2010-11-21 09:45:02 +01:00
Carsten Dominik f692ba3c26 Remove confusion of C-c C-o in footnote with cursor on link
* lisp/org.el (org-open-at-point): Don't do footnote action if cursor is
on a bracket link.

Sebastian Mengin writes:

> Hi,
>
> Consider the following minimal example:
>
> Text[fn:1]
>
> * Footnotes
> [fn:1] Note with a [[file:abecedaire.jpg][link]].
>
> Here with orgmode 7.02, doing C-c C-o on the link moves the cursor on
> [fn:1] and says in the minibuffer: "Position saved mark to ring, go back
> with C-c &", instead of opening the linked file.
>
> Is this a bug?
>
2010-11-20 18:24:18 +01:00
Carsten Dominik dce955fad0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-20 12:33:45 +01:00
Carsten Dominik 3dc846ae38 Make org-edit-special call the formula editor if cursor is in TBLFM line
* lisp/org.el (org-edit-special): Check also for TBLFM line.

Patch by Thorsten Wagner.
2010-11-20 12:33:37 +01:00
Carsten Dominik 69ba4a181c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-20 12:26:55 +01:00
Achim Gratz c906a75e48 org-clock.el: fix regex to recognize indented clock tables
* lisp/org-clock.el (org-get-clocktable)
  previous patch incorrectly required whitespace in front of #+BEGIN: and #+END:

TINYCHANGE - This patch is in the public domain.
2010-11-20 12:26:02 +01:00
Dan Davison 9db0d7e20b Tweak condition for src buffer to inherit active region.
* lisp/org-src.el (org-edit-src-code): Allow region to be inherited by
edit buffer when mark is one character beyond end of src block.

Thanks to Jambunathan K. for the bug report:

 C-c C-v C-M-h and C-c C-v C-x interaction

   In the block below do

   1. C-c C-v C-M-h, C-c C-v C-x C-M-\
   2. Mark (just) the code-block with C-SPC etc etc. C-c C-v C-x C-M-\

   See the difference in behaviour.

<text:p text:style-name="Standard">This is a xref to
<text:bookmark-ref text:reference-format="text"
text:ref-name="__RefHeading__1669_1684552201">Heading8
</text:bookmark-ref>.</text:p>

I have transient mark mode on.
2010-11-19 23:32:30 +00:00
Carsten Dominik 967c71f5ef Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-20 00:11:46 +01:00
Nicolas Goaziou 85501c0623 Fix cycling bullet with point not at column 0
* org-list.el (org-cycle-list-bullet): ensure point is at bol before
  checking item indentation.
2010-11-19 23:47:02 +01:00
Carsten Dominik 04f71ffc55 Keep byte compiler happy 2010-11-19 20:14:37 +01:00
Carsten Dominik ce329b330c Fix completion for tags and TeX-like entity macros, add block arguments 2010-11-19 20:14:25 +01:00
Eric Schulte 451acd11ce move ob-map-src-blocks up in ob.el and autoload it
* lisp/ob.el (org-babel-map-src-blocks): Moved to earlier in the file
  and now autoloading.
2010-11-19 01:16:29 -07:00
Eric Schulte e34033fec2 using higher level function for checking list membership
Thanks to Nicolas Goaziou for pointing this out

* lisp/ob-ref.el (org-babel-ref-at-ref-p): Use higher level function
  for testing list membership.
* lisp/ob.el (org-babel-read-result): Use higher level function for
  testing list membership.
  (org-babel-result-end): Use higher level function for testing list
  membership.
2010-11-18 09:34:21 -07:00
Eric Schulte 14b52a05fa ob-sqlite: pass the body to the sqlite command through a pipe
* lisp/ob-sqlite.el (ob-eval): require ob-eval for external command
  execution
  (org-babel-execute:sqlite): no longer uses the init option for
  passing commands to sqlite
2010-11-18 09:12:55 -07:00
Nicolas Goaziou c538b0eeab Fix indentation of drawers, blocks and literal examples
* lisp/org.el (org-indent-line-function): drawers and blocks have no
  influence on indentation of text below. Also fix indentation problem
  with a block at column 0 and add a special case for literal examples.
2010-11-18 16:35:46 +01:00
John Wiegley 0ff8d32131 Now using pcomplete for in-buffer completion 2010-11-18 07:34:16 +01:00
Eric Schulte 97f4c3f9a1 fixed (hopefully) error in compiled form of org-babel-map-src-blocks
* lisp/ob.el (org-babel-map-src-blocks): Ensure that the file argument
  is only evaluated once.
2010-11-17 17:03:44 -07:00
Eric Schulte 88947588bc lists are now a data type recognized by code blocks
* lisp/ob-ref.el (org-babel-ref-resolve): Recognize `list' as a unique
  type of data
  (org-babel-ref-at-ref-p): Recognize `list' as a unique type of data

* lisp/ob.el (org-babel-read-result): Recognize `list' as a unique
  type of data
  (org-babel-read-list): A function to read a textual Org-mode list
  into an emacs-lisp list.
  (org-babel-insert-result): Recognizes the "list" result param to
  insert data as an Org-mode list.
  (org-babel-result-end): Find the end of an Org-mode list.
  (org-babel-merge-params): Add "list" as a result param.

* doc/org.texi (results): Documentation of the new "list" results
  header argument.
2010-11-17 16:47:55 -07:00
Eric Schulte 4fca6b54b5 org-babel-load-file can now be called interactively
* lisp/ob-tangle.el (org-babel-load-file): Can be called interactively.
2010-11-17 13:04:48 -07:00
Carsten Dominik b3d6f04483 New hook to run after orgtbl-mode has sent a table
* lisp/org-table.el (orgtbl-after-send-table-hook): New hook.
(orgtbl-ctrl-c-ctrl-c): Run `orgtbl-after-send-table-hook' when a
table was sent.
(orgtbl-send-table): Return the number of sent tables, or nil if no
sending has happened.

Patch by Seweryn Kokot. TINYCHANGE
2010-11-17 13:58:52 +01:00
Carsten Dominik 815374e952 Allow a user-define function for getting the base priority of a node
* lisp/org.el (org-get-priority-function): New option.
(org-get-priority): Call `org-get-priority-function' if that
has been set.
2010-11-17 09:12:47 +01:00
Dan Davison b59074eca8 babel: Avoid addition of unnecessary ellipsis
* lisp/ob-table.el (org-babel-table-truncate-at-newline): Only add
"..." if there is something after the newline.
2010-11-16 11:16:18 +00:00
Achim Gratz fee2c2c8da org-clock.el: fix regex to recognize indented clock tables
* lisp/org-clock.el (org-get-clocktable):
(org-in-clocktable-p):
(org-clocktable-shift):
(org-clocktable-steps): Fix regexp to allow for indented clock tables

 #+BEGIN: and #+END: were expected only at the first column in some
   places.
 #BEGIN: and #END: were erroneously recognized inside normal lines in
   other instances.
 always allow whitespace after #BEGIN: and #END:, not just a single space

TINYCHANGE - This patch is in the public domain.
2010-11-16 10:22:57 +01:00
Puneeth Chaganti 249ae99b18 Include an .org file and lower the level of all its headers
* doc/org.texi (Include files): Document :minlevel.
* lisp/org-exp.el (org-export-handle-include-files): Support :minlevel
property.
(org-get-file-contents): New argument minlevel to demote included
content.

On Sat, Nov 13, 2010 at 1:12 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On Nov 10, 2010, at 3:46 AM, Jianshi Huang wrote:
>
>> Hi,
>>
>> I know I can include any file using #+INCLUDE.
>>
>> I need to include several org files, but they were edited
>> independently as a complete document.
>>
>> Now I want to lower the levels of headers in these org files
>> automatically during inclusion. Is there a way to do that?
>
> No. But since #+include accepts arguments, it could be implemented,
> something like
>
> #+include "aaa.org" :minlevel 4
>
> or so. I would accept a good patch to this effect.

Here's a patch. I tested it with a simple document and works fine.

Thanks,
Puneeth
2010-11-15 11:15:53 +01:00
Nicolas Goaziou 065675cdc7 list: use compatibility code whenever possible 2010-11-14 08:58:41 +01:00
Carsten Dominik c2a366ac5a Add command names for chapters 4-7 2010-11-13 10:09:15 -06:00
Carsten Dominik 0766085d9a Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-12 23:56:52 -06:00
Noorul Islam 5324802839 Internal links in LaTeX export
Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Oct 29, 2010, at 5:22 AM, Jambunathan K wrote:
>
>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>
>>> Aloha Jambunathan K.,
>>>
>>> Yes, thanks for that suggestion.  It should work on your example, but
>>> it breaks external links, like this:
>>>
>>> \hyperref[http://www.ctan.org/tex-archive/macros/latex/contrib/koma-script/
>>> ]{KOMA-script}
>>>
>>> External links require the \href{}{} command.  It appears the LaTeX
>>> export process no longer distinguishes internal and external links,
>>> as
>>> I believe it used to do.
>>>
>>
>> This is the problematic commit:
>>
>> commit f5918bdcc0
>> parent	df5894cdcb
>> Date:   Sun Oct 17 08:29:51 2010 +0000
>>
>>    LaTeX export: use org-export-latex-hyperref-format
>
> I have just reverted this commit.
>
> - Carsten
>
Looks like time to change the variable name which is actually confusing.

Since href and hyperref are two different things, I renamed the existing
`org-export-latex-hyperref-format' variable as
`org-export-latex-href-format' and introduced a new one
`org-export-latex-hyperref-format'.

* org-latex.el (org-export-latex-hyperref-format): New option.
(org-export-latex-href-format): Renamed the existing variable
`org-export-latex-hyperref-format' as `org-export-latex-href-format'
(org-export-latex-links): Use `org-export-latex-hyperref-format' and
`org-export-latex-href-format'

Thanks and Regards
Noorul

>>
>>    * lisp/org-latex.el (org-export-latex-links) : Replaced hard coded
>>    hyperref format with custom
>>      variable `org-export-latex-hyperref-format'
>>
>> Note that href is not same as hyperref.
>>
>> Jambunthan K.
>>
>>
>>> All the best,
>>> Tom
>>>
>>> On Oct 28, 2010, at 3:30 PM, Jambunathan K wrote:
>>>
>>>>
>>>> Thomas
>>>>
>>>> There was a hint at possible solution (or atleast a partial
>>>> solution) in
>>>> my original post. Did you try it before jumping in to rough waters
>>>> or
>>>> digging deeper?
>>>>
>>>> Do
>>>>
>>>> ,----
>>>> | M-x customize-variable RET org-export-latex-hyperref-format'
>>>> `----
>>>>
>>>> so that your .emacs has an entry like this
>>>>
>>>> ,---- [.emacs]
>>>> |
>>>> | (custom-set-variables
>>>> |  '(org-export-latex-hyperref-format "\\hyperref[%s]{%s}"))
>>>> |
>>>> `----
>>>>
>>>> The above setting solves the problem for me with the following
>>>> simple
>>>> Org file.
>>>>
>>>> * Heading1
>>>> Make this section as large as possible so that it fills atleast a
>>>> page.
>>>>
>>>> * Heading2
>>>> Links to [[Heading1]]
>>>>
>>>> Jambunathan K.
>>>>
>>>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>>>
>>>>> On Oct 28, 2010, at 12:35 PM, Nick Dokos wrote:
>>>>>
>>>>>> Thomas S. Dye <tsd@tsdye.com> wrote:
>>>>>>
>>>>>>> On Oct 28, 2010, at 11:01 AM, Jambunathan K wrote:
>>>>>>>
>>>>>>>
>>>>>>>  This is a regression. release-7.01h is good. HEAD is bad. I get
>>>>>>> the
>>>>>>>  following line with release-7.01h.<
>>>>>>>
>>>>>>>   Links to \hyperref[sec-1]{Heading1}
>>>>>>>
>>>>>>>  Jambunathan K.
>>>>>>>
>>>>>>> Aloha Jambunathan K.,
>>>>>>>
>>>>>>> Very many thanks for this information.  I have Org-mode version
>>>>>>> 7.01trans
>>>>>>> (release_7.01h.880.g7531f).  I take it the problem I'm having is
>>>>>>> due to a relatively recent change
>>>>>>> to Org-mode.  If there is anything I can do to help isolate the
>>>>>>> problem, please let me know.
>>>>>>>
>>>>>>
>>>>>> Tom,
>>>>>>
>>>>>> If you have the time and the inclination, you might try bisecting
>>>>>> your
>>>>>> way through. Bisecting org-mode problems is actually a very good
>>>>>> way
>>>>>> to
>>>>>> practice because the turnaround time is very small.
>>>>>>
>>>>>> Prerequisites:
>>>>>>
>>>>>> * you have a clone of the org-mode git repository.
>>>>>>
>>>>>> * you have an org test file.
>>>>>>
>>>>>>
>>>>>> Steps:
>>>>>>
>>>>>> * [optional, but it makes me feel a little safer] create a test
>>>>>> branch
>>>>>> and switch to it:
>>>>>>
>>>>>> git checkout -b test-branch master
>>>>>>
>>>>>> * I clean out all the compiled files while doing a bisection: it's
>>>>>> quicker
>>>>>> than regenerating them every time and I don't have to worry (much)
>>>>>> about
>>>>>> emacs loading a wayward .elc file:
>>>>>>
>>>>>> make clean
>>>>>>
>>>>>> * start the bisection and tell git which commit is known good and
>>>>>> which is known bad:
>>>>>>
>>>>>> git bisect start
>>>>>>
>>>>>> # current version is bad
>>>>>> git bisect bad
>>>>>>
>>>>>> # release_7.01h was good - I got the name with ``git tag''
>>>>>> git bisect good release_7.01h
>>>>>>
>>>>>> That checks out a revision half-way in between the bad and good
>>>>>> commits: since
>>>>>> there are about 900 commits in between, you'll be at approx the
>>>>>> 450-
>>>>>> mark and it
>>>>>> should take about 10 bisections to get it down to a single commit.
>>>>>>
>>>>>> * LOOP Now all you have to do is repeat the following steps:
>>>>>>
>>>>>> # since you did ``make clean'' you don't have to worry about .elc
>>>>>> files
>>>>>> # just reload all the .el files.
>>>>>> M-x org-reload
>>>>>>
>>>>>> visit your org test file, export to LaTeX, check for \href/
>>>>>> \hyperref (or
>>>>>> whatever other telltale sign shows badness/goodness).
>>>>>>
>>>>>> # tell git about it
>>>>>> git bisect good *OR* git bisect bad
>>>>>>
>>>>>> This last step will check out another revision and in about 10
>>>>>> repetitions
>>>>>> of the loop, you are done.
>>>>>>
>>>>>> * Tell git you are done, so it can clean up:
>>>>>>
>>>>>> git bisect reset
>>>>>>
>>>>>> Theoretically, you could do all of this in your master branch
>>>>>> without
>>>>>> creating a test-branch and this last step will reset everything to
>>>>>> the
>>>>>> way it was before ``git start''.
>>>>>>
>>>>>> * Post the offending commit to the list.
>>>>>>
>>>>>> * Get back to your master branch:
>>>>>>
>>>>>> git checkout master
>>>>>>
>>>>>> * If you created a test-branch, clean it out:
>>>>>>
>>>>>> git branch -d test-branch
>>>>>>
>>>>>> * [Optional] Recreate your .elc files and reload them:
>>>>>>
>>>>>> make
>>>>>> M-x org-reload
>>>>>>
>>>>>>
>>>>>> And that's it: a half-hour of fun and games. Unless of course, you
>>>>>> hit upon a revision that is neither good nor bad (in the above
>>>>>> restricted
>>>>>> sense): you might get some other problem that prevents you from
>>>>>> being
>>>>>> able to answer. That might or might not be easy to resolve, so
>>>>>> I'll
>>>>>> leave that as an advanced topic (truth be told, I came up against
>>>>>> this
>>>>>> situation a couple of days ago and I didn't know how to proceed:
>>>>>> so
>>>>>> it's ignorance more than anything else that prevents me from
>>>>>> saying
>>>>>> anything more).
>>>>>>
>>>>>> If you want to try, I'd be happy to answer questions - I might try
>>>>>> the
>>>>>> bisection later on tonight myself in any case. And btw, this is of
>>>>>> course archeology of a different (and much easier) kind, so I
>>>>>> imagine
>>>>>> you'll take to it like a fish in water :-)
>>>>>>
>>>>>> HTH,
>>>>>> Nick
>>>>>
>>>>> Hi Nick,
>>>>>
>>>>> Irresistible hook at the end there.  I wish this stuff were as easy
>>>>> as
>>>>> archaeology is for me.  Your instructions are terrific, though.
>>>>>
>>>>> I did hit on a revision that was neither good nor bad:
>>>>>
>>>>> commit 8562273b27
>>>>> Author: Eric Schulte <schulte.eric@gmail.com>
>>>>> Date:   Sat Oct 16 13:21:47 2010 -0600
>>>>>
>>>>>   ob-ref: don't forget arguments to referenced code blocks
>>>>>
>>>>>   * lisp/ob-ref.el (org-babel-ref-resolve): bringing the referent
>>>>>     arguments back to their params before evaluation
>>>>>
>>>>> This one puts these lines in *Messages* when I export to LaTeX
>>>>>
>>>>> executing Org code block...
>>>>> if: Symbol's value as variable is void: result-type
>>>>>
>>>>> I tried using different commits for the initial git bisect good,
>>>>> hoping that would skip by the problem, but this one appears to have
>>>>> stuck around a while.  My other two tries both ended with this same
>>>>> error, but with different commits.
>>>>>
>>>>> I'm not sure what to do next.  This problem isn't yielding to my
>>>>> archaeo-logic. :)
>>>>>
>>>>> All the best,
>>>>> Tom
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
2010-11-12 23:54:06 -06:00