summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2011-01-17 12:51:51 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2011-01-17 12:51:51 +0100
commit970dba19b17bdaf395c90040604ee61900886647 (patch)
tree3f081d04716cd5704dcb76e6e1421c1c099f5315
parenta7ac1f5cc98595d8953205e481e528a9a6871c88 (diff)
parent821082b5b091142b3f3c1f7388ac30cde0d040ea (diff)
downloadorg-mode-970dba19b17bdaf395c90040604ee61900886647.tar.gz
Merge branch 'master' of git://orgmode.org/org-mode
-rw-r--r--[l---------].dir-locals.el5
-rw-r--r--Makefile60
-rw-r--r--README_maintainer19
-rw-r--r--contrib/lisp/org-mime.el13
-rw-r--r--doc/org.texi27
-rw-r--r--lisp/ob-tangle.el21
-rw-r--r--lisp/ob.el76
-rw-r--r--lisp/org-agenda.el51
-rw-r--r--lisp/org.el2
9 files changed, 187 insertions, 87 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index 2c9dc35..7094cb9 120000..100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1 +1,4 @@
-.dir-settings.el \ No newline at end of file
+((nil . ((indent-tabs-mode . t)
+ (tab-width . 8)
+ (fill-column . 70))))
+
diff --git a/Makefile b/Makefile
index fa03d6e..636f015 100644
--- a/Makefile
+++ b/Makefile
@@ -318,7 +318,6 @@ release:
UTILITIES/set-version.pl -a $(TAG)
git commit -a -m "Update website to show $(TAG) as current release"
git push
- make updateweb
# The following target makes a release, but from the stuff that is on
# maint, not from the stuff that is on master. The idea is that it pushes
@@ -347,12 +346,40 @@ fixrelease:
UTILITIES/set-version.pl -o $(TAG)
git commit -a -m "Update website to show $(TAG) as current release"
git push
- make updateweb
+# ~$ make relup only makes sense from orgmode.org server
+# Don't call it from your computer!
relup:
${MAKE} makerelease
- ${MAKE} upload_release
- ${MAKE} upload_manual
+ ${MAKE} sync_release
+ ${MAKE} sync_manual
+
+makerelease:
+ @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
+ ${MAKE} distfile
+ ${MAKE} doc
+ UTILITIES/gplmanual.pl
+ ${MAKE} html_manual
+ ${MAKE} html_guide
+ rm -rf RELEASEDIR
+ $(MKDIR) RELEASEDIR
+ cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
+ cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
+ cp doc/org_dual_license.texi RELEASEDIR
+ cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
+ cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
+ cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
+
+# ~$ make sync_release only makes sense from orgmode.org server
+# Don't call it from your computer!
+sync_release:
+ rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
+
+# ~$ make sync_manual only makes sense from orgmode.org server
+# Don't call it from your computer!
+sync_manual:
+ rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
+ rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
distfile:
@if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
@@ -370,7 +397,7 @@ distfile:
cp -r $(DISTFILES_extra) org-$(TAG)/
cp -r README_DIST org-$(TAG)/README
zip -r org-$(TAG).zip org-$(TAG)
- gtar zcvf org-$(TAG).tar.gz org-$(TAG)
+ tar zcvf org-$(TAG).tar.gz org-$(TAG)
pkg:
@if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
@@ -383,29 +410,6 @@ pkg:
echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
-makerelease:
- @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
- ${MAKE} distfile
- ${MAKE} doc
- UTILITIES/gplmanual.pl
- ${MAKE} html_manual
- ${MAKE} html_guide
- rm -rf RELEASEDIR
- $(MKDIR) RELEASEDIR
- cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
- cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
- cp doc/org_dual_license.texi RELEASEDIR
- cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
- cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
- cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
-
-upload_release:
- rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
-
-upload_manual:
- rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
- rsync -avuz --delete doc/guide/ cdominik@orgmode.org:orgmode.org/guide/
-
cleanall:
${MAKE} clean
rm -f lisp/org-install.el
diff --git a/README_maintainer b/README_maintainer
index 3497654..8d1fdc2 100644
--- a/README_maintainer
+++ b/README_maintainer
@@ -131,6 +131,23 @@ from maint with this command:
: make fixrelease TAG=7.13.01
+** Updating release files on orgmode.org server
+
+As of 2011-01-15, these directives of the Makefile are meant to be
+used /from orgmode.org server/ and will copy the release files to the
+webserver directory.
+
+- ~$ make makerelease :: creates a =RELEASE/= directory containing
+ manuals and release files (=org.tar.gz=, =org.zip=, etc.)
+
+- ~$ make sync_release :: copy the content of =RELEASE/= to the right
+ location on the server
+
+- ~$ make sync_manuals :: copy the manuals from =doc/= to the right
+ location on the server
+
+- ~$ make relup :: call the three directives described above.
+
** Between releases
While working on master between releases, I used to use something like
@@ -160,7 +177,7 @@ around it]]), and so much faster.
So the way I have been doing things with Emacs is this:
1. I do not update the version in Emacs too often. Just once every
- few month - this is frequently enough for the Emacs release cycle.
+ few months - this is frequently enough for the Emacs release cycle.
Care must be taken to get in a *new and stable* version shortly
before Emacs goes into feature freeze and pretest, because that
version is going to be in the wild for a long time.
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 83f4597..2337141 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -55,6 +55,11 @@
;;; Code:
(require 'cl)
+(defcustom org-mime-use-property-inheritance nil
+ "Non-nil means al MAIL_ properties apply also for sublevels."
+ :group 'org-mime
+ :type 'boolean)
+
(defcustom org-mime-default-header
"#+OPTIONS: latex:t\n"
"Default header to control html export options, and ensure
@@ -232,9 +237,9 @@ export that region, otherwise export the entire body."
(run-hooks 'org-mime-send-subtree-hook)
(let* ((file (buffer-file-name (current-buffer)))
(subject (nth 4 (org-heading-components)))
- (to (org-entry-get nil "MAIL_TO" org-use-property-inheritance))
- (cc (org-entry-get nil "MAIL_CC" org-use-property-inheritance))
- (bcc (org-entry-get nil "MAIL_BCC" org-use-property-inheritance))
+ (to (org-entry-get nil "MAIL_TO" org-mime-use-property-inheritance))
+ (cc (org-entry-get nil "MAIL_CC" org-mime-use-property-inheritance))
+ (bcc (org-entry-get nil "MAIL_BCC" org-mime-use-property-inheritance))
(body (buffer-substring
(save-excursion (goto-char (point-min))
(forward-line 1)
@@ -312,6 +317,6 @@ export that region, otherwise export the entire body."
MAIL_FMT property of the subtree."
(interactive)
(org-mime-send-subtree
- (or (org-entry-get nil "MAIL_FMT" org-use-property-inheritance) 'org)))
+ (or (org-entry-get nil "MAIL_FMT" org-mime-use-property-inheritance) 'org)))
(provide 'org-mime)
diff --git a/doc/org.texi b/doc/org.texi
index 4d696ae..1efac9c 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10982,10 +10982,10 @@ Org-mode can generate an index across the files of a publishing project.
publish it as @file{theindex.html}.
@end multitable
-The file will be create when first publishing a project with the
+The file will be created when first publishing a project with the
@code{:makeindex} set. The file only contains a statement @code{#+include:
-"theindex.inc"}. You can then built around this include statement by adding
-a title, style information etc.
+"theindex.inc"}. You can then build around this include statement by adding
+a title, style information, etc.
@node Uploading files, Sample configuration, Configuration, Publishing
@section Uploading files
@@ -12129,6 +12129,9 @@ The text is picked from the leading context of the tangled code and is
limited by the nearest headline or source block as the case may be.
@item @code{both}
Turns on both the ``link'' and ``org'' comment options.
+@item @code{noweb}
+Turns on the ``link'' comment option, and additionally wraps expanded noweb
+references in the code block body in link comments.
@end itemize
@node no-expand, session, comments, Specific header arguments
@@ -13465,15 +13468,17 @@ fixed this problem:
(define-key yas/keymap [tab] 'yas/next-field-group)))
@end lisp
-The latest version of yasnippets doesn't play well with Org mode. If the
+The latest version of yasnippet doesn't play well with Org mode. If the
above code does not fix the conflict, start by defining the following
function:
+
@lisp
(defun yas/org-very-safe-expand ()
(let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
@end lisp
Then, tell Org mode what to do with the new function:
+
@lisp
(add-hook 'org-mode-hook
(lambda ()
@@ -14093,11 +14098,17 @@ written in a way such that it does nothing in buffers that are not in
@section Special agenda views
@cindex agenda views, user-defined
+@vindex org-agenda-skip-function
+@vindex org-agenda-skip-function-global
Org provides a special hook that can be used to narrow down the selection
-made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, @code{tags-todo},
-@code{tags-tree}. You may specify a function that is used at each match to verify
-if the match should indeed be part of the agenda view, and if not, how
-much should be skipped.
+made by these agenda views: @code{todo}, @code{alltodo}, @code{tags},
+@code{tags-todo}, @code{tags-tree}. You may specify a function that is used
+at each match to verify if the match should indeed be part of the agenda
+view, and if not, how much should be skipped. You can specify a global
+condition that will be applied to all agenda views, this condition would be
+stored in the variable @code{org-agenda-skip-function-global}. More
+commonly, such a definition is applied only to specific custom searches,
+using @code{org-agenda-skip-function}.
Let's say you want to produce a list of projects that contain a WAITING
tag anywhere in the project tree. Let's further assume that you have
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 0dbb621..4d34082 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -364,7 +364,7 @@ form
(comment (nth 6 spec))
(comments (cdr (assoc :comments (nth 4 spec))))
(link-p (or (string= comments "both") (string= comments "link")
- (string= comments "yes")))
+ (string= comments "yes") (string= comments "noweb")))
(link-data (mapcar (lambda (el)
(cons (symbol-name el)
((lambda (le)
@@ -393,7 +393,24 @@ form
(insert-comment
(org-fill-template org-babel-tangle-comment-format-end link-data))))))
-;; dangling functions
+(defun org-babel-tangle-comment-links ( &optional info)
+ "Return a list of begin and end link comments for the code block at point."
+ (let* ((start-line (org-babel-where-is-src-block-head))
+ (file (buffer-file-name))
+ (link (org-link-escape (progn (call-interactively 'org-store-link)
+ (org-babel-clean-text-properties
+ (car (pop org-stored-links))))))
+ (source-name (nth 4 (or info (org-babel-get-src-block-info 'light))))
+ (link-data (mapcar (lambda (el)
+ (cons (symbol-name el)
+ ((lambda (le)
+ (if (stringp le) le (format "%S" le)))
+ (eval el))))
+ '(start-line file link source-name))))
+ (list (org-fill-template org-babel-tangle-comment-format-beg link-data)
+ (org-fill-template org-babel-tangle-comment-format-end link-data))))
+
+;; de-tangling functions
(defvar org-bracket-link-analytic-regexp)
(defun org-babel-detangle (&optional source-code-file)
"Propagate changes in source file back original to Org-mode file.
diff --git a/lisp/ob.el b/lisp/ob.el
index f6c7a0f..82625c0 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1729,9 +1729,14 @@ block but are passed literally to the \"example-block\"."
(info (or info (org-babel-get-src-block-info)))
(lang (nth 0 info))
(body (nth 1 info))
+ (comment (string= "noweb" (cdr (assoc :comments (nth 2 info)))))
(new-body "") index source-name evaluate prefix)
- (flet ((nb-add (text)
- (setq new-body (concat new-body text))))
+ (flet ((nb-add (text) (setq new-body (concat new-body text)))
+ (c-wrap (text)
+ (with-temp-buffer
+ (funcall (intern (concat lang "-mode")))
+ (comment-region (point) (progn (insert text) (point)))
+ (org-babel-trim (buffer-string)))))
(with-temp-buffer
(insert body) (goto-char (point-min))
(setq index (point))
@@ -1748,35 +1753,44 @@ block but are passed literally to the \"example-block\"."
(nb-add (buffer-substring index (point)))
(goto-char (match-end 0))
(setq index (point))
- (nb-add (with-current-buffer parent-buffer
- (mapconcat ;; interpose PREFIX between every line
- #'identity
- (split-string
- (if evaluate
- (let ((raw (org-babel-ref-resolve source-name)))
- (if (stringp raw) raw (format "%S" raw)))
- (or (nth 2 (assoc (intern source-name)
- org-babel-library-of-babel))
- (save-restriction
- (widen)
- (let ((point (org-babel-find-named-block
- source-name)))
- (if point
- (save-excursion
- (goto-char point)
- (org-babel-trim
- (org-babel-expand-noweb-references
- (org-babel-get-src-block-info))))
- ;; optionally raise an error if named
- ;; source-block doesn't exist
- (if (member lang org-babel-noweb-error-langs)
- (error "%s"
- (concat
- "<<" source-name ">> "
- "could not be resolved (see "
- "`org-babel-noweb-error-langs')"))
- ""))))))
- "[\n\r]") (concat "\n" prefix)))))
+ (nb-add
+ (with-current-buffer parent-buffer
+ (mapconcat ;; interpose PREFIX between every line
+ #'identity
+ (split-string
+ (if evaluate
+ (let ((raw (org-babel-ref-resolve source-name)))
+ (if (stringp raw) raw (format "%S" raw)))
+ (or (nth 2 (assoc (intern source-name)
+ org-babel-library-of-babel))
+ (save-restriction
+ (widen)
+ (let ((point (org-babel-find-named-block
+ source-name)))
+ (if point
+ (save-excursion
+ (goto-char point)
+ ;; possibly wrap body in comments
+ (let* ((i (org-babel-get-src-block-info 'light))
+ (body (org-babel-trim
+ (org-babel-expand-noweb-references
+ i))))
+ (if comment
+ ((lambda (cs) (concat (c-wrap (car cs)) "\n"
+ body
+ "\n" (c-wrap (cadr cs))))
+ (org-babel-tangle-comment-links i))
+ body)))
+ ;; optionally raise an error if named
+ ;; source-block doesn't exist
+ (if (member lang org-babel-noweb-error-langs)
+ (error "%s"
+ (concat
+ "<<" source-name ">> "
+ "could not be resolved (see "
+ "`org-babel-noweb-error-langs')"))
+ ""))))))
+ "[\n\r]") (concat "\n" prefix)))))
(nb-add (buffer-substring index (point-max)))))
new-body))
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index bf36758..0cd620c 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -516,6 +516,23 @@ this one will be used."
"Options concerning skipping parts of agenda files."
:tag "Org Agenda Skip"
:group 'org-agenda)
+
+(defcustom org-agenda-skip-function-global nil
+ "Function to be called at each match during agenda construction.
+If this function returns nil, the current match should not be skipped.
+If the function decised to skip an agenda match, is must return the
+buffer position from which the search should be continued.
+This may also be a Lisp form, which will be evaluated.
+
+This variable will be applied to every agenda match, including
+tags/property searches and TODO lists. So try to make the test function
+do its checking as efficiently as possible. To implement a skipping
+condition just for specific agenda commands, use the variable
+`org-agenda-skip-function' which can be set in the options section
+of custom agenda commands."
+ :group 'org-agenda-skip
+ :type 'sexp)
+
(defgroup org-agenda-daily/weekly nil
"Options concerning the daily/weekly agenda."
:tag "Org Agenda Daily/Weekly"
@@ -3112,15 +3129,17 @@ Otherwise, the function must return a position from where the search
should be continued.
This may also be a Lisp form, it will be evaluated.
Never set this variable using `setq' or so, because then it will apply
-to all future agenda commands. Instead, bind it with `let' to scope
-it dynamically into the agenda-constructing command. A good way to set
-it is through options in `org-agenda-custom-commands'.")
+to all future agenda commands. If you do want a global skipping condition,
+use the option `org-agenda-skip-function-global' instead.
+The correct usage for `org-agenda-skip-function' is to bind it with
+`let' to scope it dynamically into the agenda-constructing command.
+A good way to set it is through options in `org-agenda-custom-commands'.")
(defun org-agenda-skip ()
"Throw to `:skip' in places that should be skipped.
Also moves point to the end of the skipped region, so that search can
continue from there."
- (let ((p (point-at-bol)) to fp)
+ (let ((p (point-at-bol)) to)
(and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
(get-text-property p :org-archived)
(org-end-of-subtree t)
@@ -3130,16 +3149,26 @@ continue from there."
(org-end-of-subtree t)
(throw :skip t))
(if (equal (char-after p) ?#) (throw :skip t))
- (when (and (or (setq fp (functionp org-agenda-skip-function))
- (consp org-agenda-skip-function))
- (setq to (save-excursion
- (save-match-data
- (if fp
- (funcall org-agenda-skip-function)
- (eval org-agenda-skip-function))))))
+ (when (setq to (or (org-agenda-skip-eval org-agenda-skip-function-global)
+ (org-agenda-skip-eval org-agenda-skip-function)))
(goto-char to)
(throw :skip t))))
+(defun org-agenda-skip-eval (form)
+ "If FORM is a function or a list, call (or eval) is and return result.
+`save-excursion' and `save-match-data' are wrapped around the call, so point
+and match data are returned to the previous state no matter what these
+functions do."
+ (let (fp)
+ (and form
+ (or (setq fp (functionp form))
+ (consp form))
+ (save-excursion
+ (save-match-data
+ (if fp
+ (funcall form)
+ (eval form)))))))
+
(defvar org-agenda-markers nil
"List of all currently active markers created by `org-agenda'.")
(defvar org-agenda-last-marker-time (org-float-time)
diff --git a/lisp/org.el b/lisp/org.el
index b2b08ae..6e8aeac 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10368,7 +10368,7 @@ This can be done with a 0 prefix: `C-0 C-c C-w'"
(goto-char pos)
(beginning-of-line 1)
(unless (org-looking-at-p re)
- (error "Invalid refile position, please rebuild the cache"))))))))
+ (error "Invalid refile position, please clear the cache with `C-0 C-c C-w' before refiling"))))))))
(defun org-refile-new-child (parent-target child)
"Use refile target PARENT-TARGET to add new CHILD below it."