* lisp/org.el (org-auto-align-tags): change docstring.
(org-update-parent-todo-statistics): keep tags aligned even when
statistics cookies are shifting them.
* lisp/org-list.el (org-update-checkbox-count): keep tags aligned even
when statistics cookies are shifting them.
* lisp/ob.el (org-babel-sha1-hash): Don't modify info argument by
side-effect when sorting result-params list.
copy-sequence only does shallow copies, so if we're going to modify a
sub-list, we need to make sure we copy it first.
* lisp/ob.el (org-babel-result-regexp): Use non-shy group around
org-babel-data-names.
By default regexp-opt returns a shy group around its arguments. But
users of org-babel-result-regexp expect the third match-string to
contain the hash. With a shy group, the second match-string contains
the hash.
Once again, thanks to Mark Cox for raising these issues.
* lisp/ob-lisp.el (org-babel-lisp-dir-fmt): Defcustom for use in
changing how/if the current directory is represented to lisp code.
(org-babel-execute:lisp): More general handling of the default
directory value.
Thanks to Mark Cox for suggesting this change.
* lisp/ob-lisp.el (org-babel-execute:lisp): Setting the value of
*default-pathname-defaults* to either the value of the :dir header
argument or the directory of the containing Org-mode file.
* org.el (org-mode-flyspell-verify): This is useful when using
flyspell with a non-English dictionary, or if some of your
keywords are in another language.
Signed-off-by: Julien Danjou <julien@danjou.info>
* org-exp.el (org-export): Use new compatibility function
`org-activate-mark'.
* org-compat.el (org-activate-mark): New function. Provide
`activate-mark' if not present (e.g. Emacs22).
Emacs 22 misses this function. Defun copied from Emac23's
`active-mark' but removed reference to customization variable
`select-active-regions' which is not present in Emacs22.
* org-bibtex.el (org-bibtex-headline): Don't use equalp at run-time,
compare downcased strings.
Compiler complains about using `equalp' because other than for example
`concatenate' it is not declared 'inline.
Cf. [[info:cl#Declarations]] about the 'inline declaration
...
`inline'
The `inline' DECL-SPEC lists one or more functions whose bodies
should be expanded "in-line" into calling functions whenever the
compiler is able to arrange for it. For example, the Common Lisp
function `cadr' is declared `inline' by this package so that the
form `(cadr X)' will expand directly into `(car (cdr X))' when it
is called in user functions, for a savings of one (relatively
expensive) function call.
The following declarations are all equivalent. Note that the
`defsubst' form is a convenient way to define a function and
declare it inline all at once.
(declaim (inline foo bar))
(eval-when (compile load eval) (proclaim '(inline foo bar)))
(defsubst foo (...) ...) ; instead of defun
*Please note:* this declaration remains in effect after the
containing source file is done. It is correct to use it to
request that a function you have defined should be inlined, but it
is impolite to use it to request inlining of an external function.
In Common Lisp, it is possible to use `(declare (inline ...))'
before a particular call to a function to cause just that call to
be inlined; the current byte compilers provide no way to implement
this, so `(declare (inline ...))' is currently ignored by this
package.
...
Thus other than `concatenate' `equalp' is stored as a function call at
run-time.
* org-id.el (org-id-locations): Fix docstring, remove reference to
non-existent option.
The configuration option `org-id-use-hash' does not exist. Git bisect
and grepping for 'org-id-use-hash' showed that this string never ever
occured more than once, hence it was never there..
* org.el (org-self-insert-command): Use `delete-char' instead of
`delete-backward-char'.
* org-table.el (orgtbl-self-insert-command): Dto.
According to the doc string `delete-backward-char' "is meant for
interactive use only; from Lisp, better use `delete-char' with a
negated argument."
* lisp/org-latex.el (org-export-latex-preprocess): add
`original-indentation' property to footnotes so they cannot possibly
end a list by being less indented than the item they belong to.
Thanks to Mark Cox for suggesting this patch
* lisp/ob-lisp.el (org-babel-expand-body:lisp): No longer wraps
biddies in `progn'.
(org-babel-execute:lisp): Wraps bodies in `progn' as they are passed
to swank.
* doc/org.texi (The clock table): Document the :properties and :inherit-props
arguments for the clocktable.
* lisp/org-clock.el (org-clocktable-write-default): Implement adding property
columns to the clock table.
Patch by Niels Giesen.
* lisp/org.el (org-default-priority):
(org-priority-start-cycle-with-default): Improve docstring.
(org-priority): Throw error when priority is out of range.
Patch by Michael Brand.
* lisp/org.el (org-toggle-heading): region should be considered as
made of full lines, without the last one if region-end is at bol.
Removed unused variables. Refactored and commented code.
* lisp/org-list.el (org-list-to-subtree): if the list is before first
heading and `org-odd-levels-only' is non-nil, the first item gets
two stars instead of one.
* lisp/org.el (org-reduced-level): a level of 0 was reduced to 1 with
`org-odd-levels-only' non-nil.
* lisp/org.el (org-toggle-item): converting an heading to an item
would sometimes insert unnecessary spaces before it, and unwanted
space with `org-indent-mode' on. Changing some text into an item
wouldn't always preserve indentation.
Hello,
Here is a patch which allows one to change the (currently) hard-coded DIV name
in which the page contents is being inserted.
It currently is "content", but some prefer "container" or "wrapper".
If accepted, my next patch will be to make this a per-project variable.
Best regards,
Seb
* lisp/org-capture.el (org-capture-current-plist): Improve docstring.
(org-capture-put): Add docstring.
(org-capture-get): Add docstring.
(org-capture-member): Add LOCAL argument. Add docstring.
(org-capture-set-target-location): Store the time received from a date
prompt into the :prompt-time property.
When using the file+datetree+prompt target for capture, the time set
by the prompt is now stored in the :prompt-time property.
* lisp/org-exp.el (org-export-mark-list-properties): even if context
is invalid, mark list item with `list-context' property.
* lisp/org-list.el (org-list-forbidden-blocks): add exporters specific
blocks to the list of forbidden blocks.
Thanks to Jai Bharat Patel for reporting this.
* lisp/ob-sh.el (ob-ref): Uses ob-ref to resolve the value of the
:stdin header argument.
(org-babel-execute:sh): Use the :stdin header argument.
(org-babel-sh-var-to-sh): Split the bulk of this function off into a
new sub-function.
(org-babel-sh-var-to-string): New function for converting elisp
values to strings that make sense for parsing with sh.
(org-babel-sh-evaluate): Adding "stdin" option to session and
external evaluation options.
* lisp/org-html.el (org-export-as-html): Don't expand non-data
lines of table.el tables.
(org-html-expand): Removed the (buggy) test for non-data lines
in table.el tables. The test is now done as part of
org-export-as-html.
(org-format-table-table-html-using-table-generate-source):
Added test for spanning of cells in table.el tables using
table.el's own library routine. Optionlly Suppress export of
simple table.el tables.
(org-format-table-html): Removed the (buggy) test for spanned
table.el tables. The test is now done as part of
org-format-table-table-html-using-table-generate-source.
* lisp/org-exp.el (org-export-define-heading-targets): Use dash instead
of underscore to make labels valid.
Currently, the section number (a string of the form "X.Y.Z") is used
to manufacture a section label of the form sec-X_Y_Z. Underscores are
overloaded however, both in org and in LaTeX, and cause conflicts with
some packages. This patch changes underscores to hyphens in section
labels.
TINYCHANGE
Slight modification of patch by Christophe Rhodes
* lisp/ob-R.el (org-babel-R-write-object-command): Ensure that all
data is written to the results file before Emacs notices that the file
exists.
* lisp/ob-exp.el (org-babel-exp-do-export): Use `org-babel-exp-code'
to generate code block output.
(org-babel-exp-code): Re-create the code block body for exporting
source code.
* lisp/org-list.el (org-list-separating-blank-lines-number): fix
confusion between point and item beginning. Now, if no information
is avalaible, truly follow user preference when it inserts blank
lines manually.
(org-list-insert-item): send correct argument to the preceding
function.
* doc/orgcard.tex: Adding line for org-babel-check-src-block.
* lisp/ob-keys.el (org-babel-key-bindings): Adding key sequence for
org-babel-check-src-block.
* lisp/ob.el (org-babel-expand-src-block): Fit within 80 cols.
(org-babel-edit-distance): Returns the edit distance of two strings.
(org-babel-check-src-block): Check a code block for errors.
* doc/org.texi (Built-in table editor): Document the table field follow mode.
* lisp/org-table.el (org-table-exit-follow-field-mode-when-leaving-table):
New option.
(org-table-check-inside-data-field): New optional argument `noerror'.
When set, the function will only return nil instead of throwing an
error.
(org-table-edit-field): Interpret double prefix argument, and improve
the properties of the editing window.
(org-table-follow-field-mode): New minor mode.
(org-table-follow-fields-with-editor): New function.
The main purpose of this functionality is to make working with table
with long fields simpler, by always showing the full content of the
current field. This functionality is based on the following
mailing list thread
http://thread.gmane.org/gmane.emacs.orgmode/41584
and contains ideas by Jonny, Juan Pechiar, and Michael Brand.
* lisp/org-agenda.el (org-agenda-get-todos): Call `org-agenda-skip' first,
then check if timestamps cause exclusion.
* lisp/org.el (org-scan-tags): Call `org-agenda-skip' first,
then check if timestamps cause exclusion.
For more information, see the following mailing list thread:
http://thread.gmane.org/gmane.emacs.orgmode/41052/focus=41052
Aloha all,
The attached patch initializes the existing variable shortn, adds it to
two caption situations in addition to the one already coded, and adds
some description to the manual.
With this patch, #+CAPTION: [Short caption]{Long caption.} in the
Org-mode source exports to \caption[Short caption]{Long caption.} in the
LaTeX export, which is, I think, as it should be.
Many thanks to Nick Dokos who made me understand why earlier patches
hadn't shown up on the patchwork server (wrong mime type, evil mail
client). This one sent with gnus and fingers crossed.
All the best,
Tom
>From 9dc65f7e598dd171ebce9448cd39c4062f7cafff Mon Sep 17 00:00:00 2001
From: Tom Dye <tsd@tsdye.com>
Date: Sun, 8 May 2011 06:56:25 -1000
Subject: [PATCH] optional caption arguments in LaTeX export
* lisp/ob-ref.el (org-babel-ref-resolve): Using the new result regexp.
* lisp/ob.el (org-babel-data-names): Configurable list of names of data.
(org-babel-result-regexp): Using new results regexp.
* lisp/org-exp.el (org-export-add-options-to-plist): Fix the option parser
This fixes up commit aa6dba8a74.
Instead of looking for the start of a word (which does not work for
the options that are characters), it looks for the beginning of the
line or a whitespace character preceding the option.
* lisp/org.el (org-structure-template-alist): Add an easy template
for index (i), and move include file to I from i.
* doc/org.texi (Easy Templates): Document new template.
Notes about this patch:
1. It breaks some old user-visible behavior, since <i changes meaning.
Per Nick's posting, we expect that if index is used, it will be used
more commonly than include file. However, since this is a custom,
behavior could be changed. Indeed, we could put index on capital
I with a suggestion that users who are indexing should swap in their
customizations.
2. I modified the docstring for org-structure-template-alist, which did
not explain the function of the "?" in the string. Someone should
check and verify I didn't get this wrong.
3. There doesn't seem to be a Muse tag equivalent for #+index, so I
just made the Muse equivalent of #+index be #+index. I don't know
org-mtags enough to know if this is appropriate.
charles.sebold@lcms.org writes:
> On 7 Apr 2011, Charles Sebold wrote:
>
>> Here's a test. Take the line below and put it in an agenda file, then
>> view the agenda.
>>
>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>>
>> The results as I see them give me a link that I can mouse-click on,
>> but I can't move point to it and hit C-c C-o.
>>
>> What do I need to do to make this a normal org link in every way? Or
>> is this a bug?
>>
Here's what seems to be going on.
Clicking with the mouse works because it calls org-open-at-mouse, which
(by calling org-open-at-point) simply looks at the text surrounding the
click point to find a link.
The function org-agenda-open-link, on the other hand, grabs part of the
headline as a string (the prefix), then jumps to the location in the
original buffer and calls org-offer-links-in-entry to look for links in
both the entry and the prefix of agenda text. Obviously, it won't find
your link in the original entry since it looks like this:
%%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
I think it shouldn't be a problem to pass the whole agenda line to
org-offer-links-in-entry. This will not result in duplicate links, since
org-offer-links-in-entry "uniquifies" the links.
I've attached a patch.
The bigger question, however, is why the expression above is even
showing up in the agenda, since it contains no scheduling information.
:)
Best,
Matt
>From 58c7621c0c84b9c1930098a098e4559aa516eec0 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Tue, 3 May 2011 15:54:35 -0400
Subject: [PATCH] Pass entire text of agenda line to org-offer-links-in-entry.
* lisp/org-agenda.el (org-agenda-open-link): Pass entire text of
agenda line to org-offer-links-in-entry.
This fixes bug noticed by Charles Sebold, in which links that are
dynamically formatted for the agenda view are ignored.
http://permalink.gmane.org/gmane.emacs.orgmode/40673
* lisp/org-bibtex.el: (org-bibtex-search): New function.
(org-bibtex-export-to-kill-ring): New function. Export to kill ring.
(org-bibtex-create-in-current-entry): New function
(org-bibtex-create): Make it easier to add bib fields to an
existing headline
(org-bibtex-export-arbitrary-fields)
(org-bibtex-treat-headline-as-title): Fix typos
(org-bibtex-fleshout): Don't upcase optional field; remove ":" from
type completion
This patch implements several helper functions: exporting to kill
ring, searching only for entries with bib fields, and creating bib
fields in an existing headline. It makes the UI of org-bibtex-fleshout
more consistent.
* lisp/org-bibtex.el (org-bibtex-treat-headline-as-title): New
defcustom.
(org-bibtex-headline): Only use headline text (not TODO or other
metadata) to generate title field and auto key.
(org-bibtex-fleshout): Allow user to choose whether to treat
headline as title.
* lisp/org-bibtex.el (org-bibtex-tags): New variable
(org-bibtex-tags-are-keywords): New variable
(org-bibtex-no-export-tags): New variable
(org-bibtex-headline): Export tags as comma-separated bibtex keywords
(org-bibtex-read): Import bibtex keywords field as tags
Bibtex users often rely on the keywords field to tag their entries.
With biblatex, the keywords field can be used to organize and filter
bibliographic entries. This patch adds an option to import keywords as
org-mode tags, and to export tags as bibtex keywords.
It also adds an option to add user-defined tags to newly created bib
headlines.
Eden Cardim <edencardim@gmail.com> writes:
> Tassilo> No, I just wasn't really sure what that SCAN argument
> Tassilo> means, so I tried to be as safe as possible. If it's
> Tassilo> always safe to provide nil, let's change that.
>
> Well, right now all it does is to check split rules against incoming
> mail. But, if we have a link to a message in org, then that message
> already went through the split process, so re-splitting is
> unnecessary.
Ok, so here we go:
Bye,
Tassilo
>From 89fecc7b938385647618dc28c4df304df872e6eb Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Tue, 12 Apr 2011 20:27:54 +0200
Subject: [PATCH] Call gnus-activate-group without SCAN arg.
* org-gnus.el (org-gnus-follow-link): Don't request scan of
group when following link.
lisp/org-agenda.el (org-agenda-set-tags): Remove org-agenda-show to prevent
disrupting windows and changing point in original buffer.
(org-agenda-set-property): Same
(org-agenda-set-effort): Same
(org-agenda-toggle-archive-tag): Same
When setting a tag in the agenda, org-mode displays the corresponding
entry in the original org buffer by calling org-agenda-show. This has
the unwelcome side-effect of disrupting the current window arrangement
and changing the position of the point in the original buffer. This
behavior is inconsistent with the that of org-agenda-todo, which makes
all its changes "silently."
Here is the offending line (6799) in org-agenda-set-tags:
--8<---------------cut here---------------start------------->8---
(org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed
--8<---------------cut here---------------end--------------->8---
The same line occurs in org-agenda-set-property, org-agenda-set-effort,
and org-agenda-toggle-archive tag.
* lisp/org-publish.el (org-publish-project-alist): Document new
:sitemap-sans-extension property.
(org-publish-org-sitemap): Use new sitemap-sans-extension setting.
The following patch adds an option to remove extensions of files linked
from the auto generated sitemap. This is useful if you want to follow
this: http://www.w3.org/Provider/Style/URI
* lisp/org.el (org-remove-uninherited-tags): Renamed from
org-remove-iniherited-tags.
(org-scan-tags): Fix typo in function call.
(org-get-tags-at): Fix typo in function call.
* lisp/org.el (org-get-tags-at): Don't include filetags if local is t.
The function org-get-tags-at and the functions that called it were
including inherited file tags even if the user requested only local
tags. This patch fixes the behavior.
Thanks to Tom Dye for suggesting this functionality
* lisp/org-bibtex.el (org-bibtex-create): Adding prefix argument which
will result in prompting for optional fields.
* lisp/org-bibtex.el (org-bibtex-headline): Renamed flet function
`get' which was causing compile problems.
(org-bibtex-fleshout): Renamed flet function `get' which was causing
compile problems.
(org-bibtex-write): Renamed flet function `get' which was causing
compile problems.
Patch by Matt Lundin adding two new customization options
* lisp/org-bibtex.el (org-bibtex-export-arbitrary-fields): New option.
(org-bibtex-key-property): New option.
(org-bibtex-put): Make use of new `org-bibtex-key-property' variable.
(org-bibtex-headline): Make use of new
`org-bibtex-export-arbitrary-fields' and `org-bibtex-key-property'
variables.
(org-bibtex-autokey): Make use of new `org-bibtex-key-property'
variable.
(org-bibtex-fleshout): Make use of new `org-bibtex-key-property'
variable.
(org-bibtex-write): Make use of new `org-bibtex-key-property'
variable.
* lisp/org-bibtex.el: Updating Copyright dates, author information,
commentary and history notes.
(org-bibtex-types): List of bibtex types with descriptions and
required and optional fields.
(org-bibtex-fields): List of bibtex fields with descriptions.
(*org-bibtex-entries*): Special variable to hold parsed bibtex
entries.
(org-bibtex-autogen-keys): Custom variable controlling whether
bibtex keys are automatically generated
(org-bibtex-prefix): Custom variable allowing use of optional prefix
for bibtex properties in Org-mode headlines.
(org-bibtex-get): Helper function for accessing bibtex elements of a
property list.
(org-bibtex-put): Helper function for inserting bibtex element into
a property list.
(org-bibtex-headline): Return a bibtex entry of the given headline
as a string.
(org-bibtex-ask): Prompt the user to fill in the value of a bibtex
field.
(org-bibtex-autokey): Generate a bibtex key for the current
headline.
(org-bibtex-fleshout): Fill in missing bibtex properties of the
current headline.
(org-bibtex): Export the current Org-mode buffer to a bibtex buffer.
(org-bibtex-check): Check that all bibtex properties are present in
the current headline.
(org-bibtex-check-all): Check all headlines in the current buffer.
(org-bibtex-create): Create a new bibtex headline at the current
level.
(org-bibtex-read): Read the current bibtex entry from a bibtex file.
(org-bibtex-write): Write the most recently read bibtex entry into
an Org-mode file.
* lisp/org-exp.el (org-export-preprocess-string): mark list end before
expanding macros. Thus, a macro inside a list and containing blank
lines cannot break the list structure.
(org-export-preprocess-apply-macros): multi-lines macros get
indented with the same indentation as the first line. Thus, we are
sure that every line belongs to the same list as the first line, if
such list exists. Also add comments in code.
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): New option.
(org-agenda-list): Handle display change to clock check.
(org-agenda-get-progress): Show only clock entries if we are doing the
consistency check.
(org-agenda-show-clocking-issues): New function.
(org-agenda-check-clock-gap): New function.
(org-agenda-view-mode-dispatch): Offer consistency check.
(org-agenda-log-mode): Handle switch to clock only display.
(org-agenda-set-mode-name): Show lighter for Clockcheck.
* lisp/org.el (org-hh:mm-string-to-minutes): Accept an integer argument
and return it unchanged.
* doc/org.texi (Agenda commands): Document clock consistency checks.
* doc/orgcard.tex: Document key for clock consistency check.
* lisp/org-list.el (org-list-struct): when walking down the list, the
function would not pay attention to drawers or blocks indentation.
Thus, such constructs couldn't consistently end an item or a list.
This patch ensures line indentation is stored (if applicable) before
skipping them. Also fixed doc-string and comments.
* lisp/org-exp.el (org-export): Go to next heading before searching
backward, so make this also work if we are on the headline of the
entry with the property...
* lisp/org.el (org-promote):
(org-demote): Soften the previous change, by only removing the
flyspell function from after-change functions, because that was the
one causing the slowdown - at least much of it.
* lisp/org.el (org-promote):
(org-demote): Turn off after-change-functions to speed up the
reindentation of text.
This is mainly toob-oz: brought up to date with the rest of Babel
* ob-tangle.el (org-babel-tangle): Make it work in an indirect buffer.
The problem was that the message generated after tangling included the
file name of the current buffer which was nil in an indirect buffer.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-get-timestamps): Fix agenda display when headlines are missing
The following entry breaks the agenda display.
,----
| ****
| :PROPERTIES:
| :DateCreated: <2011-04-13 Mi 10:00>
| :END:
|
| [[gnus:nntp%2BGwene:gwene.org.emacsen.planet][gnus:nntp+Gwene:gwene.org.emacsen.planet]]
`----
Provide the empty string as the headline if the search for the
headline returns nil. org-format-agenda-items requires a string for
the headline parameter.
* lisp/ob.el (org-babel-params-from-buffer): Now looking for header
arguments in #+Properties: as well as #+Babel:. Also, we're no
longer caching these results into a file local variable.
* lisp/ob-python.el (org-babel-python-evaluate-external-process):
Allow parsing as a table in the case of ":results output table".
(org-babel-python-evaluate-session): Allow parsing as a table in
the case of ":results output table".
* lisp/org-agenda.el (org-agenda-bulk-action): Allow bulk scatter
in all possible agenda views. Use `org-agenda-schedule' instead of
`org-agenda-date-later'.
The bulk scatter command so far shifted the date that was causing an
entry to appear in the agenda. However, the true intend was to
reschedule onto dates in the near future. This patch fixes this
issue. A side effect is that you can now bulk scatter tasks that to
not yet have a date, for example also tasks picked from the TODO
list.
* lisp/org.el (org-entry-get):
(org-entry-delete):
(org-entry-put):
(org-property-values):
(org-delete-property-globally): Use org-re-property.
(org-re-property): New function allowing to build a regexp to match a
property.
Signed-off-by: Julien Danjou <julien@danjou.info>
The problem is illustrated by the following example:
* Illustration of bug in html export
- This has a space after the colons :: so will work in latex and html
- This doesn't have a space after the colons ::so is an invalid
description item according to the org manual. Won't work in html
or docbook. Will nevertheless work in latex, provided /first/
description item is valid.
- Has a terminating space ::
- So it works in both html and latex export!
- Even though it's difficult to distinguish from the next example.
- Lacks a terminating space ::
- At present, *doesn't* work in html or docbook export, does in
latex. This is the case that the following patch fixes.
* lisp/org-table.el (org-table-cleanup-narrow-column-properties): Use
point-min rather than 1 when moving in the buffer.
Signed-off-by: Julien Danjou <julien@danjou.info>