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

3496 commits

Author SHA1 Message Date
Eric Schulte 33b19178fc ob-sh: bug fix, return the results *not* the contents of the user's buffer
Thanks to Bernt Hansen for pointing this out

* lisp/ob-sh.el (org-babel-sh-evaluate): return the results *not* the
  contents of the user's buffer
2010-07-06 19:53:34 -07:00
Eric Schulte c32d773919 babel: code cleaning -- error' and with-current-buffer' usage for Emacs inclusion 2010-07-06 10:30:58 -07:00
Eric Schulte f34f0b9b39 ob-latex: fix compiler warnings 2010-07-06 09:47:25 -07:00
Eric Schulte 804d08b119 babel: don't ask twice for confirmation with :eval query
Thanks to Carsten for the Patch

* lisp/ob.el (org-babel-confirm-evaluate): don't ask twice for
  confirmation with :eval query
2010-07-06 09:39:07 -07:00
Carsten Dominik 2cc4c0d564 BEAMER: Standardize the header cookie for the beamer extra stuff
* lisp/org-beamer.el (org-beamer-amend-header): Standardize the
header cookie for the beamer extra stuff.
2010-07-06 15:04:00 +02:00
Carsten Dominik b7157cc666 Beamer: Put extra header last in header
* lisp/org-beamer.el (org-beamer-amend-header): Put extra header
last in header.

Tassilo Horn writes:

> I'm doing a LaTeX beamer presentation with org.  The org doc starts with
> these lines:
>
> --8<---------------cut here---------------start------------->8---
> #+STARTUP: beamer
> #+LaTeX_CLASS: beamer
> #+TITLE: Implementieren, Integrieren, Installieren
> #+AUTHOR: Tassilo Horn
> #+EMAIL: horn@uni-koblenz.de
> #+LANGUAGE: de
> #+BEAMER_FRAME_LEVEL: 2
> #+LaTeX_CLASS_OPTIONS: [presentation]
> #+BEAMER_HEADER_EXTRA: \usetheme[secheader]{Boadilla} \institute{Universität Koblenz, IST}
> --8<---------------cut here---------------end--------------->8---
>
> In the presentation, the ä in Universität is printed as an A with a ~ on
> top, followed by a d'.  The reason is that the BEAMER_HEADER_EXTRA is
> put before the input encoding declaration.  To be clear, org produces a
> TeX file that starts with
>
> --8<---------------cut here---------------start------------->8---
> % Created 2010-07-06 Tue 08:57
> \documentclass[presentation]{beamer}
> \usetheme[secheader]{Boadilla} \institute{Universität Koblenz, IST}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> --8<---------------cut here---------------end--------------->8---
>
> but it should be at least:
>
> --8<---------------cut here---------------start------------->8---
> % Created 2010-07-06 Tue 08:57
> \documentclass[presentation]{beamer}
> \usepackage[utf8]{inputenc}
> \usetheme[secheader]{Boadilla} \institute{Universität Koblenz, IST}
> \usepackage[T1]{fontenc}
> --8<---------------cut here---------------end--------------->8---
>
> In general, I'd say that it would be even more safe to put the extra
> headers below all default headers.
2010-07-06 14:55:47 +02:00
Daniel Clemente b324bdca5c default base-extension .org for org-publish
Org-publish: correctly find files in projects which didn't define a base-extension.
Previously, (org-publish-get-project-from-filename "~/org/file.org") would return nil because the constructed regular expression "^/home/dc/org/.+\\.\\(\\)$" required a dot at the end.

#+BEGIN_QUOTE

#+END_QUOTE
2010-07-06 12:56:47 +02:00
Carsten Dominik b6305c713c Make sure going to last capture also works after refile 2010-07-06 12:49:41 +02:00
Carsten Dominik 2235ecb422 Fix bug in getting template from file or function 2010-07-06 12:49:35 +02:00
David Maus d044ad3f1c Remove text properties of body before calculating cache hash.
* org-exp-blocks.el (org-export-blocks-format-ditaa)
(org-export-blocks-format-dot): Remove text properties of body before
calculating cache hash.

Otherwise one and the same ditta/graphviz image has a different hash
depending on the text properties of the body.
E.g. `org-export-region-as-html' with target buffer 'string passed the
body of the block without possible indentation property `wrap-prefix'
while `org-export-as-html' does.
2010-07-06 10:42:33 +02:00
Carsten Dominik e1262e57d2 LaTeX export: Allow to customize the tabular environment
* lisp/org-latex.el (org-export-latex-tabular-environment): New option.
(org-export-latex-tables): Use `org-export-latex-tabular-environment'.
2010-07-06 10:39:35 +02:00
Carsten Dominik 85c90e96fd Allow org-indent-mode only on Emacsen that do support it
* lisp/org-compat.el (org-version-check): New function.
* lisp/org-indent.el (org-indent-mode): Check for exact emacs version.
2010-07-06 10:23:41 +02:00
Carsten Dominik c80d5b9c27 Capture: Expand template file name 2010-07-06 09:44:31 +02:00
Carsten Dominik 75192f263e Allow capture template to come from a file or from a function call
* lisp/org-capture.el (org-capture-templates): Allow the template
to come from a file or function call.
(org-capture-place-entry): Get the template from file or function.
2010-07-06 09:41:01 +02:00
David Maus dfd0c7ad2e Fix typo in docstring.
* babel/ob-exp.el (org-babel-exp-inline-src-blocks): Fix typo
in docstring.
2010-07-06 09:14:01 +02:00
Carsten Dominik 0e30108330 Fix typo 2010-07-06 09:12:50 +02:00
David Maus 4273e50ab7 Don't create marker if target is entire file.
* org-agenda.el (org-agenda-bulk-action): Don't create marker for
position if target is entire file.

If the target of a bulk refile operation is the entire file,
`org-refile-get-location' returns nil for the refile position.
Creating a marker for the target file's buffer at position nil returns
a marker that points nowhere (Cf. GNU Emacs Lisp Reference Manual,
31.6).  `org-refile' adds headings to level 1 if the target position
for the target file is nil -- and hence a marker that points nowhere
is not nil, tries to jump to nowhere.
2010-07-06 08:55:02 +02:00
Carsten Dominik 6d889cc363 Escape parenthesis at bol in docstring 2010-07-06 08:51:23 +02:00
Carsten Dominik f3d72b13f4 Implement comment standards in org-ctags.el 2010-07-06 08:25:48 +02:00
Carsten Dominik 44d56dfa2d Autoload more org-table-functions
* lisp/org.el (org-autoload): Autoload a few more org-table functions.
2010-07-06 07:39:57 +02:00
Eric Schulte c87b6a90b0 ob-latex: shouldn't require org-latex as that results in a recursive require
Thanks to Juan Pechiar for pointing this out

* lisp/ob-latex.el (org-latex): don't require org-latex as that
  results in a recursive require loop
2010-07-05 20:17:40 -07:00
Eric Schulte ae44ae853d babel: adding ob-mscgen to org-babel-load-languages
* lisp/org.el (org-babel-load-languages): adding ob-mscgen
2010-07-05 19:08:50 -07:00
Eric Schulte 2538e687da babel: updating ob-dot.el and ob-mscgen.el to use ob-eval 2010-07-05 19:03:45 -07:00
Eric Schulte 07b8908903 ob-mscgen: support for mscgen code blocks by Juan Pechiar
from the comments of the new file

This software provides EMACS org-babel export support for message
sequence charts. The mscgen utility is used for processing the
sequence definition, and must therefore be installed in the system.

Mscgen is available and documented at
http://www.mcternan.me.uk/mscgen/index.html

This code is directly inspired by Eric Schulte's ob-dot.el

Example:

msc {
 A,B;
 A -> B [ label = "send message" ];
 A <- B [ label = "get answer" ];
}

Header for alternative file type:

This differs from most standard languages in that

1) there is no such thing as a "session" in mscgen
2) we are generally only going to return results of type "file"
3) we are adding the "file" and "filetype" header arguments
4) there are no variables
2010-07-05 18:48:47 -07:00
Eric Schulte e4cfd468a0 babel: :eval header argument takes arguments "never" and "query" to limit evaluation
* lisp/ob.el (org-babel-confirm-evaluate): adding a new :eval header
  argument which can be used to control evaluation

* doc/org.texi (eval): adding documentation for the new :eval header
  argument
2010-07-05 15:51:36 -07:00
Carsten Dominik 0dec8ac617 Revert "Fix agenda display for late scheduled and deadline tasks"
This reverts commit 516640aff9.
2010-07-05 23:18:34 +02:00
Eric Schulte 4406aa5a34 org-latex: fixed last remaining elisp compilation warning
* lisp/org-latex.el (org-export-latex-tables): format string now
  matches options
2010-07-05 13:29:33 -07:00
Eric Schulte 5ded079a1a Merge branch 'safety-babel' 2010-07-05 11:31:03 -07:00
Eric Schulte 0deb72c068 babel: removed `org-babel-tangle-w-comments', now just use the :comments header arg
* lisp/ob-tangle.el (org-babel-spec-to-string): removed
  `org-babel-tangle-w-comments', now just use the :comments header arg
  to control the insertion of comments on tangling
2010-07-05 11:14:51 -07:00
Eric Schulte 0a109680ee fixed list nesting error in ob-R.el 2010-07-05 11:14:51 -07:00
Eric Schulte baa6e1d3d7 babel: absolutely no babel related compiler warnings
had to nest an argument in a trivial `or' to trick the compiler in
  the large ob-comint macro.
2010-07-05 11:14:51 -07:00
Eric Schulte 3416a0e323 babel: clean compile 2010-07-05 11:14:51 -07:00
Eric Schulte 9be0990ae1 babel: clojure is now using ob-eval 2010-07-05 11:14:51 -07:00
Eric Schulte 1e43fa0413 babel: updated ob-octave.el to work with the new ob-eval.el functions
Note, the session based evaluation has *not* be updated, mainly
  because I don't have a working octave install with which to test the
  changes.
2010-07-05 11:14:50 -07:00
Eric Schulte 1956026332 babel: ob-perl is now using the new ob-eval functionality 2010-07-05 11:14:50 -07:00
Eric Schulte d1ba364572 babel: cleaned up R code 2010-07-05 11:14:50 -07:00
Eric Schulte 7b3077dcd4 babel: cleaned up ruby (now using ob-eval) 2010-07-05 11:14:50 -07:00
Eric Schulte 0a6a5b4fae babel: fixed small input error related to empty tables 2010-07-05 11:14:50 -07:00
Eric Schulte fd9bf71265 babel: fixed sessions in python, extracted external eval into ob-eval 2010-07-05 11:14:50 -07:00
Eric Schulte 15b36e2380 ext: prefix on external file names 2010-07-05 11:14:50 -07:00
Eric Schulte 9de1e9c6cc babel: greatly enhanced support for sqlite 2010-07-05 11:14:50 -07:00
Eric Schulte 6c2e35003f babel: all languages compiling cleanly (but R has a small problem)
For some reason ob-R refuses to compile when it requires ob-comint.

  When (require 'ob-comint) is not included in  ob-R.el everything
  compiles without error, but warnings are thrown because the
  arguments to a macro defined in ob-comint are mis-interpreted as
  functions.

  When (require 'ob-comint) is added to ob-R.el then it throws errors
  complaining that the last argument to a function is nil and should
  be a string.  I don't understand this error at all and can't fix it.
2010-07-05 11:14:50 -07:00
Eric Schulte d7b7025eac flattening out lisp directory structure
all babel and babel/langs files now live in the base of the lisp directory.
2010-07-05 11:14:49 -07:00
Eric Schulte 6e469f4afb babel: `org-babel-load-languages' activates code blocks by language
* lisp/org.el (org-babel-load-languages): this variable controls which
  languages will be loaded by org-babel.  It is customizable through
  the customize interface.

  (org-babel-do-load-languages): load those languages in
  org-babel-load-languages and disable those with nil cdr's
2010-07-05 11:14:49 -07:00
Eric Schulte 0ea1432d31 babel: evaluation of code blocks now requires confirmation
* lisp/babel/ob.el (org-confirm-babel-evaluate): variable used to
  control evaluation of code blocks, default value it t, meaning all
  code block evaluation requires confirmation

  (org-babel-confirm-evaluate): function used to request confirmation
  of code block evaluation from the user

  (org-babel-execute-src-block): this function is the single point of
  entry for evaluation of code blocks (whether initiated through lob
  call, through direct code block evaluation, or as part of file
  exportation).  Every time this function is called it will now
  request confirmation from the user.  The newly added
  `org-confirm-babel-evaluate' variable can be used to configure this
  behavior.

  (org-babel-no-eval-on-ctrl-c-ctrl-c): This variable can be used to
  inhibit evaluation of code blocks with C-c C-c.

* lisp/org.el (org-ctrl-c-ctrl-c): added documentation of code block
  evaluation behavior

* lisp/babel/ob-keys.el (org-babel-key-bindings): adding keybindings
  for executing code blocks and for opening their results
2010-07-05 11:14:49 -07:00
Carsten Dominik 1217e02e56 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-05 19:01:13 +02:00
Eric Schulte 6d4cf4db84 org-latex: org-export-latex-format-image now accepts optional shortname
* lisp/org-latex.el (org-export-latex-format-image): updated number of
  arguments to allow for an optional short-name
2010-07-05 09:56:20 -07:00
Carsten Dominik 040b2aa6b2 Indent-mode: Disable in Emacs 21 and earlier
* lisp/org-indent.el (org-indent-mode): Refuse to turn on prior to Emacs 23.2
2010-07-05 17:46:19 +02:00
Stephen Eglen 27a4e48b0a Small doc fixes to org-feed.el and org-capture.el 2010-07-05 15:07:53 +02:00
Carsten Dominik 9e9bc16476 Capture: fix the function target 2010-07-05 08:53:48 +02:00
Carsten Dominik 8b7c742750 Capture: Put final touched to file+regexp & file+function targets
* lisp/org-capture.el (org-capture-set-target-location): Store
exact positions for file+regexp and file+function targets.
(org-capture-place-entry, org-capture-place-item)
(org-capture-place-table-line, org-capture-place-plain-text): Respect
exact positions.
(org-capture-finalize): Make sure we are at the beginning of a line
when fixing the empty lines after the entry.
2010-07-05 08:25:51 +02:00
Carsten Dominik 3f259819d6 Merge branch 'change-gnus-frame-default' 2010-07-02 16:27:27 +02:00
Carsten Dominik 57a5ef69b8 Repair the working of a LOGGING property value `nil'
* lisp/org.el (org-entry-get-with-inheritance): New argument LITERAL-NIL.
(org-entry-get): Pass `literal-nil' into
`org-entry-get-with-inheritance'.
(org-todo): React to nil values of the LOGGING property.
2010-07-02 15:49:40 +02:00
Carsten Dominik 8da31057eb Update docstring or `org-default-notes-file'
* lisp/org.el (org-default-notes-file): Update docstring
2010-07-02 10:54:12 +02:00
Carsten Dominik 708266eedd New default for the gnus frame setup
* lisp/org.el (org-link-frame-setup): Use `org-gnus-no-new-news' as default.
2010-07-02 10:32:51 +02:00
Eric Schulte 5edefbba26 a better way with babel
Of course, an updated patch is attached.

