Commit Graph

3743 Commits

Author SHA1 Message Date
Dan Davison 8ca34cba0b org-babel: alter R tangling defaults
Use "#!/usr/bin/env Rscript", and use ".R" instead of ".r".
2009-10-19 21:44:41 -04:00
Dan Davison 8b52bf09e0 org-babel: capture graphical output from R
If a [:file filename.ext] header arg is provided, then all graphical
output from the source block is captured on disk, and output of the
source block is a link to the resulting file, as with the
graphics-only languages such as gnuplot, ditaa, dot, asymptote. An
attempt is made to find a graphics device corresponding to the file
extension (currently .png, .jpg, .jpeg, .tiff, .bmp, .pdf, .ps,
.postscript are recognised); if that fails, png format output is
created.

Additionally, values for several arguments to the R graphics
device can be passed using header args:

:width :height :bg :units :pointsize
:antialias :quality :compression :res :type
:family :title :fonts :version :paper :encoding
:pagecentre :colormodel :useDingbats :horizontal

Arguments to the R graphics device that are not supported as header
args can be passed as a string in R argument syntax, using the header
arg :R-dev-args

An example block is (although both bg and fg can be passed directly as
header args)

\#+begin_src R :file z.pdf :width 8 :height 8 :R-dev-args bg="olivedrab", fg="hotpink"
  plot(matrix(rnorm(100), ncol=2), type="l")
\#+end_src
2009-10-19 21:44:28 -04:00
Eric Schulte 4d374b27d2 org-babel: :noweb header argument now expands noweb references before source-block evaluation 2009-10-19 12:12:19 -06:00
Carsten Dominik d1b756f381 Fix checksum of mobileorg.org after moving content 2009-10-19 13:20:51 +02:00
Carsten Dominik 03ecf8d91f Add checksum for mobileorg.org 2009-10-19 13:03:09 +02:00
Carsten Dominik 4300198902 Fix some minor quibble with mobile support 2009-10-19 12:50:47 +02:00
Carsten Dominik f0a3343533 Implement local checksum computation when staging mobile files 2009-10-19 08:44:42 +02:00
John Wiegley 85878aadbf Added context-aware, tag auto-exclusion (/ RET)
(org-agenda-auto-exclude-function): New customization variable for
allowing the user to create an "auto exclusion" filter for doing
context-aware auto tag filtering.

(org-agenda-filter-by-tag): Changes to support the use of
`org-agenda-auto-exclude-function'.  See the new manual addition,.
2009-10-18 23:43:44 -04:00
John Wiegley abfc6babca Added feature for resolving clocks due to idleness
See the new manual section on "Resolving idle time".

(org-clock-resolve-clock): If keeping or subtracting time results in a
clock out at a time in the past, and if the resolution occurred due to
idleness or invoking `M-x org-resolve-clocks', remember that past moment
in time.  On the next clock in, the user will be prompted to see if they
want to back-date their new clock to then.

(org-clock-resolve): Do not jump the user to the location of a dangling
clock if the resolution is occuring due to an idle timeout.  In that
case there is typically only one dangling clock, the active one, and
there is no value gained by shuffling their windows around to show it to
them.  Being prompted to resolve an idle clock should be as inobtrusive
as possible.

(org-resolve-clocks-if-idle): New function that resolves only the
currently active clock if the user has exceeded the time returned by
`org-user-idle-seconds', based on the value of `org-clock-idle-time'.

(org-clock-in): If, after resolving clocks,

(org-clock-out): Cancel the `org-clock-idle-timer' on clock out.
2009-10-18 23:43:43 -04:00
John Wiegley 57a7a4c15b Make sure `org-files-list' returns real files
(org-files-list): Don't attempt to return a file name for Org buffers
which have no associated file.
2009-10-18 23:43:38 -04:00
John Wiegley 4e184a530e Fixed a typo in an error message 2009-10-18 23:43:25 -04:00
Eric Schulte 3db817fb02 org-babel: now supports pp results (emacs-lisp, ruby, python) 2009-10-18 16:18:34 -06:00
Eric Schulte c167a4ac32 org-babel: emacs-lisp now returns nothing when ":results output" 2009-10-18 16:18:27 -06:00
Eric Schulte 4abe8f7ea0 org-babel: added "table" results header argument as more readable alias for "vector" 2009-10-18 12:13:42 -06:00
Carsten Dominik f253a8280b Sort files for MobileOrg 2009-10-18 16:57:09 +02:00
Carsten Dominik 3874113602 Show how to use tramp to write to the mobile directory 2009-10-18 11:59:04 +02:00
Carsten Dominik d096fac7f7 Safeguard the setting for `org-mobile-inbox-for-pull'
This file should be with the other org files, and not in the staging
area.  Also, when file names in mobileorg.org are interpreted, this
should be relative to org-directory.  So we also require now that the
user set this variable.
2009-10-18 02:53:51 +02:00
Carsten Dominik a45e7d88c7 Use `org-float-time' instead of `time-to-seconds' in John's patch 2009-10-17 17:55:59 +02:00
Carsten Dominik dd01f724a6 Merge commit 'johnw/master'
Conflicts:
	lisp/ChangeLog
	lisp/org-clock.el
