Completion for INFOJS options, and documentation. Add new faces.

This commit is contained in:
Carsten Dominik 2008-04-09 13:49:51 +02:00
parent 59bc014d99
commit 7a51a7e5f0
6 changed files with 116 additions and 23 deletions

View File

@ -1,5 +1,8 @@
2008-04-08 Carsten Dominik <dominik@science.uva.nl>
* lisp/org-exp.el (org-get-current-options): Incorporate LINK_UP,
LINK_HOME, and INFOJS.
* lisp/org-agenda.el (org-agenda-weekend-days): New variable.
* lisp/org.el (org-agenda-date, org-agenda-date-weekend): New faces.

View File

@ -9,6 +9,13 @@
** Details
*** Faces
There are now special faces for the date lines in the
agenda/timeline buffers, and another special face for days
that fall on a weekend: `org-agenda-date' and
`org-agenda-date-weekend'.
*** New archiving mechanism: The Attic Sibling
There is a new method to archive entries in the current file:

View File

@ -286,6 +286,7 @@ HTML export
* Links:: Transformation of links for HTML
* Images:: How to include images
* CSS support:: Changing the appearance of the output
* Javascript support:: Info and Folding in a web browser
LaTeX export
@ -6494,6 +6495,7 @@ language, but with additional support for tables.
* Links:: Transformation of links for HTML
* Images:: How to include images
* CSS support:: Changing the appearance of the output
* Javascript support:: Info and Folding in a web browser
@end menu
@node HTML Export commands, Quoting HTML tags, HTML export, HTML export
@ -6617,8 +6619,10 @@ will link to a high resolution version of the image, you could use:
@noindent
and you could use @code{http} addresses just as well.
@node CSS support, , Images, HTML export
@node CSS support, Javascript support, Images, HTML export
@subsection CSS support
@cindex CSS, for HTML export
@cindex HTML export, CSS
You can also give style information for the exported file. The HTML
exporter assigns the following CSS classes to appropriate parts of the
@ -6658,6 +6662,59 @@ section in the buffer.
@c FIXME: More about header and footer styles
@c FIXME: Talk about links and targets.
@node Javascript support, , CSS support, HTML export
@subsection Javascript supported display of web pages
@emph{Sebastian Rose} has written a JavaScript program especially designed to
enhance the web viewing experience of HTML files created with Org. This
program allows to view large files in two different ways. The first one is
an @emph{Info}-like mode where each section is displayed separately and
navigation can be done with the @kbd{n} and @kbd{p} keys (and some other keys
as well, press @kbd{?} for an overview of the available keys). The second
view type is a @emph{folding} view much like Org provides it inside Emacs.
The script is available at @url{http://orgmode.org/org-info.js} and you can
find the documentation for it at @url{http://orgmode.org/org-infojs.html}.
We are serving the script from our site, but if you use it a lot, you might
not want to be dependent on @url{orgmode.org} and prefer to install a local
copy on your own web server.
To use the script, you need to make sure that the @file{org-infojs.el} module
gets loaded. It should be loaded by default, try @kbd{M-x customize-variable
@key{RET} org-modules @key{RET}} to convince yourself that this is indeed the
case. All it then takes to make use of the program is adding a single line
to the Org file:
@example
#+INFOSJ_OPT: view:info toc:nil
@end example
@noindent
If this line is found, the HTML header will automatically contain the code
needed to invoke the script. Using the line above, you can set the following
viewing options:
@example
view: @r{Initial view when website is first shown. Possible values are}
info @r{Info-like interface with one section per page.}
overview @r{Folding interface, initially showing only top-level.}
content @r{Folding interface, starting with all headlines visible.}
showall @r{Folding interface, all headlines and text visible.}
toc: @r{Should the table of content be visible as the first section?}
@r{Even when @code{nil}, you can always get to the toc with @kbd{i}.}
ltoc: @r{Should there be short contents in each section?}
path: @r{The path to the script. The default is to grab the script from}
@r{@url{http://orgmode.org/org-info.js}, but you might want to have}
@r{a local copy use a path like @samp{../scripts/org-info.js}.}
mouse: @r{Headings are highlighted when the mouse is over the. Should be}
@r{@samp{underline} (default) or a background color like @samp{#cccccc}.}
buttons: @r{Should view-toggle buttons be everywhere? When @code{nil} (the}
@r{default), only one such button will be present.}
@end example
You can choose default values for these options by customizing the variable
@code{org-infojs-options}. If you always want to apply the script to your
pages, configure the variable @code{org-export-html-use-infojs}.
@node LaTeX export, XOXO export, HTML export, Exporting
@section LaTeX export
@cindex LaTeX export
@ -8741,6 +8798,11 @@ goals that Org still has today: To create a new, outline-based,
plain text mode with innovative and intuitive editing features, and to
incorporate project planning functionality directly into a notes file.
A special thanks goes to @i{Bastien Guerry} who has not only writen a large
number of extensions to Org (most of them integrated into the core by now),
but has also helep the development and maintenance of Org so much that e
should be considered co-author of this package.
Since the first release, literally thousands of emails to me or on
@code{emacs-orgmode@@gnu.org} have provided a constant stream of bug
reports, feedback, new ideas, and sometimes patches and add-on code.
@ -8800,6 +8862,10 @@ with patches, ideas, and bug reports.
@item
@i{Kai Grossjohann} pointed out key-binding conflicts with other packages.
@item
@i{Bernt Hansen} has driven much of the support for auto-repeating tasks,
task state change logging, and the clocktable. His clear explanations have
been critical when we started to adopt the GIT version control system.
@item
@i{Scott Jaderholm} proposed footnotes, control over whitespace between
folded entries, and column view for properties.
@item
@ -8842,6 +8908,10 @@ control.
@item
@i{Kevin Rogers} contributed code to access VM files on remote hosts.
@item
@i{Sebastian Rose} wrote @file{org-info.js}, a Java script for displaying
webpages derived from Org using an Info-like, or a folding interface with
single key navigation.
@item
@i{Frank Ruell} solved the mystery of the @code{keymapp nil} bug, a
conflict with @file{allout.el}.
@item

View File

@ -34,6 +34,7 @@
(declare-function org-export-latex-cleaned-string "org-export-latex" ())
(declare-function org-agenda-skip "org-agenda" ())
(declare-function org-infojs-options-inbuffer-template "org-infojs" ())
(defgroup org-export nil
"Options for exporting org-listings."
@ -1861,6 +1862,9 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
#+LANGUAGE: %s
#+TEXT: Some descriptive text to be emitted. Several lines OK.
#+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s -:%s f:%s *:%s TeX:%s LaTeX:%s skip:%s d:%s tags:%s
%s
#+LINK_UP: %s
#+LINK_HOME: %s
#+CATEGORY: %s
#+SEQ_TODO: %s
#+TYP_TODO: %s
@ -1890,6 +1894,9 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
org-export-skip-text-before-1st-heading
org-export-with-drawers
org-export-with-tags
(if (featurep 'org-infojs) (org-infojs-options-inbuffer-template) "")
org-export-html-link-up
org-export-html-link-home
(file-name-nondirectory buffer-file-name)
"TODO FEEDBACK VERIFY DONE"
"Me Jason Marie DONE"

View File

@ -65,7 +65,7 @@ line in the buffer. See also the variable `org-infojs-options'."
(const :tag "Always" t)))
(defconst org-infojs-opts-table
'((path PATH "org-info.js")
'((path PATH "http://orgmode.org/org-info.js")
(view VIEW "info")
(toc TOC :table-of-contents)
(mouse MOUSE_HINT "underline")
@ -108,7 +108,9 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
"Analyze JavaScript options in INFO-PLIST and modify EXP-PLIST accordingly."
(if (or (not org-export-html-use-infojs)
(and (eq org-export-html-use-infojs 'when-configured)
(not (plist-get exp-plist :infojs-opt))))
(or (not (plist-get exp-plist :infojs-opt))
(string-match "\\<view:nil\\>"
(plist-get exp-plist :infojs-opt)))))
;; We do not want to use the script
exp-plist
;; We do want to use the script, set it up
@ -156,6 +158,18 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
;; Return the modified property list
exp-plist)))
(defun org-infojs-options-inbuffer-template ()
(format "#+INFOJS_OPT: view:%s toc:%s ltoc:%s runs:%s mouse:%s buttons:%s path:%s"
(if (eq t org-export-html-use-infojs) (cdr (assoc 'view org-infojs-options)) nil)
(let ((a (cdr (assoc 'toc org-infojs-options))))
(cond ((memq a '(nil t)) a)
(t (plist-get (org-infile-export-plist) :table-of-contents))))
(if (equal (cdr (assoc 'ltoc org-infojs-options)) "1") t nil)
(cdr (assoc 'runs org-infojs-options))
(cdr (assoc 'mouse org-infojs-options))
(cdr (assoc 'buttons org-infojs-options))
(cdr (assoc 'path org-infojs-options))))
(provide 'org-infojs)
;;; org-infojs.el ends here

View File

@ -2563,27 +2563,19 @@ list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
"Face used in agenda for captions and dates."
:group 'org-faces)
(defface org-agenda-date
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Blue"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 8)) (:foreground "blue" :bold t))
(t (:bold t))))
"Face used in agenda for captions and dates."
:group 'org-faces)
(unless (facep 'org-agenda-date)
(copy-face 'org-agenda-structure 'org-agenda-date)
(set-face-doc-string 'org-agenda-date
"Face used in agenda for normal days."))
(defface org-agenda-date-weekend
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Blue1" :weight bold))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Blue"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 8)) (:foreground "blue" :bold t))
(t (:bold t))))
"Face used in agenda for captions and dates."
:group 'org-faces)
(unless (facep 'org-agenda-date-weekend)
(copy-face 'org-agenda-date 'org-agenda-date-weekend)
(set-face-doc-string 'org-agenda-date-weekend
"Face used in agenda for weekend days.
See the variable `org-agenda-weekend-days' for a definition of which days
belong to the weekend.")
(when (fboundp 'set-face-attribute)
(set-face-attribute 'org-agenda-date-weekend nil :weight 'bold)))
(defface org-scheduled-today
(org-compatible-face nil