Best -- Eric
Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Eric,
>
> I tried to apply the patch, but it does not apply cleanly, maybe due
> to other changes.  Can I ask you to update and resubmit?
>
> Thanks!
>
> - Carsten
>
> On Jun 21, 2010, at 6:37 PM, Eric Schulte wrote:
>
>> Hi Robert,
>>
>> Thanks for the thoughtful message.
>>
>> I present a couple of solutions below.
>>
>> Robert Cunningham <robut@iinet.net.au> writes:
>>
>>> G'day All,
>>>
>>> I wonder if I've missed something and there is a better way.
>>>
>>> Essentially I'm trying to use org babel with R and LaTeX to create
>>> figures
>>> with both long and short captions (for contents)
>>>
>>> I'd started with:
>>>
>>> #+CAPTION: Nice data (filled points indicate less nice data)
>>> #+LABEL:   fig:nicedata
>>> #+ATTR_LaTeX: width=0.98\textwidth
>>> #+begin_src R :file ndata.pdf :width 1000 :height 617 :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>> which pointed to the need for long/short captions...
>>>
>>> feeling hopeful I tried:
>>>
>>> #+CAPTION: Nice data [Nice data (filled points indicate less nice
>>> data)]
>>> #+LABEL:   fig:nicedata
>>> #+ATTR_LaTeX: width=0.98\textwidth
>>> #+begin_src R :file ndata.pdf :width 1000 :height 617 :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>
>> I'm attaching a patch [1] which adds shortname support for captions.
>> Once
>> applied, the following syntax will result in a caption with a
>> shortname
>> and a longname.
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>> #+source: g-nicedata
>> #+begin_src gnuplot :file graph.png :exports results
>>  plot sin(x)
>> #+end_src
>>
>> #+Caption: [nice data]{a longer description of the niceness of the
>> data}
>> #+results: g-nicedata
>> [[file:graph.png]]
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> however, while this patch is still pending there is an Org-babel
>> solution below which should work immediately.
>>
>>>
>>>
>>> but no luck there.
>>>
>>> Next effort was to try to use R and LaTex more directly with
>>> noweb. I tried
>>> this:
>>>
>>>
>>>
>>> #+srcname: r-nicedata
>>> #+begin_src R :session :file ndata.pdf :results output :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>>
>>> #+begin_src latex :noweb yes
>>>  \begin{figure}[htb!]
>>>    \centering
>>>    \includegraphics[width=0.98\textwidth]{<<r-nicedata()>>}
>>>    \caption[Nice data]{Nice data (filled points indicate less nice
>>> data)}
>>>    \label{fig:nicedata}
>>>  \end{figure}
>>> #+end_src
>>>
>>>
>>>
>>> This does produce the figure and long/short contents BUT ALSO
>>> produces this:
>>>
>>> #+results: r-nicedata
>>> [[file:ndata.pdf]]
>>>
>>> which upon export results in a link and consequently the plot
>>> appearing both
>>> in the figure and elsewhere. This second plot is unwelcome.
>>>
>>> I've tried assorted :results and :output options but have not found
>>> how to
>>> suppress the #+results: but still obtain the figure. I've always used
>>> the :session option.
>>>
>>> I've also tried twigging an org-export option to suppress pdf
>>> export but the
>>> link is still exported so that is not a solution.
>>>
>>> The current "working" solution is to use the noweb approach and
>>> then use sed
>>> to clean out the links to the second image-ugly to say the least!
>>>
>>
>> You were very close with the noweb approach.  The following
>> combination
>> should work -- notice the ":results silent" header argument to the
>> source block.
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>> #+source: g-nicedata
>> #+begin_src gnuplot :file graph.png :results silent :exports none
>>  plot sin(x)
>> #+end_src
>>
>> #+begin_src latex :noweb yes
>>  \begin{figure}[htb!]
>>    \centering
>>    \includegraphics[width=0.98\textwidth]{<<g-nicedata()>>}
>>    \caption[Nice data]{some nice data -- filled points indicate less
>> nice data}
>>    \label{fig:nicedata}
>>  \end{figure}
>> #+end_src
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> is exported to the following latex,
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>>
>>
>> \begin{figure}[htb!]
>>  \centering
>>  \includegraphics[width=0.98\textwidth]{graph.png}
>>  \caption[Nice data]{some nice data -- filled points indicate less
>> nice data}
>>  \label{fig:nicedata}
>> \end{figure}
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> Hope this helps,
>>
>> Best -- Eric
>>
>>>
>>>
>>>
>>> All this with org version 6.36c
>>>
>>>
>>> What have I missed? What is the best way to do this?
>>>
>>>
>>> Cheers,
>>>
>>> Robert Cunningham
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> Footnotes:
>> [1]  From 6a55dcab99bbd7840117b8390ab5db347d2573ef Mon Sep 17
>> 00:00:00 2001
>> From: Eric Schulte <schulte.eric@gmail.com>
>> Date: Mon, 21 Jun 2010 09:02:37 -0700
>> Subject: [PATCH] add short-names to #+captions with support for
>> latex export
>>
>>  captions specified with the following syntax
>>    #+CAPTION: [shortname]{longname}
>>  will have their short and longnames handled appropriately.
>>
>>  Thanks to Robert Cunningham for suggesting this feature.
>>
>> * lisp/org-exp.el (org-export-attach-captions-and-attributes): adding
>>  a shortname attribute to caption strings under the symbol name
>>  org-caption-shortn.
>>
>> * lisp/org-latex.el (org-export-latex-tables): handling caption short
>>  names on table export
>>
>>  (org-export-latex-convert-table.el-table): handling caption short
>>  names on table.el type table export
>>
>>  (org-export-latex-links): handling caption short names on link/image
>>  export
>>
>>  (org-export-latex-format-image): now takes an optional argument
>>  specifying a caption short name
>> ---
>> lisp/org-exp.el   |   14 +++++++++-----
>> lisp/org-latex.el |   21 ++++++++++++++-------
>> 2 files changed, 23 insertions(+), 12 deletions(-)
>>
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index 029e4d7..466d7da 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -1256,7 +1256,7 @@ the current file."
>>   (goto-char (point-min))
>>   (while (re-search-forward org-bracket-link-regexp nil t)
>>     (org-if-unprotected-at (1+ (match-beginning 0))
>> -     (let* ((md (match-data))
>> +      (let* ((md (match-data))
>> 	    (desc (match-end 2))
>> 	    (link (org-link-unescape (match-string 1)))
>> 	    (slink (org-solidify-link-text link))
>> @@ -1381,8 +1381,8 @@ removed as well."
>> 					   select-tags "\\|")
>> 			 "\\):"))
>> 	 (re-excl (concat ":\\(" (mapconcat 'regexp-quote
>> -					   exclude-tags "\\|")
>> -			"\\):"))
>> +					    exclude-tags "\\|")
>> +			  "\\):"))
>> 	 beg end cont)
>>     (goto-char (point-min))
>>     (when (and select-tags
>> @@ -1593,11 +1593,14 @@ table line.  If it is a link, add it to the
>> line containing the link."
>> 		    "^[ \t]*\\(|[^-]\\)"
>> 		    "\\|"
>> 		    "^[ \t]*\\[\\[.*\\]\\][ \t]*$"))
>> -	cap attr label end)
>> +	cap shortn attr label end)
>>     (while (re-search-forward re nil t)
>>       (cond
>>        ((match-end 1)
>> -	(setq cap (concat cap (if cap " " "") (org-trim (match-string 1)))))
>> +	(setq cap (concat cap (if cap " " "") (org-trim (match-string 1))))
>> +	(when (string-match "\\[\\(.*\\)\\]{\\(.*\\)}" cap)
>> +	  (setq shortn (match-string 1 cap)
>> +		cap (match-string 2 cap))))
>>        ((match-end 2)
>> 	(setq attr (concat attr (if attr " " "") (org-trim
>> (match-string 2)))))
>>        ((match-end 3)
>> @@ -1609,6 +1612,7 @@ table line.  If it is a link, add it to the
>> line containing the link."
>> 		    (point-at-eol)))
>> 	(add-text-properties (point-at-bol) end
>> 			     (list 'org-caption cap
>> +				   'org-caption-shortn shortn
>> 				   'org-attributes attr
>> 				   'org-label label))
>> 	(if label (push (cons label label) target-alist))
>> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
>> index 01a4b05..6c2aab2 100644
>> --- a/lisp/org-latex.el
>> +++ b/lisp/org-latex.el
>> @@ -1576,7 +1576,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>              (org-table-last-column-widths (copy-sequence
>>                                             org-table-last-column-
>> widths))
>>              fnum fields line lines olines gr colgropen line-fmt align
>> -             caption label attr floatp longtblp)
>> +             caption shortn label attr floatp longtblp)
>>         (if org-export-latex-tables-verbatim
>>             (let* ((tbl (concat "\\begin{verbatim}\n" raw-table
>>                                 "\\end{verbatim}\n")))
>> @@ -1585,6 +1585,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>           (progn
>>             (setq caption (org-find-text-property-in-string
>>                            'org-caption raw-table)
>> +		  shortn (org-find-text-property-in-string
>> +			  'org-caption-shortn raw-table)
>>                   attr (org-find-text-property-in-string
>>                         'org-attributes raw-table)
>>                   label (org-find-text-property-in-string
>> @@ -1652,7 +1654,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>                           (if floatp "\\begin{table}[htb]\n"))
>>                         (if floatp
>>                             (format
>> -                             "\\caption{%s%s}"
>> +                             "\\caption%s{%s%s}"
>> +			     (if shortn (concat "[" shortn "]") "")
>>                              (if label (concat "\\\label{" label
>> "}") "")
>>                              (or caption "")))
>>                         (if (and longtblp caption) "\\\\\n" "\n")
>> @@ -1680,10 +1683,11 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>
>> (defun org-export-latex-convert-table.el-table ()
>>   "Replace table.el table at point with LaTeX code."
>> -  (let (tbl caption label line floatp attr align rmlines)
>> +  (let (tbl caption shortn label line floatp attr align rmlines)
>>     (setq line (buffer-substring (point-at-bol) (point-at-eol))
>> 	  label (org-get-text-property-any 0 'org-label line)
>> 	  caption (org-get-text-property-any 0 'org-caption line)
>> +	  shortn (org-get-text-property-any 0 'org-caption-shortn line)
>> 	  attr (org-get-text-property-any 0 'org-attributes line)
>> 	  align (and attr (stringp attr)
>> 		     (string-match "\\<align=\\([^ \t\n\r,]+\\)" attr)
>> @@ -1721,7 +1725,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>       (setq tbl (concat "\\begin{center}\n" tbl "\\end{center}")))
>>     (when floatp
>>       (setq tbl (concat "\\begin{table}\n"
>> -			(format "\\caption{%s%s}\n"
>> +			(format "\\caption%s{%s%s}\n"
>> +				(if shortn (format "[%s]" shortn) "")
>> 				(if label (format "\\label{%s}" label) "")
>> 				(or caption ""))
>> 			tbl
>> @@ -1822,6 +1827,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 			  "file")))
>> 	    (coderefp (equal type "coderef"))
>> 	    (caption (org-find-text-property-in-string 'org-caption
>> raw-
>> path))
>> +	    (shortn (org-find-text-property-in-string
>> org-caption-shortn raw-path))
>> 	    (attr (or (org-find-text-property-in-string
>> org-attributes raw-
>> path)
>> 		      (plist-get org-export-latex-options-plist
>> :latex-image-
>> options)))
>> 	    (label (org-find-text-property-in-string 'org-label raw-path))
>> @@ -1859,7 +1865,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 		   (plist-get org-export-latex-options-plist :inline-images))
>> 	      ;; OK, we need to inline an image
>> 	      (insert
>> -	       (org-export-latex-format-image raw-path caption label attr)))
>> +	       (org-export-latex-format-image raw-path caption label
>> attr shortn)))
>> 	     (coderefp
>> 	      (insert (format
>> 		       (org-export-get-coderef-format path desc)
>> @@ -1889,7 +1895,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 	     (t (insert "\\texttt{" desc "}")))))))
>>
>>
>> -(defun org-export-latex-format-image (path caption label attr)
>> +(defun org-export-latex-format-image (path caption label attr
>> &optional shortn)
>>   "Format the image element, depending on user settings."
>>   (let (ind floatp wrapp multicolumnp placement figenv)
>>     (setq floatp (or caption label))
>> @@ -1932,7 +1938,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 	   (floatp "\\begin{figure}%placement
>> \\centering
>> \\includegraphics[%attr]{%path}
>> -\\caption{%labelcmd%caption}
>> +\\caption%shortn{%labelcmd%caption}
>> \\end{figure}")
>> 	   (t "\\includegraphics[%attr]{%path}")))
>>
>> @@ -1953,6 +1959,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 			 (expand-file-name path)
>> 		       path))
>> 	       (cons "attr" attr)
>> +	       (cons "shortn" (if shortn (format "[%s]" shortn) ""))
>> 	       (cons "labelcmd" (if label (format "\\label{%s}"
>> 						  label)""))
>> 	       (cons "caption" (or caption ""))
>> --
>> 1.7.0.4
>>
>> _______________________________________________
>> 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
>
> - Carsten

>From 5cbb38e25a2d2eae7c3c688d347f80619ecb8463 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Thu, 1 Jul 2010 08:07:17 -0700
Subject: [PATCH] add short-names to #+captions with support for latex export

  captions specified with the following syntax
    #+CAPTION: [shortname]{longname}
  will have their short and longnames handled appropriately.

  Thanks to Robert Cunningham for suggesting this feature.

* lisp/org-exp.el (org-export-attach-captions-and-attributes): adding
  a shortname attribute to caption strings under the symbol name
  org-caption-shortn.

* lisp/org-latex.el (org-export-latex-tables): handling caption short
  names on table export

  (org-export-latex-convert-table.el-table): handling caption short
  names on table.el type table export

  (org-export-latex-links): handling caption short names on link/image
  export

  (org-export-latex-format-image): now takes an optional argument
  specifying a caption short name
2010-07-02 10:14:12 +02:00
Carsten Dominik f693238dfe Fix naming and docstring issues in `org-iswitchb'
* lisp/org.el (org-switchb): Renamed from `org-iswitchb'.  Improve
docstring.
(org-iswitchb): New alias.
(org-ido-switchb): Make alias point to `org-switchb'.
2010-07-02 09:20:15 +02:00
Carsten Dominik d0fa608267 Capture: Respect time-of-day preference in interactive template prompt.
* lisp/org-capture.el (org-capture-fill-template): Respect
time-of-day preference in template prompt.

In an interactive time prompt in a capture template, the users
preference of getting a stamp with time was not respected.

Reported by Markus Heller
2010-07-02 09:08:29 +02:00
David Maus dc9222e066 Remove superfluous lambda.
* org-feed.el (org-feed-unescape): Remove superfluous lambda.
2010-07-02 00:48:59 -04:00
Eric Schulte 7fdfd13e96 babel: cleaner initialization of org-babel-python-buffers
* lisp/babel/langs/ob-python.el (org-babel-python-buffers):
  technically this should be initialized as an alist, although in
  practice this doesn't really make any functional difference because
  whenever this variable is used it has new values properly assigned
  to it, and it is supposed to start basically empty.
2010-07-01 15:09:34 -07:00
Carsten Dominik 0ed29448aa Keep byte compiler happy 2010-07-01 15:54:29 +02:00
David Maus 02d5f6a8b0 Provide customization variable to disable folder check when open link.
* org-wl.el (org-wl-disable-folder-check): New customization
variable.
(org-wl-open): Disable folder check depending on
`org-wl-disable-folder-check'.
2010-07-01 15:49:29 +02:00
Sebastian Rose 0a99122943 Remove obsolete function call and declaration
This patch removes an obsolete declaration and call of the function
`org-publish-initialize-files-alist'  from org-protocol.el.

This function does not exist anymore.  It was removed when we
implemented the new publishing cache.
Best wishes

  Sebastian
2010-07-01 15:46:51 +02:00
Carsten Dominik 14f05b4461 Capture: Fix bug in file+function target specification
* lisp/org-capture.el (org-capture-set-target-location): Fix
file+function interpretation.
2010-07-01 15:43:43 +02:00
Carsten Dominik e9927a6d2b Merge branch 't/patch59' 2010-07-01 15:11:54 +02:00
Carsten Dominik 2505c69796 Merge branch 't/patch58' 2010-07-01 15:11:51 +02:00
Carsten Dominik 88429d7270 Merge branch 't/patch57' 2010-07-01 15:11:46 +02:00
David Maus 6875716e76 Unescape rss element content.
* org-feed.el (org-feed-parse-rss-entry): Unescape rss element
content.
2010-07-01 15:09:43 +02:00
David Maus f15605889b Declare variable `xml-entity-alist' for byte compiler.
* org-feed.el (xml-entity-alist): Declare variable
`xml-entity-alist' for byte compiler.
2010-07-01 15:09:15 +02:00
David Maus ea47dd58ff Unescape protected entities defined in `xml-entity-alist'.
* org-feed.el (org-feed-unescape): New function.  Unescape
protected entities.
(org-feed-parse-atom-entry): Use function for atom:content
type text and html.
2010-07-01 15:08:43 +02:00
David Maus f1924d9224 Ignore case of rss element names.
* org-feed.el (org-feed-parse-rss-feed): Ignore case of rss
element names.
2010-07-01 15:07:57 +02:00
Bernt Hansen 516640aff9 Fix agenda display for late scheduled and deadline tasks
* lisp/org.el (org-time-string-to-absolute): Ignore cyclic repeater
when displaying items on todays agenda date.

Ignore the cyclic repeater when displaying items on today's agenda
date.  If you have a weekly task and miss the date the agenda view
will show more than a week late now instead of resetting on the
cyclic repeating date.  This makes it much more obvious when you
missed a repeating task after the repeater.
2010-07-01 14:56:18 +02:00
Julien Danjou 3308155e23 org-feed: Fix RSS feed parsing when <item> as attributes
I've RSS feeds with <item foo="bar"> which does not work without that change.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-07-01 14:50:08 +02:00
Carsten Dominik c74ecf4387 Fix display problem of clocked time in agenda
* lisp/org-agenda.el (org-agenda-get-progress): Avoid reusing previous
value of EXTRA.

Sebastien Vauban writes:

> Finally reporting the following bug. Has been there for as long as I can
> remember, but never did report it when seeing it. And kept forgetting.
>
> So, now...
>
> --8<---------------cut here---------------start------------->8---
> * 2010
>
> ** 2010-06 June
>
> *** Admin
>
> **** Organization
>     :LOGBOOK:
>     CLOCK: [2010-06-30 Wed 13:30]--[2010-06-30 Wed 17:50] =>  4:20
>     - DUPLICATED TeXt.
>     :END:
>
> **** Emails and News
>     :LOGBOOK:
>     CLOCK: [2010-06-28 Mon 09:10]--[2010-06-28 Mon 10:40] =>  1:30
>     CLOCK: [2010-06-30 Wed 10:30]--[2010-06-30 Wed 12:30] =>  2:00
>     :END:
>
> *** ABC
>    :LOGBOOK:
>    CLOCK: [2010-06-30 Wed 09:30]--[2010-06-30 Wed 10:30] =>  1:00
>    - Transfer of files to ABC.
>    :END:
> --8<---------------cut here---------------end--------------->8---
>
> generates the following timeline:
>
> --8<---------------cut here---------------start------------->8---
> Timeline of file /home/sva/Projects/ecm.org
>
> 2010-06-28 Mon _________________________________
>  Clocked:   (1:30) Emails and News
>
> 2010-06-29 Tue _________________________________
>
> 2010-06-30 Wed _________________________________
>  Clocked:   (1:00) ABC - Transfer of files to ABC.
>  Clocked:   (2:00) Emails and News - DUPLICATED TeXt.
>  Clocked:   (4:20) Organization - DUPLICATED TeXt.
> --8<---------------cut here---------------end--------------->8---
>
> As you can see, the fact that I never put a descriptive text for "reading
> emails" is wrongly reported: previous text is used in the timeline, instead.
2010-07-01 14:02:58 +02:00
Carsten Dominik 6c381070f9 Make timestamp directory even if the parent does not exist
* lisp/org-publish.el (org-publish-initialize-cache): Make
timestamp directory, the entire path to it.
2010-07-01 11:31:14 +02:00
Carsten Dominik a6d8eb4ea9 Fix comment protection issue
* lisp/org-exp.el (org-export-handle-comments): Make sure to check
for protection in the comment line, and not in the line after it.
2010-07-01 11:02:46 +02:00
Carsten Dominik 90afd8b797 Introduce new option for exporting LaTeX code to HTML
* lisp/org-html.el (org-export-html-preprocess): Call org-format-latex,
possibly with a protect-only argument.
* lisp/org.el (org-format-latex): New argument PROTECT-ONLY.

with the switch #+OPTIONS: LaTeX:verbatim ,
LaTeX code will be exported verbatim to HTML, so that jsmath can grab
and convert it.

Proposed by Christian Moe.
2010-07-01 10:23:33 +02:00
Carsten Dominik a5d5f4c9f3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-01 06:28:45 +02:00
Eric Schulte f44832eed0 org-exp: now removing table meta (e.g. #+TBLNAME, #+TBLFM) from export
* lisp/org-exp.el (org-export-handle-table-metalines): this function
  removes table specific meta-lines, now that we aren't wiping
  everything that looks remotely like a comment at the end of the
  export process we have to be sure to catch all of the specific lines
  in org-exp.el
2010-06-30 16:01:38 -07:00
Nicolas Goaziou 011553652e Remove unwanted #+ATTR_Backend and #+Backend during export.
* lisp/org-exp.el: (org-export-select-backend-specific-text) Properly
  get rid of #+Backend and #+ATTR_Backend specifics to backends not
  matching the one we're exporting to.
2010-06-30 14:23:01 -07:00
Eric Schulte 23b13749f6 remove newline characters from the contents of table cells
This patch changes the functionality of orgtbl-to-orgtbl so that it will
remove newline characters from the text of table cells and replace them
with "\n".  This protects the final table from such newlines.

This patch will probably only have any noticeable effect for tables
imported form external files, or from the results of code blocks.

Best -- Eric

>From 34aacc9aa037e8f17c8d32ed61a25f0a350713a0 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 18 Jun 2010 12:38:26 -0700
Subject: [PATCH] org-table: will now strip newlines from the text of table cells

* lisp/org-table.el (orgtbl-to-generic): added the :remove-newlines
  option which will strip newline characters from the text of table
  cells and replace then with "\n"

  (orgtbl-to-orgtbl): now using the new :remove-newlines option to
  orgtbl-to-generic
2010-06-30 15:34:04 +02:00
Carsten Dominik 798ebf518b Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-30 15:30:03 +02:00
Carsten Dominik a0962e02fd Increase security by limiting what file variables can do for evaluation query.
* lisp/org.el (org-confirm-shell-link-function):
(org-confirm-elisp-link-function): Limit the values that can be set by
file variables.
2010-06-30 15:29:55 +02:00
John Wiegley 706129c0c4 Fixed incorrect value returned from `org-habit-deadline' 2010-06-30 00:39:37 -04:00
Carsten Dominik 025a96d46f Fix bug due to new entity constant structure
* lisp/org.el (org-compute-latex-and-specials-regexp): Deal with
string elements by discarding them.
2010-06-29 11:47:42 +02:00
Carsten Dominik f255546425 Fix docstring for org-iswitchb again 2010-06-29 10:44:50 +02:00
Carsten Dominik 51d496f212 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-29 09:51:38 +02:00
Carsten Dominik 566a4c7f3a Restore the proper functionality for org-iswitchb
* lisp/org.el (org-iswitchb): Make sure to use at least iswitchb.

Patch by Stephen Eglen (modified).
2010-06-29 09:26:51 +02:00
Carsten Dominik d537c10964 Capture: Better error handling and better return-to-last-stored
* lisp/org-capture.el (org-capture-position-for-last-stored):
org-capture-bookmark-last-stored-position): New functions.
(org-capture-place-table-line): Better error catching.
(org-capture-place-item):
(org-capture-place-entry):
(org-capture-place-plain-text): Call
`org-capture-position-for-last-stored'.
(org-capture-finalize): Just call
`org-capture-bookmark-last-stored-position'.
2010-06-29 09:16:04 +02:00
Eric Schulte 452b00e7e1 org-exp: fixed small bug, use match data before it's overwritten by looking-at
Patch by Carsten

* lisp/org-exp.el (org-export-mark-blockquote-verse-center): fixed
  small bug, now grabbing match data before overwritten by looking-at
  this fixes a problem with remainders of #+end_quote lines appearing
  in exported output
2010-06-28 22:06:49 -07:00
David Maus 2510d02be9 Add customization option to open WL links in other frame.
* org.el (org-link-frame-setup): Add customization option for
  Wanderlust.
2010-06-29 06:39:45 +02:00
Eric Schulte b9548e92ab org-latex: now checking org-example rather than org-protected on verbatim export
* lisp/org-latex.el (org-export-latex-fixed-width): now checking
  org-example rather than org-protected on verbatim export, because by
  default all ": " prefixed lines are marked protected
2010-06-28 14:15:23 -07:00
Eric Schulte da8fffa5a4 org-latex: check for protection before wrapping ": " lines as verbatim
* lisp/org-latex.el (org-export-latex-fixed-width): check for
  protection before wrapping ": " lines as verbatim
2010-06-28 11:40:47 -07:00
Eric Schulte a8a26f245b babel: now requires org-macs
* lisp/babel/ob.el (org-macs): now requires org-macs
2010-06-28 11:38:34 -07:00
Eric Schulte 8217e8102e babel: python is more selective about None->hline replacement
thanks to Christopher Allan Webber for catching this

* lisp/babel/langs/ob-python.el (org-babel-python-table-or-string):
  now more careful not to replace "None"s which are not isolated
  portions of lists
2010-06-28 11:17:08 -07:00
Eric Schulte f4b78ad3c8 babel-haskell: variety of bug fixes
Thanks to Christopher Witte for raising these issues

* lisp/babel/langs/ob-haskell.el (org-babel-expand-body:haskell):
  replaced missing () wrapping, and now using correct variable
  expansion

  (org-babel-execute:haskell): now using
  org-babel-haskell-initiate-session to start sessions

  (org-babel-haskell-initiate-session): only starting sessions if none
  exists, also added a .25 second wait on brand new sessions to allow
  the Haskell interpreter to fire up

  (org-babel-load-session:haskell): now optionally accepts processed
  params to avoid over-execution of variable resolution

  (org-babel-prep-session:haskell):  now optionally accepts processed
  params to avoid over-execution of variable resolution, also placing
  the variable definitions directly in the session instead of loading
  them from a separate file
2010-06-28 09:55:09 -07:00
Eric Schulte 0e636dc2ed org-exp: check for protection before removing comments
* lisp/org-exp.el (org-export-handle-comments): check for protection
  before removing comments
2010-06-28 08:00:43 -07:00
Carsten Dominik ee629299c0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-28 12:18:22 +02:00
Carsten Dominik af866a94bd Better help for entities
* lisp/org-entities.el (org-entities): Restructure the list.
(org-entities-help): Turn the help output into a buffer
in Org-mode, so that it becomes easier to find a symbol
in the structure.
(org-entities-create-table): Deal with new structure.
2010-06-28 12:17:58 +02:00
Eric Schulte 05b7ea5035 babel: ensure `declare-function' is available in all Emacsen
Thanks to Daniel Mahler for finding this problem and proposing the fix

* lisp/babel/ob.el (unless): ensure `declare-function' is available in
  all Emacsen
2010-06-27 23:13:51 -07:00
David Maus 5a3766e0a1 Use backquotes to make byte compiler expand `flet' macro.
* org-agenda.el (org-write-agenda): Use backquotes to expand
`flet' at compile time.
2010-06-28 06:28:02 +02:00
Eric Schulte 2653b62c47 babel: now explicitly requiring outline.el from ob.el 2010-06-27 17:59:29 -07:00
Eric Schulte 2f0e2f1c5e babel: python now treats 'hline lines in tables as "None"s
Thanks to Christopher Webber (cwebb) for bringing this up.
2010-06-27 16:43:13 -07:00
Carsten Dominik f63d977c8b Better capturing of error when aborting capture 2010-06-27 12:26:08 +02:00
Carsten Dominik 1b2a21fdf7 Fix bug when retrieving time properties with modified keywords
* lisp/org.el (org-entry-properties): Make sure that standard property
names are used even if the user has customized time keywords.
2010-06-27 09:09:15 +02:00
Carsten Dominik a77dce0eac Do not set the file name of the temporary buffer during capture 2010-06-27 08:33:16 +02:00
Carsten Dominik d325d0c255 Implement patch by Stefan Monnier 2010-06-26 13:13:14 +02:00
Carsten Dominik bcb7f7f1ef Introduce a way to set a property to undefined.
* lisp/org-macs.el (org-not-nil): Return the value if not interpreted
as nil.
* lisp/org.el (org-entry-get):
(org-entry-get-with-inheritance): Interpret the value "nil"
as nil for properties.

Bernt Hansen writes:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> > On Jun 25, 2010, at 3:23 PM, Robert Goldman wrote:
> >
> > > Question:  what is the proper way to get a NIL into a property?  Are
> > > we
> > > to use () instead of "nil"?  Or are property values always interpreted
> > > as strings?
> > >
> > > Apologies in advance if this is a stupid question!
> >
> > Not a stupid question at all.
> >
> > There is no way, currently.   Property values are string - the only
> > way to make
> > org-entry-get return nil is to not have the property defined at all.
>
> I've wanted a similar thing in the past for the LOGGING property where
> the parent task has special logging set via the LOGGING property but I
> want to undo that for some of the child tasks so they use the default
> logging setup.
>
> Having a way to undefine a property would be good in general I think.

-Bernt
2010-06-26 07:54:07 +02:00
Carsten Dominik bbfca4a0e4 Clean up when aborting capture template selection
* lisp/org.el (org-switch-to-buffer-other-window): Return the buffer.

Patch by Sebastian Rose.
2010-06-26 07:18:27 +02:00
Carsten Dominik 2b26cb4e4e Fix bug with regexp target definition
Patch by Juan Pechiar
2010-06-25 20:53:15 +02:00
Eric Schulte 940b6f90af babel: bringing languages closer to compilability
removing un-needed 'cl functions from language files, and generally
  cleaning them up as if they were going to be compiled.
2010-06-25 10:26:48 -07:00
Eric Schulte 7f7602e65b babel: assign copyright to FSF on ob-sh.el 2010-06-25 10:17:50 -07:00
Eric Schulte 05ac8eb8a8 babel: ensuring each language defined (possibly empty) default header arguments
this makes customization easier when users can assume that
  org-babel-default-header-args:foo will exist for every language
2010-06-25 10:12:54 -07:00
Eric Schulte 670b9899b9 babel: assigning copyright to the FSF for babel language files 2010-06-25 09:32:35 -07:00
Eric Schulte ae98b23ab9 babel: assigning copyright to the FSF for core babel files 2010-06-25 09:20:39 -07:00
Carsten Dominik 7f21f76d5e fix typo 2010-06-25 10:01:23 +02:00
Carsten Dominik 7100bbea61 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-25 09:03:16 +02:00
Carsten Dominik a547c1048b Fix issue with turning off ORDERED property
* lisp/org-macs.el (org-not-nil): New function.
* lisp/org.el (org-block-todo-from-children-or-siblings-or-parent):
Use `org-not-nil' to interpret a property value of nil.

Robert Goldman writes:

> I have found what I believe to be a bug in handling ordered subtasks.
> Here is the behavior:
>
> I have a top level set of tasks that is ordered.
>
> One of the outline items below the top level set is a grab bag of tasks
> that will be performed in parallel.  So this task is NOT ordered
> (ORDERED: nil).
>
> The problem is that the blocking behavior from ordered tasks seems to be
> inherited from the top level task list into the second level of the
> outline, even though the ORDERED property at the second level is
> explicitly overridden.
>
> I am attaching an org file that displays this issue.  To see the
> problem, put your cursor on the "Bar" task and attempt to change its
> status to DONE.

The problem was here that the value of the property is the string
"nil", which is of course not nil.

This patches introduces a special case to interpret "nil" as nil.
2010-06-25 09:01:40 +02:00
Carsten Dominik 732884dbeb Fix the behavior of C-a when visible-mode is active
* lisp/org.el (org-truely-invisible-p): New function.
(org-beginning-of-line): Use `org-truely-invisible-p'.

Sebastien Vauban writes:

> I'm reporting some movement problem I've observed. When on any line, let's say
> the last clock one:
>
> - `C-e' moves the cursor to the end of it
> - `C-a' moves the cursor at the level of `LOGBOOK'.
>
> --8<---------------cut here---------------start------------->8---
> **** Emails and News
>     :PROPERTIES:
>     :ID:       62849012-ae7a-4885-a552-b34516d3fd06
>     :Effort:   1:00
>     :END:
>     :LOGBOOK:
>     CLOCK: [2010-06-01 Tue 08:35]--[2010-06-01 Tue 09:20] =>  0:45
>     CLOCK: [2010-06-02 Wed 09:10]--[2010-06-02 Wed 10:20] =>  1:10
>     CLOCK: [2010-06-03 Thu 09:25]--[2010-06-03 Thu 10:20] =>  0:55
>     CLOCK: [2010-06-04 Fri 09:00]--[2010-06-04 Fri 10:00] =>  1:00
>     CLOCK: [2010-06-07 Mon 09:05]--[2010-06-07 Mon 10:25] =>  1:20
>     CLOCK: [2010-06-08 Tue 09:05]--[2010-06-08 Tue 10:30] =>  1:25
>     CLOCK: [2010-06-09 Wed 09:05]--[2010-06-09 Wed 10:20] =>  1:15
>     CLOCK: [2010-06-10 Thu 09:05]--[2010-06-10 Thu 10:20] =>  1:15
>     CLOCK: [2010-06-11 Fri 09:15]--[2010-06-11 Fri 10:00] =>  0:45
>     CLOCK: [2010-06-14 Mon 09:15]--[2010-06-14 Mon 10:10] =>  0:55
>     :END:
> --8<---------------cut here---------------end--------------->8---
>
> This is -- at least -- true whenever `M-x visible-mode' is enabled.
2010-06-25 08:23:25 +02:00
Carsten Dominik ae20361475 Fix the clock target for org-capture 2010-06-25 07:29:13 +02:00
Eric Schulte a969714755 babel: emacs-lisp no longer evaluates header argument references multiple times
* lisp/babel/langs/ob-emacs-lisp.el
  (org-babel-expand-body:emacs-lisp): removed extra call to
  `org-babel-process-params' which was causing referenced code blocks
  to be run multiple times

  (org-babel-execute:emacs-lisp): now passing processed-params through
  to `org-babel-expand-body:emacs-lisp' which keeps references from
  being evaluated multiple times
2010-06-24 14:05:34 -07:00
Carsten Dominik 08f8875ecd Catch agenda error when there is a tie stamp before the first headline
* lisp/org-agenda.el (org-agenda-get-timestamps): No errors
while getting TODO state.
(org-agenda-highlight-todo): No error when no keyword has
been matched.

Eric Arneson writes:

> I've discovered a bug in `org-agenda-get-timestamps' wherein an active
> timestamp before the first headline causes it to fail.  I realize that
> this is probably an error in my use of active timestamps, but there was
> no really handy error message and this bugged me for weeks.
>
> I'm not familiar enough with org-mode to know what the correct behavior
> should be here (it'd be nice to get an error message saying "Don't use
> active timestamps that way!"), but here's an example .org file that will
> trigger the bug:
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN: clocktable :maxlevel 3 :scope today
> Clock summary at [2010-06-20 Sun 13:09]
>
> | L | Headline                              | Time   |
> |---+---------------------------------------+--------|
> |   | *Total time*                          | *0:13* |
> |---+---------------------------------------+--------|
> | 1 | Track down funky bug <2010-06-20 Sun> | 0:13   |
> #+END:
>
> * Track down funky bug <2010-06-20 Sun>
>  :LOGBOOK:
>  CLOCK: [2010-06-20 Sun 12:43]
>  CLOCK: [2010-06-20 Sun 12:30]--[2010-06-20 Sun 12:43] =>  0:13
>  :END:
> --8<---------------cut here---------------end--------------->8---
>
> I hope this can help somebody else track down the right place to fix
> this bug.
2010-06-24 08:53:34 +02:00
Carsten Dominik 1fc1dc389b Make sure the clock history only points to base buffers 2010-06-24 07:39:10 +02:00
Carsten Dominik e6182995d9 Skip template selection if there is only a single template 2010-06-24 07:17:54 +02:00
Eric Schulte b6e9c6a996 babel: variables can now accept null literal values
* lisp/babel/ob-exp.el (org-babel-exp-results): now checking to see if
  return value of `org-babel-ref-literal' is equal to the null
  indicator flag -- meaning it's now possible to accept a value of
  null

* lisp/babel/ob-ref.el (org-babel-ref-parse):  now checking to see if
  return value of `org-babel-ref-literal' is equal to the null
  indicator flag -- meaning it's now possible to accept a value of
  null

  (org-babel-ref-literal): now returning a null indicator flag when
  the value is *not* a literal value, meaning it is possible to pass
  in a literal value of null
2010-06-23 15:57:38 -07:00
Eric Schulte 6da29f1519 integrating org-babel into org.el 2010-06-23 13:41:20 -07:00
Eric Schulte 3beba02e1e Merged w/master 2010-06-23 11:20:49 -07:00
Carsten Dominik 92d69c7cf7 Keep byte compiler happy 2010-06-23 17:41:24 +02:00
Carsten Dominik a46e01358e Org Capture: Make ?q abort, and allow to specify the line position in table 2010-06-23 17:16:44 +02:00
Carsten Dominik fb46cf11d3 Make the link properties from org-protocol work in capture 2010-06-23 16:21:22 +02:00
Sebastian Rose 99e7f33f0a New implementation of the Org remember process ready for comments and testing
Carsten Dominik <carsten.dominik@gmail.com> writes:
> 3 Why a new name?
> ~~~~~~~~~~~~~~~~~~
>
>   I have - at least for now - chosen a new name for the new setup:
>  ` org-capture'.  There are two reasons for this:

In the manual it is "Capture - Refile - Archive".  I remember searching
for "Remember" and never found it :)

> 5 Setup
> ~~~~~~~~
>
>   To use the new setup, do the following:
>
>   1. Run
>
>      M-x org-capture-import-remember-templates RET

Worked perfectly here :)

I tested all my important templates and they work.
Abandoning org-remember seems painless.

>    '(("t" "templates adding table lines")
>      ("ta" "add to table a" table-line (file+headline "~/notes.org" "Table A))
>      ("tb" "add to table b" table-line (file+headline "~/notes.org" "Table B))
>      ("tc" "add to table c" table-line (file+headline "~/notes.org" "Table C)))
>
>    When starting capture, you can then first press "t" and then see
>    the individual options.

This is great.  Number of templates is constantly growing and the new
features will increase the speed of this process.

> 7 Request for comments
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.

Good track I guess.

Here's the tested and working patch for org-protocol.el.

To use `org-remember' and/or `org-capture' alike, copy your org-remember
link and change

   javascript:location.href='org-protocol://remember://'+...

to

   javascript:location.href='org-protocol://capture://'+...

The template char used is the same for both --- which is OK for me, but
could be changed.
2010-06-23 16:05:33 +02:00
Carsten Dominik c303801202 Fix typo 2010-06-23 13:26:58 +02:00
Carsten Dominik 94e76bd7e2 Remove forgotten (debug) form 2010-06-23 10:37:11 +02:00
Carsten Dominik fab06f5463 Implement aborting a capture note with `C-c C-k' 2010-06-23 10:36:42 +02:00
Carsten Dominik 85e6bb964d Improve importing of remember templates into org-capture
Tassilo Horn had set org-remember-default-headline to `bottom', and
the importer did not handle this special case.
2010-06-23 08:41:14 +02:00
Carsten Dominik 19602fa56e Fix minor bugs in org-capture.el, and keep byte-compiler happy 2010-06-23 07:39:56 +02:00
Carsten Dominik 2ea8652235 Minor fixes to org-capture.el 2010-06-23 06:24:26 +02:00
Eric Schulte 3429a496a3 merged with master 2010-06-22 11:55:19 -07:00
Eric Schulte b816a85ac0 babel: wrapped org-babel-params-from-buffer' in save-match-data'
* lisp/babel/ob.el (org-babel-params-from-buffer): wrapped in
  save-match-data
2010-06-22 11:46:49 -07:00
Carsten Dominik 80bcadf605 Fix behavior of org-timestamp-change for explicit number of day changes
* lisp/org.el (org-timestamp-change): New optional argument UPDOWN.
Use this to identify calls from org-timestamp-up/down, so that we can
skip by rounding minutes in this case.
(org-timestamp-up):
(org-timestamp-down):
(org-timestamp-up-day):
(org-timestamp-down-day): Call org-timestamp-change with the
updown argument.

This function used to look only if there was a prefix argument in the
current interactive call.  Now we have an explicit marker indicating
that the function is called from the updown commands.
2010-06-22 16:14:55 +02:00
Carsten Dominik 36b6471858 Merge branch 'improve-todo-match-documentation' 2010-06-22 14:47:45 +02:00
Carsten Dominik 2e73ce2177 Clarify that TODO matches only match not-DONE states by default
Bernt Hansen writes:

> I was talking to Jeff Stern about tags todo matching offlist and we
> think the documentation for tags-todo matching can probably be improved.
>
> The description of C-c a M at
> http://orgmode.org/manual/Matching-tags-and-properties.html
> states
>
> C-c a M
>
>    Like C-c a m, but only select headlines that are also TODO items and
>    force checking subitems (see variable
>    org-tags-match-list-sublevels). To exclude scheduled/deadline items,
>    see the variable org-agenda-tags-todo-honor-ignore-options. Matching
>    specific TODO keywords together with a tags match is also possible,
>    see Tag searches.
>
> When I read this I think TODO items is any todo keyword but this isn't
> the case.  It is only non-done TODO state keywords.  This makes
> tags-todo matching not work for finding tasks to archive (normally
> DONE | CANCELLED keywords in my setup)
>
> Should we explicitly state that 'headlines that are also TODO items'
> does not match DONE state keywords?  Or alternatively should TODO items
> and DONE items be separate (and explicitly defined) in the documentation
> -- like org-todo-keywords and org-done-keywords?
>
> I still think 'TODO keyword' matches any todo keyword defined in
> org-todo-keywords and maybe I need to be re-educated :)

Bernt is right, and this patch tries to clarify the issue.
2010-06-22 14:47:37 +02:00
Carsten Dominik b67492596a Merge Glen Morris' change from downstream Emacs 2010-06-22 14:42:45 +02:00
Carsten Dominik 0c4e2ab0ed Add autoloads for org-capture 2010-06-22 14:29:13 +02:00
Carsten Dominik 1d52e54efd New capture system org-capture
* lisp/org-agenda.el (org-agenda-action): Make `c' key call org-capture.
* lisp/org-capture.el: New file.
* lisp/org-compat.el (org-get-x-clipboard): Function moved here from
remember.el.
* lisp/org-mks.el: New file
* lisp/org.el (org-set-regexps-and-options): Allow statistic cookies as
part of complex headlines.
(org-find-olp): New argument THIS-BUFFER.  When set, assume that the
OLP does not contain a file name.
2010-06-22 14:19:18 +02:00
Carsten Dominik eade8e6fa3 Revert "* lisp/org-agenda.el (org-agenda-get-deadlines):"
This reverts commit 14b689946d.

See discussion in

   http://thread.gmane.org/gmane.emacs.orgmode/26154/focus=26400
2010-06-21 15:18:36 +02:00
Carsten Dominik af90fb1e4c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-18 09:51:36 +02:00
Carsten Dominik 42ea7d35b7 No longer define comments in the syntax table
* lisp/org.el (org-mode): Set `comment-start' instead of changing the
syntax of the `#' character.

Leo writes:

> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary) solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
2010-06-18 09:10:44 +02:00
Carsten Dominik c201da51b8 Fix source code example bug with plain list export to HTML
* lisp/org-exp.el (org-export-format-source-code-or-example): Mark examples
by a property. o
* lisp/org-html.el (org-export-html-close-lists-maybe): Check if raw
HTML stuff was actually made from an example

Daniel Mahler writes:

> 2. I would like to embed source blocks in numbered lists, without
> breaking the numbering ie:
>
>    1) get ready
>     #+BEGIN_SRC sh
>    get_ready
>     #+END_SRC
>    2) go
>     #+BEGIN_SRC sh
>    go
>     #+END_SRC
>
>    currently the src blocks cause the numbering to reset, so all
> items in a sequence like this are numbered 1

This patch fixes this issue - but I cannot say anymore why the code in
org-export-html-close-lists-maybe does in fact work.  The code looks
wrong, but it seems to work.  What looks wrong is that i does not
check for the true indentation in the case when the line is not
protected.  It must be that this case is covered by some other code
further down in the exporter.
2010-06-18 08:49:25 +02:00
Eric Schulte 0d1aaf735f babel: declaring variable to satisfy compiler 2010-06-17 18:15:36 -07:00
Eric Schulte ffbeb7ffe6 babel: languages adding their extensions to `'org-babel-tangle-lang-exts' 2010-06-17 18:15:35 -07:00
Eric Schulte 752a59c58f babel: ensure no whitespace in language names
* lisp/babel/ob.el (org-babel-src-block-regexp):
  ensure no whitespace in language names

  (org-babel-inline-src-block-regexp):
  ensure no whitespace in language names
2010-06-17 18:15:35 -07:00
Eric Schulte 97ead27f78 babel: remove all language file reference to define language variables 2010-06-17 18:15:35 -07:00
Eric Schulte 9ae48928ca babel: removed ob-interpreters variable -- more natural evaluation decisions
Babel will now try to evaluate any source code block for which the
  required language-specific functions are defined.
2010-06-17 18:15:35 -07:00
Eric Schulte c981f6d697 babel: simplifying handling of tangle langs
- Removed the org-babel-tangle-langs variable.
  - Added the org-babel-tangle-lang-exts alist for associating
    languages with file extensions
  - Comments now only added when the :comments header argument is set
    to yes

* lisp/babel/ob-tangle.el (org-babel-tangle-w-comments):
  this is now a defcustom

  (org-babel-tangle-lang-exts): alist associating languages with file
  extension, this is also a defcustom

  (org-babel-spec-to-string): no longer using the complex tangle-lang
  variables
2010-06-17 18:15:35 -07:00
Eric Schulte 4482058c0c babel: some final compiler tweaks -- no more compiler warnings 2010-06-17 18:15:35 -07:00
Eric Schulte 32c985ffd9 babel: more compiler cleanup -- now only throwing 1 warning (which doesn't make sense anyways) 2010-06-17 18:15:35 -07:00
Eric Schulte a86734f526 babel: eliminated compiler warning about `org-babel-get-src-block-info' 2010-06-17 18:15:35 -07:00
Eric Schulte 5769cccd6a babel: ob-sqlite now handles column names
* lisp/babel/langs/ob-sqlite.el (org-babel-execute:sqlite):
  now handling column names

  (org-babel-sqlite-offset-colnames): now handling column names
2010-06-17 18:15:34 -07:00
Eric Schulte 7513cdb12a ob-sqlite.el -- sqlite3 support to org-babel
* lisp/babel/langs/ob-sqlite.el: sqlite3 support for org-babel
2010-06-17 18:15:34 -07:00
Eric Schulte b329b7a736 babel: uniform declare-function placement at the tops of files 2010-06-17 18:15:34 -07:00
Eric Schulte e853f11899 ob-sh: adding check of existence for session variable 2010-06-17 18:15:34 -07:00
Eric Schulte 292799681e babel: pre-setting variable for compiler
* lisp/babel/ob.el (call-process-region): declaring
  call-process-region as a variable so that we can set it's value
  later
2010-06-17 18:15:34 -07:00
Eric Schulte df5f954c79 babel: swapping function order to appease the compiler
* lisp/babel/ob-tangle.el (org-babel-spec-to-string): swap flet and
  let order to make compiler happy
2010-06-17 18:15:34 -07:00
Eric Schulte 0751f2ebfa fixes 2010-06-17 18:15:34 -07:00
Eric Schulte 892292c2d9 better initialization for call-process-region 2010-06-17 18:15:33 -07:00
Eric Schulte ca3f3baca6 remember the ob-comint-with-output is a macro 2010-06-17 18:15:33 -07:00
Eric Schulte 116d9cfa85 ob: adding ob-init.el to load everything 2010-06-17 18:15:33 -07:00
Eric Schulte b746686dfe ob-sh: should say declare-function not defun-function 2010-06-17 18:15:33 -07:00
Eric Schulte 0e939a7df5 babel: more compiler satisfaction 2010-06-17 18:15:33 -07:00
Eric Schulte b9a8df9d1c babel: defvar'ing `org-babel-library-of-babel' for compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 0dabebc444 babel: eval-when-compile for 'cl in more babel files 2010-06-17 18:15:33 -07:00
Eric Schulte 6fa2ab7eac babel: replacing functions like "fifth" with "nth 4" 2010-06-17 18:15:33 -07:00
Eric Schulte defa2dcb2f babel: declaring functions and variables for the compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 75a82240c6 babel: correct function name in reference resolution
* lisp/babel/ob-ref.el (org-babel-ref-resolve-reference): correcting
  mis-named function org-babel-read-file to org-babel-read-link
2010-06-17 18:15:33 -07:00
Eric Schulte 49e90002dc babel: define variables before their first use
* lisp/babel/ob.el (org-babel-interpreters): define this before it is
  first used

* lisp/babel/ob.el (org-babel-call-process-region-original): define
  this before it is first used
2010-06-17 18:15:33 -07:00
Eric Schulte 2dc30adf15 babel: call-process-region-original is no longer a free variable
* lisp/babel/ob.el (org-babel-execute-src-block):
  call-process-region-original is no longer free

  (org-babel-org-babel-call-process-region-original):
  call-process-region-original is no longer free and is now renamed
  org-babel-call-process-region-original
  (org-babel-tramp-handle-call-process-region):
  call-process-region-original is no longer free
2010-06-17 18:15:32 -07:00
Eric Schulte ea8565e2ed babel: replaced save-excursion' with with-current-buffer'
* lisp/babel/ob.el (org-babel-expand-noweb-references):
  `save-excursion' is not longer defeated by `set-buffer'
2010-06-17 18:15:32 -07:00
Eric Schulte e0b71bf8e2 babel: wrapping free language variable in result insertion code
* lisp/babel/ob.el (org-babel-execute-src-block): now passing
  additional optional argument to `org-babel-inert-results'

  (org-babel-insert-result): now accepting additional language
  variable
2010-06-17 18:15:32 -07:00
Eric Schulte 45841a8a9d babel: ensure org-babel-interpreters' is defined before org-babel-add-interpreter'
* lisp/babel/ob.el: ensure `org-babel-interpreters' is defined before `org-babel-add-interpreter'
2010-06-17 18:15:32 -07:00
Eric Schulte 6be47552ea babel: org-babel-comint-with-output' no longer assumes full-body' variable
* lisp/babel/ob-comint.el (org-babel-comint-with-output):
  Fixed egregious oversight in which we were assuming that the
  `full-body' variable would be in scope at the time of macro
  execution.  Thanks to the compiler for finding this bug.

* lisp/babel/langs/ob-R.el (org-babel-R-evaluate): now using the fixed
  `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-haskell.el (org-babel-execute:haskell): now
  using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ocaml.el (org-babel-execute:ocaml): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-octave.el (org-babel-octave-evaluate-session):
  now using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-python.el (org-babel-python-evaluate): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ruby.el (org-babel-ruby-evaluate): now using the
  fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-sh.el (org-babel-sh-evaluate): now using the
  fixed `org-babel-comint-with-output' macro
2010-06-17 18:15:32 -07:00
Eric Schulte 8e0faf35de ensuring the existence of a complete first sentence in the documentation of each babel function 2010-06-17 18:15:32 -07:00
Eric Schulte 0738893160 updating require and provide boilerplate for new ob* files 2010-06-17 18:15:32 -07:00
Eric Schulte 904bdaff9a ob.el now adds the lisp/langs/ directory to the load path 2010-06-17 18:15:32 -07:00
Eric Schulte 96e396ba77 new header for ob.el 2010-06-17 18:15:32 -07:00
Eric Schulte e0e4d76094 renaming all org-babel* function to ob* to conform with Emacs conventions 2010-06-17 18:15:32 -07:00
Eric Schulte 04152d3a06 moving org-babel into the main org-mode lisp directory
we are keeping two things in the contrib directory

  1) the library-of-babel.org file, this is with the goal of lowering
     the barrier of entry for contribution of functions to the library
     of babel

  2) we are also keeping a langs directory in the contrib directory
     because some language files do not have FSF copyright assignment
     -- current org-babel-oz.el is the only such file
2010-06-17 18:15:32 -07:00
Christian Egli d75f20ffc2 Newer Emacsen changed the API of start-process-shell-command and issue
a warning if called with more than 3 args.
2010-06-17 17:50:24 -04:00
Eric Schulte 18810580f5 removed 'cl functions from org-exp.el to assuage elisp compiler 2010-06-17 10:27:58 -07:00
Bastien Guerry 47996c02cb Fix and improve list exporting to latex.
* lisp/org-latex.el: items are no longer skipped when their first line
  ends on a protected element.
* lisp/org-list.el: protected environments looking like lists are not
  exported anymore.

Thanks to Nicolas Goaziou <n.goaziou@gmail.com> for this patch.
2010-06-16 21:26:49 +02:00
Eric Schulte f6e4790099 org-exp-blocks: cleanup trailing newline after block
* lisp/org-exp-blocks.el (org-export-blocks-preprocess):
  cleanup trailing newline after block
2010-06-16 10:23:39 -07:00
Bastien Guerry 8ac7e4800c Fix comments export in latex.
* lisp/org-exp.el: comment regexp now matches documentation. No more
protection check when deleting comments before export.

Thanks to Nicolas Goaziou <n.goaziou@gmail.com> for this patch.
2010-06-16 18:14:28 +02:00
Bastien Guerry 5633f7084a org-exp: now recursively resolve #+INCLUDE: files in a safe way
* lisp/org-exp.el (org-export-preprocess-string):
  now using `org-export-handle-include-files-recurse' to resolve
  included files

  (org-export-handle-include-files): now returns a list of the
  included files

  (org-export-handle-include-files-recurse): recursively calls
  `org-export-handle-include-files' while checking to see if the
  process has entered an infinite loop.

Thanks to Eric Schulte for this patch.
2010-06-16 18:13:13 +02:00
Bastien Guerry cdee45fa21 org.el (org-display-inline-images): allow more characters for image filenames.
Thanks to gregory@dynapse.com (Gregory J. Grubbs) for this patch.
2010-06-16 16:27:17 +02:00
Bastien Guerry 14b689946d * lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is.  If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date.  This makes it
much more obvious when you missed a repeating task after the repeater.

Thanks to Bernt Hansen for this patch.
2010-06-16 16:12:31 +02:00
Bastien Guerry 359a6bd8be * org-exp.el (org-export-mark-blockquote-verse-center):
Consider environments that end at eob.

Thanks to David Maus for this patch.
2010-06-16 16:08:23 +02:00
Mikael Fornius 8759a77a39 Do not fontify subscripts of property keys.
* org.el (org-raise-scripts): Do not fontify sub/superscripts of text
with face `org-special-keyword'. Makes property keys as :LAST_REPEAT:
display correctly.
2010-06-16 02:17:06 -04:00
Mikael Fornius 4de326196a Use save-match-data macro instead of let.
* org.el (org-at-property-p): Use save-match-data macro instead of let.
2010-06-16 02:17:06 -04:00
Mikael Fornius 2560f72c33 Removed unused test function.
* org.el (test): Removed unused test function.
2010-06-16 02:17:06 -04:00
Sebastian Rose 2700ec42c7 possible Bug: non-interactive publishing (emacs 22.1)
This patch fixes batch-mode publishing. Tested in emacs24 like this:

   sh$   emacs -q -batch --eval='(org-publish "PROJECT_NAME" t)'
2010-06-16 02:17:05 -04:00
Martin Pohlack d18653505d Add modification hook for inline images
This patch adds a modification hook to remove inline-image overlays if
the underlying text is modified.  This prevents blind editing of text
behind images.
2010-06-16 02:17:05 -04:00
Eric Schulte e55c7d8b44 org-exp-blocks: fixed typo
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): fixed typo
2010-06-15 16:20:17 -07:00
Eric Schulte 67e16095f4 org-exp-blocks: now running the previously unhooked org-export-blocks-postblock-hook
* lisp/org-exp-blocks.el (org-export-blocks-postblock-hook): adding
  documentation to and turning into a defcustom

  (org-export-blocks-preprocess): actually running the
  `org-export-blocks-postblock-hook' hook after preprocessing
2010-06-15 15:54:52 -07:00
Eric Schulte e9b132d8ba fixed #+include file bug when :prefix was nil but :prefix1 was set
* lisp/org-exp.el (org-get-file-contents): by un-setting prefix1 to ""
  instead of to nil we avoid errors when :prefix1 is defined, but
  prefix is not.
2010-06-13 14:27:49 -07:00
Nicolas Goaziou 33445118cf org-latex.el : do not protect environments already protected.
Environments coming from latex backend specific instructions (#+LaTeX)
are already protected and won't be treated as normal environments.

* lisp/org-latex.el (org-export-latex-preprocess): Environments coming
  from latex backend specific instructions (#+LaTeX) are already
  protected and won't be treated as normal environments.
2010-06-13 09:20:09 -07:00
Eric Schulte d3b7952159 Fix typo in documentation
thanks to Puneeth Chaganti for the patch
2010-06-12 10:46:12 -07:00
Christian Egli 373199319a Merge branch 'master' into taskjuggler-export 2010-06-08 15:22:04 +02:00
Christian Egli e1de4db669 Avoid compiler warnings about reference to free variable `old-level' 2010-06-08 15:13:50 +02:00
Carsten Dominik deef19a786 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2010-06-08 12:05:52 +02:00
Bastien Guerry a85cb37d47 * org-timer.el (org-timer-set-timer): Fix typo in the docstring. 2010-06-08 09:35:07 +02:00
Christian Egli 8b7fd7d8ae Added taskjuggler export to the export dispatcher 2010-06-08 09:20:34 +02:00
Christian Egli 421423f0c2 Add a TODO about supporting SCHEDULED and DEADLINE information 2010-06-08 09:20:34 +02:00
Christian Egli c012637555 Add some documentation. 2010-06-08 09:20:33 +02:00
Christian Egli 68068aa661 Do not use the ID property frivolously
use a property named "task_id" instead as we do not search for task
ids across files. For resources use a property named "resource_id" or
only as a fall back the ID property.

Also issue a warning if a dependency cannot be resolved.
2010-06-08 09:20:33 +02:00
Christian Egli 399844ee52 Add more documentation about resource id generation 2010-06-08 09:20:33 +02:00
Christian Egli 5c89333555 Fix a typo 2010-06-08 09:20:33 +02:00
Christian Egli aae9115938 Make export work even if `org-odd-levels-only' is in use 2010-06-08 09:20:33 +02:00
Christian Egli 1a2229d785 Fail more gracefully if no tasks are defined 2010-06-08 09:20:33 +02:00
Christian Egli 97f3465176 Add some documentation about optional attributes for dependencies 2010-06-08 09:20:33 +02:00
Christian Egli d6de24e44b Added support for optional depends attributes 2010-06-08 09:20:33 +02:00
Christian Egli 020731ec2c Layout fixes 2010-06-08 09:20:33 +02:00
Christian Egli 4baa13b981 Add a changelog entry for org-taskjuggler 2010-06-08 09:20:33 +02:00
Christian Egli f6cb86ee5b Improve the documentation 2010-06-08 09:20:33 +02:00
Christian Egli a81d93a355 Do not treat the limits attribute any different than the others
i.e. you have to specify the limits attribute with {} so that
taskjuggler understands it properly. This is for the sake of
consistency.
2010-06-08 09:20:33 +02:00
Christian Egli f8fa4a2b3b Add some TODOs 2010-06-08 09:20:33 +02:00
Christian Egli f2d66428b4 Add usage documentation 2010-06-08 09:20:33 +02:00
Christian Egli d073c313aa Fix a problem with effort calculation based on hh:mm efforts 2010-06-08 09:20:33 +02:00
Christian Egli 3e0ce7b355 Make sure the reports are more flexible by changing the loadunit to shortauto 2010-06-08 09:20:33 +02:00
Christian Egli 1990e40816 Change the default project and resource tag to something that org mode accepts 2010-06-08 09:20:33 +02:00
Christian Egli 79b15d1073 changed some defcustom to contain more sensible values 2010-06-08 09:20:33 +02:00
Christian Egli 8e8bd469db Use a let instead of calculating a value twice. 2010-06-08 09:20:32 +02:00
Christian Egli c1508e9310 Add support for handling of multiple attributes values in the same node
e.g. multiple shift definitions in a resource are now properly
handled.
2010-06-08 09:20:32 +02:00
Christian Egli 24745790a2 Convert org priority properly to taskjuggler priority 2010-06-08 09:20:32 +02:00
Christian Egli 68cb44ccd4 Simplify the calculation of the project end 2010-06-08 09:20:32 +02:00
Christian Egli 96c3c0c194 Fix a bug with project end calculation and refactor attribute insertion
- Attributes are now insetred generically based on an item (resource
  or task) a list of attrbutes
- project end is now solely calculated and no longer inserted in the
  node
2010-06-08 09:20:32 +02:00
Christian Egli 5458afe24b Fix an error with unique id calculation 2010-06-08 09:20:32 +02:00
Christian Egli fd89c73c6a Add support for more resource attributes 2010-06-08 09:20:32 +02:00
Christian Egli 020bb514a4 Integrate org-taskjuggler in the rest of org-mode 2010-06-08 09:20:32 +02:00
Christian Egli 84de8a85f6 Add support for global properties 2010-06-08 09:20:32 +02:00
Christian Egli 3a30bc763b Some small correction from the imperative to a more functional style
after some reading of sicp
2010-06-08 09:20:32 +02:00
Christian Egli aa1a0daac2 Fix a problem with path calculation when the level is lowering 2010-06-08 09:20:32 +02:00
Christian Egli 4e988afcf1 Improve the default resource allocation graph 2010-06-08 09:20:32 +02:00
Christian Egli d01a04a269 Update TODOs to reflect the fact that dependencies are done 2010-06-08 09:20:32 +02:00
Christian Egli d783157907 Slightly change the default reports 2010-06-08 09:20:32 +02:00
Christian Egli 5841a1f469 Add support for explicit dependencies 2010-06-08 09:20:32 +02:00
Christian Egli 8d42317b4c Add more documentation 2010-06-08 09:20:31 +02:00
Christian Egli fcf43d1e94 Add some documentation 2010-06-08 09:20:31 +02:00
Christian Egli fd22a6f4e0 Derive completeness info from TODO state 2010-06-08 09:20:31 +02:00
Christian Egli d437e01372 Add TODO items and fix a problem with unique id assignment 2010-06-08 09:20:31 +02:00
Christian Egli cae01fcbed Map more resource attributes 2010-06-08 09:20:31 +02:00
Christian Egli b3a244baa8 Assign unique ids to resources 2010-06-08 09:20:31 +02:00
Christian Egli d0556719b9 Fix the id generation of a project 2010-06-08 09:20:31 +02:00
Christian Egli e0e433f1d7 Make sure the unique id resolving works 2010-06-08 09:20:31 +02:00
Christian Egli b8e9c4a11b Major overhaul. ORDERED dependencies sort of work 2010-06-08 09:20:31 +02:00
Christian Egli 01d0aab493 Add a command to open the project with TaskJugglerUI 2010-06-08 09:20:31 +02:00
Christian Egli 0b0ada4beb Add support for inserting and defining reports 2010-06-08 09:20:31 +02:00
Christian Egli 2b906dcfd7 Use cl function to increment a variable 2010-06-08 09:20:31 +02:00
Christian Egli 91246da189 Use the first resource for default allocations 2010-06-08 09:20:31 +02:00
Christian Egli 21b1713c64 Added an exporter to produce taskjuggler files 2010-06-08 09:20:31 +02:00
Eric Schulte cdc70ed68d color indented babel strings -- srcname, source, results, result, and call 2010-06-07 18:10:47 -07:00
Carsten Dominik b27c1c5113 Fix whitespace problems 2010-06-07 08:35:10 +02:00
Carsten Dominik 0d0dc0acb4 Do not format sub- and superscripts in links
* lisp/org.el (org-raise-scripts): Do not act in links.

Matt Lundin writes:

> Git commit 70d24c5d03 causes underscores
> in hyperlinks to display parts of link and description as subscripts.
> E.g., this link...
>
> [[http://www.samplepage.com/an_underscore][Some description words]]
>
> ...displays the word "Some" in the description as a subscript. With M-x
> visible-mode, the substring "underscore][Some" is displayed as a
> subscript.
2010-06-07 05:54:41 +02:00
Carsten Dominik 79b8411669 Fix bug with protected examples that look like table lines
* lisp/org-exp.el (org-export-remove-special-table-lines): Only fix table
lines that are not protected text.

Giovanni Moretti writes:

> I'm working up a presentation on orgmode for a local club and needed
> to prefix it with a brief emacs overview, and so included this:
>
> #+BEGIN_EXAMPLE
>                      ctrl-P (previous line)
>                           |
>                           |
> Ctrl-A <<<  Ctrl-B <---- o ----> Ctrl-F >>>  Ctrl-E
> Col 1      back char      !       fwd char        EOL
>                           !
>                      ctrl-N (next line)
> #+END_EXAMPLE
>
> :                       ctrl-P (previous line)
> :                            |
> :                            |
> : Ctrl-A <<<  Ctrl-B <---- o ----> Ctrl-F >>>  Ctrl-E
> : Col 1       back char      |       fwd char        EOL
> :                            |
> :                       ctrl-N (next line)
>
> I'm using Orgmode v6.36c and when exporting to HTML (and LaTex
> Beamer), the two lines containing the single vertical bar immediately
> below the "ctrl-P" line in the #+EXAMPLE block vanish, whereas using
> the alternate colon at the beginning of the line notation, the
> rendering is as expected.
>
> Interestingly, enabling the +n option (#+BEGIN_EXAMPLE +n) causes the
> missing lines (lines 2 & 3) to reappear.
2010-06-07 05:53:12 +02:00
Carsten Dominik 28babd4dff Better recognizing of source code snippets
* lisp/org.el (org-edit-special): Make sure source code editing goes
before table formula editing.
* lisp/org-table.el (org-table-fedit-map): "C-c '" will now also exit
the formula editor.
2010-06-06 12:51:27 +02:00
Dan Davison cab9fefbf9 Read-only src buffers
Carsten Dominik <dominik@uva.nl> writes:

> Hi Dan,
>
> after a long time, I tried to edit a fixed width region today.
> So I entered
>
>  : a
>  : b
>  : c
>
> and pressed "C-c '" in there.  The edit buffer came up in
> read-only mode, which should not be so.
>
> Also, when I do "C-c '" in an empty line, it used to be the case
> that I get an empty artist buffer which I can then edit.  Also this
> buffer comes up as read-only.
>
> I suspect that this has to do with the changes you made for read-only
> view buffers.  Before I dive into this issue myself, maybe it will be
> much
> easier if you do this?

Hi Carsten,

You're right that it dates from then. Here's the fix I suggest. I've
tested that this results in writable fixed-width edit buffers, writable
src edit buffers, and non-writable babel preview buffers.

Dan

--8<---------------cut here---------------start------------->8---
commit ed4eb9d150
Author: Dan Davison <davison@stats.ox.ac.uk>
Date:   Sat Jun 5 12:35:19 2010 +0100

    * lisp/org-src.el: Prevent fixed-width region edit buffers
    being created as read-only.

	Modified lisp/org-src.el
2010-06-05 14:31:35 +02:00
Carsten Dominik f70956ff5a Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-04 21:02:41 +02:00
Bernt Hansen dc602f3b2e Emacs 22 support - use org-string-match-p
* contrib/lisp/org-special-blocks.el (org-special-blocks-make-special-cookies):
Emacs 22 doesn't have string-match-p
* lisp/org-freemind.el (org-freemind-write-mm-buffer):
(org-freemind-get-node-style):
Emacs 22 doesn't have string-match-p
* lisp/org-html.el (org-html-make-link):
Use new org-string-match-p for compatibility
2010-06-04 21:01:29 +02:00
Eric Schulte c2c3e98004 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-04 07:31:58 -06:00
Carsten Dominik add40f96f1 Stop iCalendar export from failing with sexp dates
* lisp/org-icalendar.el (org-ical-ts-to-string): Catch error when
parsing tie string.
2010-06-04 13:13:54 +02:00
Carsten Dominik 1eb974ed62 Fix problem with calendar popping up in a different frame
* lisp/org.el (org-read-date): Bind `calendar-setup' to nil for the
scope of this command.
2010-06-04 12:57:39 +02:00
Carsten Dominik 420dd96768 Fix the date prompt for american-style dates
* lisp/org.el (org-read-date-analyze): Fix regular expression for
matching american dates

Daniel E. Doherty writes:

> In playing around with the date prompt (C-.), I ran across the following
> puzzling behavior from rather simple inputs.
>
> I entered the following on June 1, 2010.  Here is a date entered as
> "3/15": <2011-03-15 Tue>.  It interpreted it as the upcoming March 15 as
> expected.
>
> But here is a date entered as "5/21": <2021-06-05 Sat>.  Note how it
> interpreted the "21" as the year 2021, not at all what I expected from
> the documentation or the analogous "3/15" example.
>
> Maybe there is some underlying logic here that I'm not getting.  Perhaps
> it has to do with how 2-digit years are interpreted?
>
> What's going on here?  I am using org-version 6.36trans on emacs 23.1.

What was going on here is that the regular expression for matching
american-style dates was wrong.  It was looking for month numbers in
the second field and day numbers in the first field - wrong, of
course.
2010-06-04 12:35:41 +02:00
Carsten Dominik 6bad6fc737 Fix some issues in the entity and subscript code
* lisp/org-macs.el (org-rm-props): Add org-emphasis to the properties
that must be removed.
* lisp/org.el (org-do-emphasis-faces): Add org-emphasis property to
items that have emphasis done wit font-lock.
(org-fontify-entities): Do not do anything in commented lines.
(org-unfontify-region): Decompose the region as well, because we do
composition during font-lock.
(org-raise-scripts): Do nothing inside an emphasis string.

Reported by Eric Fraga in http://article.gmane.org/gmane.emacs.orgmode/25940
2010-06-04 08:25:50 +02:00
Carsten Dominik 48dfb47f52 Introduce a help function for entities
* lisp/org-entities.el (org-entities-help): New command.
2010-06-03 18:17:08 +02:00
Carsten Dominik 73f04ce48e Fix clickable images in HTML export
* lisp/org-html.el (org-export-as-html): Add the code to create
clickable images.
2010-06-03 10:27:58 +02:00
Carsten Dominik 0618aeafb3 Make raising and lowering not mess up table alignment
* lisp/org-compat.el (org-string-match-p):
(org-looking-at-p): New functions.
* lisp/org-table.el (org-table-align): Handle raised text with
invisible characters.
* lisp/org.el (org-script-display): Add raise properties for tables.
(org-raise-scripts): Handle raising differently inside tables.

Pretty display of subscripts and superscripts no longer messes up
table alignment.  This is achieved by two things:

1. Inside tables, the raised characters are not made smaller, they
   remains at the same size.  Instead they are raise/lowered more, by
   a full half character height to still be clearly readable as
   subscript or superscript.

2. The invisible characters are taken into account when computing the
   field width.
2010-06-03 10:24:04 +02:00
Carsten Dominik fd1d2992f6 Make it possible to protect hidden subtrees to be killed by `C-k'
* lisp/org.el (org-ctrl-k-protect-subtree): New option.
(org-kill-line): Protect hidden subtrees if the user wants it.
* doc/org.texi (Headlines): Mention the special behavior of C-k
in headlines.

Scott Otterson writes:

> For what must be the dozenth time, I've just accidentally deleted a
> large tree by typing C-k while in a headline.
>
> This is really easy to do because emacs users have "C-k deletes to the
> end of the line" worn deeply into their neural pathways -- it's so
> automatic for me that the keystroke is close to subconscious.  A
> mistaken C-k is especially hard to detect because org-mode displays
> the result exactly like what your subconscious expects, that is, a
> collapsed headline is deleted to the end -- and the tree underneath is
> wiped out with no noticeable warning.
>
> Feature request: add an option preventing tree deletion with C-k
> without user confirmation.  Actually, I'd like an option to prevent it
> period.
>
> If this option is already in there, then you're encouraged to tell me
> to RTFM.  But then also please tell me where it is, because I can't
> find it.

Carsten replies

> This is now possible due to the variable
> `org-ctrl-k-protect-subtree'.  But I predict that you are going to set
> it to nil again soon :D
2010-06-03 00:18:44 +02:00
Carsten Dominik 70d24c5d03 Implement pretty display of sub- and superscripts.
* doc/org.texi (Subscripts and superscripts): Document that `C-c C-x \'
will also format sub and superscripts.
* doc/orgcard.tex: Document that `C-c C-x \'
will also format sub and superscripts.
* lisp/org.el (org-use-sub-superscripts):
(org-pretty-entities-include-sub-superscripts): Move here from
org-exp.el.
(org-set-regexps-and-options): Parse subscript option and set
`org-use-sub-superscripts' as a local variable.
(org-match-sexp-depth):
(org-create-multibrace-regexp):
(org-match-substring-regexp):
(org-match-substring-with-braces-regexp): Moved here from org-exp.el
(org-set-font-lock-defaults): Call `org-raise-scripts'.
(org-remove-font-lock-display-properties): New function.
(org-unfontify-region): Call
`org-remove-font-lock-display-properties'.
(org-script-display): New constant.
(org-raise-scripts): New function.

When turning on entity display with `C-c C-x \', sub- and superscripts
will also be displayed in a smaller font, and raised/lowered.
2010-06-03 00:06:19 +02:00
Eric Schulte c4d385681f make org-show-block-all interactive as is org-hide-block-all 2010-06-02 15:03:53 -06:00
Carsten Dominik 31a9b70dfb Fix indentation 2010-06-02 15:02:36 +02:00
Carsten Dominik 5f23a22959 Fix whitespace issues 2010-06-01 17:16:37 +02:00
Carsten Dominik bc53b3da3b Minor fixes
* lisp/org-latex.el (org-export-latex-fontify): Avoid fontifying
several stars in a row.
* lisp/org.el (org-emphasis-alist): Mention
`org-export-docbook-emphasis-alist' in the docstring.
2010-06-01 09:43:03 +02:00
Carsten Dominik d34786f227 Move a function to org.el
* lisp/org.el (org-find-olp): Move the function here, from org-mobile.el
2010-05-31 18:57:01 +02:00
Carsten Dominik ea3cdc75f8 Improve MobileOrg documentation
* doc/org.texi (MobileOrg): Improve documentation about MobileOrg,
move all webdav server configuration to the FAQ.
2010-05-31 09:14:58 +02:00
Carsten Dominik 27ec3527f2 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-30 22:17:40 +02:00
Carsten Dominik b1b066b5f7 Fix some customization issues in org-beamer.el patch by Jan Moringen
* lisp/org-beamer.el (org-beamer-column-view-format):
(org-beamer-themes): Allow nil value, fix customize tags
(org-insert-beamer-options-template): Handle nil values of theme and
column view format.
2010-05-30 22:17:29 +02:00
Tassilo Horn 185625c810 org-gnus.el: Mention also Gmane in org-gnus-prefer-web-links
* org-gnus.el (org-gnus-prefer-web-links): Mention also Gmane
in the doc string.
2010-05-28 15:46:37 -06:00
David Maus 963f830b2e Escape percent character.
* org.el (org-fixup-message-id-for-http): Escape percent
character.
2010-05-28 15:46:32 -06:00
Carsten Dominik a082001643 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-28 17:34:12 +02:00
Carsten Dominik e90fe668ac Rename org-beamer-settings-template
* lisp/org-beamer.el (org-insert-beamer-options-template):
Renamed from `org-beamer-settings-template'.
2010-05-28 17:34:01 +02:00
Bastien Guerry 59badeeaaf `org-timer-set-timer': new prefix argument.
Called with a numeric prefix argument, `org-timer-set-timer' uses
this numeric value as the duration of the timer.

Called with a `C-u' prefix argument, use `org-timer-default-timer'
without prompting the user for a duration.

With two `C-u' prefix arguments, use `org-timer-default-timer'
without prompting the user for a duration and automatically
replace any running timer."
2010-05-28 12:38:29 +02:00
Carsten Dominik e7a3e1a223 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-28 09:18:37 +02:00
Carsten Dominik 4917ae9362 Fix typo
* lisp/org.el (org-show-context): Fix typo
2010-05-28 08:16:39 +02:00
Carsten Dominik a9a5e6b848 Fix id creation bug when remember is called from agenda
* lisp/org.el (org-store-link): Don't call org-store-link
interactively when called through remember from the agenda

Samuel Wales writes:

> For months, I found ID properties where they didn't belong.
> Finally I found that they are added when I do M-x
> org-remember in an agenda buffer, to the headline under
> point.  Feels like a bug.  [...]
2010-05-28 08:15:49 +02:00
David Maus 5349014e82 org.el: Remove duplicate code in `org-clone-subtree-with-time-shift'.
Operating on the clone (e.g. remove/recreated ID property) is
independent on whether the subtree is cloned with time shift or not.
2010-05-26 22:54:29 -06:00
David Maus a3e5a2f7e4 org-w3m.el: Get text property directly, not using macro `w3m-anchor'. 2010-05-26 22:53:36 -06:00
Sebastian Rose af080027fc file protocol in HTML links
The appended patch removes the protocol part from link URIs, if the
protocol is file. Neccessary, to show images again and make links work.
2010-05-26 22:48:06 -06:00
Tassilo Horn 54d513ee0c org.el (org-agenda-file-p): New predicate function.
The new function `org-agenda-file-p' checks if a given file is an org
agenda file.  Such a function is very useful in hooks, for example if
you want to export agenda files automatically when saving:

(defun th-org-mode-init ()
  ;; Update appointments and export to iCalendar when saving.
  (when (org-agenda-file-p)
    (add-hook 'after-save-hook 'th-org-agenda-to-appt t t)
    (add-hook 'after-save-hook 'org-export-icalendar-this-file t t)))
(add-hook 'org-agenda-mode-hook 'th-org-agenda-mode-init)
2010-05-26 22:46:34 -06:00
Michael Sperber 8b174b0d36 PATCH: Fix minor XEmacs compatibility issue
I'd appreciate if this one could be applied.  I'll fix XEmacs to accept
#B<binary> in the future, but I'd appreciate this one anyway.  Doesn't
really add complexity ...
2010-05-26 22:43:43 -06:00
Eric Schulte 2b08e18b93 added indent macro declaration to `org-save-outline-visibility' 2010-05-26 19:44:29 -06:00
Matt Lundin bb912d6d7c Fix org-refile-cache-check-set
Org-refile-cache fails when org-refile-use-outline-path is set to file.
Specifically, org-refile-cache-check-set throws a markerp error when it
encounters file targets, since they have nil instead a marker object.
This patch applies the test only to targets with markers (i.e.,
headings).
2010-05-26 14:14:47 -06:00
Matt Lundin 4c6012f831 Don't build org-refile-cache if org-refile-use-cache is nil
The function org-get-refile-targets was building org-refile-cache even
if org-refile-use-cache was set to nil. This caused every refile
attempt to call org-refile-cache-clear and to produce the message
"Refile cache has been cleared."
2010-05-26 14:11:04 -06:00
Julien Danjou 8c5f8a4d25 Do not expand title in <title> markups
If we expand `title', we may have HTML markup between the <title>
markups, which is not valid.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-26 14:10:28 -06:00
Julien Danjou a153f5a31d Fix docstring for org-export-html-{pre, post}amble
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-26 14:09:13 -06:00
Carsten Dominik 8dd4bafd8e Restore Emacs 22 compability
* org-html.el (org-html-make-link): Use string-match,
string-match-p is not compatible with Emacs 22.
2010-05-25 13:49:45 +02:00
Carsten Dominik 31c14d58b6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-05-25 11:38:55 +02:00
David Maus d7e15f0c88 Serialize the publishing cache
* lisp/org-publish.el (org-publish-write-cache-file):
Write a serialized version of the cache hash.
(org-publish-initialize-cache): Reset the cache hash before creating a
new one.Serialize publishing project cache with `puthash' expressions.
2010-05-25 11:38:42 +02:00
Michael Sperber 67b5a92c78 Fix org-src saving mechanism for XEmacs
write-contents-hooks is not buffer-local by default in XEmacs 21.4.
2010-05-24 09:20:23 -04:00
Bastien Guerry 3685d6b496 `org-timer-set-timer': fix bug about cancelling timer. 2010-05-24 15:11:14 +02:00
Carsten Dominik 7831cb7885 Don't add url type if link is relative.
* org-html.el (org-html-make-link): Don't add url type if link
is relative.
2010-05-23 11:59:27 +02:00
Carsten Dominik a49a64575b Document the use of `org-list-demote-modify-bullet'.
* doc/org.texi (Plain lists): Document
`org-list-demote-modify-bullet'.

* lisp/org-list.el (org-list-demote-modify-bullet): Improve docstring
by showing an example.

This change was triggered by a request by Livin Stephen Sharma.
2010-05-23 07:11:01 +02:00
Carsten Dominik 5b68cf4c4f Allow to skip steps in clock reports that have zero time
* org-clock.el (org-dblock-write:clocktable): Return total time.
(org-clocktable-steps): Skip step when time is zero and the
:stepskip0 property is set.

Rainer Stengele writes:

> Creating clocktables for each day of a month is an excellent feature
> in org!  Problem for me is that many resulting tables have a total
> time of 0:00.  The problem is not really the zero time I spent but the
> appearance of the tables with zero total time.
>
> Is there a possibility to skip getting such tables?  Rational: I do
> not need to show my boss or customer days where I spent 0:00 time on
> the project.

Now you can set :stepskip0 to achieve this.
2010-05-22 08:18:20 +02:00
John Wiegley 7e2158651d Added forward var decl to quiet compiler warning
* lisp/org.el (org-property-drawer-re): Forward declaration to avoid
  compiler warning.
2010-05-21 13:39:34 -04:00
Bernt Hansen 4f9c82fcf7 Fix typo in org-list-demote-modify-bullet docstring 2010-05-21 11:14:09 -04:00
John Wiegley a0a5b10f7a Revert "org.el (org-remove-inline-images): Call `clear-image-cache'."
This reverts commit 0c42220ca0.
2010-05-21 05:01:39 -04:00
Carsten Dominik 67331a2de0 Document the match groups of org-emph-re 2010-05-21 09:26:04 +02:00
Bernt Hansen 1405953456 Set org-clock-clocking-in' to t before org-clock-out' 2010-05-20 18:15:03 -04:00
Russell Adams 0c42220ca0 org.el (org-remove-inline-images): Call `clear-image-cache'. 2010-05-20 18:10:45 -04:00
Bastien Guerry baaf431f85 Use the type "number" for the new variable org-timer-default-timer 2010-05-20 16:24:44 +02:00
Bastien Guerry 3bf121f8b1 Define and use a new variable: org-timer-default-timer
This variable defaults to nil.  When non-nil, this is the default
value when the user is prompted for a timer.

This patch also improves org-timer-set-timer so that the user can
replace the current timer by a new one.
2010-05-20 16:16:31 +02:00
Thomas Morgan cc47da0acb Persistent filters in Org mode
Hello, Org mode hackers,

This patch defines a variable `org-agenda-persistent-filters'.
When it is set, filters persist from one agenda view to the next.

I've found this convenient when using tags for contexts like @home,
@net, etc., some of which commonly remain applicable for a while.

Thanks,
Thomas

From 052ef9205845c78cb24d6fea8f89484bbe12a528 Mon Sep 17 00:00:00 2001
From: Thomas Morgan <tlm@ziiuu.com>
Date: Fri, 23 Apr 2010 11:48:03 +0200
Subject: [PATCH] New option `org-agenda-persistent-filters'.
 When set, keep filters from one agenda view to the next.
2010-05-20 08:54:17 +02:00
Carsten Dominik 7403cb1992 Hide subtree before exposing the headings with `C-c C-k'
Proposed by Ali Tofigh.

Now `C-c C-k' always creates the same view, independent of what the
subtree visibility was before.
2010-05-20 08:51:54 +02:00
David Maus 6f1bd65fb6 Remove empty property drawers in cloned subtrees. 2010-05-20 07:59:18 +02:00
David Maus c1751071fc Provide customization variable `org-clone-delete-id'.
When non-nil, clones of a subtree don't inherit the ID property.
Otherwise they do and it will be set to a new unique identifier.
2010-05-20 07:59:06 +02:00
David Maus 9f9d129a00 Maybe create ID property in cloned subtrees. 2010-05-20 07:58:42 +02:00
Carsten Dominik 5eb7bf8a03 Add Anthony Lander's org-mac-link-grabber.el 2010-05-19 23:49:40 +02:00
Carsten Dominik d180631686 Fix empty-line problem after repeating entry
Tom writes:

> if I have a heading like this:
>
>
> ** TODO test task
> stuff
>  SCHEDULED: <2010-05-15 Sat 07:35 +1d>
>
>
> Then an empty line is inserted below the heading (before "stuff") if
> org-indent-mode is on and logging is set like this:
>
>
> (setq org-log-repeat nil)
> (setq org-log-done 'time)
>
>
>
> I tested it with a clean config using only the settings above.
2010-05-19 18:03:50 +02:00
Carsten Dominik 3cb349c039 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2010-05-19 12:18:36 +02:00
Bastien Guerry 0515ae29c0 Fix `org-refile-cache-get' error.
This patch fixes the problem first reported by Tassilo Horn in
[mid:87y6fhxc47.fsf@thinkpad.tsdh.de].  Problem was that
`org-refile-cache-get' returned an invalid refile target table after
the refile cache was cleared.
2010-05-19 11:37:08 +02:00
Carsten Dominik 11058a713a Fix alignment of numbers with invisible characters in tables
Bold numbers like *2.4* were aligned incorrectly in columns that have
mostly numbers.

Reported by Sebastian Rose
2010-05-19 11:34:23 +02:00
Carsten Dominik abe03d140b Clean up space in headlines when exporting to iCalendar
Tassilo Horn writes:

> Hi all,
>
> I've just discovered the iCalendar export and use that to have a
> visually appealing read-only agenda in KOrganizer.  Basically, the
> export seems perfect except for one thing.
>
> When I have an org entry like
>
> * Test                                           :some:tags:here:
>
> the corresponding VEVENT will have the whole org heading including the
> spaces and the tag string as SUMMARY (unless the entry has a SUMMARY
> property).  Having the tags there might be ok (although by default they
> are also set as CATEGORY), but the spaces between the heading title and
> the tags should be compacted.
2010-05-18 14:45:56 +02:00
Carsten Dominik 7bb31a512e Merge branch 'org-id-uuid' of git://github.com/dmj/dmj-org-mode 2010-05-18 09:03:26 +02:00
Carsten Dominik cd5ec17af3 Fix typo
Patch by Julien Danjou
2010-05-18 08:01:15 +02:00
Tom Breton (Tehom) 459d99c44c Moved to new branch 2010-05-17 18:17:38 -04:00
Carsten Dominik 679e3b7f03 Implement caching of refile targets 2010-05-17 19:27:08 +02:00
Carsten Dominik 016bfaefd5 Move entity search to later in the fontification 2010-05-17 18:39:26 +02:00
David Maus 2cea3f7744 Merge branch 'master' into org-id-uuid
Conflicts:
	lisp/ChangeLog
2010-05-17 16:32:31 +02:00
Carsten Dominik 2daea07630 Fix Bernt's previous patch 2010-05-17 13:56:17 +02:00
Carsten Dominik 696c2bf869 Add running clock only to report if time scope is right
Patch by Bernt Hansen:

> When org-clock-report-include-clocking-task is set we always add the
> current clocking task to the clock report.  This is incorrect if you
> are looking at an agenda clock report for a time range that does not
> include the current clocking task (e.g. yesterday or last week).
>
> Now we only include the current clocking task if the clock report
> date range includes the current clocking task start time.
2010-05-17 11:36:09 +02:00
John Wiegley 99afb931b2 (org-resolve-clocks): Changed meaning of an argument 2010-05-16 22:12:14 +02:00
John Wiegley 3128e93340 Discovered clocks were not matching up with active clock 2010-05-16 22:11:59 +02:00
John Wiegley 6a360dbf4a Enhanced functionality of the clock resolver
i/q/C-g  Ignore this question; the same as keeping all the idle time.

k/K      Keep X minutes of the idle time (default is all).  If this
         amount is less than the default, you will be clocked out
         that many minutes after the time that idling began, and then
         clocked back in at the present time.
g/G      Indicate that you \"got back\" X minutes ago.  This is quite
         different from 'k': it clocks you out from the beginning of
         the idle period and clock you back in X minutes ago.
s/S      Subtract the idle time from the current clock.  This is the
         same as keeping 0 minutes.
C        Cancel the open timer altogether.  It will be as though you
         never clocked in.
j/J      Jump to the current clock, to make manual adjustments.

For all these options, using uppercase makes your final state
to be CLOCKED OUT.
2010-05-16 22:11:45 +02:00
David Maus d6064d2cdf Use new customization value for `org-id-method'.
Silently accept the old value for backward compatibility.
2010-05-16 16:48:51 +02:00
David Maus aa0004004b Provide function that returns a string with a random (version 4) UUID. 2010-05-16 16:27:33 +02:00
Carsten Dominik d78931408d Minor fix 2010-05-16 16:24:16 +02:00
Carsten Dominik 4d4267320d Add Stefans redefinition of orgstruct-mode 2010-05-16 16:18:23 +02:00
Carsten Dominik e3c43d80cd Apply Stefan's simplification 2010-05-16 16:12:57 +02:00
Carsten Dominik f2d36827fb Fix copyright years 2010-05-16 15:44:55 +02:00
Carsten Dominik 7f86e0dedb Display entites as UTF8 characters
Based on code by Eric Schulte
2010-05-16 07:46:37 +02:00
Carsten Dominik 2d3817d51a LaTeX export: Implement table* environment for wide tables
Patch by Chris Gray.
2010-05-15 14:26:38 +02:00
Carsten Dominik 9cb5299bd1 Define a variable 2010-05-15 14:15:08 +02:00
Carsten Dominik f4ac28844e Document the use of the org-export-docbook-xslt-stylesheet variable
Patch by Baoqiu Cui.
2010-05-15 08:07:02 +02:00
David Maus d090a9d858 Remove ID property in clone template 2010-05-15 01:03:15 +02:00
David Maus 5e264e35c5 Remove superfluous third argument to `org-publish-cache-set'. 2010-05-15 00:59:53 +02:00
David Maus 54da0dce2a Use `make-hash-table' to create hash table of org-publish-cache. 2010-05-15 00:59:39 +02:00
Carsten Dominik 38b4fcc90c XEmacs compatibility 2010-05-14 14:40:44 +02:00
Carsten Dominik 9a1612410f LaTeX Export: Fix problem with alignment specs that contain a comma 2010-05-14 14:27:35 +02:00
Carsten Dominik 9a72345b0f More flexibility for the XSLT command 2010-05-14 13:38:14 +02:00
Carsten Dominik 3f74a69f91 Fix minor bug 2010-05-14 09:07:46 +02:00
Carsten Dominik 256b0dc88a Fix whitespace problem with in-buffer settings 2010-05-14 07:53:03 +02:00
Carsten Dominik 650a416935 Define variable 2010-05-13 23:05:11 +02:00
Carsten Dominik b7793bd54a Docbook export: Improve formatting of xslt command
Patch by Dale Smith.
2010-05-13 20:17:28 +02:00
Carsten Dominik 797fa7ffee Add ChangeLog entries for previous commit 2010-05-13 20:07:41 +02:00
Sebastian Rose 339d6fe4bb Publishing, cashing and timestamps
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Sebastian,
>
> sorry for being slow.  Could you do me a favor and send me the cache patch one
> more time - if possible updated to the current master.
>
> I am just not sure I have the right patch in my hands.

Hi Carsten,

no problem. The patch is attached.

Here is a list of my ChangeLog entries, redated to today:

2010-05-13  Sebastian Rose  <sebastian_rose@gmx.de>

	* org-publish.el (org-publish-cache): Use one big hashmap for
	each project defined in `org-publish-project-alist'. The
	hashmap will hold pairs of our timestamp-filenames and
	timestamps, as well as pairs of source-paths and associated
	plists for arbitrary values. Currently only the files title is
	stored there.

	The caching feature writes the information gathered during
	publishing to disk and re-loads it from there the next time we
	publish the same project.  All those informations will hence
	survive a restart of emacs.

	One cache file per publishing project is used. The contents of
	that file is the elisp that fills the new variable
	`org-publish-cache'.  The cache file is named according to the
	project with `.cache' added and lives in
	`org-timestamp-directory'.

	* org-publish.el (initialize-files-alist): This function and
	the variable `org-publish-files-alist' are not used anymore in
	favour of the reloadable cache and the functions for handling
	it. Removed therefor.

	* org-publish.el (org-publish-validate-link) was not used
	anywhere. Removed.

	* org-publish.el (org-publish-get-base-files): Added the
	variable `sitemap-requested' to avoid sorting where possible.
	See also end of `org-publish-get-base-files-1'.

	* org-publish.el (org-publish-get-files): This function is
	not called anymore. Removed.

	* org-publish.el (org-publish-get-project-from-filename) does
	not depend on a list of files anymore. Instead of laoding all
	files of all, we walk `org-publish-project-alist' until we
	find a project, where the properties :base-directory, :recursive,
	:base-extension, :include and :exclude match.

	* org-publish.el (org-publish-file) takes an additional
	parameter to avoid superfloues loading and writing of the
	cache file when used to publish a part of a project.
2010-05-13 20:03:35 +02:00
Carsten Dominik 7aa1a46359 Require cl in org-list.el 2010-05-13 18:02:05 +02:00
Carsten Dominik f3b5524a2e Make C-M-a and C-M-e do the right thing in Org-mode
The commands now move back to the heading, and to the end of the
subtree, respectively.

Proposed by Lennard Borgmann.
2010-05-13 08:59:39 +02:00
Carsten Dominik be232c4c21 LaTeX export: Fix TODO keyword export 2010-05-13 08:47:26 +02:00
Carsten Dominik a95427de18 New %T escape for note headings
Patch by Richard Riley.
2010-05-13 07:49:42 +02:00
Carsten Dominik c1cc420149 Add help-echo to habit graph
Patch by Michael Fornius.
2010-05-13 07:45:26 +02:00
Carsten Dominik e21d08ae35 Improve org-file-apps docstring
Patch by Jan Böker.
2010-05-13 07:19:24 +02:00
Carsten Dominik 09f583170b Merge branch 'org-wl' of git://github.com/dmj/dmj-org-mode
Conflicts:
	lisp/ChangeLog
2010-05-12 16:27:09 +02:00
Carsten Dominik 90c37b3f4a Fix empty line display after property visibility 2010-05-12 15:56:46 +02:00
Carsten Dominik 8a671f8d4d LaTeX export: Use special formatting by link type interface
Patch by Christian Moe, who writes:

> It looks like support for formatting custom link types in LaTeX export
> is broken?
>
> I was trying to implement a custom link type with its own formatting
> function for HTML and LaTeX export, following the steps in
> org-bbdb.el.
>
> I've found that org-bbdb-export does not italicize bbdb links in
> LaTeX, nor does my own org-cite-export turn my custom =cite:= links
> into LaTeX =\cite{}= citations. Everything works fine in HTML export,
> but in LaTeX all custom link types get formatted as =\texttt{descr}=.
>
> I see that org-export-as-html and org-export-as-docbook look up
> org-link-protocols to get the function for formatting the link, but it
> seems that org-export-as-latex doesn't.
>
>
2010-05-12 15:14:17 +02:00
Carsten Dominik 336456d0c3 Make sure remote references will not switch the selected buffer
Karl Eichwalder writes:

> Consider the following two files:
>
> * 2009
> #+TBLNAME: 2009
>  :PROPERTIES:
>  :ID:       ea32e5b5-31ba-468e-8e31-3e0d09696bb0
>  :END:
> |-----+-------|
> |  mm |    km |
> |-----+-------|
> | all | 946.8 |
> |-----+-------|
>
> * 2010
> #+TBLNAME: 2010
>  :PROPERTIES:
>  :ID:       e0df84c4-8abc-458f-a1ee-eb53eb71b4f0
>  :END:
> |-----+-------+-------+-------|
> |  mm |    km |  B km |  G km |
> |-----+-------+-------+-------|
> | all | 249.4 | 429.2 | 678.6 |
> |-----+-------+-------+-------|
>
> * all
>  :PROPERTIES:
>  :ID:       44751a7f-73a4-4c07-b3c2-e3edb9042acd
>  :END:
> #+TBLNAME: all
> |------+--------|
> | yyyy |     km |
> |------+--------|
> | 2009 |        |
> | 2010 |  678.6 |
> |------+--------|
> |  all | 1625.4 |
> |------+--------|
> #+TBLFM: @2$2=remote(ea32e5b5-31ba-468e-8e31-3e0d09696bb0,$LR2);%.1f::@3$2=remote(2010,$LR4);%.1f::$LR2=vsum(@2$2..@-1);%.1f
>
> Then, in the 2010 file, eval the formula of the "all" table by pressing
> C-c C-c.
> ==>
>
> It takes the km value from the 2009 file, but also puts the cursor
> (point) into the 2009 file in front of the ID:
>
> * 2009
> #+TBLNAME: 2009
>  :PROPERTIES:
>  :ID:       -!-ea32e5b5-31ba-468e-8e31-3e0d09696bb0
>  :END:
> |-----+-------|
> |  mm |    km |
> |-----+-------|
> | all | 946.8 |
> |-----+-------|
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=- cut here -=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> I'd prefer if the point would stay in the 2010 file.
2010-05-12 15:06:27 +02:00
Carsten Dominik 33fba09ddb Match also image paths relative to home
Baoqui Cui writes:

> "robut@iinet.net.au" <robut@iinet.net.au> writes:
>
> I very much like the idea of native inline image display in Org-mode but  can't
> seem to make it work.
>
> Given a 6.36 snapshot or 6.36 release and these org file contents
>
> * Test image
> Test image
> [[Screenshot.png]]
>
>
> I hoped org would display that image after C-c C-x C-v. Rather Org-mode returns
> "No images to display inline".
>
> I've tried different ways of linking that image, different image formats,
> relative vs complete paths, and my regular .emacs vs  a near empty one and
> always the same result. If I toggle iimage-mode the image displays fine per se
> but does not affect how Org-mode works.
>
> Seems clear I am missing something simple. What?
>
> I like the idea of inline image display too, but hit the similar
> problems.  After reading the code in org.el, I found that the inline
> image file link has to start with either "file:" or "./".
>
> For example, the following two links are OK:
>
>   [[file:~/images/myImage.png]]
>   [[./figures/org-mode-unicorn.svg]]
>
> but the following two are not:
>
>   [[Screenshot.png]]
>   [[~/images/myImage.png]]
>
> Here is a small patch that seems to work well for me, but I'd like
> Carsten to check whether it may break anything
2010-05-12 14:51:42 +02:00
Carsten Dominik 1444920253 Improve inline image display 2010-05-12 14:38:30 +02:00
David Maus 4d5cad6d88 Adjust indentation to meet coding style. 2010-05-12 10:02:43 +02:00
David Maus 032b53ed13 Don't throw error when `org-store-link' called on WL folder group. 2010-05-12 10:01:05 +02:00
Carsten Dominik 3d8b6de2ad Free up the `C-c C-v' key for Org Babel
TODO sparse trees are also accessible with `C-c / t'.
2010-05-12 08:04:27 +02:00
Carsten Dominik fdb446fa2e Revert comment syntax changes 2010-05-11 00:44:50 +02:00
Carsten Dominik 3352fc0c62 Make C-v and M-v work when entering date with popup calendar
Requested by Leo.
2010-05-10 08:57:20 +02:00
Carsten Dominik 19aec9ed9a Fix minor bug
Patch by Gregory J. Grubbs
2010-05-10 08:46:03 +02:00
Carsten Dominik 95c725ae38 Fix typo 2010-05-09 23:01:56 +02:00
Carsten Dominik d087351f37 Make C-c / t' search for all TODO keywords, C-c / T' for a specific one 2010-05-09 07:21:51 +02:00
Carsten Dominik c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik 88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik a14af124ba User-visible changes for 6.36 2010-05-09 06:12:41 +02:00
Carsten Dominik 9e9f083aa9 Fix comment syntax in org-mode
Patch by Leo.

If this works, we have fixed an issue that has bugged me for several
years.
2010-05-08 17:10:14 +02:00
Carsten Dominik f5cffa89ef Minor fixes 2010-05-08 09:25:47 +02:00
Carsten Dominik 7147508d81 Implement inline display of linked images 2010-05-08 09:20:32 +02:00
Carsten Dominik ac40bde6c6 Code cleanup and two enhancements for org-wl.el
Patch by David Maus:

>  1. Store and open link to Wanderlust folders.
>
>  2. Store link to Wanderlust message while visiting the message
>     buffer.
>
>     Up to now it was only possible to store a link to a message when
>     point was in the message summary.
2010-05-08 07:30:40 +02:00
Carsten Dominik 0448121f00 Avoid infinite loop when replacing escapes
Patch by David Maus, who writes:

> Org enters an infinite loop when `org-replace-escapes' is called with
> a table containing a replace string that contains the escape sequence
> it should be replaced with.
>
> Example:
> ,----
> | (org-replace-escapes "%m" '(("%m" . "87zl0qq1f3.wl%maus.david@gmail.com")))
> `----
>
> I stumpled upon when I tried to store a link to a internet message
> whose message id contained the sequence "%m" (perfectly valid for a
> message id) while using "%m" as message description.
>
> Attached patch fixes this by
>
>  1. detecting such 'self reference' and replacing the offending
>     sequence in the replace string by a string with a text property
>     that contains the original sequence
>
>  2. replacing occurences of substrings with this text property by the
>     original sequence.
2010-05-08 07:20:54 +02:00
Carsten Dominik 1132722418 Use symmetric encryption when no key is set.
Patch by Rick Moynihan.
2010-05-08 07:09:16 +02:00
Carsten Dominik e27bc453de Add commands to recalculate and iterate all tables in a buffer
This was a request by Johna Ekh.
2010-05-07 09:45:34 +02:00
Carsten Dominik 6a98418b66 Make M-right/left work on regions again
Patch by Matt Lundin
2010-05-07 09:14:48 +02:00
Dan Davison b1f1cdda40 Correct free variable error in org-src.el 2010-05-02 00:57:30 -04:00
Carsten Dominik 7389ecea03 Fix permissions 2010-05-01 21:57:50 +02:00
Carsten Dominik 110b175ef9 Remove (debug) 2010-05-01 06:35:23 +02:00
Carsten Dominik 23a1f40e3a Fix more typos 2010-05-01 06:30:02 +02:00
Dan Davison 182b107682 Correct coderef switch in docstring 2010-04-30 22:53:53 -04:00
Dan Davison e873ef54b3 Some docstring typos 2010-04-30 22:35:50 -04:00