2009-10-17 17:52:49 +02:00
Carsten Dominik c879026b49 Merge branch 'ded-org-src' of git://repo.or.cz/org-mode/babel 2009-10-17 17:45:38 +02:00
Carsten Dominik a752a22e25 Fix customization type for `org-agenda-sorting-strategy'
Patch by Mikael Fornius.
2009-10-17 17:43:48 +02:00
John Wiegley 8490a6c1d5 Added `M-x org-resolve-clocks' command
(org-clock-resolve-clock): New function that resolves a clock to a
specific time, closing or resuming as need be, and possibly even
starting a new clock.

(org-clock-resolve): New function used by `org-resolve-clocks' that sets
up for the call to `org-clock-resolve-clock'.  It determines the time to
resolve to based on a single-character selection from the user to either
keep time, subtract away time or cancel the clock.

(org-resolve-clocks): New user command which resolves dangling clocks --
that is, open but not active -- anywhere in the file list returned by
`org-files-list'.

(org-clock-in): Automatically resolve dangling clocks whenever a user
clocks in.

(org-clock-cancel): If the user cancels the solely clock in a LOGBOOK,
remove the empty drawer.
2009-10-17 05:09:40 -04:00
John Wiegley d3f994e01b Added functions for determining the user's idle time
(org-clock-idle-time): New user customizable option for detecting
whether the user has left a clock idle.  Note: it is only used in this
commit to test whether it's worthwhile to check OS X to get the Mac
user's current idle time.  If the Emacs idle time is less than the
value, the user hasn't been away long enough to be worth checking (a
more expensive test than just getting Emacs idle time).

(org-user-idle-seconds, org-mac-idle-seconds)
(org-emacs-idle-seconds): This three functions, in conjunction
with the user customization variable `org-clock-idle-time', return
the number of seconds (as a floating point) that the user has been
away from their Emacs (or, if running on OS X, their computer).
2009-10-17 03:51:32 -04:00
John Wiegley defe6c3838 Added several new utility functions to org-clock
(org-find-open-clocks): New function that returns a list of all open
clocks in the given FILE.  Note that each clock it returns is a cons
cell of the format (MARKER . START-TIME).  This "clock" value is used by
several of the new clock module utility functions.

(org-is-active-clock): New inline function which tests whether the given
clock value is the same as the currently active clock.  Returns non-nil
if this is the case.

(org-with-clock-position): New macro that evaluates FORMS with point in
the buffer and at the position of the given clock.  Changes to the
current clock are global.

(org-with-clock): New macro that evaluates FORMS with point in the
buffer and at the position of the given clock.  However, changes to the
current clock are local and have no effect on the user's active clock.
This allows, for example, far any clock to be cancelled without
cancelling the active clock.

(org-clock-clock-in): New inline function that switches the active clock
to the given clock.  If either the argument RESUME, or the global
`org-clock-in-resume', are non-nil, it will resume a clock that was
previously left open.

(org-clock-clock-out): New inline function that clocks out the given
clock value without affecting the currently active clock.

(org-clock-clock-cancel): New inline function that cancels the given
clock value without affecting the currently active clock.
2009-10-17 03:51:32 -04:00
John Wiegley cc039d9016 Add new parameter to the `org-clock-out' command
(org-clock-out): Accept new third parameter `at-time', which permits a
clock to be clocked out at a specific time.  Note that no attempt is
made to verify that the clock out time is later than the clock in time.
2009-10-17 03:51:32 -04:00
John Wiegley b6594a03df Prevent mode-line timers from being duplicated
(org-clock-in): Before creating `org-clock-mode-line-timer', check to
make sure an older timer is not currently running.
2009-10-17 03:51:32 -04:00
John Wiegley e673507f69 Added three new utility functions to org.el
(org-files-list): New utility function for returning a list of all open
org-mode buffers, plus all files used to build the agenda buffer.  Note
that not all the files will necessarily be visited by a buffer at time
of call.

(org-entry-beginning-position): Like the function
`line-beginning-position', this inline function returns the beginning
position of the current heading/entry.

(org-entry-end-position): Like the function `line-end-position', this
inline function returns the end position of the current heading/entry.
2009-10-17 03:51:31 -04:00
Carsten Dominik 1ad1de18be Merge commit 'johnw/master' 2009-10-17 08:27:18 +02:00
John Wiegley 6f9b983f94 Added functions for determining the user's idle time
(org-clock-idle-time): New user customizable option for detecting
whether the user has left a clock idle.  Note: it is only used in this
commit to test whether it's worthwhile to check OS X to get the Mac
user's current idle time.  If the Emacs idle time is less than the
value, the user hasn't been away long enough to be worth checking (a
more expensive test than just getting Emacs idle time).

