Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

This commit is contained in:
David Maus 2010-08-23 19:35:52 +02:00
commit 17c7786bb0
3 changed files with 25 additions and 12 deletions

View File

@ -187,7 +187,7 @@ exported source code blocks by language."
(insert content)
(write-region nil nil file-name))))
;; if files contain she-bangs, then make the executable
(when she-bang (set-file-modes file-name ?\755))
(when she-bang (set-file-modes file-name #o755))
;; update counter
(setq block-counter (+ 1 block-counter))
(add-to-list 'path-collector file-name)))))

View File

@ -189,7 +189,14 @@ sitemap of files or summary page for a given project.
The following properties control the creation of a concept index.
:makeindex Create a concept index."
:makeindex Create a concept index.
Other properties affecting publication.
:body-only Set this to 't' to publish only the body of the
documents, excluding everything outside and
including the <body> tags in HTML, or
\begin{document}..\end{document} in LaTeX."
:group 'org-publish
:type 'alist)
@ -513,7 +520,9 @@ PUB-DIR is the publishing directory."
(setq export-buf-or-file
(funcall (intern (concat "org-export-as-" format))
(plist-get plist :headline-levels)
nil plist nil nil pub-dir))
nil plist nil
(plist-get plist :body-only)
pub-dir))
(when (and (bufferp export-buf-or-file)
(buffer-live-p export-buf-or-file))
(set-buffer export-buf-or-file)

View File

@ -8218,7 +8218,7 @@ For file links, arg negates `org-context-in-file-links'."
(org-load-modules-maybe)
(setq org-store-link-plist nil) ; reset
(let ((outline-regexp (org-get-limited-outline-regexp))
link cpltxt desc description search txt custom-id)
link cpltxt desc description search txt custom-id agenda-link)
(cond
((run-hook-with-args-until-success 'org-store-link-functions)
@ -8250,9 +8250,10 @@ For file links, arg negates `org-context-in-file-links'."
(get-text-property (point) 'org-marker))))
(when m
(org-with-point-at m
(setq agenda-link
(if (interactive-p)
(call-interactively 'org-store-link)
(org-store-link nil))))))
(org-store-link nil)))))))
((eq major-mode 'calendar-mode)
(let ((cd (calendar-cursor-to-date)))
@ -8300,13 +8301,14 @@ For file links, arg negates `org-context-in-file-links'."
(setq cpltxt (concat "file:" file)
link (org-make-link cpltxt))))
((and buffer-file-name (org-mode-p))
((and (buffer-file-name (buffer-base-buffer)) (org-mode-p))
(setq custom-id (ignore-errors (org-entry-get nil "CUSTOM_ID")))
(cond
((org-in-regexp "<<\\(.*?\\)>>")
(setq cpltxt
(concat "file:"
(abbreviate-file-name buffer-file-name)
(abbreviate-file-name
(buffer-file-name (buffer-base-buffer)))
"::" (match-string 1))
link (org-make-link cpltxt)))
((and (featurep 'org-id)
@ -8328,11 +8330,13 @@ For file links, arg negates `org-context-in-file-links'."
(error
;; probably before first headline, link to file only
(concat "file:"
(abbreviate-file-name buffer-file-name))))))
(abbreviate-file-name
(buffer-file-name (buffer-base-buffer))))))))
(t
;; Just link to current headline
(setq cpltxt (concat "file:"
(abbreviate-file-name buffer-file-name)))
(abbreviate-file-name
(buffer-file-name (buffer-base-buffer)))))
;; Add a context search string
(when (org-xor org-context-in-file-links arg)
(setq txt (cond
@ -8389,7 +8393,7 @@ For file links, arg negates `org-context-in-file-links'."
"::#" custom-id))
(setq org-stored-links
(cons (list link desc) org-stored-links))))
(and link (org-make-link-string link desc)))))
(or agenda-link (and link (org-make-link-string link desc))))))
(defun org-store-link-props (&rest plist)
"Store link properties, extract names and addresses."