(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.
(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.
(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.
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.
When a backend selects its #+begin_backend ... #+end_backend
code, the markers need to be removed so that a package like
org-special-blocks.el does not try to work on the block again.
Bernt Hansen writes:
> If you narrow to subtree when there is a following task the narrowed
> buffer has a blank line at the end. If you are on this line and
> clock-in it starts the clock for the _following_ task (outside the
> narrowed subtree) and not the task you are looking at.
>
> I stumbled across this today because the following task was already
> over the estimated limit when I clocked it in - which triggered my
> alarm sound.
>
> ,----[ test.org ]
> | #+STARTUP:
> | * TODO One
> | * TODO Two
> `----
>
> ,----[ minimal.emacs ]
> | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
> | (add-to-list 'auto-mode-alist
> | '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
> | (require 'org-install)
> |
> | (global-set-key "\C-cl" 'org-store-link)
> | (global-set-key "\C-ca" 'org-agenda)
> | (global-set-key "\C-cb" 'org-iswitchb)
> `----
>
> Key sequence to reproduce:
>
> $ emacs -q -l minimal.emacs test.org
>
> | Key | Notes |
> |-------------------------------+-------------------------------|
> | C-n | Go to first task '* TODO One' |
> | M-x org-narrow-to-subtree RET | Narrow to subtree |
> | C-n | Move to last blank line |
> | C-c C-x C-i | Clock in (next) task |
> |-------------------------------+-------------------------------|
>
> -Bernt
>
> Emacs : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
> of 2008-11-09 on raven, modified by Debian
> Package: Org-mode version 6.31trans (release_6.31.8.g7485)
PT writes:
> Currently, I'm using Google Calendar and it's quick add syntax is very
> convenient:
>
> http://www.google.com/support/calendar/bin/answer.py?hl=en&answer=36604#text
>
>
> Of course, Org has similar capabilites, but I found one thing which
> google calendar does better: if it's 4pm and I add an event for 8am
> then GCal schedules it for 8am tomorrow.
>
> Org, on the the other hand, schedules it for 8am today even if that
> time is already passed.
>
> I never add past events and I think it's quite atypical. Shouldn't be
> an option similar to org-read-date-prefer-future for times too, so
> that timestamps also prefer the future when no date given?
This is now possible, but it is not the default. You need to set
(setq org-read-date-prefer-future 'time)
Thomas S. Dye writes:
> I'm trying to generate $^{14}$C, or an equivalent, from org-mode
> to represent the isotope of carbon important in archaeological
> dating.
>
> Reading the manual, I tried this:
>
> ** A Brief History of Attempts to Interpret the ^{14}C Dates
> *** The ^{14}C Dates
>
> Which, in my #+LaTeX_CLASS: beamer export, yields
>
> \subsection{A Brief History of Attempts to Interpret the \^{}{14}C Dates}
> ...
> \begin{frame}\frametitle{The \^{}{14}C Dates}
>
> The problem seems to be the space before the ^.
>
> This input:
>
> ** A Brief History of Attempts to Interpret the x^{14}C Dates
> *** The x^{14}C Dates
>
> yields the correct LaTeX:
>
> \subsection{A Brief History of Attempts to Interpret the x$^{\mathrm{14}}$C Dates}
> ...
> \begin{frame}\frametitle{The x$^{\mathrm{14}}$C Dates}
>
> Am I missing something? Or, is the LaTeX export thrown off by
> the space before ^?
Indeed, a space before the caret was not allowed in LaTeX export
Peter Westlake writes:
> One small thing, though - in the agenda TODO view, pressing "t"
> to mark the task as Done messes up the layout:
>
> [[http://orgmode.org][Org-Mode]]: TODO Demonstrate problem with link
> in category
>
> (which appears as:
>
> Org-Mode: TODO Demonstrate problem with link in category)
>
>
> Press T on that line:
>
> [[http://orgmode.org][Org-Mode]]: TODO Demonstrate problemDONE
> Demonstrate problem with link in category
>
> (which appears as:
>
> Org-Mode: TODO Demonstrate problemDONE Demonstrate problem with
> link in category)
Matt Lundin writes:
> I have org-footnote-section set to "Footnotes." If I insert a new
> footnote while...
>
> 1. the "* Footnotes" tree already exists and
>
> 2. the "* Footnotes" tree is folded
>
> ...the footnote definition label is inserted, but the "* Footnotes"
> subtree remains folded and the cursor jumps to the "* Footnotes"
> headline rather than the definition line.
>
> I've tried using org-reveal (C-c C-r) to open the "Footnotes" section,
> but nothing happens. I've tried typing C-c C-c to go back to the
> footnote, but since the cursor is on a headline, the result is a tag
> prompt. When I hit TAB to cycle, the cursor remains on the headline.
The new variable org-mobile-files can now be configured to include
non-agenda files into the staging area for MobileOrg. Furthermore,
files that are located in a subdirectory of `org-directory' will also
end up in a sub-directory in the staging area.
Dan Davison writes:
> If you start a numbered list with
>
> 1.
>
> and hit M-RET then you get
>
> 2.
> ^
> with a space, i.e. '2. '
>
> However, when creating the 10th list item, there is no space after
> '10.'. Same for 99 -> 100. This isn't entirely trivial, because if you
> start typing blindly after hitting M-RET, then the line you have created
> (lacking the space) will not be recognised as a list item and so
> e.g. the next M-RET will create a new heading, not a list item. [Has
> this changed recently? This seems like something obvious that others
> would have noticed.]
>
> Here's my patch.
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/org-list.el b/lisp/org-list.el
> index 2fea57b..8ece3ea 100644
> --- a/lisp/org-list.el
> +++ b/lisp/org-list.el
> @@ -813,7 +813,7 @@ with something like \"1.\" or \"2)\"."
> (buffer-substring (point-at-bol) (match-beginning 3))))
> ;; (term (substring (match-string 3) -1))
> ind1 (n (1- arg))
> - fmt bobp old new)
> + fmt bobp old new delta)
> ;; find where this list begins
> (org-beginning-of-item-list)
> (setq bobp (bobp))
> @@ -835,7 +835,9 @@ with something like \"1.\" or \"2)\"."
> (delete-region (match-beginning 2) (match-end 2))
> (goto-char (match-beginning 2))
> (insert (setq new (format fmt (setq n (1+ n)))))
> - (org-shift-item-indentation (- (length new) (length old))))))
> + (setq delta (- (length new) (length old)))
> + (org-shift-item-indentation delta)
> + (if (= (org-current-line) line) (setq col (+ col delta))))))
> (org-goto-line line)
> (org-move-to-column col)))
> --8<---------------cut here---------------end--------------->8---
>
> Dan
Jeff Kowalczyk writes:
> Is there a way to escape backslashes (\) in code and verbatim that
> will export to LaTeX correctly?
>
> When writing =\\host\share= or =C:\path\to=, pdftolatex output is
> incorrect.
George Pearson writes:
> I have been getting the following message in the minibuffer
> area when marking tasks done in the daily agenda:
>
> Error in post-command-hook: (error Cannot switch buffers in a dedicated
> window)
>
> The item in the underlying org file IS marked DONE, and items with
> repeaters appear to be rescheduled properly. HOWEVER, the log lines,
> like
>
> - State "DONE" from "TODO" [2009-09-07 Mon 10:36]
>
> do NOT appear.
>
> Note I have been using:
>
> org-agenda-window-setup 'other-frame
>
> for some time now, but I notice there has been a recent change
> related to this variable. Could this be the source of the
> problem?
>
> I believe the error message appears on other operations in the
> daily agenda as well, but have not yet studied this in detail.
Many agenda commands split the current window, which is not allowed on
a frame containing a dedicated window.
Therefore, we now just kill the frame by hand when exiting the agenda.
priority
So far the headline had to match the one specified in the template
exactly, except for tags. Now a TODO keyword and a priority can be
added, and the headline will still be found.
Reported by Samuel Wales and Bernt Hansen.
Jeff Kowalczyk writes:
> I frequently use clocktables, and always use scope: subtree. The
> default scope is file.
>
> If it doesn't exist already (I didn't find it with grep), an org
> customization variable for this preference would be very helpful.
Francesco Pizzolante writes:
> I'm using orgmode 6.30c and I still have this problem: if
> the #+TBLNAME: tag is not located in column 0, the remote
> reference does not work.
>
> Here's my little test:
>
> #+TBLNAME: A
> | | T |
> |---+-------|
> | | 2.00 |
> | | 5.00 |
> |---+-------|
> | # | 9.00 |
> | ^ | total |
> #+TBLFM: $2=vsum(@-I..@-II);%.2f
>
> #+TBLNAME: price
> | T | PU | Total |
> |------+-------+-------|
> | 9.00 | 10.25 | 92.25 |
> |------+-------+-------|
> #+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f
>
>
> Just add a few spaces at the first line and when you recompute
> the second table you get a "Can't find remote table A" message.
>
> Moreover, in a LaTeX environment, using the orgtbl minor mode,
> the highlighting (font locking) does not work on the #+TBLNAME:
> line, even if located in column 0.
Peter Westlake writes:
> Could I request this as a small feature enhancement, please?
> Commands like org-refile have an agenda equivalent so that
> the same keys work in the agenda, and it would be very nice
> to be able to store a link to an item that way as well.
When odd levels are being used, change the interpretation of a
numerical arg to S-TAB.
Michael Brand writes:
> I like the org-indent-mode with the soft-indentation but even more I
> like the hard-indentation with `#+STARTUP: odd hidestars' instead for
> which I have a question.
>
> This is the content of the example file oddeven:
> -*- mode: org -*-
> #+STARTUP: oddeven hidestars content
> * 1 Org Mode
> ** 1.1 Introduction
> *** 1.1.1 Installation
>
> This is the content of the example file odd:
> -*- mode: org -*-
> #+STARTUP: odd hidestars content
> * 1 Org Mode
> *** 1.1 Introduction
> ***** 1.1.1 Installation
>
> The different _Emacs-faces_ (colors) for the heading levels are the same
> when comparing the two files. This Emacs-internal adaptation I
> appreciate a lot.
>
> C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_ with
> the file odd. Is this how it is intended to work for the file odd?
org.el (org-offer-links-in-entry): Don't use "Select link" as a prompt
in the temporary window.
org-agenda.el (org-agenda-bulk-mark): Use a slightly soberer prefix for
marked entries in the agenda view.
> > New mode to show some entry body text in the agenda
> > ----------------------------------------------------
> > There is now a new agenda sub-mode called
> > `org-agenda-entry-text-mode'. It is toggled with the `E' key.
> > When active, all entries in the agenda will be accompanied by a
> > few lines from the outline entry. The amount of text can be
> > customized with the variable `org-agenda-entry-text-maxlines'.
>
>
> this already avoids displaying drawer lines.
> I also see lines like:
>
> - State "DONE" from "WARTEN" [2009-08-04 Di 16:19]
> - State "DONE" from "WARTEN" [2009-07-02 Do 09:43]
> ...
>
> and in my remeber templates I always create lines like:
>
> created: [2009-08-03 Mo 11:46]
>
> with the creation date of the entry.
> Would it be possible and make sense to set up a variable for a
> regexp to exclude lines like the ones above from showing?
This commit sets up such a variable, and also a hook.
Matt Lundin writes:
> When I call org-remember or org-store-link above the first headline in
> an org buffer, I receive the following error message:
>
> Before first headline at position 1 in buffer index.org
>
> It seems that either org-remember or org-store-link (or both) calls
> org-back-to-heading in order to grab the relevant heading for
> annotation. As a result, if I try to store a link above the first
> heading, emacs spits out the error message above because there is no
> heading to return to.
>
> Is this the intended behavior? Sometimes I prefer to create a link to
> the file as a whole rather than to a particular headline. E.g., I might
> want to create a todo to organize notes.org, which is not an agenda
> file. In this instance, it does not matter whether org-remember creates
> a link to a particular headline. In fact, I would prefer a link to the
> file as a whole and thus expect to be able to store a link while on the
> first empty line of the file or on #+TITLE.
Tassilo Horn writes:
> When I want to set a tag using `C-c C-q TAB' I get a iswitchb completion
> prompt, cause org-completion-use-iswitchb is t. I also use iswitchb's
> virtual files feature (iswitchb-use-virtual-buffers set to t), which
> includes files that aren't opened in a buffer, but are in the recentf
> list. This is a cool thing when switching buffers (I barely use C-x C-f
> anymore and switch to the virtual buffer instead), but totally useless
> and annoying for tab completion in org.
>
> So when completing anything (files/tags/...) in org with iswitchb,
> switchb-use-virtual-buffers should be let-bound to nil before.
PT writes:
> I tried this new setting with 6.30 and it works well, thanks for
> this.
>
> The only strange case is when a header line doesn't have any
> content, only empty lines.
>
> So if there are 2 empty lines between headers
>
> * header1
>
>
> * header2
>
>
> Then the first empty line after header1 is folded regardless of
> the -1 setting. If I understand the feature correctly no folding
> should occur in this case either.
The category can contain a bracket link. This commit makes sure that
the prefix in the agenda looks OK if there is a link, and that the
link is accessible with `C-c C-o 0'.
Karl Stump writes:
> Table Editing Cycle With Multiple Windows On One Buffer Does Not
> Return to Start State
>
> When I have two windows open on two buffers, one to a table in a
> file that I'm editing, the other to some other file of interest,
> the editing cycle of C-` ... C-c C-c works great, meaning that
> when the cycle is finished, the windows are restored to the start
> state.
>
> But when I have two windows open on the same buffer, one window
> on the table, and the other window somewhere else, the editing
> cycle does not restore to the beginning state.
Peter Westlake writes:
> This is quite obscure, and an odd corner case, but here it is.
>
> If you have an item which is:
>
> - a TODO
> - scheduled
> - ordered
> - blocked by a child TODO
>
> then it leaves an empty line in the agenda.
>
> Here's a test case:
> ,----
> | * Press t r on this line in the agenda
> | SCHEDULED: <2009-09-02 Wed>
> | :PROPERTIES:
> | :ORDERED: t
> | :END:
> | *** TODO Report invisible scheduled items
> `----
>
> C-a a a will show an agenda with "Scheduled: Press t r ...".
> Press "t" on that line to add a TODO.
> Press "r" to redisplay, and see the line go blank.
>
> Peter.