(org-user-idle-seconds, org-mac-idle-seconds)
(org-emacs-idle-seconds): This three functions, in conjunction
with the user customization variable `org-clock-idle-time', return
the number of seconds (as a floating point) that the user has been
away from their Emacs (or, if running on OS X, their computer).
2009-10-16 22:28:15 -04:00
John Wiegley 384d3ebc65 Added several new utility functions to org-clock
(org-find-open-clocks): New function that returns a list of all open
clocks in the given FILE.  Note that each clock it returns is a cons
cell of the format (MARKER . START-TIME).  This "clock" value is used by
several of the new clock module utility functions.

(org-is-active-clock): New inline function which tests whether the given
clock value is the same as the currently active clock.  Returns non-nil
if this is the case.

(org-with-clock-position): New macro that evaluates FORMS with point in
the buffer and at the position of the given clock.  Changes to the
current clock are global.

(org-with-clock): New macro that evaluates FORMS with point in the
buffer and at the position of the given clock.  However, changes to the
current clock are local and have no effect on the user's active clock.
This allows, for example, far any clock to be cancelled without
cancelling the active clock.

(org-clock-clock-in): New inline function that switches the active clock
to the given clock.  If either the argument RESUME, or the global
`org-clock-in-resume', are non-nil, it will resume a clock that was
previously left open.

(org-clock-clock-out): New inline function that clocks out the given
clock value without affecting the currently active clock.

(org-clock-clock-cancel): New inline function that cancels the given
clock value without affecting the currently active clock.
2009-10-16 22:21:13 -04:00
John Wiegley 63fbf2aab8 Add new parameter to the `org-clock-out' command
(org-clock-out): Accept new third parameter `at-time', which permits a
clock to be clocked out at a specific time.  Note that no attempt is
made to verify that the clock out time is later than the clock in time.
2009-10-16 22:08:01 -04:00
John Wiegley a5150cca5d Prevent mode-line timers from being duplicated
(org-clock-in): Before creating `org-clock-mode-line-timer', check to
make sure an older timer is not currently running.
2009-10-16 22:06:09 -04:00
John Wiegley 080babb885 Added three new utility functions to org.el
(org-files-list): New utility function for returning a list of all open
org-mode buffers, plus all files used to build the agenda buffer.  Note
that not all the files will necessarily be visited by a buffer at time
of call.

(org-entry-beginning-position): Like the function
`line-beginning-position', this inline function returns the beginning
position of the current heading/entry.

(org-entry-end-position): Like the function `line-end-position', this
inline function returns the end position of the current heading/entry.
2009-10-16 22:00:50 -04:00
Eric Schulte 28e6ff8d66 org-babel: adding python support (along the same lines as ruby) 2009-10-16 17:05:31 -06:00
Eric Schulte 770305a650 org-babel: adding ruby support for returning "code" results 2009-10-16 17:05:13 -06:00
Eric Schulte 430a3bf6ad org-babel: "code" results type for returning results in of source code syntax
This includes the required changes to org-babel.el and a
language-specific implementation for emacs-lisp.  The emacs-lisp
changes are from a patch by Benny Andresen.
2009-10-16 17:04:55 -06:00
Carsten Dominik c2719b7e06 Avoid compact agendas for mobile staging 2009-10-16 18:10:14 +02:00
Carsten Dominik c0c56217ff Fix all todo line bug in org-mobile.el 2009-10-16 17:07:38 +02:00
Dan Davison 6ab0d43e80 Merge commit 'org/master' into ded-org-src 2009-10-15 10:32:09 -04:00
Dan Davison 8bd1eb5d4b Merge commit 'org/master' into ded-org-src 2009-10-15 10:29:23 -04:00
Carsten Dominik 93f3968e3f Another mobile fix. 2009-10-15 15:33:11 +02:00
Carsten Dominik 6846edeba3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2009-10-15 10:24:15 +02:00
Carsten Dominik 77a9f4ecf1 Minor fixes 2009-10-15 07:59:15 +02:00
Carsten Dominik 12d1fd35cc Improve error message 2009-10-15 07:08:44 +02:00
Dan Davison 9592b6f1bd New variable org-src-ask-before-returning-to-edit-buffer
If an active edit buffer exists for a source block, and this variable
is non-nil, then org-edit-src-code will not ask before returning to
the edit buffer, and future saves will overwrite the source block's
contents.
2009-10-14 18:43:25 -04:00
Eric Schulte b0c1758c2a org-babel: dot improvements
for more information on the dot family of tools see
http://www.graphviz.org/
2009-10-14 16:03:40 -06:00
Carsten Dominik d48d06eec8 Reset start position for finding new changes in org-mobile.el 2009-10-14 17:26:10 +02:00
Carsten Dominik a8a74fc9e3 Fix problem in org-mobile.el when there are no custom agenda commands 2009-10-14 17:18:37 +02:00
Carsten Dominik 4fe057f4aa Search view: Search for substrings rather than boolen workd lists
The default in search view is not that the search expression is
searched for as a substring, i.e. the different words must occur in
direct sequence.  The old way is only used it the first word in
the search string is preceded by a plus or a minus.

This was, more-or-less, requested by John Wiegley.
2009-10-14 13:36:36 +02:00
Carsten Dominik 33c75c6e29 Agenda filtering: Make `- SPC' a filter that selects entries without tags
Request by John Wiegley.
2009-10-14 12:45:04 +02:00