From fac916bfd7f839a654c839dca609d0d75a77846a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 14 Dec 2011 13:05:20 -0800 Subject: Spelling fixes. --- doc/misc/gnus.texi | 4 ++-- doc/misc/org.texi | 2 +- doc/misc/rcirc.texi | 10 +++++----- etc/NEWS.23 | 2 +- lisp/ChangeLog | 2 +- lisp/ChangeLog.10 | 2 +- lisp/ChangeLog.11 | 2 +- lisp/ChangeLog.14 | 2 +- lisp/cedet/semantic/db-file.el | 12 ++++++------ lisp/cedet/semantic/db.el | 4 ++-- lisp/cedet/semantic/idle.el | 6 +++--- lisp/cedet/semantic/lex.el | 2 +- lisp/cedet/semantic/util-modes.el | 6 +++--- lisp/erc/erc-backend.el | 2 +- lisp/gnus/ChangeLog.2 | 2 +- lisp/gnus/gnus-group.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/message.el | 2 +- lisp/gnus/rfc2231.el | 2 +- lisp/net/tramp-sh.el | 10 +++++----- lisp/url/url-http.el | 4 ++-- lisp/vc/ediff-ptch.el | 2 +- src/ChangeLog.7 | 2 +- src/ChangeLog.8 | 2 +- src/xselect.c | 2 +- 25 files changed, 45 insertions(+), 45 deletions(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 68c7e8bbdbc..8ed57699df5 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -11634,7 +11634,7 @@ message/external-body @acronym{MIME} type. @item r (Article) @kindex r (Article) Prompt for a file name, replace the @acronym{MIME} object with an -external body refering to the file via the message/external-body +external body referring to the file via the message/external-body @acronym{MIME} type. (@code{gnus-mime-replace-part}). @findex gnus-mime-delete-part @@ -30012,7 +30012,7 @@ this: @node Score File Syntax @subsection Score File Syntax -Score files are meant to be easily parseable, but yet extremely +Score files are meant to be easily parsable, but yet extremely malleable. It was decided that something that had the same read syntax as an Emacs Lisp list would fit that spec. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index a6fae5e216f..adc9cf0b139 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -12469,7 +12469,7 @@ block. E.g., @code{:results value html}. Results assumed to be LaTeX and are enclosed in a @code{begin_latex} block. E.g., @code{:results value latex}. @item @code{code} -Result are assumed to be parseable code and are enclosed in a code block. +Result are assumed to be parsable code and are enclosed in a code block. E.g., @code{:results value code}. @item @code{pp} The result is converted to pretty-printed code and is enclosed in a code diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 3e9ee928822..192afe33cb4 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -524,7 +524,7 @@ your full name, you might want to set it to some pseudonym. @item rcirc-authinfo @vindex rcirc-authinfo -@cindex authentification +@cindex authentication @cindex identification @cindex nickserv @cindex login @@ -547,7 +547,7 @@ And here are the valid method symbols and the arguments they require: @table @code @item nickserv -@cindex nickserv authentification +@cindex nickserv authentication Use this symbol if you need to identify yourself as follows when connecting to a network: @code{/msg nickserv identify secret}. The necessary arguments are the nickname you want to use this for, and the @@ -558,7 +558,7 @@ pick a password for it. Contact @code{nickserv} and check out the details. (Using @code{/msg nickserv help}, for example.) @item chanserv -@cindex chanserv authentification +@cindex chanserv authentication Use this symbol if you need to identify yourself as follows if you want to join a particular channel: @code{/msg chanserv identify #underground secret}. The necessary arguments are the nickname and channel you want @@ -569,7 +569,7 @@ the password to use. Contact @code{chanserv} and check out the details. (Using @code{/msg chanserv help}, for example.) @item bitlbee -@cindex bitlbee authentification +@cindex bitlbee authentication Use this symbol if you need to identify yourself in the Bitlbee channel as follows: @code{identify secret}. The necessary arguments are the nickname you want to use this for, and the password to use. @@ -585,7 +585,7 @@ Bitlbee acts like an IRC server, but in fact it is a gateway to a lot of other instant messaging services. You can either install Bitlbee locally or use a public Bitlbee server. There, you need to create an account with a password. This is the nick and password you need to -provide for the bitlbee authentification method. +provide for the bitlbee authentication method. Later, you will tell Bitlbee about your accounts and passwords on all the other instant messaging services, and Bitlbee will log you in. All diff --git a/etc/NEWS.23 b/etc/NEWS.23 index 6f1b50e8c7a..b9570ee9e29 100644 --- a/etc/NEWS.23 +++ b/etc/NEWS.23 @@ -1677,7 +1677,7 @@ Running processes on a remote host can be controlled by settings in When the variable `file-precious-flag' is set, the success of a remote file copy is checked via the file's checksum. -*** Passwords can be read from an authentification file. +*** Passwords can be read from an authentication file. Tramp uses the package `auth-source' to read passwords from a file, if necessary. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf042ec6c82..cb412197f3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5275,7 +5275,7 @@ (ses-calculate-cell, ses-update-cells): Use Dijkstra algorithm for cycle detection. (ses-self-reference-early-detection): New defcustom. - (ses-formula-references): Robustify against self-refering cells. + (ses-formula-references): Robustify against self-referring cells. (ses-mode): Use ses-set-localvars. (ses-command-hook): Add call to ses-initialize-Dijkstra-attempt before lauching the update processing. diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10 index a1cfaee6eaf..d6ac498c877 100644 --- a/lisp/ChangeLog.10 +++ b/lisp/ChangeLog.10 @@ -8278,7 +8278,7 @@ 2002-11-17 Markus Rost * speedbar.el (defgroup speedbar): Use group 'etags instead of - nonexisting group 'tags. + nonexistent group 'tags. * emacs-lisp/re-builder.el: Add provide call. diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11 index 38a5530fbfc..dd1d113d665 100644 --- a/lisp/ChangeLog.11 +++ b/lisp/ChangeLog.11 @@ -1744,7 +1744,7 @@ substitute-env-vars -- not quite shell compatible but better than nothing. (compilation-error-regexp-alist-alist): Simplify ftnchek to only - handle the newer versions messages, which are more parseable. + handle the newer versions messages, which are more parsable. 2004-11-22 Stefan Monnier diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14 index 7063ed67b62..213f5cfb784 100644 --- a/lisp/ChangeLog.14 +++ b/lisp/ChangeLog.14 @@ -19176,7 +19176,7 @@ toggle-read-only. * textmodes/bibtex.el (bibtex-format-entry): Handle error message - refering to a missing required field with the OPT prefix. + referring to a missing required field with the OPT prefix. Make unwindform more robust. * textmodes/bibtex.el: Remove support for hideshow minor mode as diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 943ccf23031..9df240a3681 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el @@ -193,16 +193,16 @@ If DIRECTORY doesn't exist, create a new one." (eieio-instance-tracker-find filename 'file 'semanticdb-database-list)) (defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file) - &optional supress-questions) + &optional suppress-questions) "Does the directory the database DB needs to write to exist? -If SUPRESS-QUESTIONS, then do not ask to create the directory." +If SUPPRESS-QUESTIONS, then do not ask to create the directory." (let ((dest (file-name-directory (oref DB file))) ) (cond ((null dest) ;; @TODO - If it was never set up... what should we do ? nil) ((file-exists-p dest) t) - ((or supress-questions + ((or suppress-questions (and (boundp 'semanticdb--inhibit-make-directory) semanticdb--inhibit-make-directory)) nil) @@ -216,13 +216,13 @@ If SUPRESS-QUESTIONS, then do not ask to create the directory." (defmethod semanticdb-save-db ((DB semanticdb-project-database-file) &optional - supress-questions) + suppress-questions) "Write out the database DB to its file. If DB is not specified, then use the current database." (let ((objname (oref DB file))) (when (and (semanticdb-dirty-p DB) (semanticdb-live-p DB) - (semanticdb-file-directory-exists-p DB supress-questions) + (semanticdb-file-directory-exists-p DB suppress-questions) (semanticdb-write-directory-p DB) ) ;;(message "Saving tag summary for %s..." objname) @@ -243,7 +243,7 @@ If DB is not specified, then use the current database." (t ;; @todo - It should ask if we are not called from a hook. ;; How? - (if (or supress-questions + (if (or suppress-questions (y-or-n-p (format "Skip Error: %s ?" (car (cdr foo))))) (message "Save Error: %S: %s" (car (cdr foo)) objname) diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 3d2128db29a..c159a26dc1e 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -227,7 +227,7 @@ it is in Emacs.") "Non nil if this table needs to be `Saved'.") (db-refs :initform nil :documentation - "List of `semanticdb-table' objects refering to this one. + "List of `semanticdb-table' objects referring to this one. These aren't saved, but are instead recalculated after load. See the file semantic/db-ref.el for how this slot is used.") (pointmax :initarg :pointmax @@ -657,7 +657,7 @@ The file associated with OBJ does not need to be in a buffer." ;;; SAVE/LOAD ;; (defmethod semanticdb-save-db ((DB semanticdb-project-database) - &optional supress-questions) + &optional suppress-questions) "Cause a database to save itself. The database base class does not save itself persistently. Subclasses could save themselves to a file, or to a database, or other diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 4b3a51e79f7..c60ca4b4b6a 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -246,8 +246,8 @@ And also manages services that depend on tag values." ;; NOTE ON COMMENTED SAFE HERE ;; We used to not execute the services if the buffer was - ;; unparseable. We now assume that they are lexically - ;; safe to do, because we have marked the buffer unparseable + ;; unparsable. We now assume that they are lexically + ;; safe to do, because we have marked the buffer unparsable ;; if there was a problem. ;;(when safe (dolist (service semantic-idle-scheduler-queue) @@ -476,7 +476,7 @@ Does nothing if the current buffer doesn't need reparsing." ;; do them here, then all the bovination hooks are not run, and ;; we save lots of time. (cond - ;; If the buffer was previously marked unparseable, + ;; If the buffer was previously marked unparsable, ;; then don't waste our time. ((semantic-parse-tree-unparseable-p) nil) diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index dab5c444fae..f8e72c1027c 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -1704,7 +1704,7 @@ If there is no error, then the last value of FORMS is returned." nil)))) ;; Great Sadness. Assume that FORMS execute within the ;; confines of the current buffer only! Mark this thing - ;; unparseable iff the special symbol was thrown. This + ;; unparsable iff the special symbol was thrown. This ;; will prevent future calls from parsing, but will allow ;; then to still return the cache. (when ,ret diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index a08f4a31b30..13836f64b85 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -109,7 +109,7 @@ Only minor modes that are locally enabled are shown in the mode line." (tail (or (memq elem minor-mode-alist) (setq minor-mode-alist (cons elem minor-mode-alist))))) - (setcdr tail (nconc locals (cdr tail))))))))) + (setcdr tail (nconc locals (cdr tail))))))))) (defun semantic-desktop-ignore-this-minor-mode (buffer) "Installed as a minor-mode initializer for Desktop mode. @@ -438,7 +438,7 @@ The state is indicated in the modeline with the following characters: `-' -> The cache is up to date. `!' -> The cache requires a full update. `~' -> The cache needs to be incrementally parsed. - `%' -> The cache is not currently parseable. + `%' -> The cache is not currently parsable. `@' -> Auto-parse in progress (not set here.) With prefix argument ARG, turn on if positive, otherwise off. The minor mode can be turned on only if semantic feature is available and @@ -524,7 +524,7 @@ This marker is one of the following: `-' -> The cache is up to date. `!' -> The cache requires a full update. `~' -> The cache needs to be incrementally parsed. - `%' -> The cache is not currently parseable. + `%' -> The cache is not currently parsable. `@' -> Auto-parse in progress (not set here.) Arguments IGNORE are ignored, and accepted so this can be used as a hook in many situations." diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 5baa676ab39..112091af219 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -991,7 +991,7 @@ Hands off to helper functions via `erc-call-hooks'." (if (member (erc-response.command parsed-response) erc-server-prevent-duplicates) (let ((m (erc-response.unparsed parsed-response))) - ;; duplicate supression + ;; duplicate suppression (if (< (or (gethash m erc-server-duplicates) 0) (- (erc-current-time) erc-server-duplicate-timeout)) (erc-call-hooks process parsed-response)) diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 893ee88e98d..64b15ce31b3 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -8442,7 +8442,7 @@ 2002-07-21 Nevin Kapur - * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting + * nnmail.el (nnmail-fancy-expiry-target): Treat nonexistent headers as empty headers. 2002-07-21 Jochen Hein diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 694b4d7e8b4..9730b69164e 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -992,7 +992,7 @@ Setter function for custom variables." 'gnus-group-tool-bar-retro) "Specifies the Gnus group tool bar. -It can be either a list or a symbol refering to a list. See +It can be either a list or a symbol referring to a list. See `gmm-tool-bar-from-list' for the format of the list. The default key map is `gnus-group-mode-map'. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 17ccae986e9..d8db300efbd 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2835,7 +2835,7 @@ Setter function for custom variables." 'gnus-summary-tool-bar-retro) "Specifies the Gnus summary tool bar. -It can be either a list or a symbol refering to a list. See +It can be either a list or a symbol referring to a list. See `gmm-tool-bar-from-list' for the format of the list. The default key map is `gnus-summary-mode-map'. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 85c084751f8..8fbd2c765fe 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7738,7 +7738,7 @@ Setter function for custom variables." 'message-tool-bar-retro) "Specifies the message mode tool bar. -It can be either a list or a symbol refering to a list. See +It can be either a list or a symbol referring to a list. See `gmm-tool-bar-from-list' for the format of the list. The default key map is `message-mode-map'. diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el index 306b67cd7c1..9c30379ef6e 100644 --- a/lisp/gnus/rfc2231.el +++ b/lisp/gnus/rfc2231.el @@ -58,7 +58,7 @@ must never cause a Lisp error." ;; The most likely cause of an error is unbalanced parentheses ;; or double-quotes. If all parentheses and double-quotes are ;; quoted meaninglessly with backslashes, removing them might - ;; make it parseable. Let's try... + ;; make it parsable. Let's try... (error (let (mod) (when (and (string-match "\\\\\"" string) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index da6f8a69e6d..446a27c65d3 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3526,7 +3526,7 @@ variable PATH." Here, we are looking for a command which has zero exit status if the file exists and nonzero exit status otherwise." (let ((existing "/") - (nonexisting + (nonexistent (tramp-shell-quote-argument "/ this file does not exist ")) result) ;; The algorithm is as follows: we try a list of several commands. @@ -3551,22 +3551,22 @@ file exists and nonzero exit status otherwise." (tramp-send-command-and-check vec (format "%s %s" result existing)) (not (tramp-send-command-and-check - vec (format "%s %s" result nonexisting)))) + vec (format "%s %s" result nonexistent)))) (and (setq result "/bin/test -e") (tramp-send-command-and-check vec (format "%s %s" result existing)) (not (tramp-send-command-and-check - vec (format "%s %s" result nonexisting)))) + vec (format "%s %s" result nonexistent)))) (and (setq result "/usr/bin/test -e") (tramp-send-command-and-check vec (format "%s %s" result existing)) (not (tramp-send-command-and-check - vec (format "%s %s" result nonexisting)))) + vec (format "%s %s" result nonexistent)))) (and (setq result (format "%s -d" (tramp-get-ls-command vec))) (tramp-send-command-and-check vec (format "%s %s" result existing)) (not (tramp-send-command-and-check - vec (format "%s %s" result nonexisting))))) + vec (format "%s %s" result nonexistent))))) (tramp-error vec 'file-error "Couldn't find command to check if file exists")) result)) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index a9ff042d681..9b9bdb6416e 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -237,12 +237,12 @@ request.") (if proxy-auth (setq proxy-auth (concat "Proxy-Authorization: " proxy-auth "\r\n"))) - ;; Protection against stupid values in the referer + ;; Protection against stupid values in the referrer (if (and ref-url (stringp ref-url) (or (string= ref-url "file:nil") (string= ref-url ""))) (setq ref-url nil)) - ;; We do not want to expose the referer if the user is paranoid. + ;; We do not want to expose the referrer if the user is paranoid. (if (or (memq url-privacy-level '(low high paranoid)) (and (listp url-privacy-level) (memq 'lastloc url-privacy-level))) diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index ef273c610fe..6563dca5ec6 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -373,7 +373,7 @@ other files, enter /dev/null (concat actual-dir (cdr proposed-file-names))))) )) ediff-patch-map) - ;; Check for the existing files in each pair and discard the nonexisting + ;; Check for the existing files in each pair and discard the nonexistent ;; ones. If both exist, ask the user. (mapcar (lambda (session-info) (let* ((file1 (car (ediff-get-session-objA-name session-info))) diff --git a/src/ChangeLog.7 b/src/ChangeLog.7 index fc97acdeb1e..bb18f684242 100644 --- a/src/ChangeLog.7 +++ b/src/ChangeLog.7 @@ -3968,7 +3968,7 @@ 1998-01-12 Kenichi Handa - * minibuf.c (Fminibuffer_complete_word): Fix a bug of refering + * minibuf.c (Fminibuffer_complete_word): Fix a bug of referring `i'. We must refer `i_byte' instead. * insdel.c (insert_from_string_1): Decrement GAP_SIZE by diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index 6a48b09e64b..e2572e8ac88 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 @@ -4027,7 +4027,7 @@ * dispextern.h (struct glyph_row): Flag internal_border_p removed. * xfns.c (x_create_tip_frame): Don't set bitmapIcon resource - because this will try to access a nonexisting widget. + because this will try to access a nonexistent widget. 1999-07-26 Markus Rost diff --git a/src/xselect.c b/src/xselect.c index f9ebdf730d4..5e5e6a098b6 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -757,7 +757,7 @@ x_reply_selection_request (struct input_event *event, /* The window we're communicating with may have been deleted in the meantime (that's a real situation from a bug report). In this case, there may be events in the event queue still - refering to the deleted window, and we'll get a BadWindow error + referring to the deleted window, and we'll get a BadWindow error in XTread_socket when processing the events. I don't have an idea how to fix that. gerd, 2001-01-98. */ /* 2004-09-10: XSync and UNBLOCK so that possible protocol errors are -- cgit v1.2.1 From 100d5755ed82e6c47833a3559fb0a154381d5afd Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 15 Dec 2011 11:12:08 +0900 Subject: xftfont.c (xftfont_draw): Use the font metrics of s->font to fill background (Bug#8992). --- src/ChangeLog | 5 +++++ src/xftfont.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 68547e191f2..dacce28a87d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-15 YAMAMOTO Mitsuharu + + * xftfont.c (xftfont_draw): Use the font metrics of s->font to + fill background (Bug#8992). + 2011-12-13 Martin Rudalics * window.c (Vwindow_combination_resize) diff --git a/src/xftfont.c b/src/xftfont.c index c27a4fcf91a..8cb4c494854 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -654,7 +654,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b if (with_background) XftDrawRect (xft_draw, &bg, - x, y - face->font->ascent, s->width, face->font->height); + x, y - s->font->ascent, s->width, s->font->height); code = alloca (sizeof (FT_UInt) * len); for (i = 0; i < len; i++) code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8) -- cgit v1.2.1 From bbd240ceeefcf4181aa9205f4e743b32b5c68e1f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 14 Dec 2011 23:24:10 -0800 Subject: Spelling fixes. --- configure.in | 2 +- doc/misc/ede.texi | 4 ++-- doc/misc/semantic.texi | 2 +- etc/NEWS.22 | 2 +- lisp/arc-mode.el | 4 ++-- lisp/cedet/semantic/scope.el | 2 +- lisp/dframe.el | 2 +- lisp/emacs-lisp/pcase.el | 10 +++++----- lisp/filesets.el | 2 +- lisp/international/ccl.el | 2 +- lisp/international/quail.el | 4 ++-- lisp/international/titdic-cnv.el | 4 ++-- lisp/org/org-protocol.el | 4 ++-- lisp/printing.el | 10 +++++----- lisp/progmodes/cperl-mode.el | 14 +++++++------- lisp/progmodes/gdb-mi.el | 2 +- lisp/progmodes/idlwave.el | 2 +- src/ChangeLog.11 | 2 +- src/ChangeLog.8 | 2 +- src/charset.c | 2 +- src/charset.h | 4 ++-- src/font.h | 2 +- src/w16select.c | 9 ++++----- src/w32font.c | 2 +- 24 files changed, 47 insertions(+), 48 deletions(-) diff --git a/configure.in b/configure.in index 53c219c0923..b4bb8eb708c 100644 --- a/configure.in +++ b/configure.in @@ -1683,7 +1683,7 @@ if test "$doug_lea_malloc" = "yes" ; then ## Use mmap directly for allocating larger buffers. ## FIXME this comes from src/s/{gnu,gnu-linux}.h: ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif - ## Does the AC_FUNC_MMAP test below make this check unecessary? + ## Does the AC_FUNC_MMAP test below make this check unnecessary? case "$opsys" in gnu*) REL_ALLOC=no ;; esac diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index cc566086f44..d488fb5b515 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -705,11 +705,11 @@ A brief description of the project or target. This is currently used by the @samp{ede-speedbar} interface. @item ede-want-file-p Return non-nil if a target will accept a given file. -It is generally unecessary to override this. See the section on source +It is generally unnecessary to override this. See the section on source code. @item ede-buffer-mine Return non-nil if a buffer belongs to this target. Used during -association when a file is loaded. It is generally unecessary to +association when a file is loaded. It is generally unnecessary to override this unless you keep auxiliary files. @end table diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index dcfff1fcb96..8c56d2dc9f8 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi @@ -380,7 +380,7 @@ with the search results format. @item semanticdb-ref.el Tracks crossreferences. Cross references are needed when buffer is -reparsed, and must alert other tables that any dependant caches may +reparsed, and must alert other tables that any dependent caches may need to be flushed. References are in the form of include files. @end table diff --git a/etc/NEWS.22 b/etc/NEWS.22 index 87d77cf52fc..70c7b0e018b 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 @@ -4273,7 +4273,7 @@ of suffixes. The function also accepts a predicate argument to further filter candidate files. One advantage of using this function is that the list of suffixes in -`exec-suffixes' is OS-dependant, so this function will find +`exec-suffixes' is OS-dependent, so this function will find executables without polluting Lisp code with OS dependencies. *** The new function `file-remote-p' tests a file name and returns diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 48b4c5be164..816291166fa 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -860,13 +860,13 @@ using `make-temp-file', and the generated name is returned." dir))) (if (or alien (file-exists-p fullname)) (progn - ;; Maked sure all the leading directories in + ;; Make sure all the leading directories in ;; archive-local-name exist under archive-tmpdir, so that ;; the directory structure recorded in the archive is ;; reconstructed in the temporary directory. (make-directory (file-name-directory tmpfile) t) (make-temp-file tmpfile)) - ;; Maked sure all the leading directories in `fullname' exist + ;; Make sure all the leading directories in `fullname' exist ;; under archive-tmpdir. This is necessary for nested archives ;; (`archive-extract' sets `archive-remote' to t in case ;; an archive occurs inside another archive). diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index ea4903c70ea..937936032d2 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el @@ -725,7 +725,7 @@ The class returned from the scope calculation is variable (oset scopecache localargs localargs) (oset scopecache localvar localvar) ))) - ;; Make sure we become dependant on the typecache. + ;; Make sure we become dependent on the typecache. (semanticdb-typecache-add-dependant scopecache) ;; Handy debug output. (when (called-interactively-p 'any) diff --git a/lisp/dframe.el b/lisp/dframe.el index b4f44e1a308..728f08d135d 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -221,7 +221,7 @@ Local to those buffers, as a function called that created it.") (define-key map [mouse-2] 'dframe-click) ;; This is the power click for new frames, or refreshing a cache (define-key map [S-mouse-2] 'dframe-power-click) - ;; This adds a small unecessary visual effect + ;; This adds a small unnecessary visual effect ;;(define-key map [down-mouse-2] 'dframe-quick-mouse) (define-key map [down-mouse-3] 'dframe-popup-kludge) diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index e6c4ccbbc50..6931ce75cb5 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -363,12 +363,12 @@ MATCH is the pattern that needs to be matched, of the form: (dolist (branch rest) (let* ((match (car branch)) (code&vars (cdr branch)) - (splitted + (split (pcase--split-match sym splitter match))) - (unless (eq (car splitted) :pcase--fail) - (push (cons (car splitted) code&vars) then-rest)) - (unless (eq (cdr splitted) :pcase--fail) - (push (cons (cdr splitted) code&vars) else-rest)))) + (unless (eq (car split) :pcase--fail) + (push (cons (car split) code&vars) then-rest)) + (unless (eq (cdr split) :pcase--fail) + (push (cons (cdr split) code&vars) else-rest)))) (cons (nreverse then-rest) (nreverse else-rest)))) (defun pcase--split-consp (syma symd pat) diff --git a/lisp/filesets.el b/lisp/filesets.el index 680a107adfe..0f6c6e8dd78 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -453,7 +453,7 @@ will not be rewrapped if their length exceeds this value." :group 'filesets) (defcustom filesets-max-entry-length 50 - "Truncate names of splitted submenus to this length." + "Truncate names of split submenus to this length." :set (function filesets-set-default) :type 'integer :group 'filesets) diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 457fe84c0b1..d16a272c9dc 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -1469,7 +1469,7 @@ OPERATOR := | de-sjis ;; If ARG_0 and ARG_1 are the first and second code point of - ;; JISX0208 character CHAR, and SJIS is the correponding + ;; JISX0208 character CHAR, and SJIS is the corresponding ;; Shift-JIS code, ;; (REG = ARG_0 en-sjis ARG_1) means: ;; ((REG = HIGH) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 3a70b1ec2a5..3e0f543492a 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -2832,7 +2832,7 @@ STATE-n are symbols to denote state. STATE-0 is the initial state. TRANSITION-n-m are transition rules from STATE-n, and have the form \(RULES . STATE-x) or RULES, where STATE-x is one of STATE-n above, RULES is a symbol whose value is an alist of keys \(string) vs the -correponding characters or strings. The format of the symbol value of +corresponding characters or strings. The format of the symbol value of RULES is the same as arguments to `quail-define-rules'. If TRANSITION-n-m has the form (RULES . STATE-x), it means that @@ -2846,7 +2846,7 @@ The generated map can be set for the current Quail package by the function `quail-install-map' (which see)." (let ((state-alist (mapcar (lambda (x) (list (car x))) table)) tail elt) - ;; STATE-ALIST is an alist of states vs the correponding sub Quail + ;; STATE-ALIST is an alist of states vs the corresponding sub Quail ;; map. It is now initialized to ((STATE-0) (STATE-1) ...). ;; Set key sequence mapping rules in cdr part of each element. (while table diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 82349761bdb..304dc01abe4 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -103,7 +103,7 @@ For example: \\ -For double-width GB2312 characters correponding to ASCII, use the +For double-width GB2312 characters corresponding to ASCII, use the input method `chinese-qj'.") ("chinese-ecdict" "$(05CKH(B" @@ -191,7 +191,7 @@ For instance, to input $ADc(B, you type \"n i 3 3\", the first \"n i\" is a Pinyin, the next \"3\" specifies tone, and the last \"3\" selects the third character from the candidate list. -For double-width GB2312 characters correponding to ASCII, use the +For double-width GB2312 characters corresponding to ASCII, use the input method `chinese-qj'.") ("chinese-zozy" "$(0I\0D(B" diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index ca7bfe2a4d0..bbb93b07fc9 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -546,8 +546,8 @@ as filename." (when (string-match proto fname) (let* ((func (plist-get (cdr prolist) :function)) (greedy (plist-get (cdr prolist) :greedy)) - (splitted (split-string fname proto)) - (result (if greedy restoffiles (cadr splitted)))) + (split (split-string fname proto)) + (result (if greedy restoffiles (cadr split)))) (when (plist-get (cdr prolist) :kill-client) (message "Greedy org-protocol handler. Killing client.") (server-edit)) diff --git a/lisp/printing.el b/lisp/printing.el index dab57d16dca..a604b9f1027 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -4710,12 +4710,12 @@ Interactively, you have the following situations: M-x pr-ps-fast-fire RET The command prompts the user for a N-UP value and printing will - immediatelly be done using the current active printer. + immediately be done using the current active printer. C-u M-x pr-ps-fast-fire RET C-u 0 M-x pr-ps-fast-fire RET The command prompts the user for a N-UP value and also for a current - PostScript printer, then printing will immediatelly be done using the new + PostScript printer, then printing will immediately be done using the new current active printer. C-u 1 M-x pr-ps-fast-fire RET @@ -4736,7 +4736,7 @@ zero and the argument SELECT is treated as follows: If it's nil, send the image to the printer. If it's a list or an integer lesser or equal to zero, the command prompts - the user for a current PostScript printer, then printing will immediatelly + the user for a current PostScript printer, then printing will immediately be done using the new current active printer. If it's an integer equal to 1, the command prompts the user for a file name @@ -4749,7 +4749,7 @@ zero and the argument SELECT is treated as follows: instead of sending it to the printer. If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new - active printer and printing will immediatelly be done using the new active + active printer and printing will immediately be done using the new active printer. Otherwise, send the image to the printer. @@ -4800,7 +4800,7 @@ Noninteractively, the argument SELECT-PRINTER is treated as follows: If it's nil, the printing is sent to the current active text printer. If it's a symbol which it's defined in `pr-txt-printer-alist', it's the new - active printer and printing will immediatelly be done using the new active + active printer and printing will immediately be done using the new active printer. If it's non-nil, the command prompts the user for a new active text printer. diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 13fa310106c..86284eaa30a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -958,7 +958,7 @@ B) Speed of editing operations. `cperl-array-face' Array names `cperl-hash-face' Hash names `font-lock-comment-face' Comments, PODs and whatever is considered - syntaxically to be not code + syntactically to be not code `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 2-arg operators s/y/tr/ or of RExen, `font-lock-warning-face' Special-cased m// and s//foo/, @@ -970,7 +970,7 @@ B) Speed of editing operations. `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, literal parts and the terminator of formats - and whatever is syntaxically considered + and whatever is syntactically considered as string literals `font-lock-type-face' Overridable keywords `font-lock-variable-name-face' Variable declarations, indirect array and @@ -1537,8 +1537,8 @@ default.) You can always quote (with \\[quoted-insert]) the left since most the time you mean \"less\". CPerl mode tries to guess whether you want to type pair <>, and inserts is if it appropriate. You can set `cperl-electric-parens-string' to the string that -contains the parenths from the above list you want to be electrical. -Electricity of parenths is controlled by `cperl-electric-parens'. +contains the parens from the above list you want to be electrical. +Electricity of parens is controlled by `cperl-electric-parens'. You may also set `cperl-electric-parens-mark' to have electric parens look for active mark and \"embrace\" a region if possible.' @@ -3517,7 +3517,7 @@ Works before syntax recognition is done." (defvar font-lock-warning-face) (defun cperl-find-sub-attrs (&optional st-l b-fname e-fname pos) - "Syntaxically mark (and fontify) attributes of a subroutine. + "Syntactically mark (and fontify) attributes of a subroutine. Should be called with the point before leading colon of an attribute." ;; Works *before* syntax recognition is done (or st-l (setq st-l (list nil))) ; Avoid overwriting '() @@ -4994,7 +4994,7 @@ conditional/loop constructs." (setq top (point)) ;; Plan A: if line has an unfinished paren-group, go to end-of-group (while (= -1 (nth 0 (parse-partial-sexp (point) tmp-end -1))) - (setq top (point))) ; Get the outermost parenths in line + (setq top (point))) ; Get the outermost parens in line (goto-char top) (while (< (point) tmp-end) (parse-partial-sexp (point) tmp-end nil t) ; To start-sexp or eol @@ -5906,7 +5906,7 @@ indentation and initial hashes. Behaves usually outside of comment." 3 font-lock-variable-name-face))) '("\\= 0 go forwards, ARG < 0 go backwards. -Returns non-nil if successfull." +Returns non-nil if successful." (interactive "p") (let (status) (if (< arg 0) diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index f9fd442da3f..289ef168088 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 @@ -30657,7 +30657,7 @@ (display_buffer): Do not set split_height_threshold to twice the value of window_min_height to avoid changing the value of a customizable variable. Rather explicitly check whether the - height of the window that shall be splitted is at least as large + height of the window that shall be split is at least as large as split_height_threshold. (Fwindow_full_width_p): New defun. (syms_of_window): Defsubr it. diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index e2572e8ac88..6973717a7d7 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 @@ -11485,7 +11485,7 @@ Substitute homedir by `~' also in default_filename. * xdisp.c (try_window_id): Fix computation of tab_offset when - backing up over a character that is splitted across lines. + backing up over a character that is split across lines. 1999-05-08 Kenichi HANDA diff --git a/src/charset.c b/src/charset.c index 3c15f1bee54..49fc7288069 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1660,7 +1660,7 @@ maybe_unify_char (int c, Lisp_Object val) } -/* Return a character correponding to the code-point CODE of +/* Return a character corresponding to the code-point CODE of CHARSET. */ int diff --git a/src/charset.h b/src/charset.h index fc35d6bb991..5ca83130b77 100644 --- a/src/charset.h +++ b/src/charset.h @@ -238,7 +238,7 @@ struct charset int unified_p; }; -/* Hash table of charset symbols vs. the correponding attribute +/* Hash table of charset symbols vs. the corresponding attribute vectors. */ extern Lisp_Object Vcharset_hash_table; @@ -389,7 +389,7 @@ extern Lisp_Object Vchar_charset_set; #endif -/* Return a character correponding to the code-point CODE of CHARSET. +/* Return a character corresponding to the code-point CODE of CHARSET. Try some optimization before calling decode_char. */ #define DECODE_CHAR(charset, code) \ diff --git a/src/font.h b/src/font.h index 8ca7c9c19c4..b6c1acf4a30 100644 --- a/src/font.h +++ b/src/font.h @@ -621,7 +621,7 @@ struct font_driver /* Optional. Get coordinates of the INDEXth anchor point of the glyph whose code is CODE. Store the coordinates in *X and *Y. Return 0 if - the operations was successfull. Otherwise return -1. */ + the operations was successful. Otherwise return -1. */ int (*anchor_point) (struct font *font, unsigned code, int index, int *x, int *y); diff --git a/src/w16select.c b/src/w16select.c index cae7a6f82dd..7ba62fde0e5 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -114,7 +114,7 @@ identify_winoldap_version (void) return regs.x.ax; } -/* Open the clipboard, return non-zero if successfull. */ +/* Open the clipboard, return non-zero if successful. */ unsigned open_clipboard (void) { @@ -137,7 +137,7 @@ open_clipboard (void) return regs.x.ax; } -/* Empty clipboard, return non-zero if successfull. */ +/* Empty clipboard, return non-zero if successful. */ unsigned empty_clipboard (void) { @@ -207,7 +207,7 @@ free_xfer_buf (void) } } -/* Copy data into the clipboard, return zero if successfull. */ +/* Copy data into the clipboard, return zero if successful. */ unsigned set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw) { @@ -405,7 +405,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw) return (unsigned) (dp - (unsigned char *)Data - 1); } -/* Close clipboard, return non-zero if successfull. */ +/* Close clipboard, return non-zero if successful. */ unsigned close_clipboard (void) { @@ -730,4 +730,3 @@ After the communication, this variable is set to nil. */); } #endif /* MSDOS */ - diff --git a/src/w32font.c b/src/w32font.c index 5cc37c0e74f..e8a223de0a4 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -786,7 +786,7 @@ w32font_free_outline (struct font *font, void *outline); Optional. Get coordinates of the INDEXth anchor point of the glyph whose code is CODE. Store the coordinates in *X and *Y. Return 0 if - the operations was successfull. Otherwise return -1. + the operations was successful. Otherwise return -1. static int w32font_anchor_point (struct font *font, unsigned code, int index, int *x, int *y); -- cgit v1.2.1 From 5fc1c122ccc781fb93dd81aacac368ac7bd973e6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 15 Dec 2011 16:50:05 +0900 Subject: Fix Ethiopic related codes for deleted variables and functions. --- leim/ChangeLog | 5 +++++ leim/quail/ethiopic.el | 2 +- lisp/ChangeLog | 6 ++++++ lisp/language/ethio-util.el | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/leim/ChangeLog b/leim/ChangeLog index 11aae483ba2..95a3671bdd1 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,8 @@ +2011-12-15 Kenichi Handa + + * quail/ethiopic.el ("ethiopic"): Do not refer to + ethio-prefer-ascii-punctuation. + 2011-11-20 Juanma Barranquero * quail/hangul.el (hangul-character): Fix typo. diff --git a/leim/quail/ethiopic.el b/leim/quail/ethiopic.el index 7e108a71a60..569d6e6b245 100644 --- a/leim/quail/ethiopic.el +++ b/leim/quail/ethiopic.el @@ -39,7 +39,7 @@ "ethiopic" "Ethiopic" '("$(3$Q#U!.(B " (ethio-prefer-ascii-space "_" "$(3$h(B") - (ethio-prefer-ascii-punctuation "." "$(3$i(B")) + "$(3$i(B") t " Quail package for Ethiopic (Tigrigna and Amharic) When you are in Ethiopic language environment, the following special diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb412197f3d..e718222e01b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-12-15 Kenichi Handa + + * language/ethio-util.el: Change coding tag to utf-8-emacs. + (setup-ethiopic-environment-internal): Comment out key-binding for + ethio-toggle-punctuation. + 2011-12-13 Alan Mackenzie Add the switch statement to AWK Mode. diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index 306a7bee9dc..3c39b1eff9c 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -1,4 +1,4 @@ -;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8; -*- +;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*- ;; Copyright (C) 1997-1998, 2002-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -48,7 +48,7 @@ ([f4] . ethio-sera-to-fidel-buffer) ([S-f4] . ethio-sera-to-fidel-region) ([C-f4] . ethio-sera-to-fidel-marker) - ([S-f5] . ethio-toggle-punctuation) + ;; ([S-f5] . ethio-toggle-punctuation) ([S-f6] . ethio-modify-vowel) ([S-f7] . ethio-replace-space) ;; ([S-f8] . ethio-input-special-character) ; deprecated -- cgit v1.2.1 From b6d6d607063f5f8aba31d94d1dc2f181fb536c01 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 15 Dec 2011 06:18:13 -0500 Subject: Auto-commit of generated files. --- autogen/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/configure b/autogen/configure index c24266ebe6d..620be0abd07 100755 --- a/autogen/configure +++ b/autogen/configure @@ -10018,7 +10018,7 @@ $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h ## Use mmap directly for allocating larger buffers. ## FIXME this comes from src/s/{gnu,gnu-linux}.h: ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif - ## Does the AC_FUNC_MMAP test below make this check unecessary? + ## Does the AC_FUNC_MMAP test below make this check unnecessary? case "$opsys" in gnu*) REL_ALLOC=no ;; esac -- cgit v1.2.1 From a87ef8990608ec483657636c18b18cba7bf630c6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 15 Dec 2011 14:14:12 -0800 Subject: Spelling fixes. --- doc/misc/ede.texi | 4 ++-- leim/quail/persian.el | 2 +- lisp/cedet/ede/pmake.el | 6 +++--- lisp/cedet/ede/proj-archive.el | 2 +- lisp/cedet/ede/proj-shared.el | 2 +- lisp/ido.el | 2 +- lisp/ldefs-boot.el | 2 +- lisp/loadhist.el | 2 +- lisp/progmodes/ebnf2ps.el | 8 ++++---- lisp/progmodes/vera-mode.el | 4 ++-- test/cedet/tests/testpolymorph.cpp | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index d488fb5b515..2b2a6a21b7f 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -2483,7 +2483,7 @@ Create the make rule needed to create an archive for @var{THIS}. @deffn Method ede-proj-makefile-insert-source-variables :PRIMARY this Insert bin_PROGRAMS variables needed by target @var{THIS}. -We aren't acutally inserting SOURCE details, but this is used by the +We aren't actually inserting SOURCE details, but this is used by the Makefile.am generator, so use it to add this important bin program. @end deffn @@ -2624,7 +2624,7 @@ Return the name of the main target for @var{THIS} target. @deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this Insert bin_PROGRAMS variables needed by target @var{THIS}. -We aren't acutally inserting SOURCE details, but this is used by the +We aren't actually inserting SOURCE details, but this is used by the Makefile.am generator, so use it to add this important bin program. @end deffn diff --git a/leim/quail/persian.el b/leim/quail/persian.el index 572c9127f9d..b6b3146cc8d 100644 --- a/leim/quail/persian.el +++ b/leim/quail/persian.el @@ -27,7 +27,7 @@ ;;; Commentary: ;; ;; This file contains a collection of input methods for -;; Persian languages (Farsi, Urdu, Pashto/Afghanic, ...) +;; Persian languages - Farsi, Urdu, Pashto (Afghani), ... ;; ;; At this time, the following input methods are specified: ;; diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index d78e95af27f..4065b848f54 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -335,7 +335,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of ; ; (oref this variables)) ; -; ;; Add in all variables from the configuration not allready covered. +; ;; Add in all variables from the configuration not already covered. ; (mapc (lambda (c) ; ; (if (member (car c) conf-done) @@ -372,7 +372,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of (setq conf-done (cons (car c) conf-done)))) (insert (cdr c) "\n")) (oref this variables)) - ;; Add in all variables from the configuration not allready covered. + ;; Add in all variables from the configuration not already covered. (mapc (lambda (c) (if (member (car c) conf-done) nil @@ -430,7 +430,7 @@ sources variable." this (oref proj configuration-default))) (conf-done nil) ) - ;; Add in all variables from the configuration not allready covered. + ;; Add in all variables from the configuration not already covered. (mapc (lambda (c) (if (member (car c) conf-done) nil diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el index 23d3aa05000..23ef4850b6a 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el @@ -46,7 +46,7 @@ (defmethod ede-proj-makefile-insert-source-variables :BEFORE ((this ede-proj-target-makefile-archive) &optional moresource) "Insert bin_PROGRAMS variables needed by target THIS. -We aren't acutally inserting SOURCE details, but this is used by the +We aren't actually inserting SOURCE details, but this is used by the Makefile.am generator, so use it to add this important bin program." (ede-pmake-insert-variable-shared (concat "lib" (ede-name this) "_a_LIBRARIES") diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index 4e233f56a12..7268fb95646 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -181,7 +181,7 @@ Results in --add-missing being passed to automake." (defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target-makefile-shared-object)) "Insert bin_PROGRAMS variables needed by target THIS. -We aren't acutally inserting SOURCE details, but this is used by the +We aren't actually inserting SOURCE details, but this is used by the Makefile.am generator, so use it to add this important bin program." (ede-pmake-insert-variable-shared "lib_LTLIBRARIES" (insert (concat "lib" (ede-name this) ".la")))) diff --git a/lisp/ido.el b/lisp/ido.el index f2dcba614a9..345438d3cc6 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -308,7 +308,7 @@ ;; ifindf package back into iswitchb. ;; ;; This is basically what ido (interactively do) is all about; but I -;; found it ackward to merge my changes into the "iswitchb-" namespace, +;; found it awkward to merge my changes into the "iswitchb-" namespace, ;; so I invented a common "ido-" namespace for the merged packages. ;; ;; This version is based on ido.el version 1.57 released on diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 858cfa85a6f..db511e1ce40 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -3608,7 +3608,7 @@ REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7 ARG := REG | integer OPERATOR := - ;; Normal arithmethic operators (same meaning as C code). + ;; Normal arithmetic operators (same meaning as C code). + | - | * | / | % ;; Bitwise operators (same meaning as C code) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 51df6ecff0a..8edda03044a 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -156,7 +156,7 @@ documentation of `unload-feature' for details.") (dolist (buffer (buffer-list)) (set-buffer buffer) (let ((proposed major-mode)) - ;; Look for an antecessor mode not defined in the feature we're processing + ;; Look for a predecessor mode not defined in the feature we're processing (while (and proposed (rassq proposed unload-function-defs-list)) (setq proposed (get proposed 'derived-mode-parent))) (unless (eq proposed major-mode) diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index d9adff6c8b8..240deb39ce3 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -3260,7 +3260,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and % --- Corners -%>corner Right Descendent: height arrow corner_RD +%>corner Right Descendant: height arrow corner_RD % _ | arrow % / height > 0 | 0 - none % | | 1 - right @@ -3299,7 +3299,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and Gstroke }def -%>corner Right Ascendent: height arrow corner_RA +%>corner Right Ascendant: height arrow corner_RA % | arrow % | height > 0 | 0 - none % / | 1 - right @@ -3338,7 +3338,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and Gstroke }def -%>corner Left Descendent: height arrow corner_LD +%>corner Left Descendant: height arrow corner_LD % _ | arrow % \\ height > 0 | 0 - none % | | 1 - right @@ -3377,7 +3377,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and Gstroke }def -%>corner Left Ascendent: height arrow corner_LA +%>corner Left Ascendant: height arrow corner_LA % | arrow % | height > 0 | 0 - none % \\ | 1 - right diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index b02324871ff..434984c8bf1 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el @@ -427,7 +427,7 @@ Key bindings: "icompare" "insert" "inst_get_at_least" "inst_get_auto_bin_max" "inst_get_collect" "inst_get_cov_weight" "inst_get_coverage_goal" "inst_getcross_bin_max" "inst_query" "inst_set_at_least" - "inst_set_auto_bin_max" "inst_set_bin_activiation" "inst_set_collect" + "inst_set_auto_bin_max" "inst_set_bin_activation" "inst_set_collect" "inst_set_cov_weight" "inst_set_coverage_goal" "inst_set_cross_bin_max" "itoa" "last" "last_index" "len" "load" @@ -438,7 +438,7 @@ Key bindings: "push_front" "putc" "query" "query_str" "rand_mode" "randomize" "reserve" "reverse" "rsort" - "search" "set_at_least" "set_auto_bin_max" "set_bin_activiation" + "search" "set_at_least" "set_auto_bin_max" "set_bin_activation" "set_cov_weight" "set_coverage_goal" "set_cross_bin_max" "set_name" "size" "sort" "substr" "sum" "thismatch" "tolower" "toupper" diff --git a/test/cedet/tests/testpolymorph.cpp b/test/cedet/tests/testpolymorph.cpp index 9db2d51efe7..83175406e90 100644 --- a/test/cedet/tests/testpolymorph.cpp +++ b/test/cedet/tests/testpolymorph.cpp @@ -83,7 +83,7 @@ namespace template_partial_spec { }; } -// Test 5 - Templates w/ full specicialization which may or may not share +// Test 5 - Templates w/ full specialization which may or may not share // common functions. namespace template_full_spec { template class test -- cgit v1.2.1 From d1d7b339f8d04b60ed75d337a3b4109a6cb82c98 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 16 Dec 2011 01:28:56 +0200 Subject: * src/image.c (imagemagick_error): New function. (imagemagick_load_image): Comment out `MagickSetResolution' call. Use `imagemagick_error' where ImageMagick functions return `MagickFalse'. (Fimagemagick_types): Add `Fnreverse' to return the list in the proper order. Fixes: debbugs:10112 --- src/ChangeLog | 9 +++++++++ src/image.c | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dacce28a87d..f8fa66d0046 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2011-12-15 Juri Linkov + + * image.c (imagemagick_error): New function. (Bug#10112) + (imagemagick_load_image): Comment out `MagickSetResolution' call. + Use `imagemagick_error' where ImageMagick functions return + `MagickFalse'. + (Fimagemagick_types): Add `Fnreverse' to return the list in the + proper order. + 2011-12-15 YAMAMOTO Mitsuharu * xftfont.c (xftfont_draw): Use the font metrics of s->font to diff --git a/src/image.c b/src/image.c index 81907d8e580..3d189a5504b 100644 --- a/src/image.c +++ b/src/image.c @@ -7564,6 +7564,22 @@ extern WandExport void PixelGetMagickColor (const PixelWand *, MagickPixelPacket *); #endif +/* Log ImageMagick error message. + Useful when a ImageMagick function returns the status `MagickFalse'. */ + +static void +imagemagick_error (MagickWand *wand) +{ + char *description; + ExceptionType severity; + + description = MagickGetException (wand, &severity); + image_error ("ImageMagick error: %s", + make_string (description, strlen (description)), + Qnil); + description = (char *) MagickRelinquishMemory (description); +} + /* Helper function for imagemagick_load, which does the actual loading given contents and size, apart from frame and image structures, passed from imagemagick_load. Uses librimagemagick to do most of @@ -7618,6 +7634,7 @@ imagemagick_load_image (struct frame *f, struct image *img, image = image_spec_value (img->spec, QCindex, NULL); ino = INTEGERP (image) ? XFASTINT (image) : 0; ping_wand = NewMagickWand (); + /* MagickSetResolution (ping_wand, 2, 2); (Bug#10112) */ if (filename != NULL) { @@ -7628,7 +7645,12 @@ imagemagick_load_image (struct frame *f, struct image *img, status = MagickPingImageBlob (ping_wand, contents, size); } - MagickSetResolution (ping_wand, 2, 2); + if (status == MagickFalse) + { + imagemagick_error (ping_wand); + DestroyMagickWand (ping_wand); + return 0; + } if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand))) { @@ -7669,7 +7691,10 @@ imagemagick_load_image (struct frame *f, struct image *img, { image_wand = NewMagickWand (); if (MagickReadImageBlob (image_wand, contents, size) == MagickFalse) - goto imagemagick_error; + { + imagemagick_error (image_wand); + goto imagemagick_error; + } } /* If width and/or height is set in the display spec assume we want @@ -7697,6 +7722,7 @@ imagemagick_load_image (struct frame *f, struct image *img, if (status == MagickFalse) { image_error ("Imagemagick scale failed", Qnil, Qnil); + imagemagick_error (image_wand); goto imagemagick_error; } } @@ -7751,6 +7777,7 @@ imagemagick_load_image (struct frame *f, struct image *img, if (status == MagickFalse) { image_error ("Imagemagick image rotate failed", Qnil, Qnil); + imagemagick_error (image_wand); goto imagemagick_error; } } @@ -7975,7 +8002,7 @@ recognize as images, such as C. See `imagemagick-types-inhibit'. */) Qimagemagicktype = intern (imtypes[i]); typelist = Fcons (Qimagemagicktype, typelist); } - return typelist; + return Fnreverse (typelist); } #endif /* defined (HAVE_IMAGEMAGICK) */ -- cgit v1.2.1 From 92a24ea80eaebfdcebab8577d322ca67d4e1d236 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 16 Dec 2011 01:35:40 +0200 Subject: * lisp/gnus/mm-decode.el (mm-inline-media-tests): Add missing `mm-handle-media-subtype'. --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/mm-decode.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 00b5417fa37..ee7442c55e1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2011-12-15 Juri Linkov + + * mm-decode.el (mm-inline-media-tests): Add missing `mm-handle-media-subtype'. + 2011-12-09 Tassilo Horn * message.el (message-valid-fqdn-regexp): Update with newly approved diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 44e2af5b904..7ea0902bdb5 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -275,7 +275,7 @@ before the external MIME handler is invoked." (ignore-errors (if (fboundp 'create-image) (create-image (buffer-string) 'imagemagick 'data-p) - (mm-create-image-xemacs type))))) + (mm-create-image-xemacs (mm-handle-media-subtype handle)))))) (when image (setcar (cdr handle) (list "image/imagemagick")) (mm-image-fit-p handle))))))) -- cgit v1.2.1 From 763237c468b08353bf89a6fb63a0ad75be7892f8 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Thu, 15 Dec 2011 22:14:07 -0500 Subject: (Man-getpage-in-background): When running under a window-system, ignore $MANWIDTH and $COLUMNS. --- lisp/ChangeLog | 5 +++++ lisp/man.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e718222e01b..a07d4fa2cde 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-13 Sam Steingold + + * man.el (Man-getpage-in-background): When running under a + window-system, ignore $MANWIDTH and $COLUMNS. + 2011-12-15 Kenichi Handa * language/ethio-util.el: Change coding tag to utf-8-emacs. diff --git a/lisp/man.el b/lisp/man.el index aeba3327c40..3cdbdddb044 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -933,7 +933,8 @@ Return the buffer in which the manpage will appear." ;; minal (using an ioctl(2) if available, the value of ;; $COLUMNS, or falling back to 80 characters if nei- ;; ther is available). - (unless (or (getenv "MANWIDTH") (getenv "COLUMNS")) + (when (or window-system + (not (or (getenv "MANWIDTH") (getenv "COLUMNS")))) ;; This isn't strictly correct, since we don't know how ;; the page will actually be displayed, but it seems ;; reasonable. -- cgit v1.2.1 From f16c898aa38a64c75fad0973f4dc2b003f1f4b60 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 16 Dec 2011 14:32:35 +0100 Subject: * calc/calc-misc.el (calc-help): Avoid wrapping help message. --- lisp/ChangeLog | 4 ++++ lisp/calc/calc-misc.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a07d4fa2cde..f0ac21bac65 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-16 Andreas Schwab + + * calc/calc-misc.el (calc-help): Avoid wrapping help message. + 2011-12-13 Sam Steingold * man.el (Man-getpage-in-background): When running under a diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 6d034927ae0..d8bdc614e67 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -219,10 +219,10 @@ Calc user interface as before (either C-x * C or C-x * K; initially C-x * C). (let ((msgs '("Press `h' for complete help; press `?' repeatedly for a summary" "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit" - "Letter keys: SHIFT + Undo, reDo; Keep-args; Inverse, Hyperbolic, Option" + "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option" "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB" "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi" - "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro" + "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args" "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)" "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)" "Other keys: ' (alg-entry), = (eval), ` (edit); M-RET (last-args)" -- cgit v1.2.1 From 99a289d98d688501ff5a89dc946c7d92fdb675d8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 16 Dec 2011 23:55:00 +0800 Subject: * lisp/vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. --- lisp/ChangeLog | 4 ++++ lisp/vc/vc.el | 49 +++++++++++++++++++++---------------------------- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0ac21bac65..eb7be329d84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-16 Chong Yidong + + * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. + 2011-12-16 Andreas Schwab * calc/calc-misc.el (calc-help): Avoid wrapping help message. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index eea1a992094..85fbd93e9c6 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1048,34 +1048,27 @@ current buffer." ;;;###autoload (defun vc-next-action (verbose) "Do the next logical version control operation on the current fileset. -This requires that all files in the fileset be in the same state. - -For locking systems: - If every file is not already registered, this registers each for version -control. - If every file is registered and not locked by anyone, this checks out -a writable and locked file of each ready for editing. - If every file is checked out and locked by the calling user, this -first checks to see if each file has changed since checkout. If not, -it performs a revert on that file. - If every file has been changed, this pops up a buffer for entry -of a log message; when the message has been entered, it checks in the -resulting changes along with the log message as change commentary. If -the variable `vc-keep-workfiles' is non-nil (which is its default), a -read-only copy of each changed file is left in place afterwards. - If the affected file is registered and locked by someone else, you are -given the option to steal the lock(s). - -For merging systems: - If every file is not already registered, this registers each one for version -control. This does an add, but not a commit. - If every file is added but not committed, each one is committed. - If every working file is changed, but the corresponding repository file is -unchanged, this pops up a buffer for entry of a log message; when the -message has been entered, it checks in the resulting changes along -with the logmessage as change commentary. A writable file is retained. - If the repository file is changed, you are asked if you want to -merge in the changes into your working copy." +This requires that all files in the current VC fileset be in the +same state. If not, signal an error. + +For merging-based version control systems: + If every file in the VC fileset is not registered for version + control, register the fileset (but don't commit). + If every work file in the VC fileset is added or changed, pop + up a *vc-log* buffer to commit the fileset. + For a centralized version control system, if any work file in + the VC fileset is out of date, offer to update the fileset. + +For old-style locking-based version control systems, like RCS: + If every file is not registered, register the file(s). + If every file is registered and unlocked, check out (lock) + the file(s) for editing. + If every file is locked by you and has changes, pop up a + *vc-log* buffer to check in the changes. If the variable + `vc-keep-workfiles' is non-nil (the default), leave a + read-only copy of each changed file after checking in. + If every file is locked by you and unchanged, unlock them. + If every file is locked by someone else, offer to steal the lock." (interactive "P") (let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files)) (backend (car vc-fileset)) -- cgit v1.2.1 From f3b316df6114d1b93d3b69c59802148d9656c4d4 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 17 Dec 2011 00:05:59 +0800 Subject: Fixes for Maintaining chapter of Emacs manual. * doc/emacs/maintaining.texi (Version Control Systems): Drop Meta-CVS. (Basic VC Editing): Remove redundant descriptions. (VC With A Merging VCS): Make description more general instead of CVS-specific. (VC With A Locking VCS): Use VC fileset terminology. --- doc/emacs/ChangeLog | 8 +++ doc/emacs/building.texi | 6 +- doc/emacs/maintaining.texi | 153 +++++++++++++++++++++++---------------------- 3 files changed, 88 insertions(+), 79 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index c26f1a7e1ca..412a9cd5a58 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,11 @@ +2011-12-16 Chong Yidong + + * maintaining.texi (Version Control Systems): Drop Meta-CVS. + (Basic VC Editing): Remove redundant descriptions. + (VC With A Merging VCS): Make description more general instead of + CVS-specific. + (VC With A Locking VCS): Use VC fileset terminology. + 2011-12-12 Chong Yidong * building.texi (Executing Lisp): Fix xref for C-M-x. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index ab4a485cb87..47a3329f88d 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -24,9 +24,9 @@ assist in the process of compiling and testing programs. * Executing Lisp:: Various modes for editing Lisp programs, with different facilities for running the Lisp programs. -* Lisp Libraries:: How Lisp programs are loaded into Emacs. -* Lisp Eval:: Executing a single Lisp expression in Emacs. -* Lisp Interaction:: Executing Lisp in an Emacs buffer. +* Libraries: Lisp Libraries. How Lisp programs are loaded into Emacs. +* Eval: Lisp Eval. Executing a single Lisp expression in Emacs. +* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer. * External Lisp:: Communicating through Emacs with a separate Lisp. @end menu diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 354812edc1f..eed14c07216 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -71,7 +71,7 @@ control operations. Some uncommon or intricate version control operations, such as altering repository settings, are not supported in VC. You should -perform such tasks outside Emacs, e.g. via the command line. +perform such tasks outside Emacs, e.g.@: via the command line. This section provides a general overview of version control, and describes the version control systems that VC supports. You can skip @@ -125,7 +125,7 @@ which it refers to as @dfn{back ends}: @item SCCS was the first version control system ever built, and was long ago superseded by more advanced ones. VC compensates for certain features -missing in SCCS (e.g., tag names for releases) by implementing them +missing in SCCS (e.g.@: tag names for releases) by implementing them itself. Other VC features, such as multiple branches, are simply unavailable. Since SCCS is non-free, we recommend avoiding it. @@ -154,7 +154,7 @@ moving/renaming. VC supports all basic editing operations under CVS. @cindex SVN @cindex Subversion @item -Subversion (SVN) is a free version control system designed to be +Subversion (svn) is a free version control system designed to be similar to CVS but without its problems (e.g., it supports atomic commits of filesets, and versioning of directories, symbolic links, meta-data, renames, copies, and deletes). @@ -189,10 +189,6 @@ both repository-based and distributed versioning. VC supports most basic editing operations under Bazaar. @end itemize - Previous versions of VC supported a version control system known as -Meta-CVS. This support was dropped due to limited interest from users -and developers. - @node VCS Concepts @subsubsection Concepts of Version Control @@ -264,7 +260,7 @@ number and severity of conflicts that actually occur. SCCS always uses locking. RCS is lock-based by default but can be told to operate in a merging style. CVS and Subversion are merge-based by default but can be told to operate in a locking mode. -Distributed version control systems, such as GNU Arch, git, and +Distributed version control systems, such as GNU Arch, Git, and Mercurial, are exclusively merging-based. VC mode supports both locking and merging version control. The @@ -302,7 +298,7 @@ kind of model. One of its drawbacks is that the repository is a choke point for reliability and efficiency. GNU Arch pioneered the concept of @dfn{decentralized} version -control, later implemented in git, Mercurial, and Bazaar. A project +control, later implemented in Git, Mercurial, and Bazaar. A project may have several different repositories, and these systems support a sort of super-merge between repositories that tries to reconcile their change histories. In effect, there is one repository for each @@ -409,37 +405,35 @@ VC fileset is simply that one file. When you type them in a VC Directory buffer, and some files in it are marked, the VC fileset consists of the marked files (@pxref{VC Directory Mode}). - The principal VC command is an all-purpose command, @kbd{C-x v v} -(@code{vc-next-action}), that performs either registration, locking, -merging or a check-in (depending on the situation) on the current VC -fileset. You can use @kbd{C-x v v} in a file-visiting buffer or in a -VC Directory buffer. + On Subversion and on decentralized version control systems, +multi-file VC filesets are handled as a single group by the relevant +version control commands. For example, committing a multi-file VC +fileset generates a single revision, consisting of all the changes to +those files. But on older version control systems which lack support +for group operations, such as CVS, the files in a multi-file VC +fileset are passed individually to version control commands (e.g.@: a +commit generates one revision for each changed file). @table @kbd @itemx C-x v v -Perform the appropriate next version control operation on the VC fileset. +Perform the next appropriate version control operation on the current +VC fileset. @end table @findex vc-next-action @kindex C-x v v - The precise action of @kbd{C-x v v} depends on the state of the VC -fileset, and whether the version control system uses locking or -merging. This is described in detail in the subsequent sections. - - VC filesets are the way that VC mode bridges the gap between -file-based and changeset-based version control systems. They are, -essentially, a way to pass multiple file arguments as a group to -version control commands. For example, on Subversion, a checkin with -a multi-file VC fileset becomes a joint commit, as though you had -typed @command{svn commit} with those file arguments at the shell -command line. All files in a VC fileset must be under the same -version control system; if they are not, Emacs signals an error when -you attempt to execute a command on the fileset. - - VC filesets are distinct from the ``named filesets'' used for -viewing and visiting files in functional groups (@pxref{Filesets}). -Unlike named filesets, VC filesets are not named and don't persist -across sessions. + The principal VC command is an all-purpose command, @kbd{C-x v v} +(@code{vc-next-action}), which performs the ``most appropriate'' +action on the current VC fileset: either registering it with a version +control system, or committing it, or unlocking it, or merging changes +into it. The precise actions are described in detail in the following +subsections. You can use @kbd{C-x v v} either in a file-visiting +buffer or in a VC Directory buffer. + + Note that VC filesets are distinct from the ``named filesets'' used +for viewing and visiting files in functional groups +(@pxref{Filesets}). Unlike named filesets, VC filesets are not named +and don't persist across sessions. @menu * VC With A Merging VCS:: Without locking: default mode for CVS. @@ -450,46 +444,41 @@ across sessions. @node VC With A Merging VCS @subsubsection Basic Version Control with Merging - When your version control system is merging-based (the default for -CVS and all newer version control systems), work files are always -writable; you need not do anything special to begin editing a file. -The status indicator on the mode line is @samp{-} if the file is -unmodified; it flips to @samp{:} as soon as you save any changes -(@pxref{VC Mode Line}). - - Here is what @kbd{C-x v v} does when using a merging-based system: + On a merging-based version control system (i.e.@: most modern ones; +@pxref{VCS Merging}), @kbd{C-x v v} does the following: @itemize @bullet @item -If the work file is in a directory that is not controlled by any -version control system, prompt for a repository type. Then, create a -version control repository of that type and register the file with it. +If there is more than one file in the VC fileset and the files have +inconsistent version control states, signal an error. @item -If the work file is in a directory that is controlled by a version -control system but not registered with it, register the file. +If each file in the VC fileset is not registered with a version +control system, register the VC fileset. If the fileset is in a +directory controlled by a version control system, register it with +that system; otherwise, prompt for a repository type, create a new +repository, and register the VC fileset with it. @item -If the work file is the same as in the repository, do nothing. +If each work file in the VC fileset is unchanged, do nothing. @item -If you have not changed the work file, but some other user has checked -in changes to the repository, merge those changes into the work file. +If each work file in the VC fileset has been modified, commit the +changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the +desired log entry for the new revision, followed by @kbd{C-c C-c} to +commit (@pxref{Log Buffer}). + +If committing to a shared repository, the commit may fail if the +repository that has been changed since your last update. In that +case, you must perform an update before trying again. If using a +decentralized version control system, use @kbd{C-x v +} or @kbd{C-x v +m} (@pxref{Merging}). If using a centralized version control system, +type @kbd{C-x v v} again to merge in the repository changes. @item -If you have made modifications to the work file, attempt to commit -the changes. To do this, Emacs first reads the log entry for the new -revision (@pxref{Log Buffer}). If some other user has committed -changes to the repository since you last checked it out, the checkin -fails. In that case, type @kbd{C-x v v} again to merge those changes -into your own work file; this puts the work file into a ``conflicted'' -state. Type @kbd{C-x v v} to clear the ``conflicted'' state; VC then -regards the file as up-to-date and modified, and you can try to check -it in again. - -To pick up any recent changes from the repository @emph{without} -trying to commit your own changes, type @kbd{C-x v m @key{RET}}. -@xref{Merging}. +Finally, if you are using a centralized version control system, check +if each work file in the VC fileset is up-to-date. If any file has +been changed in the repository, offer to update it. @end itemize These rules also apply when you use RCS in its ``non-locking'' mode, @@ -506,32 +495,44 @@ its normal locking mode (@pxref{VC With A Locking VCS}). @node VC With A Locking VCS @subsubsection Basic Version Control with Locking - Under a locking-based version control system (such as SCCS, and RCS -in its default mode), @kbd{C-x v v} does the following: + On a locking-based version control system (such as SCCS, and RCS in +its default mode), @kbd{C-x v v} does the following: @itemize @bullet @item -If the file is not locked, lock it and make it writable, so that you -can change it. +If there is more than one file in the VC fileset and the files have +inconsistent version control states, signal an error. + +@item +If each file in the VC fileset is not registered with a version +control system, register the VC fileset. If the fileset is in a +directory controlled by a version control system, register it with +that system; otherwise, prompt for a repository type, create a new +repository, and register the VC fileset with it. + +@item +If each file is registed and unlocked, lock it and make it writable, +so that you can begin to edit it. @item -If the file is locked by you, and contains changes, commit the -changes. In order to do this, Emacs first reads the log entry for the -new revision. @xref{Log Buffer}. +If each file is locked by you and contains changes, commit the +changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the +desired log entry for the new revision, followed by @kbd{C-c C-c} to +commit (@pxref{Log Buffer}). @item -If the file is locked by you, but you have not changed it since you -locked it, release the lock and makes the file read-only again. +If each file is locked by you, but you have not changed it, release +the lock and make the file read-only again. @item -If the file is locked by some other user, ask whether you want to -``steal the lock'' from that user. If you say yes, the file becomes -locked by you, but a message is sent to the person who had formerly -locked the file, to inform him of what has happened. +If each file is locked by another user, ask whether you want to +``steal the lock''. If you say yes, the file becomes locked by you, +and a warning message is sent to the user who had formerly locked the +file. @end itemize These rules also apply when you use CVS in locking mode, except -that CVS does not support stealing a lock. +that CVS does not support stealing locks. @node Advanced C-x v v @subsubsection Advanced Control in @kbd{C-x v v} -- cgit v1.2.1 From adee8a65c46c101249a665ad34bad70fcd8b0deb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 16 Dec 2011 16:51:40 -0800 Subject: Port HAVE_PTHREAD configuration to MirBSD 10 (Bug#10201). * configure.in (HAVE_PTHREAD): Check for pthread_atforkif linking to gmalloc.c. This should prevent a MirBSD 10 build failure reported by Nelson H. F. Beebe in . --- ChangeLog | 8 ++++++++ configure.in | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 507848b63b6..23efc30f4fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-12-17 Paul Eggert + + Port HAVE_PTHREAD configuration to MirBSD 10 (Bug#10201). + * configure.in (HAVE_PTHREAD): Check for pthread_atfork if linking + to gmalloc.c. This should prevent a MirBSD 10 build failure reported + by Nelson H. F. Beebe in + . + 2011-12-10 Juanma Barranquero * update-subdirs: Don't set no-byte-compile twice (bug#10260). diff --git a/configure.in b/configure.in index b4bb8eb708c..83acc82064e 100644 --- a/configure.in +++ b/configure.in @@ -1720,7 +1720,15 @@ dnl Check if pthreads is available. LIB_PTHREAD= AC_CHECK_HEADERS(pthread.h) if test "$ac_cv_header_pthread_h"; then - AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes) + dnl gmalloc.c uses pthread_atfork, which is not available on older-style + dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely + dnl testing for pthread_self if Emacs uses gmalloc.c. + if test "$GMALLOC_OBJ" = gmalloc.o; then + emacs_pthread_function=pthread_atfork + else + emacs_pthread_function=pthread_self + fi + AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes) fi if test "$HAVE_PTHREAD" = yes; then case "${canonical}" in -- cgit v1.2.1 From 2adb6e857867449beb24faf7b361e7c3c3904c88 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 16 Dec 2011 17:05:26 -0800 Subject: * s/gnu-linux.h: Fix mark_memory typo (Bug#10286). (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory, which caused a build failure on GNU/Linux IA-64. This problem was introduced by my 2011-10-07 patch. --- src/ChangeLog | 7 +++++++ src/s/gnu-linux.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f8fa66d0046..98e87ef4306 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-12-17 Paul Eggert + + * s/gnu-linux.h: Fix mark_memory typo (Bug#10286). + (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory, + which caused a build failure on GNU/Linux IA-64. This problem was + introduced by my 2011-10-07 patch. + 2011-12-15 Juri Linkov * image.c (imagemagick_error): New function. (Bug#10112) diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 3d78bf695bc..d89b14cc080 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -155,7 +155,7 @@ along with GNU Emacs. If not, see . */ extern void *__libc_ia64_register_backing_store_base; \ __builtin_ia64_flushrs (); \ mark_memory (__libc_ia64_register_backing_store_base, \ - __builtin_ia64_bsp (), 0); \ + __builtin_ia64_bsp ()); \ } while (0) #endif #endif -- cgit v1.2.1 From 301b181a14b0f698c6aae05522e6f3401ea45a3c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 16 Dec 2011 22:51:13 -0800 Subject: Spelling fixes. --- doc/emacs/cal-xtra.texi | 4 ++-- doc/emacs/maintaining.texi | 4 ++-- doc/misc/dbus.texi | 2 +- lisp/ansi-color.el | 2 +- lisp/cedet/semantic/wisent/comp.el | 2 +- lisp/international/mule-cmds.el | 2 +- lisp/language/cyrillic.el | 4 ++-- lisp/progmodes/prolog.el | 6 +++--- lisp/progmodes/python.el | 2 +- lisp/progmodes/verilog-mode.el | 18 +++++++++--------- lisp/textmodes/artist.el | 2 +- lisp/textmodes/fill.el | 4 ++-- lisp/vc/emerge.el | 2 +- lisp/window.el | 2 +- src/dbusbind.c | 2 +- src/w32term.c | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi index 6d20c92a6d9..2d2b32943f5 100644 --- a/doc/emacs/cal-xtra.texi +++ b/doc/emacs/cal-xtra.texi @@ -41,12 +41,12 @@ customize the variables @code{calendar-intermonth-header} and @vindex calendar-holiday-marker @vindex diary-entry-marker -@vindex calenday-today-marker +@vindex calendar-today-marker The variable @code{calendar-holiday-marker} specifies how to mark a date as being a holiday. Its value may be a single-character string to insert next to the date, or a face name to use for displaying the date. Likewise, the variable @code{diary-entry-marker} specifies how to mark a -date that has diary entries, and @code{calenday-today-marker} is used by +date that has diary entries, and @code{calendar-today-marker} is used by the function @code{calendar-mark-today} to mark today's date. By default, the calendar uses faces named @code{holiday}, @code{diary}, and @code{calendar-today} for these purposes. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index eed14c07216..9d788fa7192 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -511,7 +511,7 @@ that system; otherwise, prompt for a repository type, create a new repository, and register the VC fileset with it. @item -If each file is registed and unlocked, lock it and make it writable, +If each file is registered and unlocked, lock it and make it writable, so that you can begin to edit it. @item @@ -1880,7 +1880,7 @@ directory where the tags file was initially written. This way, you can move an entire directory tree containing both the tags file and the source files, and the tags file will still refer correctly to the source files. If the tags file is @file{-} or is in the @file{/dev} directory, -however, the file names are +however, the file names are made relative to the current working directory. This is useful, for example, when writing the tags to @file{/dev/stdout}. diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 06a52107d71..f515109bf76 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -1677,7 +1677,7 @@ Establish the connection to D-Bus @var{bus}. @var{bus} can be either the symbol @code{:system} or the symbol @code{:session}, or it can be a string denoting the address of the -corresponding bus. For the system and session busses, this function +corresponding bus. For the system and session buses, this function is called when loading @file{dbus.el}, there is no need to call it again. diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 08b569de333..abb6a961018 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -585,7 +585,7 @@ ANSI-CODE is used as an index into the vector." "Create a new face by applying all the parameters in ESCAPE-SEQ. Should any of the parameters result in the default face (usually this is -the parameter 0), then the effect of all previous parameters is cancelled. +the parameter 0), then the effect of all previous parameters is canceled. ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter 34 is used by `ansi-color-get-face-1' to return a face definition." diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 884342a1df2..0aff8325252 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -51,7 +51,7 @@ ;; name space. Elisp dynamic binding allows that ;-) ;; Here are simple macros to easily define and use set of variables -;; binded locally, without all these "reference to free variable" +;; bound locally, without all these "reference to free variable" ;; compiler warnings! (defmacro wisent-context-name (name) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 0a5d6ed954c..0d3f079866e 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1031,7 +1031,7 @@ It is highly recommended to fix it before writing to a file." and try again)? " coding-system auto-cs)) (error "Save aborted")))) (when (and tick (/= tick (buffer-chars-modified-tick))) - (error "Cancelled because the buffer was modified")) + (error "Canceled because the buffer was modified")) coding-system))) (setq select-safe-coding-system-function 'select-safe-coding-system) diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index 8fb7fae720d..c0f857cadee 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -126,7 +126,7 @@ Support for Russian using koi8-r and the russian-computer input method.") (define-coding-system 'koi8-u "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)" :coding-type 'charset - :mnemonic ?U + :mnemonic ?U :charset-list '(koi8-u) :mime-charset 'koi8-u) @@ -246,7 +246,7 @@ Support for Russian using koi8-r and the russian-computer input method.") (ctext-non-standard-encodings "microsoft-cp1251") (input-method . "bulgarian-bds") (documentation - . "Support for Bulgrian with windows-1251 character set.")) + . "Support for Bulgarian with windows-1251 character set.")) '("Cyrillic")) (set-language-info-alist diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 5b229cc0c24..0efc2ca231b 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -147,9 +147,9 @@ ;; o Introduced three new customizable variables: electric colon ;; (`prolog-electric-colon-flag', default nil), electric dash ;; (`prolog-electric-dash-flag', default nil), and a possibility -;; to prevent the predicate template insertion from adding commata +;; to prevent the predicate template insertion from adding commas ;; (`prolog-electric-dot-full-predicate-template', defaults to t -;; since it seems quicker to me to just type those commata). A +;; since it seems quicker to me to just type those commas). A ;; trivial adaptation of a patch by Markus Triska. ;; o Improved the behavior of electric if-then-else to only skip ;; forward if the parenthesis/semicolon is preceded by @@ -512,7 +512,7 @@ It does not apply in strings and comments." (defcustom prolog-electric-dot-full-predicate-template nil "*If nil, electric dot inserts only the current predicate's name and `(' for recursive calls or new clause heads. Non-nil means to also -insert enough commata to cover the predicate's arity and `)', +insert enough commas to cover the predicate's arity and `)', and dot and newline for recursive calls." :group 'prolog-keyboard :type 'boolean) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index fbf7c3c42f7..6081d8e838b 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2343,7 +2343,7 @@ Interactively, prompt for the name with completion." ;;;; Bicycle Repair Man support (autoload 'pymacs-load "pymacs" nil t) -(autoload 'brm-init "bikemacs") +(autoload 'brm-init "bikeemacs") (defvar brm-menu) ;; I'm not sure how useful BRM really is, and it's certainly dangerous diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 3ae66a477e8..87c678890de 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -981,7 +981,7 @@ of each Verilog file that requires it, rather than being set globally." "*If true, AUTORESET will reset those signals which were assigned with blocking assignments (=) even in a block with non-blocking assignments (<=). - + If nil, all blocking assigned signals are ignored when any non-blocking assignment is in the AUTORESET block. This allows blocking assignments to be used for temporary values and not have @@ -2011,7 +2011,7 @@ find the errors." "`uvm_component_utils" "`uvm_create" "`uvm_create_on" - "`uvm_create_seq" ;; Undocumented in 1.1 + "`uvm_create_seq" ;; Undocumented in 1.1 "`uvm_declare_p_sequencer" "`uvm_declare_sequence_lib" ;; Deprecated in 1.1 "`uvm_do" @@ -7505,7 +7505,7 @@ Signals must be in standard (base vector) form." (nreverse out-list))) (defun verilog-signals-combine-bus (in-list) - "Return a list of signals in IN-LIST, with busses combined. + "Return a list of signals in IN-LIST, with buses combined. Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]." (let (combo buswarn out-list @@ -9907,7 +9907,7 @@ If optional WHITESPACE true, ignore whitespace." (p2 (with-current-buffer b2 (goto-char (point-min)))) (maxp1 (with-current-buffer b1 (point-max))) (maxp2 (with-current-buffer b2 (point-max))) - (op1 -1) (op2 -1) + (op1 -1) (op2 -1) progress size) (while (not (and (eq p1 op1) (eq p2 op2))) ;; If both windows have whitespace optionally skip over it. @@ -10100,7 +10100,7 @@ instantiating the resulting module. Long lines are split based on the `fill-column', see \\[set-fill-column]. Limitations: - Concatenation and outputting partial busses is not supported. + Concatenation and outputting partial buses is not supported. Typedefs must match `verilog-typedef-regexp', which is disabled by default. @@ -10958,7 +10958,7 @@ the datatype of the declarations. Limitations: This ONLY detects outputs of AUTOINSTants (see `verilog-read-sub-decls'), - and all busses must have widths, such as those from AUTOINST, or using [] + and all buses must have widths, such as those from AUTOINST, or using [] in AUTO_TEMPLATEs. This does NOT work on memories or SystemVerilog .name connections, @@ -11315,7 +11315,7 @@ Limitations: If placed inside the parenthesis of a module declaration, it creates Verilog 2001 style, else uses Verilog 1995 style. - Concatenation and outputting partial busses is not supported. + Concatenation and outputting partial buses is not supported. Module names must be resolvable to filenames. See `verilog-auto-inst'. @@ -11439,7 +11439,7 @@ Limitations: If placed inside the parenthesis of a module declaration, it creates Verilog 2001 style, else uses Verilog 1995 style. - Concatenation and outputting partial busses is not supported. + Concatenation and outputting partial buses is not supported. Module names must be resolvable to filenames. See `verilog-auto-inst'. @@ -11490,7 +11490,7 @@ Limitations: If placed inside the parenthesis of a module declaration, it creates Verilog 2001 style, else uses Verilog 1995 style. - Concatenation and outputting partial busses is not supported. + Concatenation and outputting partial buses is not supported. Module names must be resolvable to filenames. See `verilog-auto-inst'. diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index bd1fcc43d22..2e90a4bf241 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -4455,7 +4455,7 @@ If N is negative, move backward." "Set current fill character to be C." (interactive "cType fill char (type RET to turn off): ") (cond ((eq c ?\r) (setq artist-fill-char-set nil) - (message "Fill cancelled")) + (message "Fill canceled")) (t (setq artist-fill-char-set t) (setq artist-fill-char c) (message "Fill set to \"%c\"" c)))) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index b8614b16f82..610b0c71357 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -82,7 +82,7 @@ reinserts the fill prefix in each resulting line." (setq fill-prefix nil))) (if fill-prefix (message "fill-prefix: \"%s\"" fill-prefix) - (message "fill-prefix cancelled"))) + (message "fill-prefix canceled"))) (defcustom adaptive-fill-mode t "Non-nil means determine a paragraph's fill prefix from its text." @@ -383,7 +383,7 @@ and `fill-nobreak-invisible'." "Char-table of characters that don't use space between words.") (progn - ;; Register `kinsoku' for scripts HAN, KANA, BOPOMPFO, and CJK-MISS. + ;; Register `kinsoku' for scripts HAN, KANA, BOPOMOFO, and CJK-MISC. ;; Also tell that they don't use space between words. (map-char-table #'(lambda (key val) diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index 3ba5bcdb90a..bc4b0725c4e 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el @@ -1754,7 +1754,7 @@ to the left margin, if they are in windows." ;; If there are min-lines lines above and below the region, then don't do ;; anything. ;; If not, recenter the region to make it so. -;; If that isn't possible, remove context lines balancedly from top and bottom +;; If that isn't possible, remove context lines evenly from top and bottom ;; so the entire region shows. ;; If that isn't possible, show the top of the region. ;; BEG must be at the beginning of a line. diff --git a/lisp/window.el b/lisp/window.el index dcf7394b204..8fbc8b8ace4 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -3713,7 +3713,7 @@ value can be also stored on disk and read back in a new session." (if (window-sizable-p window (- size) horizontal 'safe) (let* ((window-combination-limit (assq 'combination-limit item))) - ;; We must inherit the combiantion limit, otherwise + ;; We must inherit the combination limit, otherwise ;; we might mess up handling of atomic and side ;; window. (setq new (split-window window size horizontal))) diff --git a/src/dbusbind.c b/src/dbusbind.c index 7984be3564b..c5448ee5e7a 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -968,7 +968,7 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0, connection = xd_initialize (bus, TRUE); /* Add the watch functions. We pass also the bus as data, in order - to distinguish between the busses in xd_remove_watch. */ + to distinguish between the buses in xd_remove_watch. */ if (!dbus_connection_set_watch_functions (connection, xd_add_watch, xd_remove_watch, diff --git a/src/w32term.c b/src/w32term.c index 6df218326d1..532ff64fe66 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3286,7 +3286,7 @@ w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, ***********************************************************************/ /* Handle mouse button event on the tool-bar of frame F, at - frame-relative coordinates X/Y. EVENT_TYPE is either ButtionPress + frame-relative coordinates X/Y. EVENT_TYPE is either ButtonPress or ButtonRelease. */ static void -- cgit v1.2.1 From 9cff91f800cc72f8c77cf192c119c78d4a14a8ee Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 17 Dec 2011 15:50:08 +0800 Subject: More updates for VC documentation. * doc/emacs/maintaining.texi (VCS Concepts): Make "revision" terminology less CVS-specific. (VC With A Merging VCS, VC With A Locking VCS): Add xref to Registering node. (Secondary VC Commands): Deleted. Promote subnodes. (Log Buffer): Add command name for C-c C-c. Fix the name of the log buffer. Add index entries. (VCS Changesets, Types of Log File, VC With A Merging VCS): Use "commit" terminology. (Old Revisions): Move it to just before VC Change Log. "Tag" here doesn't refer to tags tables. Note other possible forms of the revision ID. C-x v = does not save. (Registering): Note similarity to C-x v v action. Fix description of how backends are chosen. De-document vc-default-init-revision. (VC Change Log): Document C-x v l in VC-Dir buffer. Document RET in root log buffers. * lisp/vc/vc.el (vc-deduce-fileset): Minor doc fix. --- doc/emacs/ChangeLog | 19 ++ doc/emacs/emacs.texi | 12 +- doc/emacs/maintaining.texi | 587 ++++++++++++++++++++++----------------------- etc/NEWS | 2 + lisp/ChangeLog | 3 +- lisp/vc/vc.el | 12 +- 6 files changed, 318 insertions(+), 317 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 412a9cd5a58..20f068e4ef6 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,22 @@ +2011-12-17 Chong Yidong + + * maintaining.texi (VCS Concepts): Make "revision" terminology + less CVS-specific. + (VC With A Merging VCS, VC With A Locking VCS): Add xref to + Registering node. + (Secondary VC Commands): Deleted. Promote subnodes. + (Log Buffer): Add command name for C-c C-c. Fix the name of the + log buffer. Add index entries. + (VCS Changesets, Types of Log File, VC With A Merging VCS): Use + "commit" terminology. + (Old Revisions): Move it to just before VC Change Log. "Tag" here + doesn't refer to tags tables. Note other possible forms of the + revision ID. C-x v = does not save. + (Registering): Note similarity to C-x v v action. Fix description + of how backends are chosen. De-document vc-default-init-revision. + (VC Change Log): Document C-x v l in VC-Dir buffer. Document RET + in root log buffers. + 2011-12-16 Chong Yidong * maintaining.texi (Version Control Systems): Drop Meta-CVS. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 2cb02feee60..3a93889f6c7 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -741,15 +741,17 @@ Version Control * VC Mode Line:: How the mode line shows version control status. * Basic VC Editing:: How to edit a file under version control. * Log Buffer:: Features available in log entry buffers. +* Registering:: Putting a file under version control. * Old Revisions:: Examining and comparing old versions. -* Secondary VC Commands:: The commands used a little less frequently. +* VC Change Log:: Viewing the VC Change Log. +* VC Undo:: Canceling changes before or after committing. * VC Directory Mode:: Listing files managed by version control. * Branches:: Multiple lines of development. * Remote Repositories:: Efficient access to remote CVS servers. * Revision Tags:: Symbolic names for revisions. * Miscellaneous VC:: Various other commands and features of VC. * Customizing VC:: Variables that change VC's behavior. - + Introduction to Version Control * Why Version Control?:: Understanding the problems it addresses. @@ -766,12 +768,6 @@ Basic Editing under Version Control * VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. * Advanced C-x v v:: Advanced features available with a prefix argument. -The Secondary Commands of VC - -* Registering:: Putting a file under version control. -* VC Change Log:: Viewing the VC Change Log. -* VC Undo:: Canceling changes before or after check-in. - VC Directory Mode * VC Directory Buffer:: What the buffer looks like and means. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 9d788fa7192..063d0e65f5b 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -49,8 +49,10 @@ variable @code{vc-handled-backends} to @code{nil} * VC Mode Line:: How the mode line shows version control status. * Basic VC Editing:: How to edit a file under version control. * Log Buffer:: Features available in log entry buffers. +* Registering:: Putting a file under version control. * Old Revisions:: Examining and comparing old versions. -* Secondary VC Commands:: The commands used a little less frequently. +* VC Change Log:: Viewing the VC Change Log. +* VC Undo:: Canceling changes before or after committing. * VC Directory Mode:: Listing files managed by version control. * Branches:: Multiple lines of development. @ifnottex @@ -171,14 +173,14 @@ under active development, and has been deprecated in favor of Bazaar. @item Git is a distributed version control system originally invented by Linus Torvalds to support development of Linux (his kernel). VC -supports many common git operations, but others, such as repository +supports many common Git operations, but others, such as repository syncing, must be done from the command line. @cindex hg @cindex Mercurial @item Mercurial (hg) is a distributed version control system broadly -resembling git. VC supports most Mercurial commands, with the +resembling Git. VC supports most Mercurial commands, with the exception of repository sync operations. @cindex bzr @@ -206,16 +208,16 @@ as @dfn{log entries} that describe the changes made to each file. The copy of a version-controlled file that you actually edit is called the @dfn{work file}. You can change each work file as you would an ordinary file. After you are done with a set of changes, you -@dfn{commit} (or @dfn{check in}) the changes; this records the changes -in the repository, along with a descriptive log entry. +may @dfn{commit} (or @dfn{check in}) the changes; this records the +changes in the repository, along with a descriptive log entry. @cindex revision @cindex revision ID - A copy of a file stored in a repository is called a @dfn{revision}. -The history of a file is a sequence of revisions. Each revision is -named by a @dfn{revision ID}. The format of the revision ID depends -on the version control system; in the simplest case, it is just an -integer. + Each commit creates a new @dfn{revision} in the repository. The +version control system keeps track of all past revisions and the +changes that were made in each revision. Each revision is named by a +@dfn{revision ID}, whose format depends on the version control system; +in the simplest case, it is just an integer. To go beyond these basic concepts, you will need to understand three aspects in which version control systems differ. As explained in the @@ -231,10 +233,10 @@ these modes of operation, but it cannot hide the differences. between users who want to change the same file. There are two ways to do this: merging and locking. - In a version control system that uses merging, each user may check -out and modify a work file at any time. The system lets you -@dfn{merge} your work file, which may contain changes that have not -been committed, with the latest changes that others have committed. + In a version control system that uses merging, each user may modify +a work file at any time. The system lets you @dfn{merge} your work +file, which may contain changes that have not been committed, with the +latest changes that others have committed. Older version control systems use a @dfn{locking} scheme instead. Here, work files are normally read-only. To edit a file, you ask the @@ -277,7 +279,7 @@ possible. control operations are @dfn{file-based}: each file has its own comment and revision history separate from that of all other files. Newer systems, beginning with Subversion, are @dfn{changeset-based}: a -checkin may include changes to several files, and the entire set of +commit may include changes to several files, and the entire set of changes is handled as a unit. Any comment associated with the change does not belong to a single file, but to the changeset itself. @@ -342,10 +344,9 @@ policy, which you should follow. When the policy is to use both, you typically want to write an entry for each change just once, then put it into both logs. You can write the entry in @file{ChangeLog}, then copy it to the log buffer with -@kbd{C-c C-a} when checking in the change (@pxref{Log Buffer}). Or -you can write the entry in the log buffer while checking in the -change, and later use the @kbd{C-x v a} command to copy it to -@file{ChangeLog} +@kbd{C-c C-a} when committing the change (@pxref{Log Buffer}). Or you +can write the entry in the log buffer while committing the change, and +later use the @kbd{C-x v a} command to copy it to @file{ChangeLog} @iftex (@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}). @end iftex @@ -450,23 +451,25 @@ and don't persist across sessions. @itemize @bullet @item If there is more than one file in the VC fileset and the files have -inconsistent version control states, signal an error. +inconsistent version control states, signal an error. (Note, however, +that a fileset is allowed to include both ``newly-added'' files and +``modified'' files; @pxref{Registering}.) @item -If each file in the VC fileset is not registered with a version -control system, register the VC fileset. If the fileset is in a -directory controlled by a version control system, register it with -that system; otherwise, prompt for a repository type, create a new -repository, and register the VC fileset with it. +If none of the files in the VC fileset are registered with a version +control system, register the VC fileset, i.e.@: place it under version +control. @xref{Registering}. If Emacs cannot find a system to +register under, it prompts for a repository type, creates a new +repository, and registers the VC fileset with it. @item -If each work file in the VC fileset is unchanged, do nothing. +If every work file in the VC fileset is unchanged, do nothing. @item -If each work file in the VC fileset has been modified, commit the +If every work file in the VC fileset has been modified, commit the changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the desired log entry for the new revision, followed by @kbd{C-c C-c} to -commit (@pxref{Log Buffer}). +commit. @xref{Log Buffer}. If committing to a shared repository, the commit may fail if the repository that has been changed since your last update. In that @@ -487,7 +490,7 @@ Nothing informs you if another user has committed changes in the same file since you began editing it; when you commit your revision, his changes are removed (however, they remain in the repository and are thus not irrevocably lost). Therefore, you must verify that the -current revision is unchanged before checking in your changes. In +current revision is unchanged before committing your changes. In addition, locking is possible with RCS even in this mode: @kbd{C-x v v} with an unmodified file locks the file, just as it does with RCS in its normal locking mode (@pxref{VC With A Locking VCS}). @@ -505,10 +508,10 @@ inconsistent version control states, signal an error. @item If each file in the VC fileset is not registered with a version -control system, register the VC fileset. If the fileset is in a -directory controlled by a version control system, register it with -that system; otherwise, prompt for a repository type, create a new -repository, and register the VC fileset with it. +control system, register the VC fileset. @xref{Registering}. If +Emacs cannot find a system to register under, it prompts for a +repository type, creates a new repository, and registers the VC +fileset with it. @item If each file is registered and unlocked, lock it and make it writable, @@ -575,13 +578,23 @@ Features}). @node Log Buffer @subsection Features of the Log Entry Buffer - When you tell VC to commit a change, it pops up a buffer called -@samp{*VC-Log*}. In this buffer, you should write a @dfn{log entry} +@cindex C-c C-c @r{(Log Edit mode)} +@findex log-edit-done + When you tell VC to commit a change, it pops up a buffer named +@samp{*vc-log*}. In this buffer, you should write a @dfn{log entry} describing the changes you have made (@pxref{Why Version Control?}). -After you are done, type @kbd{C-c C-c}; this exits the buffer and -commits the change, together with your log entry. +After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit +the buffer and commit the change, together with your log entry. - While in the @samp{*VC-Log*} buffer, you can write one or more +@cindex Log Edit mode +@cindex mode, Log Edit +@vindex vc-log-mode-hook + The major mode for the @samp{*vc-log*} buffer is Log Edit mode, a +variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode, +Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook} +(@pxref{Hooks}). + + While in the @samp{*vc-log*} buffer, you can write one or more @dfn{header lines}, specifying additional information to be supplied to the version control system. Each header line must occupy a single line at the top of the buffer; the first line that is not a header @@ -598,196 +611,224 @@ Apart from the @samp{Author} header, Emacs recognizes the headers @samp{Date} (a manually-specified commit time) and @samp{Fixes} (a reference to a bug fixed by the change). Not all version control systems recognize all headers: Bazaar recognizes all three headers, -while git, Mercurial, and Monotone recognizes only @samp{Author} and -@samp{Summary}. If you specify a header for a version control that -does not support it, the header is treated as part of the log entry. +while Git, Mercurial, and Monotone recognize only @samp{Author} and +@samp{Date}. If you specify a header for a version control that does +not support it, the header is treated as part of the log entry. +@kindex C-c C-f @r{(Log Edit mode)} @findex log-edit-show-files + Type @kbd{C-c C-f} (@code{log-edit-show-files}) in the +@samp{*vc-log*} buffer to view a list of files for the VC fileset that +is to be committed. If you called @kbd{C-x v v} directly from a work +file, the fileset consists of that single file. If you called +@kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory Mode}), +the fileset may consist of multiple files; in that case, @kbd{C-c C-c} +will commit those files together, as a single revision, if that is +supported by the version control system (on older version control +systems, such as CVS, each file in a multi-file VC fileset is +committed as an individual revision). + +@kindex C-c C-d @r{(Log Edit mode)} @findex log-edit-show-diff - Type @kbd{C-c C-f} (@code{log-edit-show-files}) to display a list of -files in the current VC fileset. If you called @kbd{C-x v v} directly -from a work file, the fileset consists of that single file; if you -called @kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory -Mode}), the fileset may consist of multiple files. - -@findex log-edit-insert-changelog Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff} -of the changes you have made (i.e., the differences between the work -file and the repository revision from which you started editing). -@xref{Old Revisions}. +of the changes between the current VC fileset and the repository +revision from which you started editing. @xref{Old Revisions}. - If the current VC fileset includes one or more @file{ChangeLog} -files (@pxref{Change Log}), type @kbd{C-c C-a} +@kindex C-c C-a @r{(Log Edit mode)} +@findex log-edit-insert-changelog + If the VC fileset that is to be committed includes one or more +@file{ChangeLog} files (@pxref{Change Log}), type @kbd{C-c C-a} (@code{log-edit-insert-changelog}) to pull the relevant entries into -the @samp{*VC-Log*} buffer. If the topmost item in each +the @samp{*vc-log*} buffer. If the topmost item in each @file{ChangeLog} was made under your user name on the current date, -this command searches that item for entries that match the file(s) to -be committed; if found, these entries are inserted. -@iftex -@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}, -@end iftex +this command searches that item for entries matching the file(s) to be +committed, and inserts them. @ifnottex -@xref{Change Logs and VC}, +@xref{Change Logs and VC}, for the opposite way of +working---generating ChangeLog entries from the revision control log. @end ifnottex -for the opposite way of working---generating ChangeLog entries from -the revision control log. - To abort a check-in, just @strong{don't} type @kbd{C-c C-c} in that + To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that buffer. You can switch buffers and do other editing. As long as you -don't try to commit another file, the entry you were editing remains -in the @samp{*VC-Log*} buffer, and you can go back to that buffer at -any time to complete the check-in. - - If you change several source files for the same reason, it is often -convenient to specify the same log entry for many of the files. (This -is the normal way to do things on a changeset-oriented system, where -comments are attached to changesets rather than the history of -individual files.) The most convenient way to do this is to mark all -the files in VC Directory Mode and commit from there; the log buffer -will carry the fileset information with it and do a group commit when -you type @kbd{C-c C-c}. - +don't try to make another commit, the entry you were editing remains +in the @samp{*vc-log*} buffer, and you can go back to that buffer at +any time to complete the commit. + +@kindex M-n @r{(Log Edit mode)} +@kindex M-p @r{(Log Edit mode)} +@kindex M-s @r{(Log Edit mode)} +@kindex M-r @r{(Log Edit mode)} You can also browse the history of previous log entries to duplicate -a checkin comment. This can be useful when you want several files to -have checkin comments that vary only slightly from each other. The -commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for doing this -work just like the minibuffer history commands (except that these -versions are used outside the minibuffer). +a commit comment. This can be useful when you want to make several +commits with similar comments. The commands @kbd{M-n}, @kbd{M-p}, +@kbd{M-s} and @kbd{M-r} for doing this work just like the minibuffer +history commands (@pxref{Minibuffer History}), except that they are +used outside the minibuffer. -@vindex vc-log-mode-hook - Each time you commit a change, the log entry buffer is put into VC -Log Edit mode, which involves running two hooks: @code{text-mode-hook} -and @code{vc-log-mode-hook}. @xref{Hooks}. +@node Registering +@subsection Registering a File for Version Control + +@table @kbd +@item C-x v i +Register the visited file for version control. +@end table + +@kindex C-x v i +@findex vc-register + The command @kbd{C-x v i} (@code{vc-register}) @dfn{registers} each +file in the current VC fileset, placing it under version control. +This is essentially equivalent to the action of @kbd{C-x v v} on an +unregistered VC fileset (@pxref{Basic VC Editing}), except that if the +VC fileset is already registered, @kbd{C-x v i} signals an error +whereas @kbd{C-x v v} performs some other action. + + To register a file, Emacs must choose a version control system. For +a multi-file VC fileset, the VC Directory buffer specifies the system +to use (@pxref{VC Directory Mode}). For a single-file VC fileset, if +the file's directory already contains files registered in a version +control system, or if the directory is part of a directory tree +controlled by a version control system, Emacs chooses that system. In +the event that more than one version control system is applicable, +Emacs uses the one that appears first in the variable +@iftex +@code{vc-handled-backends}. +@end iftex +@ifnottex +@code{vc-handled-backends} (@pxref{Customizing VC}). +@end ifnottex +If Emacs cannot find a version control system to register the file +under, it prompts for a repository type, creates a new repository, and +registers the file into that repository. + + On most version control systems, registering a file with @kbd{C-x v +i} or @kbd{C-x v v} adds it to the ``working tree'' but not to the +repository. Such files are labeled as @samp{added} in the VC +Directory buffer, and show a revision ID of @samp{@@@@} in the mode +line. To make the registration take effect in the repository, you +must perform a commit (@pxref{Basic VC Editing}). Note that on +changeset-based version control systems, commits can consist of both +file additions and modifications. + + On a locking-based version control system (@pxref{VCS Merging}), +registering a file leaves it unlocked and read-only. Type @kbd{C-x v +v} if you wish to start editing it. @node Old Revisions @subsection Examining And Comparing Old Revisions - One of the convenient features of version control is the ability -to examine any revision of a file, or compare two revisions. - @table @kbd -@item C-x v ~ -Prompt for a revision of the current file, and visit it in a buffer of -its own (@code{vc-revision-other-window}). - @item C-x v = -Compare the files in the current fileset with the working revision(s) -you started from (@code{vc-diff}). With a prefix argument, prompt for -two revisions of the current fileset and compare them. You can call -this command from a Dired buffer (@pxref{Dired}). +Compare the work files in the current VC fileset with the versions you +started from (@code{vc-diff}). With a prefix argument, prompt for two +revisions of the current VC fileset and compare them. You can also +call this command from a Dired buffer (@pxref{Dired}). + +@ifnottex +@item M-x vc-ediff +Like @kbd{C-x v =}, but using an Ediff session. @xref{Top, Ediff, +ediff, The Ediff Manual}. +@end ifnottex @item C-x v D -Compare the entire tree corresponding to the current fileset with the -tree you started from (@code{vc-root-diff}). With a prefix argument, -prompt for two revisions and compare their trees. +Compare all work files in the current version controlled directory +tree to the tree you started from (@code{vc-root-diff}). With a +prefix argument, prompt for two revisions and compare their trees. + +@item C-x v ~ +Prompt for a revision of the current file, and visit it in a separate +buffer (@code{vc-revision-other-window}). @item C-x v g -Display an annotated version of the file: for each line, show the -latest revision in which it was modified (@code{vc-annotate}). +Display an annotated version of the current file: for each line, show +the latest revision in which it was modified (@code{vc-annotate}). @end table -@findex vc-revision-other-window -@kindex C-x v ~ - To examine an old revision, visit the work file and type @kbd{C-x v -~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). Here, -@var{revision} is either the desired revision ID (@pxref{VCS -Concepts}), or the name of a tag or branch -@iftex -(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}). -@end iftex -@ifnottex -(@pxref{Tags}). -@end ifnottex -This command puts the text of the old revision in a file named -@file{@var{filename}.~@var{revision}~}, and visits it in its own -buffer in a separate window. - @findex vc-diff @kindex C-x v = - @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC -fileset (saving them if necessary) with the repository revision(s) -from which you started editing. Note that the latter may or may not -be the latest revision of the file(s). - - The diff is displayed in another window, in a Diff mode buffer -(@pxref{Diff Mode}) named @file{*vc-diff*}. In this buffer, the -@kbd{g} (@code{revert-buffer}) command performs the file comparison -again, generating a new diff. + @kbd{C-x v =} (@code{vc-diff}) displays a @dfn{diff} which compares +each work file in the current VC fileset to the version(s) from which +you started editing. The diff is displayed in another window, in a +Diff mode buffer (@pxref{Diff Mode}) named @file{*vc-diff*}. The +usual Diff mode commands are available in this buffer. In particular, +the @kbd{g} (@code{revert-buffer}) command performs the file +comparison again, generating a new diff. -@findex vc-diff @kindex C-u C-x v = To compare two arbitrary revisions of the current VC fileset, call @code{vc-diff} with a prefix argument: @kbd{C-u C-x v =}. This -prompts for two revision IDs, using the minibuffer, and displays the -diff in a special buffer in another window. Instead of providing a -revision ID, you can give an empty input, which specifies the current -contents of the work file; or a tag or branch name -@iftex -(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}). -@end iftex +prompts for two revision IDs (@pxref{VCS Concepts}), and displays a +diff between those versions of the fileset. This will not work +reliably for multi-file VC filesets, if the version control system is +file-based rather than changeset-based (e.g.@: CVS), since then +revision IDs for different files would not be related in any +meaningful way. + + Instead of the revision ID, some version control systems let you +specify revisions in other formats. For instance, under Bazaar you +can enter @samp{date:yesterday} for the argument to @kbd{C-u C-x v =} +(and related commands) to specify the first revision committed after +yesterday. See the documentation of the version control system for +details. + + If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a Dired buffer +(@pxref{Dired}), the file listed on the current line is treated as the +current VC fileset. + @ifnottex -(@pxref{Tags}). +@findex vc-ediff + @kbd{M-x vc-ediff} works like @kbd{C-x v =}, except that it uses an +Ediff session. @xref{Top, Ediff, ediff, The Ediff Manual}. @end ifnottex -If your version control system is file-based (e.g. CVS) rather than -changeset-based (Subversion, GNU Arch, git, Mercurial), supplying a -revision ID for a multi-file fileset (as opposed to a symbolic tag -name) is unlikely to return diffs that are connected in any meaningful -way. - - The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to -@kbd{C-x v =}, but it compares the entire tree associated with the -current VC fileset with the tree you started with. This means all the -files controlled by the current version control repository, even those -that are not part of the current VC fileset. - - If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that -is neither visiting a version-controlled file nor a VC directory -buffer, these commands generate a diff of all registered files in the -current directory and its subdirectories. -@findex vc-ediff -The function @code{vc-ediff} works like @code{vc-diff} and provides a way to -visually compare two revisions of a file in an Ediff session, @pxref{Top, -Ediff, ediff, The Ediff Manual}. It compares the file associated with the -current buffer with the last repository revision. To compare two arbitrary -revisions of the current file, call @code{vc-ediff} with a prefix argument. +@findex vc-root-diff +@kindex C-x v D + @kbd{C-x v D} (@code{vc-root-diff}) is similar to @kbd{C-x v =}, but +it displays a comparison between the entire current version controlled +tree (i.e.@: the tree controlled by the version control system +associated with the current VC fileset, which may include files that +are not part of that fileset) and the tree you started with. If you +invoke this command from a Dired buffer, it applies to the entire +version controlled tree containing the directory. @vindex vc-diff-switches -@vindex vc-rcs-diff-switches - @kbd{C-x v =} works by running a variant of the @code{diff} utility -designed to work with the version control system in use. The options -to pass to the @code{diff} command are taken from the first non-@code{nil} -value of @code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, -and @code{diff-switches} (@pxref{Comparing Files}), in that order. -Since @code{nil} means to check the next variable in the sequence, -either of the first two may use the value @code{t} to mean no switches at all. -Most of the @samp{vc@dots{}diff-switches} variables default to -@code{nil}, but some default to @code{t}. These are for those version -control systems (e.g. SVN) whose @code{diff} implementations do not -accept common options (e.g. @samp{-c}) likely to be in -@code{diff-switches}. - - The buffer produced by @kbd{C-x v =} supports the commands of -Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and -@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always -find the corresponding locations in the current work file. (Older -revisions are not, in general, present as files on your disk.) + You can customize the @command{diff} options that @kbd{C-x v =} and +@kbd{C-x v D} use for generating diffs. The options used are taken +from the first non-@code{nil} value amongst the variables +@code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, and +@code{diff-switches} (@pxref{Comparing Files}), in that order. Here, +@var{backend} stands for the current version control system, +e.g.@: @code{bzr} for Bazaar. Since @code{nil} means to check the +next variable in the sequence, either of the first two may use the +value @code{t} to mean no switches at all. Most of the +@code{vc-@var{backend}-diff-switches} variables default to @code{nil}, +but some default to @code{t}; these are for version control systems, +such as Subversion, whose @code{diff} implementations do not accept +common diff options. + +@findex vc-revision-other-window +@kindex C-x v ~ + To directly examine an older version of a file, visit the work file +and type @kbd{C-x v ~ @var{revision} @key{RET}} +(@code{vc-revision-other-window}). This retrieves the file version +corresponding to @var{revision}, saves it to +@file{@var{filename}.~@var{revision}~}, and visits it in a separate +window. @findex vc-annotate @kindex C-x v g - For some back ends, you can display the file @dfn{annotated} with -per-line revision information, by typing @kbd{C-x v g} + Many version control systems allow you to view files @dfn{annotated} +with per-line revision information, by typing @kbd{C-x v g} (@code{vc-annotate}). This creates a new buffer (the ``annotate -buffer'') displaying the file's text, with each part colored to show -how old it is. Text colored red is new, blue means old, and -intermediate colors indicate intermediate ages. By default, the color -is scaled over the full range of ages, such that the oldest changes -are blue, and the newest changes are red. +buffer'') displaying the file's text, with each line colored to show +how old it is. Red text is new, blue is old, and intermediate colors +indicate intermediate ages. By default, the color is scaled over the +full range of ages, such that the oldest changes are blue, and the +newest changes are red. When you give a prefix argument to this command, Emacs reads two -arguments using the minibuffer: the ID of which revision to display and -annotate (instead of the current file contents), and the time span in -days the color range should cover. +arguments using the minibuffer: the revision to display and annotate +(instead of the current file contents), and the time span in days the +color range should cover. From the annotate buffer, these and other color scaling options are available from the @samp{VC-Annotate} menu. In this buffer, you can @@ -796,13 +837,13 @@ view diffs, or view log entries: @table @kbd @item p -Annotate the previous revision, that is to say, the revision before -the one currently annotated. A numeric prefix argument is a repeat -count, so @kbd{C-u 10 p} would take you back 10 revisions. +Annotate the previous revision, i.e.@: the revision before the one +currently annotated. A numeric prefix argument is a repeat count, so +@kbd{C-u 10 p} would take you back 10 revisions. @item n -Annotate the next revision---the one after the revision currently -annotated. A numeric prefix argument is a repeat count. +Annotate the next revision, i.e.@: the revision after the one +currently annotated. A numeric prefix argument is a repeat count. @item j Annotate the revision indicated by the current line. @@ -841,72 +882,8 @@ Toggle the annotation visibility. This is useful for looking just at the file contents without distraction from the annotations. @end table -@node Secondary VC Commands -@subsection The Secondary Commands of VC - - This section explains the secondary commands of VC. - -@menu -* Registering:: Putting a file under version control. -* VC Change Log:: Viewing the VC Change Log. -* VC Undo:: Canceling changes before or after check-in. -@end menu - -@node Registering -@subsubsection Registering a File for Version Control - -@kindex C-x v i -@findex vc-register - You can put any file under version control by simply visiting it, and -then typing @w{@kbd{C-x v i}} (@code{vc-register}). - -@table @kbd -@item C-x v i -Register the visited file for version control. -@end table - - To register the file, Emacs must choose which version control system -to use for it. If the file's directory already contains files -registered in a version control system, Emacs uses that system. If -there is more than one system in use for a directory, Emacs uses the -one that appears first in @code{vc-handled-backends} -@iftex -(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). -@end iftex -@ifnottex -(@pxref{Customizing VC}). -@end ifnottex -On the other hand, if there are no files already registered, Emacs uses -the first system from @code{vc-handled-backends} that could register -the file (for example, you cannot register a file under CVS if its -directory is not already part of a CVS tree); with the default value -of @code{vc-handled-backends}, this means that Emacs uses RCS in this -situation. - - If locking is in use, @kbd{C-x v i} leaves the file unlocked and -read-only. Type @kbd{C-x v v} if you wish to start editing it. After -registering a file with CVS, you must subsequently commit the initial -revision by typing @kbd{C-x v v}. Until you do that, the revision ID -appears as @samp{@@@@} in the mode line. - -@vindex vc-default-init-revision -@cindex initial revision ID to register - The default initial revision ID for a newly registered file -varies by what VCS you are using; normally it will be 1.1 on VCSes -that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs. -You can specify a different default by setting the variable -@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a -numeric argument; then it reads the initial revision ID for this -particular file using the minibuffer. - -@c See http://debbugs.gnu.org/9745 -@c @vindex vc-initial-comment -@c If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an -@c initial comment to describe the purpose of this source file. Reading -@c the initial comment works like reading a log entry (@pxref{Log Buffer}). - @node VC Change Log -@subsubsection VC Change Log +@subsection VC Change Log @table @kbd @item C-x v l @@ -929,21 +906,31 @@ Display the changes that will be sent by the next push operation @kindex C-x v l @findex vc-print-log The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer -named @samp{*vc-change-log*} in a new window. This buffer lists the -changes to the current file, including the associated log entries. -(These are the log entries associated with the version control system, -i.e. the ones you enter via the @samp{*VC-Log*} buffer. @xref{Log -Buffer}.) Point is centered at the revision of the file currently -being visited. With a prefix argument, the command prompts for the -revision to center on, and the maximum number of revisions to display. -You can call this command from a Dired buffer (@pxref{Dired}). +named @samp{*vc-change-log*}, showing the history of changes made to +the current file, including who made the changes, the dates, and the +log entry for each change (these are the same log entries you would +enter via the @samp{*vc-log*} buffer; @pxref{Log Buffer}). Point is +centered at the revision of the file currently being visited. With a +prefix argument, the command prompts for the revision to center on, +and the maximum number of revisions to display. + + If you call @kbd{C-x v l} from a VC Directory buffer (@pxref{VC +Directory Mode}) or a Dired buffer (@pxref{Dired}), it applies to the +file listed on the current line. @findex vc-print-root-log - Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a -@samp{*vc-change-log*} buffer showing the history of the -version-controlled directory tree as a whole. With a prefix argument, -the command prompts for the maximum number of revisions to display. -RCS, SCCS, and CVS do not support this feature. +@findex log-view-toggle-entry-display + @kbd{C-x v L} (@code{vc-print-root-log}) displays a +@samp{*vc-change-log*} buffer showing the history of the entire +version-controlled directory tree (RCS, SCCS, and CVS do not support +this feature). With a prefix argument, the command prompts for the +maximum number of revisions to display. + + The @kbd{C-x v L} history is shown in a compact form, usually +omitting all but the first line of each log entry. However, you can +type @key{RET} (@code{log-view-toggle-entry-display}) in the +@samp{*vc-change-log*} buffer to reveal the entire log entry for the +revision at point. A second @key{RET} hides it again. On a distributed version control system, the @kbd{C-x v I} (@code{vc-log-incoming}) command displays a log buffer showing the @@ -952,62 +939,58 @@ control system's ``pull'' command to get new revisions from another repository. This other repository is the default one from which changes are pulled, as defined by the version control system; with a prefix argument, @code{vc-log-incoming} prompts for a specific -repository from which changes would be pulled, and lists the changes -accordingly. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows +repository. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows the changes that will be sent to another repository, the next time you run the ``push'' command; with a prefix argument, it prompts for a -specific repository to which changes would be pushed. +specific destination repository. In the @samp{*vc-change-log*} buffer, you can use the following keys -to move between the logs of revisions and of files, to view past -revisions, to modify change comments, to view annotations and to view -diffs: +to move between the logs of revisions and of files, and to examine and +compare past revisions (@pxref{Old Revisions}): @table @kbd @item p -Move to the previous revision-item in the buffer. (Revision entries in the log +Move to the previous revision entry. (Revision entries in the log buffer are usually in reverse-chronological order, so the previous revision-item usually corresponds to a newer revision.) A numeric prefix argument is a repeat count. @item n -Move to the next revision-item (which most often corresponds to the -previous revision of the file). A numeric prefix argument is a repeat -count. +Move to the next revision entry. A numeric prefix argument is a +repeat count. @item P -Move to the log of the previous file, when the logs of multiple files -are in the log buffer (@pxref{VC Directory Mode}). Otherwise, just -move to the beginning of the log. A numeric prefix argument is a -repeat count, so @kbd{C-u 10 P} would move backward 10 files. +Move to the log of the previous file, if showing logs for a multi-file +VC fileset. Otherwise, just move to the beginning of the log. A +numeric prefix argument is a repeat count. @item N -Move to the log of the next file, when the logs of multiple files are -in the log buffer (@pxref{VC Directory Mode}). It also takes a -numeric prefix argument as a repeat count. +Move to the log of the next file, if showing logs for a multi-file VC +fileset. A numeric prefix argument is a repeat count. @item a -Annotate the revision indicated by the current line. +Annotate the revision on the current line (@pxref{Old Revisions}). @item e Modify the change comment displayed at point. Note that not all VC systems support modifying change comments. @item f -Visit the revision indicated at the current line, like typing @kbd{C-x -v ~} and specifying this revision's ID (@pxref{Old Revisions}). +Visit the revision indicated at the current line. @item d -Display the diff (@pxref{Comparing Files}) between the revision -indicated at the current line and the next earlier revision. This is -useful to see what actually changed in the file when the revision -indicated on the current line was committed. +Display a diff between the revision at point and the next earlier +revision, for the specific file. @item D -Display the changeset diff (@pxref{Comparing Files}) between the -revision indicated at the current line and the next earlier revision. -This is useful to see all the changes to all files that the revision -indicated on the current line did when it was committed. +Display the changeset diff between the revision at point and the next +earlier revision. This shows the changes to all files made in that +revision. + +@item @key{RET} +In a compact-style log buffer (e.g.@: the one created by @kbd{C-x v +L}), toggle between showing and hiding the full log entry for the +revision at point. @end table @vindex vc-log-show-limit @@ -1021,7 +1004,7 @@ entries} or @samp{Show unlimited entries} buttons at the end of the buffer. However, RCS, SCCS, and CVS do not support this feature. @node VC Undo -@subsubsection Undoing Version Control Actions +@subsection Undoing Version Control Actions @table @kbd @item C-x v u @@ -1030,7 +1013,7 @@ editing the file. @item C-x v c Remove the last-entered change from the master for the visited file. -This undoes your last check-in. +This undoes your last commit. @end table @kindex C-x v u @@ -1133,7 +1116,7 @@ This is because access to the repository may be slow, or you may be working offline and not have access to the repository at all. As a consequence, VC would not be able to tell you that @samp{file3.c} is in the ``merge'' state; you would learn that only when you try to -check-in your modified copy of the file, or use a command such as +commit your modified copy of the file, or use a command such as @kbd{C-x v m}. In practice, this is not a problem because CVS handles this case @@ -1330,7 +1313,7 @@ because that's the only way to add a new revision at a point that is not the head of a branch. After the branch is created, you ``stay'' on it. That means that -subsequent check-ins create new revisions on that branch. To leave the +subsequent commits create new revisions on that branch. To leave the branch, you must explicitly select a different revision with @kbd{C-u C-x v v}. To transfer changes from one branch to another, use the merge command, described in the next section. @@ -1379,7 +1362,7 @@ of the work file. You can now commit the changed file, thus creating revision 1.6 containing the changes from the branch. It is possible to do further editing after merging the branch, before -the next check-in. But it is usually wiser to commit the merged +the next commit. But it is usually wiser to commit the merged revision, then lock it and make the further changes. This will keep a better record of the history of changes. diff --git a/etc/NEWS b/etc/NEWS index d778fe3e520..7454a4a89a3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -852,6 +852,7 @@ the user for specifics, e.g. a merge source. *** New option `vc-revert-show-diff' controls whether `vc-revert' shows a diff while querying the user. It defaults to t. ++++ *** Log entries in some Log View buffers can be toggled to display a longer description by typing RET (log-view-toggle-entry-display). In the Log View buffers made by `C-x v L' (vc-print-root-log), you can @@ -862,6 +863,7 @@ use this to display the full log entry for the revision at point. **** Packages using Log View mode can enable this functionality by binding `log-view-expanded-log-entry-function' to a suitable function. ++++ *** New command `vc-ediff' allows visual comparison of two revisions of a file similar to `vc-diff', but using ediff backend. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb7be329d84..990a7259bc8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ -2011-12-16 Chong Yidong +2011-12-17 Chong Yidong * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. + (vc-deduce-fileset): Doc fix. 2011-12-16 Andreas Schwab diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 85fbd93e9c6..87e8901e33a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -951,13 +951,13 @@ Within directories, only files already under version control are noticed." (defun vc-deduce-fileset (&optional observer allow-unregistered state-model-only-files) "Deduce a set of files and a backend to which to apply an operation. - Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). -If we're in VC-dir mode, the fileset is the list of marked files. -Otherwise, if we're looking at a buffer visiting a version-controlled file, -the fileset is a singleton containing this file. -If none of these conditions is met, but ALLOW_UNREGISTERED is on and the -visited file is not registered, return a singleton fileset containing it. + +If we're in VC-dir mode, FILESET is the list of marked files. +Otherwise, if in a buffer visiting a version-controlled file, +FILESET is a single-file fileset containing that file. +Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file +is unregistered, FILESET is a single-file fileset containing it. Otherwise, throw an error. STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs -- cgit v1.2.1 From e1fefc61a4b0c59007b9375b62e889dd1e70bfdc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 17 Dec 2011 06:17:53 -0500 Subject: Auto-commit of generated files. --- autogen/configure | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/autogen/configure b/autogen/configure index 620be0abd07..325df38a2df 100755 --- a/autogen/configure +++ b/autogen/configure @@ -10339,9 +10339,15 @@ fi done if test "$ac_cv_header_pthread_h"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 -$as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : + if test "$GMALLOC_OBJ" = gmalloc.o; then + emacs_pthread_function=pthread_atfork + else + emacs_pthread_function=pthread_self + fi + as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5 +$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10355,27 +10361,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char pthread_self (); +char $emacs_pthread_function (); int main () { -return pthread_self (); +return $emacs_pthread_function (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_self=yes + eval "$as_ac_Lib=yes" else - ac_cv_lib_pthread_pthread_self=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Lib + if test "x$as_val" = x""yes; then : HAVE_PTHREAD=yes fi -- cgit v1.2.1 From e1b01a3a530809a1e84ecddff31faf85b94e79e7 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 17 Dec 2011 12:00:49 -0500 Subject: * src/fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or GID is unknown (Bug#10257). --- src/ChangeLog | 5 +++++ src/fileio.c | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 98e87ef4306..e25f0c68ce0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-17 Ken Brown + + * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or + GID is unknown (Bug#10257). + 2011-12-17 Paul Eggert * s/gnu-linux.h: Fix mark_memory typo (Bug#10286). diff --git a/src/fileio.c b/src/fileio.c index fb021cee5a4..3306085491e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2416,15 +2416,27 @@ check_writable (const char *filename) return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode)); #else /* not MSDOS */ #ifdef HAVE_EUIDACCESS - return (euidaccess (filename, 2) >= 0); -#else + int res = (euidaccess (filename, 2) >= 0); +#ifdef CYGWIN + /* euidaccess may have returned failure because Cygwin couldn't + determine the file's UID or GID; if so, we return success. */ + if (!res) + { + struct stat st; + if (stat (filename, &st) < 0) + return 0; + res = (st.st_uid == -1 || st.st_gid == -1); + } +#endif /* CYGWIN */ + return res; +#else /* not HAVE_EUIDACCESS */ /* Access isn't quite right because it uses the real uid and we really want to test with the effective uid. But Unix doesn't give us a right way to do it. Opening with O_WRONLY could work for an ordinary file, but would lose for directories. */ return (access (filename, 2) >= 0); -#endif +#endif /* not HAVE_EUIDACCESS */ #endif /* not MSDOS */ } -- cgit v1.2.1 From c803b2b767f8ed06beb28106a03f23bc577cfdae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 18 Dec 2011 14:49:38 +0100 Subject: NS selection bug fix and cleanup, see thread C-g crash in C-x C-f (OSX Lion). Thread is on emacs-devel. * lisp/term/ns-win.el (ns-get-selection-internal) (ns-store-selection-internal): Declare. (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): Declare as obsolete. (ns-get-pasteboard, ns-paste-secondary): Use ns-get-selection-internal. (ns-set-pasteboard, ns-copy-including-secondary): Use ns-store-selection-internal. * src/nsselect.m (CUT_BUFFER_SUPPORT): Remove define. (symbol_to_nsstring): Fix indentation. (ns_symbol_to_pb): New function. (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal. (Fns_rotate_cut_buffers_internal): Removed. (Fns_store_selection_internal): Renamed from Fns_store_cut_buffer_internal. (ns_get_foreign_selection, Fx_own_selection_internal) (Fx_disown_selection_internal, Fx_selection_exists_p) (Fns_get_selection_internal, Fns_store_selection_internal): Use ns_symbol_to_pb and check if return value is nil. (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal renamed to Sns_store_selection_internal. (ns_handle_selection_request): Move code to Fx_own_selection_internal and remove this function. (ns_handle_selection_clear): Remove, never used. (Fx_own_selection_internal): Move code from ns_handle_selection_request here. --- lisp/ChangeLog | 11 ++++ lisp/term/ns-win.el | 21 ++++--- src/ChangeLog | 23 +++++++ src/nsselect.m | 168 ++++++++++++++++++---------------------------------- 4 files changed, 103 insertions(+), 120 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 990a7259bc8..9be0d2f1a3c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2011-12-18 Jan Djärv + + * term/ns-win.el (ns-get-selection-internal) + (ns-store-selection-internal): Declare. + (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): Declare + as obsolete. + (ns-get-pasteboard, ns-paste-secondary): Use + ns-get-selection-internal. + (ns-set-pasteboard, ns-copy-including-secondary): Use + ns-store-selection-internal. + 2011-12-17 Chong Yidong * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index b639af7cda0..df0ddd7de8b 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -702,19 +702,24 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;;;; Pasteboard support. -(declare-function ns-get-cut-buffer-internal "nsselect.m" (buffer)) +(declare-function ns-get-selection-internal "nsselect.m" (buffer)) +(declare-function ns-store-selection-internal "nsselect.m" (buffer string)) + +(define-obsolete-function-alias 'ns-get-cut-buffer-internal + 'ns-get-selection-internal "24.1") +(define-obsolete-function-alias 'ns-store-cut-buffer-internal + 'ns-store-selection-internal "24.1") + (defun ns-get-pasteboard () "Returns the value of the pasteboard." - (ns-get-cut-buffer-internal 'CLIPBOARD)) - -(declare-function ns-store-cut-buffer-internal "nsselect.m" (buffer string)) + (ns-get-selection-internal 'CLIPBOARD)) (defun ns-set-pasteboard (string) "Store STRING into the pasteboard of the Nextstep display server." ;; Check the data type of STRING. (if (not (stringp string)) (error "Nonstring given to pasteboard")) - (ns-store-cut-buffer-internal 'CLIPBOARD string)) + (ns-store-selection-internal 'CLIPBOARD string)) ;; We keep track of the last text selected here, so we can check the ;; current selection against it, and avoid passing back our own text @@ -742,11 +747,11 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (defun ns-copy-including-secondary () (interactive) (call-interactively 'kill-ring-save) - (ns-store-cut-buffer-internal 'SECONDARY - (buffer-substring (point) (mark t)))) + (ns-store-selection-internal 'SECONDARY + (buffer-substring (point) (mark t)))) (defun ns-paste-secondary () (interactive) - (insert (ns-get-cut-buffer-internal 'SECONDARY))) + (insert (ns-get-selection-internal 'SECONDARY))) ;;;; Scrollbar handling. diff --git a/src/ChangeLog b/src/ChangeLog index e25f0c68ce0..610079fe321 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,26 @@ +2011-12-18 Jan Djärv + + * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. + (symbol_to_nsstring): Fix indentation. + (ns_symbol_to_pb): New function. + (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal. + (Fns_rotate_cut_buffers_internal): Removed. + (Fns_store_selection_internal): Renamed from + Fns_store_cut_buffer_internal. + (ns_get_foreign_selection, Fx_own_selection_internal) + (Fx_disown_selection_internal, Fx_selection_exists_p) + (Fns_get_selection_internal, Fns_store_selection_internal): Use + ns_symbol_to_pb and check if return value is nil. + (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove + defsubr Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal + renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal + renamed to Sns_store_selection_internal. + (ns_handle_selection_request): Move code to Fx_own_selection_internal + and remove this function. + (ns_handle_selection_clear): Remove, never used. + (Fx_own_selection_internal): Move code from ns_handle_selection_request + here. + 2011-12-17 Ken Brown * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or diff --git a/src/nsselect.m b/src/nsselect.m index 867cf3252e5..928eb8652dc 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -35,8 +35,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu) #include "termhooks.h" #include "keyboard.h" -#define CUT_BUFFER_SUPPORT - Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME; static Lisp_Object Vselection_alist; @@ -60,13 +58,18 @@ static NSString * symbol_to_nsstring (Lisp_Object sym) { CHECK_SYMBOL (sym); - if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard; + if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard; if (EQ (sym, QPRIMARY)) return NXPrimaryPboard; if (EQ (sym, QSECONDARY)) return NXSecondaryPboard; if (EQ (sym, QTEXT)) return NSStringPboardType; return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)]; } +static NSPasteboard * +ns_symbol_to_pb (Lisp_Object symbol) +{ + return [NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)]; +} static Lisp_Object ns_string_to_symbol (NSString *t) @@ -230,70 +233,11 @@ static Lisp_Object ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target) { id pb; - pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)]; - return ns_string_from_pasteboard (pb); -} - - -static void -ns_handle_selection_request (struct input_event *event) -{ - // FIXME: BIG UGLY HACK!!! - id pb = (id)*(EMACS_INT*)&(event->x); - NSString *type = (NSString *)*(EMACS_INT*)&(event->y); - Lisp_Object selection_name, selection_data, target_symbol, data; - Lisp_Object successful_p, rest; - - selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]); - target_symbol = ns_string_to_symbol (type); - selection_data = assq_no_quit (selection_name, Vselection_alist); - successful_p = Qnil; - - if (!NILP (selection_data)) - { - data = ns_get_local_selection (selection_name, target_symbol); - if (!NILP (data)) - { - if (STRINGP (data)) - ns_string_to_pasteboard_internal (pb, data, type); - successful_p = Qt; - } - } - - if (!EQ (Vns_sent_selection_hooks, Qunbound)) - { - for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest)) - call3 (Fcar (rest), selection_name, target_symbol, successful_p); - } + pb = ns_symbol_to_pb (symbol); + return pb != nil ? ns_string_from_pasteboard (pb) : Qnil; } -static void -ns_handle_selection_clear (struct input_event *event) -{ - id pb = (id)*(EMACS_INT*)&(event->x); - Lisp_Object selection_name, selection_data, rest; - - selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]); - selection_data = assq_no_quit (selection_name, Vselection_alist); - if (NILP (selection_data)) return; - - if (EQ (selection_data, Fcar (Vselection_alist))) - Vselection_alist = Fcdr (Vselection_alist); - else - { - for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) - if (EQ (selection_data, Fcar (Fcdr (rest)))) - Fsetcdr (rest, Fcdr (Fcdr (rest))); - } - - if (!EQ (Vns_lost_selection_hooks, Qunbound)) - { - for (rest = Vns_lost_selection_hooks;CONSP (rest); rest = Fcdr (rest)) - call1 (Fcar (rest), selection_name); - } -} - /* ========================================================================== @@ -401,29 +345,44 @@ anything that the functions on `selection-converter-alist' know about. */) { id pb; Lisp_Object old_value, new_value; + NSString *type; + Lisp_Object successful_p = Qnil, rest; + Lisp_Object target_symbol, data; + check_ns (); CHECK_SYMBOL (selection_name); if (NILP (selection_value)) error ("selection-value may not be nil."); - pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)]; + pb = ns_symbol_to_pb (selection_name); + if (pb == nil) return Qnil; + ns_declare_pasteboard (pb); old_value = assq_no_quit (selection_name, Vselection_alist); new_value = Fcons (selection_name, Fcons (selection_value, Qnil)); + if (NILP (old_value)) Vselection_alist = Fcons (new_value, Vselection_alist); else Fsetcdr (old_value, Fcdr (new_value)); - /* XXX An evil hack, but a necessary one I fear XXX */ - { - struct input_event ev; - ev.kind = SELECTION_REQUEST_EVENT; - ev.modifiers = 0; - ev.code = 0; - *(EMACS_INT*)(&(ev.x)) = (EMACS_INT)pb; // FIXME: BIG UGLY HACK!! - *(EMACS_INT*)(&(ev.y)) = (EMACS_INT)NSStringPboardType; - ns_handle_selection_request (&ev); - } + + /* We only support copy of text. */ + type = NSStringPboardType; + target_symbol = ns_string_to_symbol (type); + data = ns_get_local_selection (selection_name, target_symbol); + if (!NILP (data)) + { + if (STRINGP (data)) + ns_string_to_pasteboard_internal (pb, data, type); + successful_p = Qt; + } + + if (!EQ (Vns_sent_selection_hooks, Qunbound)) + { + for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest)) + call3 (Fcar (rest), selection_name, target_symbol, successful_p); + } + return selection_value; } @@ -438,8 +397,8 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal, CHECK_SYMBOL (selection_name); if (NILP (assq_no_quit (selection_name, Vselection_alist))) return Qnil; - pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)]; - ns_undeclare_pasteboard (pb); + pb = ns_symbol_to_pb (selection_name); + if (pb != nil) ns_undeclare_pasteboard (pb); return Qt; } @@ -460,8 +419,10 @@ and t is the same as `SECONDARY'.) */) CHECK_SYMBOL (selection); if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; - pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection)]; - types =[pb types]; + pb = ns_symbol_to_pb (selection); + if (pb == nil) return Qnil; + + types = [pb types]; return ([types count] == 0) ? Qnil : Qt; } @@ -511,45 +472,31 @@ TYPE is the type of data desired, typically `STRING'. */) } -#ifdef CUT_BUFFER_SUPPORT -DEFUN ("ns-get-cut-buffer-internal", Fns_get_cut_buffer_internal, - Sns_get_cut_buffer_internal, 1, 1, 0, - doc: /* Returns the value of the named cut buffer. */) - (Lisp_Object buffer) +DEFUN ("ns-get-selection-internal", Fns_get_selection_internal, + Sns_get_selection_internal, 1, 1, 0, + doc: /* Returns the value of SELECTION as a string. +SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */) + (Lisp_Object selection) { id pb; check_ns (); - pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)]; - return ns_string_from_pasteboard (pb); + pb = ns_symbol_to_pb (selection); + return pb != nil ? ns_string_from_pasteboard (pb) : Qnil; } -DEFUN ("ns-rotate-cut-buffers-internal", Fns_rotate_cut_buffers_internal, - Sns_rotate_cut_buffers_internal, 1, 1, 0, - doc: /* Rotate the values of the cut buffers by N steps. -Positive N means move values forward, negative means -backward. CURRENTLY NOT IMPLEMENTED UNDER NEXTSTEP. */ ) - (Lisp_Object n) -{ - /* XXX This function is unimplemented under NeXTstep XXX */ - Fsignal (Qquit, Fcons (build_string ( - "Warning: ns-rotate-cut-buffers-internal not implemented\n"), Qnil)); - return Qnil; -} - - -DEFUN ("ns-store-cut-buffer-internal", Fns_store_cut_buffer_internal, - Sns_store_cut_buffer_internal, 2, 2, 0, - doc: /* Sets the value of the named cut buffer (typically CUT_BUFFER0). */) - (Lisp_Object buffer, Lisp_Object string) +DEFUN ("ns-store-selection-internal", Fns_store_selection_internal, + Sns_store_selection_internal, 2, 2, 0, + doc: /* Sets the string value of SELECTION. +SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */) + (Lisp_Object selection, Lisp_Object string) { id pb; check_ns (); - pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)]; - ns_string_to_pasteboard (pb, string); + pb = ns_symbol_to_pb (selection); + if (pb != nil) ns_string_to_pasteboard (pb, string); return Qnil; } -#endif void @@ -572,11 +519,8 @@ syms_of_nsselect (void) defsubr (&Sx_own_selection_internal); defsubr (&Sx_selection_exists_p); defsubr (&Sx_selection_owner_p); -#ifdef CUT_BUFFER_SUPPORT - defsubr (&Sns_get_cut_buffer_internal); - defsubr (&Sns_rotate_cut_buffers_internal); - defsubr (&Sns_store_cut_buffer_internal); -#endif + defsubr (&Sns_get_selection_internal); + defsubr (&Sns_store_selection_internal); Vselection_alist = Qnil; staticpro (&Vselection_alist); -- cgit v1.2.1 From 5fecd5fce0bac31f1d39d84caa9d2c444c8e7e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 18 Dec 2011 15:50:19 +0100 Subject: Adapt code from AquaEmacs to handle occasional blank menus. * nsmenu.m (trackingMenu): New variable. (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and NS_IMPL_COCOA. (trackingNotification): New method (from AquaEmacs). (menuNeedsUpdate): Expand comment and return if trackingMenu is 0, from AquaEmacs. (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. * nsterm.m (ns_term_init): Subscribe for notifications NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification to method trackingNotification in EmacsMenu. Fixes: debbugs:7030 --- src/ChangeLog | 12 ++++++++++++ src/nsmenu.m | 44 ++++++++++++++++++++++++++++++++++++++------ src/nsterm.m | 9 +++++++++ 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 610079fe321..14eb35bdc1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,17 @@ 2011-12-18 Jan Djärv + * nsterm.m (ns_term_init): Subscribe for notifications + NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification + to method trackingNotification in EmacsMenu. + + * nsmenu.m (trackingMenu): New variable. + (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and + NS_IMPL_COCOA. + (trackingNotification): New method (from AquaEmacs). + (menuNeedsUpdate): Expand comment and return if trackingMenu is 0, + from AquaEmacs (Bug#7030). + (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. + * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. (symbol_to_nsstring): Fix indentation. (ns_symbol_to_pb): New function. diff --git a/src/nsmenu.m b/src/nsmenu.m index 951282910ac..d599cdb6ce5 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -74,6 +74,10 @@ EmacsMenu *mainMenu, *svcsMenu, *dockMenu; static int popup_activated_flag; static NSModalSession popupSession; +/* Nonzero means we are tracking and updating menus. */ +static int trackingMenu; + + /* NOTE: toolbar implementation is at end, following complete menu implementation. */ @@ -543,21 +547,44 @@ set_frame_menubar (struct frame *f, int first_time, int deep_p) frame = f; } +#ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 +extern NSString *NSMenuDidBeginTrackingNotification; +#endif +#endif + +#ifdef NS_IMPL_COCOA +-(void)trackingNotification:(NSNotification *)notification +{ + /* Update menu in menuNeedsUpdate only while tracking menus. */ + trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification + ? 1 : 0); +} +#endif /* delegate method called when a submenu is being opened: run a 'deep' call to set_frame_menubar */ - (void)menuNeedsUpdate: (NSMenu *)menu { - NSEvent *event; if (!FRAME_LIVE_P (frame)) return; - event = [[FRAME_NS_VIEW (frame) window] currentEvent]; - /* HACK: Cocoa/Carbon will request update on every keystroke + + /* Cocoa/Carbon will request update on every keystroke via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed since key equivalents are handled through emacs. - On Leopard, even keystroke events generate SystemDefined events, but - their subtype is 8. */ - if ([event type] != NSSystemDefined || [event subtype] == 8 + On Leopard, even keystroke events generate SystemDefined event. + Third-party applications that enhance mouse / trackpad + interaction, or also VNC/Remote Desktop will send events + of type AppDefined rather than SysDefined. + Menus will fail to show up if they haven't been initialized. + AppDefined events may lack timing data. + + Thus, we rely on the didBeginTrackingNotification notification + as above to indicate the need for updates. + From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the + key press case, NSMenuPropertyItemImage (e.g.) won't be set. + */ + if (trackingMenu == 0 /* Also, don't try this if from an event picked up asynchronously, as lots of lisp evaluation happens in ns_update_menubar. */ || handling_signal != 0) @@ -1795,6 +1822,11 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_ void syms_of_nsmenu (void) { +#ifndef NS_IMPL_COCOA + /* Don't know how to keep track of this in Next/Open/Gnustep. Always + update menus there. */ + trackingMenu = 1; +#endif defsubr (&Sx_popup_dialog); defsubr (&Sns_reset_menu); defsubr (&Smenu_or_popup_active_p); diff --git a/src/nsterm.m b/src/nsterm.m index 1d645943065..055959bf2ac 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4203,6 +4203,15 @@ ns_term_init (Lisp_Object display_name) [NSApp setServicesMenu: svcsMenu]; /* Needed at least on Cocoa, to get dock menu to show windows */ [NSApp setWindowsMenu: [[NSMenu alloc] init]]; + + [[NSNotificationCenter defaultCenter] + addObserver: mainMenu + selector: @selector (trackingNotification:) + name: NSMenuDidBeginTrackingNotification object: mainMenu]; + [[NSNotificationCenter defaultCenter] + addObserver: mainMenu + selector: @selector (trackingNotification:) + name: NSMenuDidEndTrackingNotification object: mainMenu]; } #endif /* MAC OS X menu setup */ -- cgit v1.2.1 From 3771cb1735b47102e7f94187bcdeb1a4644a557e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 18 Dec 2011 15:53:01 +0100 Subject: Fix spelling AquaEmacs => Aquamacs --- src/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 14eb35bdc1c..3cdc0111506 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,9 +7,9 @@ * nsmenu.m (trackingMenu): New variable. (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and NS_IMPL_COCOA. - (trackingNotification): New method (from AquaEmacs). + (trackingNotification): New method (from Aquamacs). (menuNeedsUpdate): Expand comment and return if trackingMenu is 0, - from AquaEmacs (Bug#7030). + from Aquamacs (Bug#7030). (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. -- cgit v1.2.1 From 99d990817cac77ba755b4e31722c44f6f6bbe3b0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 18 Dec 2011 22:21:24 -0800 Subject: Spelling fixes. --- admin/grammars/bovine-grammar.el | 2 +- admin/grammars/js.wy | 2 +- doc/lispref/spellfile | 1 - doc/misc/idlwave.texi | 2 +- etc/NEWS.19 | 2 +- leim/ChangeLog | 2 +- leim/quail/hanja3.el | 2 +- lisp/ChangeLog.12 | 2 +- lisp/allout.el | 10 +++++----- lisp/cedet/data-debug.el | 4 ++-- lisp/cedet/semantic/analyze/debug.el | 2 +- lisp/emacs-lisp/bytecomp.el | 2 +- lisp/font-lock.el | 2 +- lisp/gnus/ChangeLog | 2 +- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-msg.el | 2 +- lisp/gnus/gnus-spec.el | 4 ++-- lisp/gnus/gnus-win.el | 4 ++-- lisp/gnus/message.el | 2 +- lisp/mail/rmailmm.el | 2 +- lisp/progmodes/sql.el | 2 +- lisp/progmodes/verilog-mode.el | 2 +- lisp/reveal.el | 2 +- lisp/simple.el | 6 +++--- lisp/textmodes/rst.el | 2 +- lisp/textmodes/texnfo-upd.el | 2 +- lisp/vc/vc-hg.el | 2 +- src/ccl.c | 4 ++-- src/w32term.c | 2 +- src/xterm.c | 2 +- test/indent/prolog.prolog | 2 +- 31 files changed, 40 insertions(+), 41 deletions(-) diff --git a/admin/grammars/bovine-grammar.el b/admin/grammars/bovine-grammar.el index eda7b42adbd..a7fe955acf4 100644 --- a/admin/grammars/bovine-grammar.el +++ b/admin/grammars/bovine-grammar.el @@ -298,7 +298,7 @@ VALUE is a value, or range of values to match against. For example, a SYMBOL might need to match \"foo\". Some TYPES will not have matching criteria. -LAMBDA is a lambda expression which is evaled with the text of the +LAMBDA is a lambda expression which is evalled with the text of the type when it is found. It is passed the list of all buffer text elements found since the last lambda expression. It should return a semantic element (see below.) diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy index a13abf56e6e..ffa324806cf 100644 --- a/admin/grammars/js.wy +++ b/admin/grammars/js.wy @@ -66,7 +66,7 @@ ;; Other Goals %start FormalParameterList -;; with the terminals stuff, I used the javacript.y names, +;; with the terminals stuff, I used the javascript.y names, ;; but the semantic/wisent/java-tags.wy types ;; when possible ;; ------------------ diff --git a/doc/lispref/spellfile b/doc/lispref/spellfile index e0d77ee0541..18fb633acfd 100644 --- a/doc/lispref/spellfile +++ b/doc/lispref/spellfile @@ -337,7 +337,6 @@ fset fstab ftp fu -funtions garbles gc gcpro diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 5149eb91651..c7495d8cc93 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -669,7 +669,7 @@ We have already used the routine info display in the first part of this tutorial. This was the invoked using @kbd{C-c ?}, and displays information about the IDL routine near the cursor position. Wouldn't it be nice to have the same kind of information available for your own -routines and for the huge amount of code in major libraries like JHUPL +routines and for the huge amount of code in major libraries like JHUAPL or the IDL-Astro library? In many cases, you may already have this information. Files named @file{.idlwave_catalog} in library directories contain scanned information on the routines in that directory; many diff --git a/etc/NEWS.19 b/etc/NEWS.19 index 849566e6238..df6c4893f87 100644 --- a/etc/NEWS.19 +++ b/etc/NEWS.19 @@ -6114,7 +6114,7 @@ When you have edited both buffers as you wish, merge them with C-x 6 1. This copies the text from the right-hand buffer as a second column in the other buffer. To go back to two-column editing, use C-x 6 s. -Use C-x 6 d to disassociate the two buffers, leaving each as it +Use C-x 6 d to dissociate the two buffers, leaving each as it stands. (If the other buffer, the one that was not current when you type C-x 6 d, is empty, C-x 6 d kills it.) diff --git a/leim/ChangeLog b/leim/ChangeLog index 95a3671bdd1..57c5a406785 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1895,7 +1895,7 @@ * Makefile.in (${TIT}): To byte-compile quail packages, use just built quail. -1997-12-09 Koaunghi Un +1997-12-09 Koaunghi Un * quail/hanja3.el: New file. diff --git a/leim/quail/hanja3.el b/leim/quail/hanja3.el index aa0fc7948af..dae716c7a8b 100644 --- a/leim/quail/hanja3.el +++ b/leim/quail/hanja3.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. -;; Author: Koaunghi Un +;; Author: Koaunghi Un ;; Keywords: mule, quail, multilingual, input method, Korean, Hanja ;; This file is part of GNU Emacs. diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index b97555f1e9d..0dd5a6ec7a3 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -18459,7 +18459,7 @@ reveal-open-spots, so as to be more reliable. There were several tricky corner cases where an open spot might be lost, or where a closed spot might end up on the list of open spots. - Only reveal text that's ellipsised. + Only reveal text that's ellipsized. 2005-11-07 Carsten Dominik diff --git a/lisp/allout.el b/lisp/allout.el index 9289e38b418..480c22d31e0 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -3334,7 +3334,7 @@ coordinating with allout activity.") (run-hooks 'allout-post-undo-hook) (cond ((and (= buffer-saved-size -1) allout-auto-save-temporarily-disabled) - ;; user possibly undid a decryption, deinhibit auto-save: + ;; user possibly undid a decryption, disinhibit auto-save: (allout-maybe-resume-auto-save-info-after-encryption)) ((save-excursion (save-restriction @@ -5871,7 +5871,7 @@ encryption. Further, encrypting with a KEYMODE-CUE universal argument greater than 4 - eg, preceded by a doubled Ctrl-U - causes association of the specified recipients with the file, replacing those currently -associated with it. This can be used to deassociate any +associated with it. This can be used to dissociate any recipients with the file, by selecting no recipients in the dialog. @@ -5912,7 +5912,7 @@ encryption. Further, encrypting with a KEYMODE-CUE universal argument greater than 4 - eg, preceded by a doubled Ctrl-U - causes association of the specified recipients with the file, replacing those currently -associated with it. This can be used to deassociate any +associated with it. This can be used to dissociate any recipients with the file, by selecting no recipients in the dialog. @@ -6045,7 +6045,7 @@ encryption. Further, encrypting with a KEYMODE-CUE universal argument greater than 4 - eg, preceded by a doubled Ctrl-U - causes association of the specified recipients with the file, replacing those currently -associated with it. This can be used to deassociate any +associated with it. This can be used to dissociate any recipients with the file, by selecting no recipients in the dialog. @@ -6661,7 +6661,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (if (/= arg 1) (condition-case nil (line-move (1- arg)) (error nil))) - ;; Move to beginning-of-line, ignoring fields and invisibles. + ;; Move to beginning-of-line, ignoring fields and invisible text. (skip-chars-backward "^\n") (while (and (not (bobp)) (let ((prop diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index 329d1c608c2..d553c433fc4 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -1060,11 +1060,11 @@ If the result is a list or vector, then use the data debugger to display it." (setq values (cons (eval expr) values)) (let ((old-value (make-symbol "t")) new-value) ;; Bind debug-on-error to something unique so that we can - ;; detect when evaled code changes it. + ;; detect when evalled code changes it. (let ((debug-on-error old-value)) (setq values (cons (eval expr) values)) (setq new-value debug-on-error)) - ;; If evaled code has changed the value of debug-on-error, + ;; If evalled code has changed the value of debug-on-error, ;; propagate that change to the global binding. (unless (eq old-value new-value) (setq debug-on-error new-value)))) diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index b02358b7243..ce8e79b19dc 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -70,7 +70,7 @@ (let ((pentry (nth idx pf)) (ptentry (nth idx pft))) (if (or (stringp pentry) (not ptentry)) - ;; Found someting ok. stop + ;; Found something ok. Stop. (setq stop t) (setq idx (1+ idx))))) ;; We found the first non-tag entry. What is the situation? diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9aa230cfe9b..29c5f3f092b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2637,7 +2637,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." (setq form (cdr form))) (setq form (car form))) (if (and (eq (car-safe form) 'list) - ;; The spec is evaled in callint.c in dynamic-scoping + ;; The spec is evalled in callint.c in dynamic-scoping ;; mode, so just leaving the form unchanged would mean ;; it won't be eval'd in the right mode. (not lexical-binding)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c319974fb41..2db0d809275 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -294,7 +294,7 @@ If a number, only buffers greater than this size have fontification messages." ;; and they give users another mechanism for changing face appearance. ;; We now allow a FACENAME in `font-lock-keywords' to be any expression that ;; returns a face. So the easiest thing is to continue using these variables, -;; rather than sometimes evaling FACENAME and sometimes not. sm. +;; rather than sometimes evalling FACENAME and sometimes not. sm. ;; Note that in new code, in the vast majority of cases there is no ;; need to create variables that specify face names. Simply using diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ee7442c55e1..c26c0a0a5b1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -21339,7 +21339,7 @@ (gnus-agent-cat-groups): Use eval-and-compile, not eval-when-compile, to define gnus-agent-set-cat-groups as the setf method of gnus-agent-cat-groups even when the buffer has been - evaled. + evalled. (gnus-agent-save-active, gnus-agent-save-active-1): Merge to delete gnus-agent-save-active-1. (gnus-agent-save-groups): Delete. Identical to diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 555c715bc2f..ea0710bf026 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -669,7 +669,7 @@ non-nil. If the match is a string, it is used as a regexp match on the article. If the match is a symbol, that symbol will be funcalled from the buffer of the article to be saved with the newsgroup as the -parameter. If it is a list, it will be evaled in the same buffer. +parameter. If it is a list, it will be evalled in the same buffer. If this form or function returns a string, this string will be used as a possible file name; and if it returns a non-nil list, that list will be diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 58373525f96..6ff1023383b 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1784,7 +1784,7 @@ this is a reply." (and header (string-match (nth 2 match) header))))))) (t - ;; This is a form to be evaled. + ;; This is a form to be evalled. (eval match))))) ;; We have a match, so we set the variables. (dolist (attribute style) diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 2345c4fc141..4c5715c67f9 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -52,7 +52,7 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway." (defvar gnus-group-indentation "") ;; Format specs. The chunks below are the machine-generated forms -;; that are to be evaled as the result of the default format strings. +;; that are to be evalled as the result of the default format strings. ;; We write them in here to get them byte-compiled. That way the ;; default actions will be quite fast, while still retaining the full ;; flexibility of the user-defined format specs. @@ -690,7 +690,7 @@ are supported for %s." (not (and (featurep 'xemacs) gnus-use-correct-string-widths))) (insert (number-to-string pad-width))) - ;; Create the form to be evaled. + ;; Create the form to be evalled. (if (or max-width cut-width ignore-value (and (featurep 'xemacs) gnus-use-correct-string-widths)) diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index ecd5b3b525b..f0009830b44 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -242,7 +242,7 @@ See the Gnus manual for an explanation of the syntax used.") (let* ((current-window (or (get-buffer-window (current-buffer)) (selected-window))) (window (or window current-window))) (select-window window) - ;; The SPLIT might be something that is to be evaled to + ;; The SPLIT might be something that is to be evalled to ;; return a new SPLIT. (while (and (not (assq (car split) gnus-window-to-buffer)) (symbolp (car split)) (fboundp (car split))) @@ -447,7 +447,7 @@ should have point." (when (consp (car split)) (push 1.0 split) (push 'vertical split)) - ;; The SPLIT might be something that is to be evaled to + ;; The SPLIT might be something that is to be evalled to ;; return a new SPLIT. (while (and (not (assq (car split) gnus-window-to-buffer)) (symbolp (car split)) (fboundp (car split))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8fbd2c765fe..5198618c2c3 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4409,7 +4409,7 @@ This function could be useful in `message-setup-hook'." ;; A simple function. ((functionp action) (funcall action)) - ;; Something to be evaled. + ;; Something to be evalled. (t (eval action)))))) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index d01cfc7f2c8..03023b07527 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -320,7 +320,7 @@ The value is a vector [INDEX HEADER TAGLINE BODY END], where (setq index 2)) ;; If the tagline is displayed, get past it to the body. (if (rmail-mime-display-tagline current) - ;; The next foward-line call must be in sync with how + ;; The next forward-line call must be in sync with how ;; `rmail-mime-insert-tagline' formats the tagline. The ;; body begins after the empty line that ends the tagline. (forward-line 3)) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 03e095b6bfc..60ba768a80e 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4224,7 +4224,7 @@ The default comes from `process-coding-system-alist' and "^\\(.+\\) (hex ..)$" "SET \\1") - ;; FEDDBACK ON for 99 or more rows + ;; FEEDBACK ON for 99 or more rows ;; feedback OFF (sql-redirect-value sqlbuf diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 87c678890de..52e7b6e2429 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -10932,7 +10932,7 @@ Typing \\[verilog-auto] will make this into: (defun verilog-auto-logic () "Expand AUTOLOGIC statements, as part of \\[verilog-auto]. Make wire statements using the SystemVerilog logic keyword. -This is currently equivelent to: +This is currently equivalent to: /*AUTOWIRE*/ diff --git a/lisp/reveal.el b/lisp/reveal.el index c776ab72969..8b4ac22a717 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el @@ -106,7 +106,7 @@ Each element has the form (WINDOW . OVERLAY).") (let ((inv (overlay-get ol 'invisible)) open) (when (and inv ;; There's an `invisible' property. Make sure it's - ;; actually invisible, and ellipsised. + ;; actually invisible, and ellipsized. (and (consp buffer-invisibility-spec) (cdr (assq inv buffer-invisibility-spec))) (or (setq open diff --git a/lisp/simple.el b/lisp/simple.el index c9ac32e0f9e..b7165c9f6a9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1225,11 +1225,11 @@ this command arranges for all errors to enter the debugger." (push (eval eval-expression-arg lexical-binding) values) (let ((old-value (make-symbol "t")) new-value) ;; Bind debug-on-error to something unique so that we can - ;; detect when evaled code changes it. + ;; detect when evalled code changes it. (let ((debug-on-error old-value)) (push (eval eval-expression-arg lexical-binding) values) (setq new-value debug-on-error)) - ;; If evaled code has changed the value of debug-on-error, + ;; If evalled code has changed the value of debug-on-error, ;; propagate that change to the global binding. (unless (eq old-value new-value) (setq debug-on-error new-value)))) @@ -4729,7 +4729,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (let ((line-move-visual nil)) (line-move (1- arg) t))) - ;; Move to beginning-of-line, ignoring fields and invisibles. + ;; Move to beginning-of-line, ignoring fields and invisible text. (skip-chars-backward "^\n") (while (and (not (bobp)) (invisible-p (1- (point)))) (goto-char (previous-char-property-change (point))) diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 64dffe78d50..f2dba1575c2 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -243,7 +243,7 @@ (define-key map [(control ?=)] 'rst-adjust) ;; (Does not work on the Mac OSX.) ;; Display the hierarchy of decorations implied by the current document contents. (define-key map [(control c) (control h)] 'rst-display-decorations-hierarchy) - ;; Homogeneize the decorations in the document. + ;; Homogenize the decorations in the document. (define-key map [(control c) (control s)] 'rst-straighten-decorations) ;; (define-key map [(control c) (control s)] 'rst-straighten-deco-spacing) diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index d674b3a397e..69d68a76d4b 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -1165,7 +1165,7 @@ error if the node is not the top node and a section is not found." "texinfo-specific-section-type: Chapter or section not found")))))) (defun texinfo-hierarchic-level () - "Return the general hierarchal level of the next node in a texinfo file. + "Return the general hierarchical level of the next node in a texinfo file. Thus, a subheading or appendixsubsec is of type subsection." (let ((case-fold-search t)) (cadr (assoc diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 0516abbf024..7b90536a31b 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -216,7 +216,7 @@ highlighting the Log View buffer." ((eq state ?R) 'removed) ((eq state ?!) 'missing) ((eq state ??) 'unregistered) - ((eq state ?C) 'up-to-date) ;; Older mercurials use this + ((eq state ?C) 'up-to-date) ;; Older mercurial versions use this. (t 'up-to-date))))))) (defun vc-hg-working-revision (file) diff --git a/src/ccl.c b/src/ccl.c index 491b925d75c..65a6dcfcb85 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -210,8 +210,8 @@ static Lisp_Object Vccl_program_table; #define CCL_WriteArrayReadJump 0x0B /* Write an array element, read, and jump: 1:A--D--D--R--E--S--S-rrrXXXXX 2:LENGTH - 3:ELEMENET[0] - 4:ELEMENET[1] + 3:ELEMENT[0] + 4:ELEMENT[1] ... N:A--D--D--R--E--S--S-rrrYYYYY ------------------------------ diff --git a/src/w32term.c b/src/w32term.c index 532ff64fe66..29ac9d119b4 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3556,7 +3556,7 @@ x_scroll_bar_remove (struct scroll_bar *bar) /* Destroy the window. */ my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar)); - /* Disassociate this scroll bar from its window. */ + /* Dissociate this scroll bar from its window. */ XWINDOW (bar->window)->vertical_scroll_bar = Qnil; UNBLOCK_INPUT; diff --git a/src/xterm.c b/src/xterm.c index 1f995b3c1a0..e2f356db7b0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5151,7 +5151,7 @@ x_scroll_bar_remove (struct scroll_bar *bar) XDestroyWindow (FRAME_X_DISPLAY (f), bar->x_window); #endif - /* Disassociate this scroll bar from its window. */ + /* Dissociate this scroll bar from its window. */ XWINDOW (bar->window)->vertical_scroll_bar = Qnil; UNBLOCK_INPUT; diff --git a/test/indent/prolog.prolog b/test/indent/prolog.prolog index 6cb5535fe8d..8af21877b59 100644 --- a/test/indent/prolog.prolog +++ b/test/indent/prolog.prolog @@ -200,7 +200,7 @@ elaborate(fix(F,T,B,E), Env, Ee) :- elaborate(let(F,T,app(fix,lambda(F,T,B)),E), Env, Ee). %% elab_bindings(+TS, +Env, -TS). -%% Applique `elaborate' sur l'environnment de type TS. +%% Applique `elaborate' sur l'environnement de type TS. elab_tenv([], _, []). elab_tenv([(X,T)|TS], Env, [(X, Tg)|TSe]) :- elaborate(T, Env, Te), -- cgit v1.2.1 From 34c5fb55c88617ae0b0721d653d833bc73a4e623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Mon, 19 Dec 2011 07:30:36 +0100 Subject: Ooops... undo changes of 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net, as trunk branch is feature frozen, and 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net was a feature addition. --- lisp/ChangeLog | 6 ++++ lisp/ses.el | 109 ++++++++------------------------------------------------- 2 files changed, 20 insertions(+), 95 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9be0d2f1a3c..7d5da3a41c0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-12-19 Vincent Belaïche + + * ses.el: Ooops... undo changes of 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net, as trunk + branch is feature frozen, and 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net was a feature + addition. + 2011-12-18 Jan Djärv * term/ns-win.el (ns-get-selection-internal) diff --git a/lisp/ses.el b/lisp/ses.el index 403651695a8..d5947472c1a 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -674,13 +674,6 @@ for this spreadsheet." (put sym 'ses-cell (cons xrow xcol)) (make-local-variable sym))))) -(defun ses-create-cell-variable (sym row col) - "Create a buffer-local variable for cell with symbol -SYM at position ROW COL. Return nil in case of failure." - (unless (local-variable-p sym) - (make-local-variable sym) - (put sym 'ses-cell (cons row col)))) - ;; We do not delete the ses-cell properties for the cell-variables, in ;; case a formula that refers to this cell is in the kill-ring and is ;; later pasted back in. @@ -1406,8 +1399,7 @@ removed. Example: Sets `ses-relocate-return' to 'delete if cell-references were removed." (let (rowcol result) (if (or (atom formula) (eq (car formula) 'quote)) - (if (and (setq rowcol (ses-sym-rowcol formula)) - (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) + (if (setq rowcol (ses-sym-rowcol formula)) (ses-relocate-symbol formula rowcol startrow startcol rowincr colincr) formula) ; Pass through as-is. @@ -1515,15 +1507,14 @@ if the range was altered." the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR to each symbol." (let (reform) - (let (mycell newval xrow) + (let (mycell newval) (dotimes-with-progress-reporter (row ses--numrows) "Relocating formulas..." (dotimes (col ses--numcols) (setq ses-relocate-return nil mycell (ses-get-cell row col) newval (ses-relocate-formula (ses-cell-formula mycell) - minrow mincol rowincr colincr) - xrow (- row rowincr)) + minrow mincol rowincr colincr)) (ses-set-cell row col 'formula newval) (if (eq ses-relocate-return 'range) ;; This cell contains a (ses-range X Y) where a cell has been @@ -1539,22 +1530,8 @@ to each symbol." minrow mincol rowincr colincr)) (ses-set-cell row col 'references newval) (and (>= row minrow) (>= col mincol) - (let ((sym (ses-cell-symbol row col)) - (xcol (- col colincr))) - (if (and - sym - (>= xrow 0) - (>= xcol 0) - (null (eq sym - (ses-create-cell-symbol xrow xcol)))) - ;; This is a renamed cell, do not update the cell - ;; name, but just update the coordinate property. - (put sym 'ses-cell (cons row col)) - (ses-set-cell row col 'symbol - (setq sym (ses-create-cell-symbol row col))) - (unless (and (boundp sym) (local-variable-p sym)) - (set (make-local-variable sym) nil) - (put sym 'ses-cell (cons row col)))))) ))) + (ses-set-cell row col 'symbol + (ses-create-cell-symbol row col)))))) ;; Relocate the cell values. (let (oldval myrow mycol xrow xcol) (cond @@ -1567,17 +1544,11 @@ to each symbol." (setq mycol (+ col mincol) xrow (- myrow rowincr) xcol (- mycol colincr)) - (let ((sym (ses-cell-symbol myrow mycol)) - (xsym (ses-create-cell-symbol xrow xcol))) - ;; Make the value relocation only when if the cell is not - ;; a renamed cell. Otherwise this is not needed. - (and (eq sym xsym) - (ses-set-cell myrow mycol 'value - (if (and (< xrow ses--numrows) (< xcol ses--numcols)) - (ses-cell-value xrow xcol) - ;;Cell is off the end of the array - (symbol-value xsym)))))))) - + (if (and (< xrow ses--numrows) (< xcol ses--numcols)) + (setq oldval (ses-cell-value xrow xcol)) + ;; Cell is off the end of the array. + (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) + (ses-set-cell myrow mycol 'value oldval)))) ((and (wholenump rowincr) (wholenump colincr)) ;; Insertion of rows and/or columns. Run the loop backwards. (let ((disty (1- ses--numrows)) @@ -1687,6 +1658,7 @@ Does not execute cell formulas or print functions." (message "Upgrading from SES-1 file format"))) (or (= ses--file-format 2) (error "This file needs a newer version of the SES library code")) + (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols)) ;; Initialize cell array. (setq ses--cells (make-vector ses--numrows nil)) (dotimes (row ses--numrows) @@ -1706,10 +1678,11 @@ Does not execute cell formulas or print functions." (dotimes (row ses--numrows) (dotimes (col ses--numcols) (let* ((x (read (current-buffer))) - (sym (car-safe (cdr-safe x)))) + (rowcol (ses-sym-rowcol (car-safe (cdr-safe x))))) (or (and (looking-at "\n") (eq (car-safe x) 'ses-cell) - (ses-create-cell-variable sym row col)) + (eq row (car rowcol)) + (eq col (cdr rowcol))) (error "Cell-def error")) (eval x))) (or (looking-at "\n\n") @@ -3166,60 +3139,6 @@ highlighted range in the spreadsheet." (mouse-set-point event) (ses-insert-ses-range)) -(defun ses-replace-name-in-formula (formula old-name new-name) - (let ((new-formula formula)) - (unless (and (consp formula) - (eq (car-safe formula) 'quote)) - (while formula - (let ((elt (car-safe formula))) - (cond - ((consp elt) - (setcar formula (ses-replace-name-in-formula elt old-name new-name))) - ((and (symbolp elt) - (eq (car-safe formula) old-name)) - (setcar formula new-name)))) - (setq formula (cdr formula)))) - new-formula)) - -(defun ses-rename-cell (new-name) - "Rename current cell." - (interactive "*SEnter new name: ") - (ses-check-curcell) - (or - (and (local-variable-p new-name) - (ses-sym-rowcol new-name) - (error "Already a cell name")) - (and (boundp new-name) - (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? " - new-name))) - (error "Already a bound cell name"))) - (let* ((rowcol (ses-sym-rowcol ses--curcell)) - (cell (ses-get-cell (car rowcol) (cdr rowcol)))) - (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol))) - (let* ((rowcol (ses-sym-rowcol reference)) - (cell (ses-get-cell (car rowcol) (cdr rowcol)))) - (ses-cell-set-formula (car rowcol) - (cdr rowcol) - (ses-replace-name-in-formula - (ses-cell-formula cell) - ses--curcell - new-name)))) - (put new-name 'ses-cell rowcol) - (set new-name (symbol-value ses--curcell)) - (aset cell 0 new-name) - (put ses--curcell 'ses-cell nil) - (makunbound ses--curcell) - (setq ses--curcell new-name) - (let* ((pos (point)) - (inhibit-read-only t) - (col (current-column)) - (end (save-excursion - (move-to-column (1+ col)) - (if (eolp) - (+ pos (ses-col-width col) 1) - (point))))) - (put-text-property pos end 'intangible new-name))) ) - ;;---------------------------------------------------------------------------- ;; Checking formulas for safety -- cgit v1.2.1 From a6198c9097703c4ad2a686ecb1ade1af8cd52112 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 19 Dec 2011 15:00:16 +0800 Subject: Fix bugs in vc-dir-mark-unmark and vc-dir-mark-all-files. * lisp/vc/vc-dir.el (vc-dir-parent-marked-p, vc-dir-children-marked-p): Don't signal an error in a predicate function; return non-nil. (vc-dir-mark-file): Move the error here. (vc-dir-mark-unmark): If acting on the region, keep going if one of the entries cannot be marked/unmarked. (vc-dir-mark-all-files): If current entry is a directory, mark only child files, as documented. --- lisp/ChangeLog | 10 ++++++ lisp/vc/vc-dir.el | 100 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 67 insertions(+), 43 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d5da3a41c0..e360a257a3b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2011-12-19 Chong Yidong + + * vc/vc-dir.el (vc-dir-parent-marked-p, vc-dir-children-marked-p): + Don't signal an error in a predicate function; return non-nil. + (vc-dir-mark-file): Move the error here. + (vc-dir-mark-unmark): If acting on the region, keep going if one + of the entries cannot be marked/unmarked. + (vc-dir-mark-all-files): If current entry is a directory, mark + only child files, as documented. + 2011-12-19 Vincent Belaïche * ses.el: Ooops... undo changes of 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net, as trunk diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index d4b631a1d1b..f14b8830d43 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -534,57 +534,71 @@ If a prefix argument is given, move by that many lines." (save-excursion (goto-char (region-beginning)) (while (<= (line-number-at-pos) lastl) - (funcall mark-unmark-function)))) + (condition-case nil + (funcall mark-unmark-function) + ;; `vc-dir-mark-file' signals an error if we try marking + ;; a directory containing marked files in its tree, or a + ;; file in a marked directory tree. Just continue. + (error (vc-dir-next-line 1)))))) (funcall mark-unmark-function))) (defun vc-dir-parent-marked-p (arg) - ;; Return nil if none of the parent directories of arg is marked. + ;; Non-nil iff a parent directory of arg is marked. + ;; Return value, if non-nil is the `ewoc-data' for the marked parent. (let* ((argdir (vc-dir-node-directory arg)) (arglen (length argdir)) (crt arg) - data dir) + (found nil)) ;; Go through the predecessors, checking if any directory that is ;; a parent is marked. - (while (setq crt (ewoc-prev vc-ewoc crt)) - (setq data (ewoc-data crt)) - (setq dir (vc-dir-node-directory crt)) - (when (and (vc-dir-fileinfo->directory data) - (vc-string-prefix-p dir argdir)) - (when (vc-dir-fileinfo->marked data) - (error "Cannot mark `%s', parent directory `%s' marked" - (vc-dir-fileinfo->name (ewoc-data arg)) - (vc-dir-fileinfo->name data))))) - nil)) + (while (and (null found) + (setq crt (ewoc-prev vc-ewoc crt))) + (let ((data (ewoc-data crt)) + (dir (vc-dir-node-directory crt))) + (and (vc-dir-fileinfo->directory data) + (vc-string-prefix-p dir argdir) + (vc-dir-fileinfo->marked data) + (setq found data)))) + found)) (defun vc-dir-children-marked-p (arg) - ;; Return nil if none of the children of arg is marked. + ;; Non-nil iff a child of ARG is marked. + ;; Return value, if non-nil, is the `ewoc-data' for the marked child. (let* ((argdir-re (concat "\\`" (regexp-quote (vc-dir-node-directory arg)))) (is-child t) (crt arg) - data dir) - (while (and is-child (setq crt (ewoc-next vc-ewoc crt))) - (setq data (ewoc-data crt)) - (setq dir (vc-dir-node-directory crt)) - (if (string-match argdir-re dir) - (when (vc-dir-fileinfo->marked data) - (error "Cannot mark `%s', child `%s' marked" - (vc-dir-fileinfo->name (ewoc-data arg)) - (vc-dir-fileinfo->name data))) - ;; We are done, we got to an entry that is not a child of `arg'. - (setq is-child nil))) - nil)) + (found nil)) + (while (and is-child + (null found) + (setq crt (ewoc-next vc-ewoc crt))) + (let ((data (ewoc-data crt)) + (dir (vc-dir-node-directory crt))) + (if (string-match argdir-re dir) + (if (vc-dir-fileinfo->marked data) + (setq found data)) + ;; We are done, we got to an entry that is not a child of `arg'. + (setq is-child nil)))) + found)) (defun vc-dir-mark-file (&optional arg) ;; Mark ARG or the current file and move to the next line. (let* ((crt (or arg (ewoc-locate vc-ewoc))) (file (ewoc-data crt)) - (isdir (vc-dir-fileinfo->directory file))) - (when (or (and isdir (not (vc-dir-children-marked-p crt))) - (and (not isdir) (not (vc-dir-parent-marked-p crt)))) - (setf (vc-dir-fileinfo->marked file) t) - (ewoc-invalidate vc-ewoc crt) - (unless (or arg (mouse-event-p last-command-event)) - (vc-dir-next-line 1))))) + (isdir (vc-dir-fileinfo->directory file)) + ;; Forbid marking a directory containing marked files in its + ;; tree, or a file in a marked directory tree. + (conflict (if isdir + (vc-dir-children-marked-p crt) + (vc-dir-parent-marked-p crt)))) + (when conflict + (error (if isdir + "File `%s' in this directory is already marked" + "Parent directory `%s' is already marked") + (vc-dir-fileinfo->name conflict))) + (setf (vc-dir-fileinfo->marked file) t) + (ewoc-invalidate vc-ewoc crt) + (unless (or arg (mouse-event-p last-command-event)) + (vc-dir-next-line 1)))) (defun vc-dir-mark () "Mark the current file or all files in the region. @@ -621,19 +635,19 @@ share the same state." (setf (vc-dir-fileinfo->marked filearg) t) t)) vc-ewoc)) - (let ((data (ewoc-data (ewoc-locate vc-ewoc)))) + (let* ((crt (ewoc-locate vc-ewoc)) + (data (ewoc-data crt))) (if (vc-dir-fileinfo->directory data) ;; It's a directory, mark child files. - (let ((crt (ewoc-locate vc-ewoc))) - (unless (vc-dir-children-marked-p crt) - (while (setq crt (ewoc-next vc-ewoc crt)) - (let ((crt-data (ewoc-data crt))) - (unless (vc-dir-fileinfo->directory crt-data) - (setf (vc-dir-fileinfo->marked crt-data) t) - (ewoc-invalidate vc-ewoc crt)))))) + (let (crt-data) + (while (and (setq crt (ewoc-next vc-ewoc crt)) + (setq crt-data (ewoc-data crt)) + (not (vc-dir-fileinfo->directory crt-data))) + (setf (vc-dir-fileinfo->marked crt-data) t) + (ewoc-invalidate vc-ewoc crt))) ;; It's a file - (let ((state (vc-dir-fileinfo->state data)) - (crt (ewoc-nth vc-ewoc 0))) + (let ((state (vc-dir-fileinfo->state data))) + (setq crt (ewoc-nth vc-ewoc 0)) (while crt (let ((crt-data (ewoc-data crt))) (when (and (not (vc-dir-fileinfo->marked crt-data)) -- cgit v1.2.1 From bc859d5f3eb942f627f113eb9e75015cb43eda02 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 19 Dec 2011 15:25:46 +0800 Subject: More updates for VC documentation. * doc/emacs/maintaining.texi (VCS Merging, VCS Changesets): Index entries. (VC Mode Line): Add index entry for "version control status". (VC Undo): Use vc-revert instead of its vc-revert-buffer alias. Document vc-revert-show-diff. De-document vc-rollback. (VC Directory Mode): Rewrite introduction. Move prefix arg documentation here from VC Directory Buffer node. (VC Directory Buffer): Use a decentralized VCS example. (VC Directory Commands): Use a table. Remove material duplicated in previous nodes on multi-file VC filsets. --- admin/FOR-RELEASE | 30 +--- doc/emacs/ChangeLog | 12 ++ doc/emacs/maintaining.texi | 388 +++++++++++++++++++++++++-------------------- etc/NEWS | 1 + 4 files changed, 235 insertions(+), 196 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 23d2bd2b16a..fc36fb6e1d7 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -61,13 +61,6 @@ sk Miroslav Vaško * BUGS -** Does deleting frames run Lisp code? If so, can we get rid of that? -It is a dangerous design. -http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01330.html - -** Why were the calls to x_fully_uncatch_errors commented out in eval.c? -http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01987.html - ** rms: gnus-dired.el is a mistake. Those features should not be part of Gnus. They should be moved to some other part of Emacs. rsteib: Gnus dependencies in `gnus-dired.el' (and `mailcap.el') have been @@ -90,25 +83,8 @@ and change key bindings where necessary. The current list of modes: `log-edit-comment-search-forward'. Perhaps search commands on the global key binding `M-s' are useless in these modes. -** sdl.web@gmail.com, 30 Oct: ps-lpr-switches has no effect -http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg02091.html - -Fixed by this change? - -2007-11-09 Vinicius Jose Latorre - - * ps-print.el: [...] - (ps-do-despool): If ps-lpr-switches is not a list, force it to be one. - -** In C, use EMACS_INT for variables and structure members -for buffer/string positions. E.g. struct it, struct text_pos. - * DOCUMENTATION -** Clean up Emacs.app references in code and documentation. - -** Document new font backend - ** Document XEmbed support ** Check the Emacs Tutorial. @@ -154,7 +130,7 @@ anti.texi arevert-xtra.texi cyd basic.texi cyd buffers.texi cyd -building.texi +building.texi cyd calendar.texi cal-xtra.texi cmdargs.texi @@ -188,13 +164,13 @@ msdog-xtra.texi mule.texi m-x.texi cyd picture-xtra.texi -programs.texi +programs.texi cyd regs.texi cyd rmail.texi screen.texi cyd search.texi cyd sending.texi -text.texi +text.texi cyd trouble.texi vc-xtra.texi vc1-xtra.texi diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 20f068e4ef6..90bc9dc8c91 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,15 @@ +2011-12-19 Chong Yidong + + * maintaining.texi (VCS Merging, VCS Changesets): Index entries. + (VC Mode Line): Add index entry for "version control status". + (VC Undo): Use vc-revert instead of its vc-revert-buffer alias. + Document vc-revert-show-diff. De-document vc-rollback. + (VC Directory Mode): Rewrite introduction. Move prefix arg + documentation here from VC Directory Buffer node. + (VC Directory Buffer): Use a decentralized VCS example. + (VC Directory Commands): Use a table. Remove material duplicated + in previous nodes on multi-file VC filsets. + 2011-12-17 Chong Yidong * maintaining.texi (VCS Concepts): Make "revision" terminology diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 063d0e65f5b..96d520e143c 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -227,17 +227,18 @@ these modes of operation, but it cannot hide the differences. @node VCS Merging @subsubsection Merge-based vs lock-based Version Control -@cindex locking versus merging A version control system typically has some mechanism to coordinate between users who want to change the same file. There are two ways to do this: merging and locking. +@cindex merging-based version In a version control system that uses merging, each user may modify a work file at any time. The system lets you @dfn{merge} your work file, which may contain changes that have not been committed, with the latest changes that others have committed. +@cindex locking-based version Older version control systems use a @dfn{locking} scheme instead. Here, work files are normally read-only. To edit a file, you ask the version control system to make it writable for you by @dfn{locking} @@ -274,7 +275,7 @@ possible. @node VCS Changesets @subsubsection Changeset-based vs File-based Version Control -@cindex changesets +@cindex file-based version control On SCCS, RCS, CVS, and other early version control systems, version control operations are @dfn{file-based}: each file has its own comment and revision history separate from that of all other files. Newer @@ -283,6 +284,7 @@ commit may include changes to several files, and the entire set of changes is handled as a unit. Any comment associated with the change does not belong to a single file, but to the changeset itself. +@cindex changeset-based version control Changeset-based version control is more flexible and powerful than file-based version control; usually, when a change to multiple files has to be reversed, it's good to be able to easily identify and remove @@ -356,20 +358,22 @@ later use the @kbd{C-x v a} command to copy it to @file{ChangeLog} @node VC Mode Line @subsection Version Control and the Mode Line -@cindex VC, mode line indicator +@cindex VC mode line indicator When you visit a file that is under version control, Emacs indicates this on the mode line. For example, @samp{Bzr-1223} says that Bazaar is used for that file, and the current revision ID is 1223. +@cindex version control status The character between the back-end name and the revision ID -indicates the status of the work file. In a merge-based version -control system, a @samp{-} character indicates that the work file is -unmodified, and @samp{:} indicates that it has been modified. -@samp{!} indicates that the file contains conflicts as result of a -recent merge operation (@pxref{Merging}), or that the file was removed -from the version control. Finally, @samp{?} means that the file is -under version control, but is missing from the working tree. +indicates the @dfn{version control status} of the work file. In a +merge-based version control system, a @samp{-} character indicates +that the work file is unmodified, and @samp{:} indicates that it has +been modified. @samp{!} indicates that the file contains conflicts as +result of a recent merge operation (@pxref{Merging}), or that the file +was removed from the version control. Finally, @samp{?} means that +the file is under version control, but is missing from the working +tree. In a lock-based system, @samp{-} indicates an unlocked file, and @samp{:} a locked file; if the file is locked by another user (for @@ -399,6 +403,7 @@ system, but is usually not excessive. @subsection Basic Editing under Version Control @cindex filesets, VC +@cindex VC filesets Most VC commands operate on @dfn{VC filesets}. A VC fileset is a collection of one or more files that a VC operation acts on. When you type VC commands in a buffer visiting a version-controlled file, the @@ -451,9 +456,9 @@ and don't persist across sessions. @itemize @bullet @item If there is more than one file in the VC fileset and the files have -inconsistent version control states, signal an error. (Note, however, -that a fileset is allowed to include both ``newly-added'' files and -``modified'' files; @pxref{Registering}.) +inconsistent version control statuses, signal an error. (Note, +however, that a fileset is allowed to include both ``newly-added'' +files and ``modified'' files; @pxref{Registering}.) @item If none of the files in the VC fileset are registered with a version @@ -504,7 +509,7 @@ its default mode), @kbd{C-x v v} does the following: @itemize @bullet @item If there is more than one file in the VC fileset and the files have -inconsistent version control states, signal an error. +inconsistent version control statuses, signal an error. @item If each file in the VC fileset is not registered with a version @@ -887,7 +892,7 @@ the file contents without distraction from the annotations. @table @kbd @item C-x v l -Display revision control state and change history +Display the change history for the current fileset (@code{vc-print-log}). @item C-x v L @@ -927,8 +932,8 @@ this feature). With a prefix argument, the command prompts for the maximum number of revisions to display. The @kbd{C-x v L} history is shown in a compact form, usually -omitting all but the first line of each log entry. However, you can -type @key{RET} (@code{log-view-toggle-entry-display}) in the +showing only the first line of each log entry. However, you can type +@key{RET} (@code{log-view-toggle-entry-display}) in the @samp{*vc-change-log*} buffer to reveal the entire log entry for the revision at point. A second @key{RET} hides it again. @@ -1008,58 +1013,67 @@ buffer. However, RCS, SCCS, and CVS do not support this feature. @table @kbd @item C-x v u -Revert the buffer and the file to the working revision from which you started -editing the file. - -@item C-x v c -Remove the last-entered change from the master for the visited file. -This undoes your last commit. +Revert the work file(s) in the current VC fileset to the last revision +(@code{vc-revert}). @end table +@c `C-x v c' (vc-rollback) was removed, since it's RCS/SCCS specific. + @kindex C-x v u -@findex vc-revert-buffer - If you want to discard your current set of changes and revert to the -working revision from which you started editing the file, use @kbd{C-x -v u} (@code{vc-revert-buffer}). If the version control system is -locking-based, this leaves the file unlocked, and you must lock it -again before making new changes. @kbd{C-x v u} requires confirmation, -unless it sees that you haven't made any changes with respect to the -master copy of the working revision. - - @kbd{C-x v u} is also the command to unlock a file if you lock it and -then decide not to change it. - -@kindex C-x v c -@findex vc-rollback - To cancel a change that you already committed, use @kbd{C-x v c} -(@code{vc-rollback}). This command discards all record of the most -recent checked-in revision, but only if your work file corresponds to -that revision---you cannot use @kbd{C-x v c} to cancel a revision that -is not the latest on its branch. Note that many version control -systems do not support rollback at all; this command is something of a -historical relic. +@findex vc-revert +@vindex vc-revert-show-diff + If you want to discard all the changes you have made to the current +VC fileset, type @kbd{C-x v u} (@code{vc-revert-buffer}). This shows +you a diff between the work file(s) and the revision from which you +started editing, and asks for confirmation for discarding the changes. +If you agree, the fileset is reverted. If you don't want @kbd{C-x v +u} to show a diff, set the variable @code{vc-revert-show-diff} to +@code{nil} (you can still view the diff directly with @kbd{C-x v =}; +@pxref{Old Revisions}). Note that @kbd{C-x v u} cannot be reversed +with the usual undo commands (@pxref{Undo}), so use it with care. + + On locking-based version control systems, @kbd{C-x v u} leaves files +unlocked; you must lock again to resume editing. You can also use +@kbd{C-x v u} to unlock a file if you lock it and then decide not to +change it. @node VC Directory Mode @subsection VC Directory Mode +@cindex VC Directory buffer + The @dfn{VC Directory buffer} is a specialized buffer for viewing +the version control statuses of the files in a directory tree, and +performing version control operations on those files. In particular, +it is used to specify multi-file VC filesets for commands like +@w{@kbd{C-x v v}} to act on (@pxref{VC Directory Commands}). + @kindex C-x v d @findex vc-dir - When you are working on a large program, it is often useful to find -out which files have changed within an entire directory tree, or to -view the status of all files under version control at once, and to -perform version control operations on collections of files. You can -use the command @kbd{C-x v d} (@code{vc-dir}) to make a directory -listing that includes only files relevant for version control. This -creates a @dfn{VC Directory buffer} and displays it in a separate -window. + To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}). +This reads a directory name using the minibuffer, and switches to a VC +Directory buffer for that directory. By default, the buffer is named +@samp{*vc-dir*}. Its contents are described +@iftex +below. +@end iftex +@ifnottex +in @ref{VC Directory Buffer}. +@end ifnottex + The @code{vc-dir} command automatically detects the version control +system to be used in the specified directory. In the event that more +than one system is being used in the directory, you should invoke the +command with a prefix argument, @kbd{C-u C-x v d}; this prompts for +the version control system which the VC Directory buffer should use. + +@ifnottex @cindex PCL-CVS @pindex cvs @cindex CVS directory mode - The VC Directory buffer works with all the version control systems -that VC supports. For CVS, Emacs also offers a more powerful facility -called PCL-CVS. @xref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The -Emacs Front-End to CVS}. + In addition to the VC Directory buffer, Emacs has a similar facility +called PCL-CVS which is specialized for CVS. @xref{Top, , About +PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}. +@end ifnottex @menu * Buffer: VC Directory Buffer. What the buffer looks like and means. @@ -1070,152 +1084,188 @@ Emacs Front-End to CVS}. @subsubsection The VC Directory Buffer The VC Directory buffer contains a list of version-controlled files -in the current directory and its subdirectories. Files which are -up-to-date (have no local differences from the repository copy) are -usually hidden; if all files in a subdirectory are up-to-date, the -subdirectory is hidden as well. There is an exception to this rule: -if VC mode detects that a file has changed to an up-to-date state -since you last looked at it, that file and its state are shown. - - If a directory uses more that one version control system, you can -select which system to use for the @code{vc-dir} command by invoking -@code{vc-dir} with a prefix argument: @kbd{C-u C-x v d}. - - The line for an individual file shows the version control state of -the file. Under RCS and SCCS, the name of the user locking the file -is shown; under CVS, an abbreviated version of the @samp{cvs status} -output is used. Here is an example using CVS: +and their version control statuses. It lists files in the current +directory (the one specified when you called @kbd{C-x v d}) and its +subdirectories, but only those with a ``noteworthy'' status. Files +that are up-to-date (i.e.@: the same as in the repository) are +omitted. If all the files in a subdirectory are up-to-date, the +subdirectory is not listed either. As an exception, if a file has +become up-to-date as a direct result of a VC command, it is listed. + + Here is an example of a VC Directory buffer listing: @smallexample @group - ./ - modified file1.c - needs-update file2.c - needs-merge file3.c + ./ + edited configure.ac +* added README + unregistered temp.txt + src/ +* edited src/main.c @end group @end smallexample @noindent -In this example, @samp{file1.c} is modified with respect to the -repository, and @samp{file2.c} is not. @samp{file3.c} is modified, -but other changes have also been committed---you need to merge them -with the work file before you can check it in. - -@vindex vc-stay-local -@vindex vc-cvs-stay-local - In the above, if the repository were on a remote machine, VC only -contacts it when the variable @code{vc-stay-local} (or -@code{vc-cvs-stay-local}) is @code{nil} +Two work files have been modified but not committed: +@file{configure.ac} in the current directory, and @file{foo.c} in the +@file{src/} subdirectory. The file named @file{README} has been added +but is not yet committed, while @file{temp.txt} is not under version +control (@pxref{Registering}). + +The @samp{*} characters next to the entries for @file{README} and +@file{src/main.c} indicate that the user has marked out these files as +the current VC fileset @iftex -(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}). +(see below). @end iftex @ifnottex -(@pxref{CVS Options}). +(@pxref{VC Directory Commands}). +@end ifnottex + + The above example is typical for a decentralized version control +system like Bazaar, Git, or Mercurial. Other systems can show other +statuses. For instance, CVS shows the @samp{needs-update} status if +the repository has changes that have not been applied to the work +file. RCS and SCCS show the name of the user locking a file as its +status. + +@ifnottex +@vindex vc-stay-local +@vindex vc-cvs-stay-local + On CVS and Subversion, the @code{vc-dir} command normally contacts +the repository, which may be on a remote machine, to check for +updates. If you change the variable @code{vc-stay-local} or +@code{vc-cvs-stay-local} (for CVS) to @code{nil} (@pxref{CVS +Options}), then Emacs avoids contacting a remote repository when +generating the VC Directory buffer (it will still contact it when +necessary, e.g.@: when doing a commit). This may be desirable if you +are working offline or the network is slow. @end ifnottex -This is because access to the repository may be slow, or you may be -working offline and not have access to the repository at all. As a -consequence, VC would not be able to tell you that @samp{file3.c} is -in the ``merge'' state; you would learn that only when you try to -commit your modified copy of the file, or use a command such as -@kbd{C-x v m}. - - In practice, this is not a problem because CVS handles this case -consistently whenever it arises. In VC, you'll simply get prompted to -merge the remote changes into your work file first. The benefits of -less network communication usually outweigh the disadvantage of not -seeing remote changes immediately. @vindex vc-directory-exclusion-list - When a VC directory displays subdirectories it omits some that -should never contain any files under version control. By default, -this includes Version Control subdirectories such as @samp{RCS} and -@samp{CVS}; you can customize this by setting the variable -@code{vc-directory-exclusion-list}. + The VC Directory buffer omits subdirectories listed in the variable +@code{vc-directory-exclusion-list}. The default value of this +variable contains directories that are used internally by version +control systems. @node VC Directory Commands @subsubsection VC Directory Commands - VC Directory mode has a full set of navigation and marking commands -for picking out filesets. Some of these are also available in a -context menu invoked by @kbd{mouse-2}. + Emacs provides several commands for navigating the VC Directory +buffer, and for ``marking'' files as belonging to the current VC +fileset. - Up- and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also -move vertically as in other list-browsing modes. @key{SPC} and -@key{TAB} behave like down-arrow, and @key{BackTab} behaves like -up-arrow. +@table @kbd +@item n +@itemx @key{SPC} +Move point to the next entry (@code{vc-dir-next-line}). - Both @kbd{C-m} and @kbd{f} visit the file on the current -line. @kbd{o} visits that file in another window. @kbd{q} dismisses -the directory buffer. +@item p +Move point to the previous entry (@code{vc-dir-previous-line}). - @kbd{x} hides up-to-date files. +@item @key{TAB} +Move to the next directory entry (@code{vc-dir-next-directory}). - @kbd{m} marks the file or directory on the current line. If the -region is active, @kbd{m} marks all the files in the region. There -are some restrictions when marking: a file cannot be marked if any of -its parent directories are marked, and a directory cannot be marked if -any files in it or in its child directories are marked. +@item S-@key{TAB} +Move to the previous directory entry +(@code{vc-dir-previous-directory}). - @kbd{M} marks all the files with the same VC state as the current -file if the cursor is on a file. If the cursor is on a directory, it -marks all child files. With a prefix argument: marks all files and -directories. +@item @key{RET} +@itemx f +Visit the file or directory listed on the current line +(@code{vc-dir-find-file}). - @kbd{u} unmarks the file or directory on the current line. If the -region is active, it unmarks all the files in the region. +@item o +Visit the file or directory on the current line, in a separate window +(@code{vc-dir-find-file-other-window}). - @kbd{U} marks all the files with the same VC state as the current file -if the cursor is on a file. If the cursor is on a directory, it -unmarks all child files. With a prefix argument: unmarks all marked +@item m +Mark the file or directory on the current line (@code{vc-dir-mark}), +putting it in the current VC fileset. If the region is active, mark +all files in the region. + +A file cannot be marked with this command if it is already in a marked +directory, or one of its subdirectories. Similarly, a directory +cannot be marked with this command if any file in its tree is marked. + +@item M +If point is on a file entry, mark all files with the same status; if +point is on a directory entry, mark all files in that directory tree +(@code{vc-dir-mark-all-files}). With a prefix argument, mark all +listed files and directories. + +@item u +Unmark the file or directory on the current line. If the region is +active, unmark all the files in the region (@code{vc-dir-unmark}). + +@item U +If point is on a file entry, umark all files with the same status; if +point is on a directory entry, unmark all files in that directory tree +(@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all files and directories. - It is possible to do search, search and replace, incremental search, -and incremental regexp search on multiple files. These commands will -work on all the marked files or the current file if nothing is marked. -If a directory is marked, the files in that directory shown in the VC -directory buffer will be used. +@item x +Hide files with @samp{up-to-date} status +(@code{vc-dir-hide-up-to-date}). + +@item q +Quit the VC Directory buffer, and bury it (@code{quit-window}). +@end table + +@findex vc-dir-mark +@findex vc-dir-mark-all-files + While in the VC Directory buffer, all the files that you mark with +@kbd{m} (@code{vc-dir-mark}) or @kbd{M} (@code{vc-dir-mark}) are in +the current VC fileset. If you mark a directory entry with @kbd{m}, +all the listed files in that directory tree are in the current VC +fileset. The files and directories that belong to the current VC +fileset are indicated with a @samp{*} character in the VC Directory +buffer, next to their VC status. In this way, you can set up a +multi-file VC fileset to be acted on by VC commands like @w{@kbd{C-x v +v}} (@pxref{Basic VC Editing}), @w{@kbd{C-x v =}} (@pxref{Old +Revisions}), and @w{@kbd{C-x v u}} (@pxref{VC Undo}). + + The VC Directory buffer also defines some single-key shortcuts for +VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l}, +@kbd{i}, and @kbd{v}. + + For example, you can commit a set of edited files by opening a VC +Directory buffer, where the files are listed with the @samp{edited} +status; marking the files; and typing @kbd{v} or @kbd{C-x v v} +(@code{vc-next-action}). If the version control system is +changeset-based, Emacs will commit the files in a single revision. + + While in the VC Directory buffer, you can also perform search and +replace on the current VC fileset, with the following commands: - @kbd{S} searches the marked files. +@table @kbd +@item S +Search the fileset (@code{vc-dir-search}). + +@item Q +Do a regular expression query replace on the fileset +(@code{vc-dir-query-replace-regexp}). - @kbd{Q} does a query replace on the marked files. +@item M-s a C-s +Do an incremental search on the fileset (@code{vc-dir-isearch}). - @kbd{M-s a C-s} does an incremental search on the marked files. +@item M-s a C-M-s +Do an incremental regular expression search on the fileset +(@code{vc-dir-isearch-regexp}). +@end table - @kbd{M-s a C-M-s} does an incremental regular expression search -on the marked files. +@noindent +Apart from acting on multiple files, these commands behave much like +their single-buffer counterparts (@pxref{Search}). @cindex stashes in version control @cindex shelves in version control - Commands are also accessible from the VC-dir menu. Note that some -VC backends use the VC-dir menu to make available extra, -backend-specific, commands. For example, Git and Bazaar allow you to -manipulate @dfn{stashes} and @dfn{shelves}. (These provide a -mechanism to temporarily store uncommitted changes somewhere out of -the way, and bring them back at a later time.) - - Normal VC commands with the @kbd{C-x v} prefix work in VC directory -buffers. Some single-key shortcuts are available as well; @kbd{=}, -@kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with -@kbd{C-x v}. - - The command @kbd{C-x v v} (@code{vc-next-action}) operates on all -the marked files, so that you can commit several files at once. If -the underlying VC supports atomic commits of multiple-file changesets, -@kbd{C-x v v} with a selected set of modified but not committed files -will commit all of them at once as a single changeset. - - When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple -files, all of those files must be either in the same state or in -compatible states (added, modified and removed states are considered -compatible). Otherwise it signals an error. This differs from the -behavior of older versions of VC, which did not have fileset -operations and simply did @code{vc-next-action} on each file -individually. - - If any files are in a state that calls for commit, @kbd{C-x v v} reads a -single log entry and uses it for the changeset as a whole. If the -underling VCS is file- rather than changeset-oriented, the log entry -will be replicated into the history of each file. + The above commands are also available via the menu bar, and via a +context menu invoked by @kbd{Mouse-2}. Furthermore, some VC backends +use the menu to provide extra backend-specific commands. For example, +Git and Bazaar allow you to manipulate @dfn{stashes} and @dfn{shelves} +(where are a way to temporarily put aside uncommitted changes, and +bring them back at a later time). @node Branches @subsection Multiple Branches of a File diff --git a/etc/NEWS b/etc/NEWS index 7454a4a89a3..65a3b41f5bf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -849,6 +849,7 @@ the user for specifics, e.g. a merge source. **** Currently supported for Bzr, Git, and Mercurial. ++++ *** New option `vc-revert-show-diff' controls whether `vc-revert' shows a diff while querying the user. It defaults to t. -- cgit v1.2.1 From 59ff373bd6c85b758127536e45da259bb8f64d17 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 19 Dec 2011 06:21:17 -0500 Subject: Auto-commit of loaddefs files. --- lisp/mail/rmail.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 2415ef969ee..1ea01bdadb8 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4527,7 +4527,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "2cb1f29b88b0c724fdba389fd7b98b00") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "91f72e39e6ea7c2be098fe3f05174b9e") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ -- cgit v1.2.1 From 9954ec0dae829e7141aa25e87e6b496e8dd9e48c Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Mon, 19 Dec 2011 10:15:11 -0500 Subject: * lisp/cedet/semantic/edit.el (semantic-edits-incremental-parser): Add the autoload cookie, necessary for JDEE. --- lisp/cedet/ChangeLog | 5 +++++ lisp/cedet/semantic/edit.el | 1 + 2 files changed, 6 insertions(+) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index ccc81e6613e..0e46ba73e6e 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,8 @@ +2011-12-19 Sam Steingold + + * semantic/edit.el (semantic-edits-incremental-parser): Add the + autoload cookie, necessary for JDEE. + 2011-12-06 Juanma Barranquero * semantic/bovine/c.el (semantic-tag-abstract-p): Fix typo. diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el index 3fbcf6d932f..d33454eb56b 100644 --- a/lisp/cedet/semantic/edit.el +++ b/lisp/cedet/semantic/edit.el @@ -470,6 +470,7 @@ a 'semantic-parse-changes-failed exception with value t." (buffer-name (current-buffer)))) (run-hooks 'semantic-edits-incremental-reparse-failed-hook)) +;;;###autoload (defun semantic-edits-incremental-parser () "Incrementally reparse the current buffer. Incremental parser allows semantic to only reparse those sections of -- cgit v1.2.1 From 1154d12e5b3597869808d576dafaf0734840bc0f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 19 Dec 2011 16:46:50 +0100 Subject: Fix typos. --- ChangeLog | 4 ++-- lisp/ChangeLog | 59 +++++++++++++++++++++++++-------------------------- lisp/ChangeLog.14 | 2 +- lisp/mh-e/ChangeLog.1 | 2 +- src/ChangeLog.11 | 2 +- 5 files changed, 34 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23efc30f4fc..605ef32b598 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2262,7 +2262,7 @@ 2009-12-10 Jan Djärv - * configure.in: Check for RSVG if GNUStep is used. + * configure.in: Check for RSVG if GNUstep is used. 2009-12-09 Jan Djärv @@ -2447,7 +2447,7 @@ 2009-05-06 Stefan Monnier - * configure.in: Don't define CANNOT_DUMP for GNUStep any more. + * configure.in: Don't define CANNOT_DUMP for GNUstep any more. 2009-05-05 Per Starbäck (tiny change) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e360a257a3b..7e583f2bbc6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -18,12 +18,12 @@ * term/ns-win.el (ns-get-selection-internal) (ns-store-selection-internal): Declare. - (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): Declare - as obsolete. - (ns-get-pasteboard, ns-paste-secondary): Use - ns-get-selection-internal. - (ns-set-pasteboard, ns-copy-including-secondary): Use - ns-store-selection-internal. + (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): + Declare as obsolete. + (ns-get-pasteboard, ns-paste-secondary): + Use ns-get-selection-internal. + (ns-set-pasteboard, ns-copy-including-secondary): + Use ns-store-selection-internal. 2011-12-17 Chong Yidong @@ -642,8 +642,8 @@ 2011-11-21 Juri Linkov - * calc/calc.el (calc-read-key-sequence): Let-bind `input-method-function' - to nil. (Bug#10018) + * calc/calc.el (calc-read-key-sequence): + Let-bind `input-method-function' to nil. (Bug#10018) 2011-11-21 Lars Magne Ingebrigtsen @@ -2173,11 +2173,10 @@ 2011-09-24 Ulf Jasper * net/newst-reader.el (newsticker-html-renderer) - (newsticker-show-news): Automatically - load html rendering package if newsticker-html-renderer is set. - Fixes "Warning: defvar ignored because w3m-fill-column is - let-bound" and the error "Symbol's value as variable is void: - w3m-fill-column". + (newsticker-show-news): Automatically load html rendering package + if newsticker-html-renderer is set. Fixes "Warning: defvar ignored + because w3m-fill-column is let-bound" and the error "Symbol's value + as variable is void: w3m-fill-column". 2011-09-24 Michael Albinus @@ -2291,8 +2290,8 @@ 2011-09-21 Martin Rudalics * window.el (set-window-buffer-start-and-point): - Call set-window-start with NOFORCE argument t. Suggested by Thierry - Volpiatto . + Call set-window-start with NOFORCE argument t. + Suggested by Thierry Volpiatto . (quit-window): Reword doc-string. Handle new format of quit-restore parameter. Don't delete window if it has a previous buffer we can show instead of the present one. @@ -2410,13 +2409,13 @@ 2011-09-18 Juri Linkov * info.el (Info-mode-syntax-table): New variable. - (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table'. (Bug#3312) + (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table' (bug#3312). 2011-09-18 Juri Linkov - * info.el (Info-file-supports-index-cookies): Increment - line-beginning-position's arg from 3 to 4 because makeinfo outputs - one more line for long file names (bug#4142). + * info.el (Info-file-supports-index-cookies): + Increment line-beginning-position's arg from 3 to 4 because makeinfo + outputs one more line for long file names (bug#4142). 2011-09-18 Chong Yidong @@ -4708,8 +4707,8 @@ pending encryption. (allout-inhibit-auto-save-info-for-decryption): - Adjust buffer-saved-size and some allout state to inhibit auto-saves if - there are plain-text topics pending encryption. + Adjust buffer-saved-size and some allout state to inhibit auto-saves + if there are plain-text topics pending encryption. (allout-maybe-resume-auto-save-info-after-encryption): Adjust buffer-saved-size and some allout state to not inhibit auto-saves @@ -6139,11 +6138,11 @@ (split-window-keep-point): Mention split-window-above-each-other instead of split-window-vertically. (split-window-above-each-other, split-window-vertically): - Rename split-window-vertically to split-window-above-each-other and - provide defalias for old definition. - (split-window-side-by-side, split-window-horizontally): Rename - split-window-horizontally to split-window-side-by-side and provide - defalias for the old definition. + Rename split-window-vertically to split-window-above-each-other + and provide defalias for old definition. + (split-window-side-by-side, split-window-horizontally): + Rename split-window-horizontally to split-window-side-by-side + and provide defalias for the old definition. (ctl-x-map): Move bindings for delete-window, delete-other-windows and enlarge-window here from window.c. Replace bindings for split-window-vertically and @@ -9566,10 +9565,10 @@ preserves the existing header prefix, rebulleting it if necessary, rather than replacing it. This is necessary for proper operation of cooperative addons like allout-widgets. - (allout-make-topic-prefix, allout-rebullet-heading): Change - SOLICIT arg to INSTEAD, and interpret additionally a string value - as alternate bullet to be used, instead of prompting the user for - a bullet character. + (allout-make-topic-prefix, allout-rebullet-heading): + Change SOLICIT arg to INSTEAD, and interpret additionally a string + value as alternate bullet to be used, instead of prompting the user + for a bullet character. 2011-03-09 Michael Albinus diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14 index 213f5cfb784..5620b90a3f4 100644 --- a/lisp/ChangeLog.14 +++ b/lisp/ChangeLog.14 @@ -3473,7 +3473,7 @@ 2009-01-10 Dan Nicolaescu * diff-mode.el (diff-show-trailing-whitespaces): Remove function. - Move setting up whitepace-mode ... + Move setting up whitespace-mode ... (diff-mode): ... here. (diff-mode-menu): Add a menu entry for showing trailing whitespace. diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1 index 65ffb0375ab..506390896a1 100644 --- a/lisp/mh-e/ChangeLog.1 +++ b/lisp/mh-e/ChangeLog.1 @@ -1648,7 +1648,7 @@ * mh-e.el (mh-version): Do something sensible when mh-variant-in-use is undefined. * mh-junk.el (mh-spamassassin-blacklist) - (mh-spamassassin-whitelist): Change options to be compatoble with + (mh-spamassassin-whitelist): Change options to be compatible with old version of spamassassin (V2.20). 2003-09-07 Mark D. Baushke diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 289ef168088..78639ef0c2b 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 @@ -12897,7 +12897,7 @@ * font.c (font_update_drivers): Sanity fallback to avoid disabling all drivers. - * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep. + * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUstep. 2009-05-06 YAMAMOTO Mitsuharu -- cgit v1.2.1 From 2edef1a0a6809d182d0003fe0413dfcb86ae47b6 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 20 Dec 2011 11:00:10 +0800 Subject: More updates for VC documentation. * doc/emacs/maintaining.texi (VCS Concepts): Add "working tree" terminology. (Old Revisions): Use it. (VCS Repositories): Add "distributed" terminology. (Log Buffer): Remove duplicate description about changesets. Fix "current VC fileset" ambiguity. (Multi-User Branching): Node deleted. (Branches, Switching Branches): Discuss decentralized version control systems. (VC Pull): New node. (Merging): Document merging on decentralized systems. (Creating Branches): Note that this is specific to CVS and related systems. --- doc/emacs/ChangeLog | 15 ++ doc/emacs/emacs.texi | 5 +- doc/emacs/maintaining.texi | 462 ++++++++++++++++++++------------------------- doc/emacs/vc1-xtra.texi | 9 +- etc/NEWS | 14 +- 5 files changed, 230 insertions(+), 275 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 90bc9dc8c91..3475dda704a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,18 @@ +2011-12-20 Chong Yidong + + * maintaining.texi (VCS Concepts): Add "working tree" terminology. + (Old Revisions): Use it. + (VCS Repositories): Add "distributed" terminology. + (Log Buffer): Remove duplicate description + about changesets. Fix "current VC fileset" ambiguity. + (Multi-User Branching): Node deleted. + (Branches, Switching Branches): Discuss decentralized version + control systems. + (VC Pull): New node. + (Merging): Document merging on decentralized systems. + (Creating Branches): Note that this is specific to CVS and related + systems. + 2011-12-19 Chong Yidong * maintaining.texi (VCS Merging, VCS Changesets): Index entries. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 3a93889f6c7..d3caf4e63df 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -776,10 +776,9 @@ VC Directory Mode Multiple Branches of a File * Switching Branches:: How to get to another existing branch. -* Creating Branches:: How to start a new branch. +* VC Pull:: Updating a branch from another branch. * Merging:: Transferring changes between branches. -* Multi-User Branching:: Multiple users working at multiple branches - in parallel. +* Creating Branches:: How to start a new branch. Remote Repositories diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 96d520e143c..8bf7d74f9b6 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -164,14 +164,14 @@ meta-data, renames, copies, and deletes). @cindex GNU Arch @cindex Arch @item -GNU Arch is one of the earliest @dfn{distributed} version control +GNU Arch is one of the earliest @dfn{decentralized} version control systems (the other being Monotone). @xref{VCS Concepts}, for a -description of distributed version control systems. It is no longer +description of decentralized version control systems. It is no longer under active development, and has been deprecated in favor of Bazaar. @cindex git @item -Git is a distributed version control system originally invented by +Git is a decentralized version control system originally invented by Linus Torvalds to support development of Linux (his kernel). VC supports many common Git operations, but others, such as repository syncing, must be done from the command line. @@ -179,15 +179,15 @@ syncing, must be done from the command line. @cindex hg @cindex Mercurial @item -Mercurial (hg) is a distributed version control system broadly +Mercurial (hg) is a decentralized version control system broadly resembling Git. VC supports most Mercurial commands, with the exception of repository sync operations. @cindex bzr @cindex Bazaar @item -Bazaar (bzr) is a distributed version control system that supports -both repository-based and distributed versioning. VC supports most +Bazaar (bzr) is a decentralized version control system that supports +both repository-based and decentralized versioning. VC supports most basic editing operations under Bazaar. @end itemize @@ -211,6 +211,9 @@ would an ordinary file. After you are done with a set of changes, you may @dfn{commit} (or @dfn{check in}) the changes; this records the changes in the repository, along with a descriptive log entry. +@cindex working tree + A directory tree of work files is called a @dfn{working tree}. + @cindex revision @cindex revision ID Each commit creates a new @dfn{revision} in the repository. The @@ -263,7 +266,7 @@ number and severity of conflicts that actually occur. SCCS always uses locking. RCS is lock-based by default but can be told to operate in a merging style. CVS and Subversion are merge-based by default but can be told to operate in a locking mode. -Distributed version control systems, such as GNU Arch, Git, and +Decentralized version control systems, such as GNU Arch, Git, and Mercurial, are exclusively merging-based. VC mode supports both locking and merging version control. The @@ -295,18 +298,20 @@ all of it. @cindex centralized version control @cindex decentralized version control +@cindex distributed version control Early version control systems were designed around a @dfn{centralized} model in which each project has only one repository used by all developers. SCCS, RCS, CVS, and Subversion share this kind of model. One of its drawbacks is that the repository is a choke point for reliability and efficiency. - GNU Arch pioneered the concept of @dfn{decentralized} version -control, later implemented in Git, Mercurial, and Bazaar. A project -may have several different repositories, and these systems support a -sort of super-merge between repositories that tries to reconcile their -change histories. In effect, there is one repository for each -developer, and repository merges take the place of commit operations. + GNU Arch pioneered the concept of @dfn{distributed} or +@dfn{decentralized} version control, later implemented in Git, +Mercurial, and Bazaar. A project may have several different +repositories, and these systems support a sort of super-merge between +repositories that tries to reconcile their change histories. In +effect, there is one repository for each developer, and repository +merges take the place of commit operations. VC helps you manage the traffic between your personal workfiles and a repository. Whether the repository is a single master, or one of a @@ -411,14 +416,13 @@ VC fileset is simply that one file. When you type them in a VC Directory buffer, and some files in it are marked, the VC fileset consists of the marked files (@pxref{VC Directory Mode}). - On Subversion and on decentralized version control systems, -multi-file VC filesets are handled as a single group by the relevant -version control commands. For example, committing a multi-file VC -fileset generates a single revision, consisting of all the changes to -those files. But on older version control systems which lack support -for group operations, such as CVS, the files in a multi-file VC -fileset are passed individually to version control commands (e.g.@: a -commit generates one revision for each changed file). + On modern changeset-based version control systems (@pxref{VCS +Changesets}), VC commands handle multi-file VC filesets as a group. +For example, committing a multi-file VC fileset generates a single +revision, containing the changes to all those files. On older +file-based version control systems like CVS, each file in a multi-file +VC fileset is handled individually; for example, a commit generates +one revision for each changed file. @table @kbd @itemx C-x v v @@ -428,7 +432,7 @@ VC fileset. @findex vc-next-action @kindex C-x v v - The principal VC command is an all-purpose command, @kbd{C-x v v} + The principal VC command is a multi-purpose command, @kbd{C-x v v} (@code{vc-next-action}), which performs the ``most appropriate'' action on the current VC fileset: either registering it with a version control system, or committing it, or unlocking it, or merging changes @@ -599,13 +603,13 @@ variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode, Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook} (@pxref{Hooks}). - While in the @samp{*vc-log*} buffer, you can write one or more -@dfn{header lines}, specifying additional information to be supplied -to the version control system. Each header line must occupy a single -line at the top of the buffer; the first line that is not a header -line is treated as the start of the log entry. For example, the -following header line states that the present change was not written -by you, but by another developer: + In the @samp{*vc-log*} buffer, you can write one or more @dfn{header +lines}, specifying additional information to be supplied to the +version control system. Each header line must occupy a single line at +the top of the buffer; the first line that is not a header line is +treated as the start of the log entry. For example, the following +header line states that the present change was not written by you, but +by another developer: @smallexample Author: J. R. Hacker @@ -617,32 +621,25 @@ Apart from the @samp{Author} header, Emacs recognizes the headers reference to a bug fixed by the change). Not all version control systems recognize all headers: Bazaar recognizes all three headers, while Git, Mercurial, and Monotone recognize only @samp{Author} and -@samp{Date}. If you specify a header for a version control that does -not support it, the header is treated as part of the log entry. +@samp{Date}. If you specify a header for a system that does not +support it, the header is treated as part of the log entry. @kindex C-c C-f @r{(Log Edit mode)} @findex log-edit-show-files - Type @kbd{C-c C-f} (@code{log-edit-show-files}) in the -@samp{*vc-log*} buffer to view a list of files for the VC fileset that -is to be committed. If you called @kbd{C-x v v} directly from a work -file, the fileset consists of that single file. If you called -@kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory Mode}), -the fileset may consist of multiple files; in that case, @kbd{C-c C-c} -will commit those files together, as a single revision, if that is -supported by the version control system (on older version control -systems, such as CVS, each file in a multi-file VC fileset is -committed as an individual revision). - @kindex C-c C-d @r{(Log Edit mode)} @findex log-edit-show-diff - Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff} -of the changes between the current VC fileset and the repository -revision from which you started editing. @xref{Old Revisions}. + While in the @samp{*vc-log*} buffer, the ``current VC fileset'' is +considered to be the fileset that will be committed if you type +@w{@kbd{C-c C-c}}. To view a list of the files in the VC fileset, +type @w{@kbd{C-c C-f}} (@code{log-edit-show-files}). To view a diff +of changes between the VC fileset and the version from which you +started editing (@pxref{Old Revisions}), type @kbd{C-c C-d} +(@code{log-edit-show-diff}). @kindex C-c C-a @r{(Log Edit mode)} @findex log-edit-insert-changelog - If the VC fileset that is to be committed includes one or more -@file{ChangeLog} files (@pxref{Change Log}), type @kbd{C-c C-a} + If the VC fileset includes one or more @file{ChangeLog} files +(@pxref{Change Log}), type @kbd{C-c C-a} (@code{log-edit-insert-changelog}) to pull the relevant entries into the @samp{*vc-log*} buffer. If the topmost item in each @file{ChangeLog} was made under your user name on the current date, @@ -650,7 +647,7 @@ this command searches that item for entries matching the file(s) to be committed, and inserts them. @ifnottex @xref{Change Logs and VC}, for the opposite way of -working---generating ChangeLog entries from the revision control log. +working---generating ChangeLog entries from the Log Edit buffer. @end ifnottex To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that @@ -710,9 +707,8 @@ i} or @kbd{C-x v v} adds it to the ``working tree'' but not to the repository. Such files are labeled as @samp{added} in the VC Directory buffer, and show a revision ID of @samp{@@@@} in the mode line. To make the registration take effect in the repository, you -must perform a commit (@pxref{Basic VC Editing}). Note that on -changeset-based version control systems, commits can consist of both -file additions and modifications. +must perform a commit (@pxref{Basic VC Editing}). Note that a single +commit can include both file additions and edits to existing files. On a locking-based version control system (@pxref{VCS Merging}), registering a file leaves it unlocked and read-only. Type @kbd{C-x v @@ -730,14 +726,14 @@ call this command from a Dired buffer (@pxref{Dired}). @ifnottex @item M-x vc-ediff -Like @kbd{C-x v =}, but using an Ediff session. @xref{Top, Ediff, -ediff, The Ediff Manual}. +Like @kbd{C-x v =}, but using Ediff. @xref{Top, Ediff, ediff, The +Ediff Manual}. @end ifnottex @item C-x v D -Compare all work files in the current version controlled directory -tree to the tree you started from (@code{vc-root-diff}). With a -prefix argument, prompt for two revisions and compare their trees. +Compare the entire working tree to the revision you started from +(@code{vc-root-diff}). With a prefix argument, prompt for two +revisions and compare their trees. @item C-x v ~ Prompt for a revision of the current file, and visit it in a separate @@ -788,12 +784,10 @@ Ediff session. @xref{Top, Ediff, ediff, The Ediff Manual}. @findex vc-root-diff @kindex C-x v D @kbd{C-x v D} (@code{vc-root-diff}) is similar to @kbd{C-x v =}, but -it displays a comparison between the entire current version controlled -tree (i.e.@: the tree controlled by the version control system -associated with the current VC fileset, which may include files that -are not part of that fileset) and the tree you started with. If you -invoke this command from a Dired buffer, it applies to the entire -version controlled tree containing the directory. +it displays the changes in the entire current working tree (i.e.@: the +working tree containing the current VC fileset). If you invoke this +command from a Dired buffer, it applies to the working tree containing +the directory. @vindex vc-diff-switches You can customize the @command{diff} options that @kbd{C-x v =} and @@ -801,14 +795,14 @@ version controlled tree containing the directory. from the first non-@code{nil} value amongst the variables @code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, and @code{diff-switches} (@pxref{Comparing Files}), in that order. Here, -@var{backend} stands for the current version control system, +@var{backend} stands for the relevant version control system, e.g.@: @code{bzr} for Bazaar. Since @code{nil} means to check the next variable in the sequence, either of the first two may use the value @code{t} to mean no switches at all. Most of the @code{vc-@var{backend}-diff-switches} variables default to @code{nil}, -but some default to @code{t}; these are for version control systems, -such as Subversion, whose @code{diff} implementations do not accept -common diff options. +but some default to @code{t}; these are for version control systems +whose @code{diff} implementations do not accept common diff options, +such as Subversion. @findex vc-revision-other-window @kindex C-x v ~ @@ -937,7 +931,7 @@ showing only the first line of each log entry. However, you can type @samp{*vc-change-log*} buffer to reveal the entire log entry for the revision at point. A second @key{RET} hides it again. - On a distributed version control system, the @kbd{C-x v I} + On a decentralized version control system, the @kbd{C-x v I} (@code{vc-log-incoming}) command displays a log buffer showing the changes that will be applied, the next time you run the version control system's ``pull'' command to get new revisions from another @@ -1144,9 +1138,8 @@ are working offline or the network is slow. @vindex vc-directory-exclusion-list The VC Directory buffer omits subdirectories listed in the variable -@code{vc-directory-exclusion-list}. The default value of this -variable contains directories that are used internally by version -control systems. +@code{vc-directory-exclusion-list}. Its default value contains +directories that are used internally by version control systems. @node VC Directory Commands @subsubsection VC Directory Commands @@ -1268,221 +1261,174 @@ Git and Bazaar allow you to manipulate @dfn{stashes} and @dfn{shelves} bring them back at a later time). @node Branches -@subsection Multiple Branches of a File +@subsection Version Control Branches @cindex branch (version control) -@cindex trunk (version control) - - One use of version control is to maintain multiple ``current'' -revisions of a file. For example, you might have different revisions of a -program in which you are gradually adding various unfinished new -features. Each such independent line of development is called a -@dfn{branch}. VC allows you to create branches, switch between -different branches, and merge changes from one branch to another. -Please note, however, that branches are not supported for SCCS. - - A file's main line of development is usually called the @dfn{trunk}. -You can create multiple branches from the trunk. How the difference -between trunk and branch is made visible is dependent on whether the -VCS uses dot-pair or monotonic version IDs. - - In VCSes with dot-pair revision IDs, the revisions on the trunk are -normally IDed 1.1, 1.2, 1.3, etc. At any such revision, you can -start an independent branch. A branch starting at revision 1.2 would -have revision ID 1.2.1.1, and consecutive revisions on this branch -would have IDs 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on. If there is -a second branch also starting at revision 1.2, it would consist of -revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. - - In VCSes with monotonic revision IDs, trunk revisions are IDed as -1, 2, 3, etc. A branch from (say) revision 2 might start with 2.1 and -continue through 2.2, 2.3, etc. But naming conventions for branches -and subbranches vary widely on these systems, and some (like -Mercurial) never depart from the monotonic integer sequence at all. -Consult the documentation of the VCS you are using. - -@cindex head revision - If you omit the final component of a dot-pair revision ID, that is called a -@dfn{branch ID}. It refers to the highest existing revision on that -branch---the @dfn{head revision} of that branch. The branches in the -dot-pair example above have branch IDs 1.2.1 and 1.2.2. + + One use of version control is to support multiple independent lines +of development, which are called @dfn{branches}. Branches are used +for maintaining separate ``stable'' and ``development'' versions of a +program, and for developing unrelated features in isolation from one +another. + + VC's support for branch operations is currently fairly limited. For +decentralized version control systems, it provides commands for +@dfn{updating} one branch with the contents of another, and for +@dfn{merging} the changes made to two different branches +(@pxref{Merging}). For centralized version control systems, it +supports checking out different branches and committing into new or +different branches. @menu * Switching Branches:: How to get to another existing branch. -* Creating Branches:: How to start a new branch. +* VC Pull:: Updating the contents of a branch. * Merging:: Transferring changes between branches. -* Multi-User Branching:: Multiple users working at multiple branches - in parallel. +* Creating Branches:: How to start a new branch. @end menu @node Switching Branches @subsubsection Switching between Branches - To switch between branches, type @kbd{C-u C-x v v} and specify the -revision ID you want to select. On a locking-based system, this -version is then visited @emph{unlocked} (write-protected), so you can -examine it before locking it. Switching branches in this way is allowed -only when the file is not locked. + The various version control systems differ in how branches are +implemented, and these differences cannot be entirely concealed by VC. + + On some decentralized version control systems, including Bazaar and +Mercurial in its normal mode of operation, each branch has its own +working directory tree, so switching between branches just involves +switching directories. On Git, switching between branches is done +using the @command{git branch} command, which changes the contents of +the working tree itself. + + On centralized version control systems, you can switch between +branches by typing @kbd{C-u C-x v v} in an up-to-date work file +(@pxref{Advanced C-x v v}), and entering the revision ID for a +revision on another branch. On CVS, for instance, revisions on the +@dfn{trunk} (the main line of development) normally have IDs of the +form 1.1, 1.2, 1.3, @dots{}, while the first branch created from (say) +revision 1.2 has revision IDs 1.2.1.1, 1.2.1.2, @dots{}, the second +branch created from revision 1.2 has revision IDs 1.2.2.1, 1.2.2.2, +@dots{}, and so forth. You can also specify the @dfn{branch ID}, +which is a branch revision ID omitting its final component +(e.g.@: 1.2.1), to switch to the latest revision on that branch. + + On a locking-based system, switching to a different branch also +unlocks (write-protects) the working tree. + + Once you have switched to a branch, VC commands will apply to that +branch until you switch away; for instance, any VC filesets that you +commit will be committed to that specific branch. + +@node VC Pull +@subsubsection Pulling Changes into a Branch - On a VCS with dot-pair IDs, you can omit the minor part, thus giving -only the branch ID; this takes you to the head version on the -chosen branch. If you only type @key{RET}, Emacs goes to the highest -version on the trunk. - - After you have switched to any branch (including the main branch), you -stay on it for subsequent VC commands, until you explicitly select some -other branch. - -@node Creating Branches -@subsubsection Creating New Branches +@table @kbd +@itemx C-x v + +On a decentralized version control system, update the current branch +by ``pulling in'' changes from another location. - To create a new branch from a head revision (one that is the latest -in the branch that contains it), first select that revision if -necessary, lock it with @kbd{C-x v v}, and make whatever changes you -want. Then, when you commit the changes, use @kbd{C-u C-x v v}. This -lets you specify the revision ID for the new revision. You should -specify a suitable branch ID for a branch starting at the current -revision. For example, if the current revision is 2.5, the branch ID -should be 2.5.1, 2.5.2, and so on, depending on the number of existing -branches at that point. - - To create a new branch at an older revision (one that is no longer the -head of a branch), first select that revision (@pxref{Switching -Branches}). Your procedure will then differ depending on whether you -are using a locking or merging-based VCS. +On a centralized version control system, update the current VC +fileset. +@end table - On a locking VCS, you will need to lock the old revision branch with -@kbd{C-x v v}. You'll be asked to confirm, when you lock the old -revision, that you really mean to create a new branch---if you say no, -you'll be offered a chance to lock the latest revision instead. On -a merging-based VCS you will skip this step. +@kindex C-x v + +@findex vc-pull + On a decentralized version control system, the command @kbd{C-x v +} +(@code{vc-pull}) updates the current branch and working tree. It is +typically used to update a copy of a remote branch. If you supply a +prefix argument, the command prompts for the exact version control +command to use, which lets you specify where to pull changes from. +Otherwise, it pulls from a default location determined by the version +control system. - Then make your changes and type @kbd{C-x v v} again to commit a new -revision. This automatically creates a new branch starting from the -selected revision. You need not specially request a new branch, -because that's the only way to add a new revision at a point that is -not the head of a branch. + Amongst decentralized version control systems, @kbd{C-x v +} +currently supports only Bazaar, Git, and Mercurial. On Bazaar, it +calls @command{bzr pull} for ordinary branches (to pull from a master +branch into a mirroring branch), and @command{bzr update} for a bound +branch (to pull from a central repository). On Git, it calls +@command{git pull} to fetch changes from a remote repository and merge +it into the current branch. On Mercurial, it calls @command{hg pull +-u} to fetch changesets from the default remote repository and update +the working directory. - After the branch is created, you ``stay'' on it. That means that -subsequent commits create new revisions on that branch. To leave the -branch, you must explicitly select a different revision with @kbd{C-u C-x -v v}. To transfer changes from one branch to another, use the merge -command, described in the next section. + On a centralized version control system like CVS, @kbd{C-x v +} +updates the current VC fileset from the repository. @node Merging @subsubsection Merging Branches - @cindex merging changes - When you have finished the changes on a certain branch, you will -often want to incorporate them into the file's main line of development -(the trunk). This is not a trivial operation, because development might -also have proceeded on the trunk, so that you must @dfn{merge} the -changes into a file that has already been changed otherwise. VC allows -you to do this (and other things) with the @code{vc-merge} command. @table @kbd -@item C-x v m (vc-merge) -Merge changes into the work file. +@itemx C-x v m +On a decentralized version control system, merge changes from another +branch into the current one. + +On a centralized version control system, merge changes from another +branch into the current VC fileset. @end table -@kindex C-x v m -@findex vc-merge - @kbd{C-x v m} (@code{vc-merge}) takes a set of changes and merges it -into the current version of the work file. It firsts asks you in the -minibuffer where the changes should come from. If you just type -@key{RET}, Emacs merges any changes that were made on the same branch -since you checked the file out (we call this @dfn{merging the news}). -This is the common way to pick up recent changes from the repository, -regardless of whether you have already changed the file yourself. - - You can also enter a branch ID or a pair of revision IDs in -the minibuffer. Then @kbd{C-x v m} finds the changes from that -branch, or the differences between the two revisions you specified, and -merges them into the current revision of the current file. - - As an example, suppose that you have finished a certain feature on -branch 1.3.1. In the meantime, development on the trunk has proceeded -to revision 1.5. To merge the changes from the branch to the trunk, -first go to the head revision of the trunk, by typing @kbd{C-u C-x v v -@key{RET}}. Revision 1.5 is now current. If locking is used for the file, -type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next, -type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on -branch 1.3.1 (relative to revision 1.3, where the branch started, up to -the last revision on the branch) and merges it into the current revision -of the work file. You can now commit the changed file, thus creating -revision 1.6 containing the changes from the branch. - - It is possible to do further editing after merging the branch, before -the next commit. But it is usually wiser to commit the merged -revision, then lock it and make the further changes. This will keep -a better record of the history of changes. + While developing a branch, you may sometimes need to @dfn{merge} in +changes that have already been made in another branch. This is not a +trivial operation, as overlapping changes may have been made to the +two branches. + + On a decentralized version control system, merging is done with the +command @kbd{C-x v m} (@code{vc-merge}). On Bazaar, this prompts for +the exact arguments to pass to @command{bzr merge}, offering a +sensible default if possible. On Git, this prompts for the name of a +branch to merge from, with completion (based on the branch names known +to the current repository). The output from running the merge command +is shown in a separate buffer. + + On a centralized version control system like CVS, @kbd{C-x v m} +prompts for a branch ID, or a pair of revision IDs (@pxref{Switching +Branches}); then it finds the changes from that branch, or the changes +between the two revisions you specified, and merges those changes into +the current VC fileset. If you just type @key{RET}, Emacs simply +merges any changes that were made on the same branch since you checked +the file out. @cindex conflicts @cindex resolving conflicts - When you merge changes into a file that has itself been modified, the -changes might overlap. We call this situation a @dfn{conflict}, and -reconciling the conflicting changes is called @dfn{resolving a -conflict}. - - Whenever conflicts occur during merging, VC detects them, tells you -about them in the echo area, and asks whether you want help in merging. -If you say yes, it starts an Ediff session (@pxref{Top, -Ediff, Ediff, ediff, The Ediff Manual}). - - If you say no, the conflicting changes are both inserted into the -file, surrounded by @dfn{conflict markers}. The example below shows how -a conflict region looks; the file is called @samp{name} and the current -master file revision with user B's changes in it is 1.11. - -@c @w here is so CVS won't think this is a conflict. -@smallexample -@group -@w{<}<<<<<< name - @var{User A's version} -======= - @var{User B's version} -@w{>}>>>>>> 1.11 -@end group -@end smallexample + Immediately after performing a merge, only the working tree is +modified, and you can review the changes produced by the merge with +@kbd{C-x v D} and related commands (@pxref{Old Revisions}). If the +two branches contained overlapping changes, merging produces a +@dfn{conflict}; a warning appears in the output of the merge command, +and @dfn{conflict markers} are inserted into each affected work file, +surrounding the two sets of conflicting changes. You must then +resolve the conflict by editing the conflicted files. Once you are +done, the modified files must be committed in the usual way for the +merge to take effect (@pxref{Basic VC Editing}). -@findex vc-resolve-conflicts - Then you can resolve the conflicts by editing the file manually. Or -you can type @code{M-x vc-resolve-conflicts} after visiting the file. -This starts an Ediff session, as described above. Don't forget to -commit the merged version afterwards. - -@findex vc-find-conflicted-file - If there is more than one conflicted file in a merge, type @kbd{M-x -vc-find-conflicted-file} after resolving the conflicts in each file. -This command visits the next conflicted file, and moves point to the -first conflict marker in that file. - -@node Multi-User Branching -@subsubsection Multi-User Branching - - It is often useful for multiple developers to work simultaneously on -different branches of a file. CVS and later systems allow this by -default; for RCS, it is possible if you create multiple source -directories. Each source directory should have a link named -@file{RCS} which points to a common directory of RCS master files. -Then each source directory can have its own choice of selected -revisions, but all share the same common RCS records. - - This technique works reliably and automatically, provided that the -source files contain RCS version headers -@iftex -(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}). -@end iftex -@ifnottex -(@pxref{Version Headers}). -@end ifnottex -The headers enable Emacs to be sure, at all times, which revision -ID is present in the work file. - - If the files do not have version headers, you must instead tell Emacs -explicitly in each session which branch you are working on. To do this, -first find the file, then type @kbd{C-u C-x v v} and specify the correct -branch ID. This ensures that Emacs knows which branch it is using -during this particular editing session. +@node Creating Branches +@subsubsection Creating New Branches + + On centralized version control systems like CVS, Emacs supports +creating new branches as part of a commit operation. When committing +a modified VC fileset, type @kbd{C-u C-x v v} (@code{vc-next-action} +with a prefix argument; @pxref{Advanced C-x v v}). Then Emacs prompts +for a revision ID for the new revision. You should specify a suitable +branch ID for a branch starting at the current revision. For example, +if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2, +and so on, depending on the number of existing branches at that point. + + To create a new branch at an older revision (one that is no longer +the head of a branch), first select that revision (@pxref{Switching +Branches}). Your procedure will then differ depending on whether you +are using a locking or merging-based VCS. + + On a locking VCS, you will need to lock the old revision branch with +@kbd{C-x v v}. You'll be asked to confirm, when you lock the old +revision, that you really mean to create a new branch---if you say no, +you'll be offered a chance to lock the latest revision instead. On a +merging-based VCS you will skip this step. + + Then make your changes and type @kbd{C-x v v} again to commit a new +revision. This creates a new branch starting from the selected +revision. + + After the branch is created, subsequent commits create new revisions +on that branch. To leave the branch, you must explicitly select a +different revision with @kbd{C-u C-x v v}. @ifnottex @include vc1-xtra.texi diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 05e89e69f0e..c4a4b351cac 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -495,14 +495,7 @@ a mechanism, except GNU Arch. VC does not normally use the information contained in these headers. The exception is RCS---with RCS, version headers are sometimes more reliable than the master file to determine which version of the file -you are editing. Note that in a multi-branch environment, version -headers are necessary to make VC behave correctly -@iftex -(@pxref{Multi-User Branching,,,emacs, the Emacs Manual}). -@end iftex -@ifnottex -(@pxref{Multi-User Branching}). -@end ifnottex +you are editing. Searching for RCS version headers is controlled by the variable @code{vc-consult-headers}. If it is non-@code{nil} (the default), diff --git a/etc/NEWS b/etc/NEWS index 65a3b41f5bf..95d47de5bba 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -833,19 +833,21 @@ controlling the degree of parallelism. ** VC and related modes ++++ *** Support for pulling on distributed version control systems. -The vc-pull command runs a "pull" operation, if it is supported. -This updates the current branch from upstream. A prefix argument -means to prompt the user for specifics, e.g. a pull location. +`C-x v +' (`vc-pull') runs a "pull" operation, if it is supported, to +update the current branch and working tree. A prefix argument means +to prompt the user for specifics, e.g. a pull location. **** `vc-update' is now an alias for `vc-pull'. **** Currently supported by Bzr, Git, and Mercurial. ++++ *** Support for merging on distributed version control systems. -The vc-merge command now runs a "merge" operation, if it is supported. -This merges another branch into the current one. This command prompts -the user for specifics, e.g. a merge source. +The vc-merge command now runs a "merge" operation, if it is supported, +to merge changes from another branch into the current one. It prompts +for specifics, e.g. a merge source. **** Currently supported for Bzr, Git, and Mercurial. -- cgit v1.2.1 From d45ba96b43300ffc391b5c8f4effe41472d31f6b Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 20 Dec 2011 08:45:20 +0100 Subject: Restore Emacs 23 handling of display-buffer's BUFFER-OR-NAME argument. * window.el (window-normalize-buffer-to-display): Remove. (display-buffer): Handle buffer-or-name argument as in Emacs 23. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 19 ++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e583f2bbc6..01c03c2baf6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-20 Martin Rudalics + + * window.el (window-normalize-buffer-to-display): Remove. + (display-buffer): Handle buffer-or-name argument as in Emacs 23. + 2011-12-19 Chong Yidong * vc/vc-dir.el (vc-dir-parent-marked-p, vc-dir-children-marked-p): diff --git a/lisp/window.el b/lisp/window.el index 8fbc8b8ace4..16a38ca03c6 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4526,19 +4526,6 @@ Return WINDOW." The actual non-nil value of this variable will be copied to the `window-dedicated-p' flag.") -(defun window-normalize-buffer-to-display (buffer-or-name) - "Normalize BUFFER-OR-NAME argument for buffer display functions. -If BUFFER-OR-NAME is nil, return the current buffer. Else, if a -buffer specified by BUFFER-OR-NAME exists, return that buffer. -If no such buffer exists, create a buffer with the name -BUFFER-OR-NAME and return that buffer." - (if buffer-or-name - (or (get-buffer buffer-or-name) - (let ((buffer (get-buffer-create buffer-or-name))) - (set-buffer-major-mode buffer) - buffer)) - (current-buffer))) - (defconst display-buffer--action-function-custom-type '(choice :tag "Function" (const :tag "--" ignore) ; default for insertion @@ -4640,7 +4627,7 @@ specified, e.g. by the user options `display-buffer-alist' or "A `display-buffer' action for displaying in another frame.") (put 'display-buffer--other-frame-action 'risky-local-variable t) -(defun display-buffer (&optional buffer-or-name action frame) +(defun display-buffer (buffer-or-name &optional action frame) "Display BUFFER-OR-NAME in some window, without selecting it. BUFFER-OR-NAME must be a buffer or the name of an existing buffer. Return the window chosen for displaying BUFFER-OR-NAME, @@ -4688,7 +4675,9 @@ search for a window that is already displaying the buffer. See `display-buffer-reuse-window'." (interactive (list (read-buffer "Display buffer: " (other-buffer)) (if current-prefix-arg t))) - (let ((buffer (window-normalize-buffer-to-display buffer-or-name)) + (let ((buffer (if (bufferp buffer-or-name) + buffer-or-name + (get-buffer buffer-or-name))) ;; Handle the old form of the first argument. (inhibit-same-window (and action (not (listp action))))) (unless (listp action) (setq action nil)) -- cgit v1.2.1 From 47d42d81afa02760899d55c7d7ae847492928648 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 20 Dec 2011 16:00:47 +0000 Subject: Update programs.texi and cc-mode.texi for new CC Mode features: cc-mode.texi: Update version string to 5.32. programs.texi: Describe "guessing" of indentation style. Update C-M-a/e. --- doc/emacs/ChangeLog | 6 ++++++ doc/emacs/programs.texi | 25 ++++++++++++++++--------- doc/misc/ChangeLog | 4 ++++ doc/misc/cc-mode.texi | 4 ++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3475dda704a..22f9a4ae7cc 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2011-12-20 Alan Mackenzie + + * programs.texi (Motion in C): Update the description of C-M-a and + C-M-e, they now DTRT in enclosing scopes. + (Custom C Indent): Add @dfn{guessing} of the indentation style. + 2011-12-20 Chong Yidong * maintaining.texi (VCS Concepts): Add "working tree" terminology. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index bb62ad67b2a..892c574734b 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -38,8 +38,8 @@ Highlight program syntax (@pxref{Font Lock}). * Glasses:: Making identifiersLikeThis more readable. * Semantic:: Suite of editing tools based on source code parsing. * Misc for Programs:: Other Emacs features useful for editing programs. -* C Modes:: Special commands of C, C++, Objective-C, - Java, and Pike modes. +* C Modes:: Special commands of C, C++, Objective-C, Java, + IDL, Pike and AWK modes. * Asm Mode:: Asm mode and its special features. @ifnottex * Fortran:: Fortran mode and its special features. @@ -606,6 +606,13 @@ information on customizing indentation for C and related modes, including how to override parts of an existing style and how to define your own styles. + As an alternative to specifying a style, you can get Emacs to +@dfn{guess} the style by scanning a code buffer which is already +formatted. To do this, call @kbd{M-x c-guess} in your sample buffer. +You can then apply this guessed style to other buffers with @kbd{M-x +c-guess-install}. @xref{Guessing the Style,,, ccmode, the CC Mode +Manual}, for more details about this mechanism. + @node Parentheses @section Commands for Editing with Parentheses @@ -1462,17 +1469,17 @@ with Emacs. related modes. @table @code -@item M-x c-beginning-of-defun -@itemx M-x c-end-of-defun +@item C-M-a +@itemx C-M-e @findex c-beginning-of-defun @findex c-end-of-defun Move point to the beginning or end of the current function or -top-level definition. These are found by searching for the least +top-level definition. In languages with enclosing scopes (such as +C++'s classes) the @dfn{current function} is the immediate one, +possibly inside a scope. Otherwise it is the one defined by the least enclosing braces. (By contrast, @code{beginning-of-defun} and -@code{end-of-defun} search for braces in column zero.) If you are -editing code where the opening brace of a function isn't placed in -column zero, you may wish to bind @code{C-M-a} and @code{C-M-e} to -these commands. @xref{Moving by Defuns}. +@code{end-of-defun} search for braces in column zero.) @xref{Moving +by Defuns}. @item C-c C-u @kindex C-c C-u @r{(C mode)} diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 5d8e05806e0..dcf816e7fd3 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-12-20 Alan Mackenzie + + * cc-mode.texi: Update version string 5.31 -> 5.32. + 2011-12-06 Juanma Barranquero * gnus-faq.texi (FAQ 2-1, FAQ 3-8, FAQ 4-14, FAQ 9-1): Fix typos. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index c36e45e60f7..8b589259a48 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -190,7 +190,7 @@ developing GNU and promoting software freedom.'' @titlepage @sp 10 -@center @titlefont{CC Mode 5.31} +@center @titlefont{CC Mode 5.32} @sp 2 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} @sp 2 @@ -378,7 +378,7 @@ was added in version 5.30. This manual describes @ccmode{} @comment The following line must appear on its own, so that the -version 5.31. +version 5.32. @comment Release.py script can update the version number automatically @ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C, -- cgit v1.2.1 From 678f4426c3e42029becee680b99f31d5cd254626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 21 Dec 2011 07:37:49 +0100 Subject: Attribute Aquamacs code to David Reitter. --- src/ChangeLog | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3cdc0111506..673d6fb9d97 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,16 +1,22 @@ 2011-12-18 Jan Djärv + * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 + and NS_IMPL_COCOA. + (trackingNotification): Surround with ifdef NS_IMPL_COCOA. + (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. + +2011-12-18 David Reitter + * nsterm.m (ns_term_init): Subscribe for notifications NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification to method trackingNotification in EmacsMenu. * nsmenu.m (trackingMenu): New variable. - (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 and - NS_IMPL_COCOA. (trackingNotification): New method (from Aquamacs). (menuNeedsUpdate): Expand comment and return if trackingMenu is 0, from Aquamacs (Bug#7030). - (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. + +2011-12-18 Jan Djärv * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. (symbol_to_nsstring): Fix indentation. -- cgit v1.2.1 From bc86f573eecb9067dfb73c612309a909332bb15d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 21 Dec 2011 15:46:49 +0800 Subject: * vc-bzr.el (vc-bzr-rename-file): Don't pass ~ to Bzr in filename arg. --- lisp/ChangeLog | 5 +++++ lisp/vc/vc-bzr.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 01c03c2baf6..27e8bcd0add 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-21 Chong Yidong + + * vc/vc-bzr.el (vc-bzr-rename-file): Don't pass ~ to Bzr in + filename argument. + 2011-12-20 Martin Rudalics * window.el (window-normalize-buffer-to-display): Remove. diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index c5c0ce73b3a..508420f026a 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -764,7 +764,10 @@ REV non-nil gets an error." (defun vc-bzr-rename-file (old new) "Rename file from OLD to NEW using `bzr mv'." - (vc-bzr-command "mv" nil 0 new old)) + (setq old (expand-file-name old)) + (setq new (expand-file-name new)) + (vc-bzr-command "mv" nil 0 new old) + (message "Renamed %s => %s" old new)) (defvar vc-bzr-annotation-table nil "Internal use.") -- cgit v1.2.1 From 204ee57fa0bb286ba4c6f540cefb44ed011a921f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 21 Dec 2011 09:04:19 +0100 Subject: Fix biggest memory leaks in NS-port. More remain. * emacs.c (ns_pool): New variable. (main): Assign ns_pool. (Fkill_emacs): Call ns_release_autorelease_pool. * nsfns.m (x_set_background_color): Assign return value from ns_index_color to face-background instead of NSColor*. (ns_implicitly_set_icon_type): Fix indentation. Change assignment in for loop to comparison. * nsfont.m (ns_spec_to_descriptor): Fix indentation, autorelease fdesc, release fdAttrs and tdict. (ns_get_covering_families): Release charset. (ns_findfonts): Release NSFontDescriptor created with new. (ns_uni_to_glyphs): Fix indentation. (setString): Release attrStr before assigning new value. * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree before returning. * nsterm.m (x_free_frame_resources): Release f->output_data.ns->miniimage (ns_index_color): Fix indentation. Do not retain color_table->colors[i]. --- src/ChangeLog | 26 ++++++++++++++++++++++++++ src/emacs.c | 12 +++++++++++- src/nsfns.m | 9 ++++----- src/nsfont.m | 29 ++++++++++++++++++++--------- src/nsmenu.m | 2 ++ src/nsterm.m | 27 +++++++++++---------------- 6 files changed, 74 insertions(+), 31 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 673d6fb9d97..e40a7f3fbe0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2011-12-21 Jan Djärv + + * nsterm.m (x_free_frame_resources): Release + f->output_data.ns->miniimage + (ns_index_color): Fix indentation. Do not retain + color_table->colors[i]. + + * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree + before returning. + + * nsfns.m (x_set_background_color): Assign return value from + ns_index_color to face-background instead of NSColor*. + (ns_implicitly_set_icon_type): Fix indentation. + Change assignment in for loop to comparison. + + * emacs.c (ns_pool): New variable. + (main): Assign ns_pool. + (Fkill_emacs): Call ns_release_autorelease_pool. + + * nsfont.m (ns_spec_to_descriptor): Fix indentation, + autorelease fdesc, release fdAttrs and tdict. + (ns_get_covering_families): Release charset. + (ns_findfonts): Release NSFontDescriptor created with new. + (ns_uni_to_glyphs): Fix indentation. + (setString): Release attrStr before assigning new value. + 2011-12-18 Jan Djärv * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5 diff --git a/src/emacs.c b/src/emacs.c index 12a48b26553..f4fa0eb0b9e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -321,6 +321,12 @@ static void (*fatal_error_signal_hook) (void); pthread_t main_thread; #endif +#ifdef HAVE_NS +/* NS autrelease pool, for memory management. */ +static void *ns_pool; +#endif + + /* Handle bus errors, invalid instruction, etc. */ #ifndef FLOAT_CATCH_SIGILL @@ -1318,7 +1324,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args); #ifdef HAVE_NS - ns_alloc_autorelease_pool (); + ns_pool = ns_alloc_autorelease_pool (); if (!noninteractive) { #ifdef NS_IMPL_COCOA @@ -2015,6 +2021,10 @@ all of which are called before Emacs is actually killed. */) shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); +#ifdef HAVE_NS + ns_release_autorelease_pool (ns_pool); +#endif + /* If we have an auto-save list file, kill it because we are exiting Emacs deliberately (not crashing). Do it after shut_down_emacs, which does an auto-save. */ diff --git a/src/nsfns.m b/src/nsfns.m index 9dade071e85..e41b77e242a 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -394,9 +394,8 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (face) { col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f); - face->background - = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain]; - [col release]; + face->background = ns_index_color + ([col colorWithAlphaComponent: alpha], f); update_face_from_frame_parameter (f, Qbackground_color, arg); } @@ -770,7 +769,7 @@ ns_implicitly_set_icon_type (struct frame *f) { Lisp_Object tem; EmacsView *view = FRAME_NS_VIEW (f); - id image =nil; + id image = nil; Lisp_Object chain, elt; NSAutoreleasePool *pool; BOOL setMini = YES; @@ -797,7 +796,7 @@ ns_implicitly_set_icon_type (struct frame *f) } for (chain = Vns_icon_type_alist; - (image = nil) && CONSP (chain); + image == nil && CONSP (chain); chain = XCDR (chain)) { elt = XCAR (chain); diff --git a/src/nsfont.m b/src/nsfont.m index 6a053af344d..080af447b0a 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -126,8 +126,8 @@ ns_attribute_fvalue (NSFontDescriptor *fdesc, NSString *trait) /* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, plus family and script/lang to NSFont descriptor. Information under extra only needed for matching. */ #define STYLE_REF 100 -static NSFontDescriptor -*ns_spec_to_descriptor(Lisp_Object font_spec) +static NSFontDescriptor * +ns_spec_to_descriptor (Lisp_Object font_spec) { NSFontDescriptor *fdesc; NSMutableDictionary *fdAttrs = [NSMutableDictionary new]; @@ -152,8 +152,14 @@ static NSFontDescriptor [fdAttrs setObject: tdict forKey: NSFontTraitsAttribute]; fdesc = [NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs]; - if (family != nil) + if (family != nil) + { fdesc = [fdesc fontDescriptorWithFamily: family]; + [fdesc autorelease]; + } + + [fdAttrs release]; + [tdict release]; return fdesc; } @@ -469,6 +475,7 @@ static NSSet if ([families count] > 0 || pct < 0.05) break; } + [charset release]; } #ifdef NS_IMPL_COCOA if ([families count] == 0) @@ -536,12 +543,14 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch) family = [fdesc objectForKey: NSFontFamilyAttribute]; if (family != nil && !foundItal && XINT (Flength (list)) > 0) { - NSFontDescriptor *sDesc = [[[NSFontDescriptor new] - fontDescriptorWithSymbolicTraits: NSFontItalicTrait] - fontDescriptorWithFamily: family]; + NSFontDescriptor *s1 = [NSFontDescriptor new]; + NSFontDescriptor *sDesc + = [[s1 fontDescriptorWithSymbolicTraits: NSFontItalicTrait] + fontDescriptorWithFamily: family]; list = Fcons (ns_descriptor_to_entity (sDesc, AREF (font_spec, FONT_EXTRA_INDEX), "synthItal"), list); + [s1 release]; } /* Return something if was a match and nothing found. */ @@ -1293,7 +1302,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block) abort (); /* create a string containing all Unicode characters in this block */ - for (idx = block<<8, i =0; i<0x100; idx++, i++) + for (idx = block<<8, i = 0; i < 0x100; idx++, i++) if (idx < 0xD800 || idx > 0xDFFF) unichars[i] = idx; else @@ -1309,7 +1318,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block) NSGlyphGenerator *glyphGenerator = [NSGlyphGenerator sharedGlyphGenerator]; /*NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */ unsigned int numGlyphs = [font_info->nsfont numberOfGlyphs]; - NSUInteger gInd =0, cInd =0; + NSUInteger gInd = 0, cInd = 0; [glyphStorage setString: allChars font: font_info->nsfont]; [glyphGenerator generateGlyphsForGlyphStorage: glyphStorage @@ -1317,7 +1326,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block) glyphIndex: &gInd characterIndex: &cInd]; #endif glyphs = font_info->glyphs[block]; - for (i =0; i<0x100; i++, glyphs++) + for (i = 0; i < 0x100; i++, glyphs++) { #ifdef NS_IMPL_GNUSTEP g = unichars[i]; @@ -1425,6 +1434,8 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block) - (void) setString: (NSString *)str font: (NSFont *)font { [dict setObject: font forKey: NSFontAttributeName]; + if (attrStr != nil) + [attrStr release]; attrStr = [[NSAttributedString alloc] initWithString: str attributes: dict]; maxChar = [str length]; maxGlyph = 0; diff --git a/src/nsmenu.m b/src/nsmenu.m index d599cdb6ce5..94c6b6a6198 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -404,6 +404,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) items = FRAME_MENU_BAR_ITEMS (f); if (NILP (items)) { + free_menubar_widget_value_tree (first_wv); [pool release]; UNBLOCK_INPUT; return; @@ -431,6 +432,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) if (i == n) { + free_menubar_widget_value_tree (first_wv); [pool release]; UNBLOCK_INPUT; return; diff --git a/src/nsterm.m b/src/nsterm.m index 055959bf2ac..f8e69f98942 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1158,6 +1158,9 @@ x_free_frame_resources (struct frame *f) xfree (f->output_data.ns); + if (f->output_data.ns->miniimage != nil) + [f->output_data.ns->miniimage release]; + [[view window] close]; [view release]; @@ -1351,7 +1354,7 @@ ns_index_color (NSColor *color, struct frame *f) { struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; ptrdiff_t idx; - NSNumber *index; + ptrdiff_t i; if (!color_table->colors) { @@ -1364,21 +1367,13 @@ ns_index_color (NSColor *color, struct frame *f) } /* do we already have this color ? */ - { - ptrdiff_t i; - for (i = 1; i < color_table->avail; i++) - { - if (color_table->colors[i] && [color_table->colors[i] isEqual: color]) - { - [color_table->colors[i] retain]; - return i; - } - } - } + for (i = 1; i < color_table->avail; i++) + if (color_table->colors[i] && [color_table->colors[i] isEqual: color]) + return i; if ([color_table->empty_indices count] > 0) { - index = [color_table->empty_indices anyObject]; + NSNumber *index = [color_table->empty_indices anyObject]; [color_table->empty_indices removeObject: index]; idx = [index unsignedLongValue]; } @@ -1411,20 +1406,20 @@ ns_free_indexed_color (unsigned long idx, struct frame *f) color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; if (idx <= 0 || idx >= color_table->size) { - message1("ns_free_indexed_color: Color index out of range.\n"); + message1 ("ns_free_indexed_color: Color index out of range.\n"); return; } index = [NSNumber numberWithUnsignedInt: idx]; if ([color_table->empty_indices containsObject: index]) { - message1("ns_free_indexed_color: attempt to free already freed color.\n"); + message1 ("ns_free_indexed_color: attempt to free already freed color.\n"); return; } color = color_table->colors[idx]; [color release]; color_table->colors[idx] = nil; - [color_table->empty_indices addObject: [NSNumber numberWithUnsignedInt: idx]]; + [color_table->empty_indices addObject: index]; /*fprintf(stderr, "color_table: FREED %d\n",idx);*/ } -- cgit v1.2.1 From d3098e1ec618fc043568be481b487f3bf7689bad Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 21 Dec 2011 16:39:32 +0800 Subject: More updates for VC documentation. * files.texi (Misc File Ops): Mention vc-rename-file. * maintaining.texi (Advanced C-x v v): Use fileset terminology. (VC With A Merging VCS, VC Change Log): Add xref to VC Pull node. (VC Pull): Mention vc-log-incoming. (Log Buffer): Add CVS/RCS only disclaimer. * vc1-xtra.texi (Remote Repositories): Update introduction. (Local Version Control): Node deleted (obsolete with DVCSes). (Remote Repositories, Version Backups): Node deleted. Move documentation of vc-cvs-stay-local to CVS Options. (CVS Options): Reduce verbosity of description of obscure CVS locking feature. (Making Revision Tags, Revision Tag Caveats): Merge into Revision Tags node. (Revision Tags): Move under Miscellaneous VC subsection. (Change Logs and VC): Note that this is wrong for DVCSs. De-document log entry manipulating features. (Renaming and VC): Describe how it works on modern VCSes. * programs.texi (Custom C Indent): Add index entries. --- doc/emacs/ChangeLog | 24 ++ doc/emacs/emacs.texi | 12 +- doc/emacs/files.texi | 8 + doc/emacs/maintaining.texi | 76 +++--- doc/emacs/programs.texi | 11 +- doc/emacs/vc1-xtra.texi | 627 +++++++++++++-------------------------------- 6 files changed, 250 insertions(+), 508 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 22f9a4ae7cc..8e2b278f84b 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,27 @@ +2011-12-21 Chong Yidong + + * maintaining.texi (Advanced C-x v v): Use fileset terminology. + (VC With A Merging VCS, VC Change Log): Add xref to VC Pull node. + (VC Pull): Mention vc-log-incoming. + (Log Buffer): Add CVS/RCS only disclaimer. + + * vc1-xtra.texi (Remote Repositories): Update introduction. + (Local Version Control): Node deleted (obsolete with DVCSes). + (Remote Repositories, Version Backups): Node deleted. Move + documentation of vc-cvs-stay-local to CVS Options. + (CVS Options): Reduce verbosity of description of obscure CVS + locking feature. + (Making Revision Tags, Revision Tag Caveats): Merge into Revision + Tags node. + (Revision Tags): Move under Miscellaneous VC subsection. + (Change Logs and VC): Note that this is wrong for DVCSs. + De-document log entry manipulating features. + (Renaming and VC): Describe how it works on modern VCSes. + + * files.texi (Misc File Ops): Mention vc-rename-file. + + * programs.texi (Custom C Indent): Add index entries. + 2011-12-20 Alan Mackenzie * programs.texi (Motion in C): Update the description of C-M-a and diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index d3caf4e63df..b12cdf6ddd1 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -747,7 +747,6 @@ Version Control * VC Undo:: Canceling changes before or after committing. * VC Directory Mode:: Listing files managed by version control. * Branches:: Multiple lines of development. -* Remote Repositories:: Efficient access to remote CVS servers. * Revision Tags:: Symbolic names for revisions. * Miscellaneous VC:: Various other commands and features of VC. * Customizing VC:: Variables that change VC's behavior. @@ -780,21 +779,12 @@ Multiple Branches of a File * Merging:: Transferring changes between branches. * Creating Branches:: How to start a new branch. -Remote Repositories - -* Version Backups:: Keeping local copies of repository versions. -* Local Version Control:: Using another version system for local editing. - -Revision Tags - -* Making Revision Tags:: The tag facilities. -* Revision Tag Caveats:: Things to be careful of when using tags. - Miscellaneous Commands and Features of VC * Change Logs and VC:: Generating a change log file from log entries. * Renaming and VC:: A command to rename both the source and master file correctly. +* Revision Tags:: Symbolic names for revisions. * Version Headers:: Inserting version control headers into working files. Customizing VC diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index e3da0ca44e6..96c38f4190e 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1498,6 +1498,7 @@ it creates a copy of the @var{old} directory and puts it in @var{new}. If @var{new} is not an existing directory, it copies all the contents of @var{old} into a new directory named @var{new}. +@cindex renaming files @findex rename-file @kbd{M-x rename-file} reads two file names @var{old} and @var{new} using the minibuffer, then renames file @var{old} as @var{new}. If @@ -1512,6 +1513,13 @@ RET /tmp RET} renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all the remaining commands in this section. All of them ask for confirmation when the new file name already exists, too. +@ifnottex + Note that if a file is under version control (@pxref{Version +Control}), you normally ought to rename it via the version control +system instead, using @kbd{M-x vc-rename-file}. @xref{Renaming and +VC}. +@end ifnottex + @findex add-name-to-file @cindex hard links (creation) @kbd{M-x add-name-to-file} adds an additional name to an existing diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 8bf7d74f9b6..488bdf87320 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -56,8 +56,6 @@ variable @code{vc-handled-backends} to @code{nil} * VC Directory Mode:: Listing files managed by version control. * Branches:: Multiple lines of development. @ifnottex -* Remote Repositories:: Efficient access to remote CVS servers. -* Revision Tags:: Symbolic names for revisions. * Miscellaneous VC:: Various other commands and features of VC. * Customizing VC:: Variables that change VC's behavior. @end ifnottex @@ -482,10 +480,11 @@ commit. @xref{Log Buffer}. If committing to a shared repository, the commit may fail if the repository that has been changed since your last update. In that -case, you must perform an update before trying again. If using a -decentralized version control system, use @kbd{C-x v +} or @kbd{C-x v -m} (@pxref{Merging}). If using a centralized version control system, -type @kbd{C-x v v} again to merge in the repository changes. +case, you must perform an update before trying again. On a +decentralized version control system, use @kbd{C-x v +} (@pxref{VC +Pull}) or @kbd{C-x v m} (@pxref{Merging}). On a centralized version +control system, type @kbd{C-x v v} again to merge in the repository +changes. @item Finally, if you are using a centralized version control system, check @@ -557,31 +556,27 @@ to do the operation. @itemize @bullet @item -If the file is modified (or locked), you can specify the revision ID -to use for the new version that you commit. This is one way to create -a new branch (@pxref{Branches}). +@cindex specific version control system +You can specify the name of a version control system. This is useful +if the fileset can be managed by more than one version control system, +and Emacs fails to detect the correct one. @item -If the file is not modified (and unlocked), you can specify the -revision to select; this lets you start working from an older -revision, or on another branch. If you do not enter any revision, -that takes you to the highest (``head'') revision on the current -branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to -get the latest version of a file from the repository. +Otherwise, if using CVS or RCS, you can specify a revision ID. -@item -@cindex specific version control system -Instead of the revision ID, you can also specify the name of a -version control system. This is useful when one file is being managed -with two version control systems at the same time -@iftex -(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs -Features}). -@end iftex -@ifnottex -(@pxref{Local Version Control}). -@end ifnottex +If the fileset is modified (or locked), this makes Emacs commit with +that revision ID. You can create a new branch by supplying an +appropriate revision ID (@pxref{Branches}). +If the fileset is unmodified (and unlocked), this checks the specified +revision into the working tree. You can also specify a revision on +another branch by giving its revision or branch ID (@pxref{Switching +Branches}). An empty argument (i.e.@: @kbd{C-u C-x v v @key{RET}}) +checks out the latest (``head'') revision on the current branch. + +This signals an error on a decentralized version control system. +Those systems do not let you specify your own revision IDs, nor do +they use the concept of ``checking out'' individual files. @end itemize @node Log Buffer @@ -646,8 +641,9 @@ the @samp{*vc-log*} buffer. If the topmost item in each this command searches that item for entries matching the file(s) to be committed, and inserts them. @ifnottex -@xref{Change Logs and VC}, for the opposite way of -working---generating ChangeLog entries from the Log Edit buffer. +If you are using CVS or RCS, see @ref{Change Logs and VC}, for the +opposite way of working---generating ChangeLog entries from the Log +Edit buffer. @end ifnottex To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that @@ -935,13 +931,13 @@ revision at point. A second @key{RET} hides it again. (@code{vc-log-incoming}) command displays a log buffer showing the changes that will be applied, the next time you run the version control system's ``pull'' command to get new revisions from another -repository. This other repository is the default one from which -changes are pulled, as defined by the version control system; with a -prefix argument, @code{vc-log-incoming} prompts for a specific -repository. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows -the changes that will be sent to another repository, the next time you -run the ``push'' command; with a prefix argument, it prompts for a -specific destination repository. +repository (@pxref{VC Pull}). This other repository is the default +one from which changes are pulled, as defined by the version control +system; with a prefix argument, @code{vc-log-incoming} prompts for a +specific repository. Similarly, @kbd{C-x v O} +(@code{vc-log-outgoing}) shows the changes that will be sent to +another repository, the next time you run the ``push'' command; with a +prefix argument, it prompts for a specific destination repository. In the @samp{*vc-change-log*} buffer, you can use the following keys to move between the logs of revisions and of files, and to examine and @@ -1339,8 +1335,8 @@ command to use, which lets you specify where to pull changes from. Otherwise, it pulls from a default location determined by the version control system. - Amongst decentralized version control systems, @kbd{C-x v +} -currently supports only Bazaar, Git, and Mercurial. On Bazaar, it + Amongst decentralized version control systems, @kbd{C-x v +} is +currently supported only by Bazaar, Git, and Mercurial. On Bazaar, it calls @command{bzr pull} for ordinary branches (to pull from a master branch into a mirroring branch), and @command{bzr update} for a bound branch (to pull from a central repository). On Git, it calls @@ -1349,6 +1345,10 @@ it into the current branch. On Mercurial, it calls @command{hg pull -u} to fetch changesets from the default remote repository and update the working directory. + Prior to pulling, you can use @kbd{C-x v I} (@code{vc-log-incoming}) +to view a log buffer of the changes to be applied. @xref{VC Change +Log}. + On a centralized version control system like CVS, @kbd{C-x v +} updates the current VC fileset from the repository. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 892c574734b..e2051a93c60 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -606,12 +606,13 @@ information on customizing indentation for C and related modes, including how to override parts of an existing style and how to define your own styles. - As an alternative to specifying a style, you can get Emacs to -@dfn{guess} the style by scanning a code buffer which is already -formatted. To do this, call @kbd{M-x c-guess} in your sample buffer. -You can then apply this guessed style to other buffers with @kbd{M-x +@findex c-guess +@findex c-guess-install + As an alternative to specifying a style, you can tell Emacs to guess +a style by typing @kbd{M-x c-guess} in a sample code buffer. You can +then apply the guessed style to other buffers with @kbd{M-x c-guess-install}. @xref{Guessing the Style,,, ccmode, the CC Mode -Manual}, for more details about this mechanism. +Manual}, for details. @node Parentheses @section Commands for Editing with Parentheses diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index c4a4b351cac..700003db58a 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -5,301 +5,6 @@ @c This file is included either in vc-xtra.texi (when producing the @c printed version) or in the main Emacs manual (for the on-line version). -@node Remote Repositories -@subsection Remote Repositories -@cindex remote repositories - - A common way of using CVS and other more advanced VCSes is to set up -a central repository on some Internet host, then have each -developer check out a personal working copy of the files on his local -machine. Committing changes to the repository, and picking up changes -from other users into one's own working area, then works by direct -interactions with the repository server. - - One difficulty is that access to a repository server is often slow, -and that developers might need to work off-line as well. While only -third-generation decentralized VCses such as GNU Arch or Mercurial -really solve this problem, VC is designed to reduce the amount of -network interaction necessary. - - If you are using a truly decentralized VCS you can skip the rest of -this section. It describes backup and local-repository techniques -that are only useful for Subversion and earlier VCSes. - -@menu -* Version Backups:: Keeping local copies of repository versions. -* Local Version Control:: Using another version system for local editing. -@end menu - -@node Version Backups -@subsubsection Version Backups -@cindex version backups - -@cindex automatic version backups - When VC sees that the repository for a file is on a remote -machine, it automatically makes local backups of unmodified versions -of the file---@dfn{automatic version backups}. This means that you -can compare the file to the repository version (@kbd{C-x v =}), or -revert to that version (@kbd{C-x v u}), without any network -interactions. - - The local copy of the unmodified file is called a @dfn{version -backup} to indicate that it corresponds exactly to a version that is -stored in the repository. Note that version backups are not the same -as ordinary Emacs backup files -@iftex -(@pxref{Backup,,,emacs, the Emacs Manual}). -@end iftex -@ifnottex -(@pxref{Backup}). -@end ifnottex -But they follow a similar naming convention. - - For a file that comes from a remote repository, VC makes a -version backup whenever you save the first changes to the file, and -removes it after you have committed your modified version to the -repository. You can disable the making of automatic version backups by -setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}). - -@cindex manual version backups - The name of the automatic version backup for version @var{version} -of file @var{file} is @code{@var{file}.~@var{version}.~}. This is -almost the same as the name used by @kbd{C-x v ~} -@iftex -(@pxref{Old Revisions,,,emacs, the Emacs Manual}), -@end iftex -@ifnottex -(@pxref{Old Revisions}), -@end ifnottex -the only difference being the additional dot (@samp{.}) after the -version number. This similarity is intentional, because both kinds of -files store the same kind of information. The file made by @kbd{C-x v -~} acts as a @dfn{manual version backup}. - - All the VC commands that operate on old versions of a file can use -both kinds of version backups. For instance, @kbd{C-x v ~} uses -either an automatic or a manual version backup, if possible, to get -the contents of the version you request. Likewise, @kbd{C-x v =} and -@kbd{C-x v u} use either an automatic or a manual version backup, if -one of them exists, to get the contents of a version to compare or -revert to. If you changed a file outside of Emacs, so that no -automatic version backup was created for the previous text, you can -create a manual backup of that version using @kbd{C-x v ~}, and thus -obtain the benefit of the local copy for Emacs commands. - - The only difference in Emacs's handling of manual and automatic -version backups, once they exist, is that Emacs deletes automatic -version backups when you commit to the repository. By contrast, -manual version backups remain until you delete them. - -@node Local Version Control -@subsubsection Local Version Control -@cindex local version control -@cindex local back end (version control) - -When you make many changes to a file that comes from a remote -repository, it can be convenient to have version control on your local -machine as well. You can then record intermediate versions, revert to -a previous state, etc., before you actually commit your changes to the -remote server. - -VC lets you do this by putting a file under a second, local version -control system, so that the file is effectively registered in two -systems at the same time. For the description here, we will assume -that the remote system is CVS, and you use RCS locally, although the -mechanism works with any combination of version control systems -(@dfn{back ends}). - -To make it work with other back ends, you must make sure that the -``more local'' back end comes before the ``more remote'' back end in -the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By -default, this variable is set up so that you can use remote CVS and -local RCS as described here. - -To start using local RCS for a file that comes from a remote CVS -server, you must @emph{register the file in RCS}, by typing @kbd{C-u -C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a -prefix argument, and specify RCS as the back end.) - -You can do this at any time; it does not matter whether you have -already modified the file with respect to the version in the CVS -repository. If possible, VC tries to make the RCS master start with -the unmodified repository version, then checks in any local changes -as a new version. This works if you have not made any changes yet, or -if the unmodified repository version exists locally as a version -backup (@pxref{Version Backups}). If the unmodified version is not -available locally, the RCS master starts with the modified version; -the only drawback to this is that you cannot compare your changes -locally to what is stored in the repository. - -The version number of the RCS master is derived from the current CVS -version, starting a branch from it. For example, if the current CVS -version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in -the RCS master will be identical to version 1.23 under CVS; your first -changes are checked in as 1.23.1.1. (If the unmodified file is not -available locally, VC will check in the modified file twice, both as -1.23 and 1.23.1.1, to make the revision numbers consistent.) - -If you do not use locking under CVS (the default), locking is also -disabled for RCS, so that editing under RCS works exactly as under -CVS. - -When you are done with local editing, you can commit the final version -back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}. -This initializes the log entry buffer -@iftex -(@pxref{Log Buffer,,,emacs, the Emacs Manual}) -@end iftex -@ifnottex -(@pxref{Log Buffer}) -@end ifnottex -to contain all the log entries you have recorded in the RCS master; -you can edit them as you wish, and then commit in CVS by typing -@kbd{C-c C-c}. If the commit is successful, VC removes the RCS -master, so that the file is once again registered under CVS only. -(The RCS master is not actually deleted, just renamed by appending -@samp{~} to the name, so that you can refer to it later if you wish.) - -While using local RCS, you can pick up recent changes from the CVS -repository into your local file, or commit some of your changes back -to CVS, without terminating local RCS version control. To do this, -switch to the CVS back end temporarily, with the @kbd{C-x v b} command: - -@table @kbd -@item C-x v b -Switch to another back end that the current file is registered -under (@code{vc-switch-backend}). - -@item C-u C-x v b @var{backend} @key{RET} -Switch to @var{backend} for the current file. -@end table - -@kindex C-x v b -@findex vc-switch-backend -@kbd{C-x v b} does not change the buffer contents, or any files; it -only changes VC's perspective on how to handle the file. Any -subsequent VC commands for that file will operate on the back end that -is currently selected. - -If the current file is registered in more than one back end, typing -@kbd{C-x v b} ``cycles'' through all of these back ends. With a -prefix argument, it asks for the back end to use in the minibuffer. - -Thus, if you are using local RCS, and you want to pick up some recent -changes in the file from remote CVS, first visit the file, then type -@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m -@key{RET}} to merge the news -@iftex -(@pxref{Merging,,,emacs, the Emacs Manual}). -@end iftex -@ifnottex -(@pxref{Merging}). -@end ifnottex -You can then switch back to RCS by typing @kbd{C-x v b} again, and -continue to edit locally. - -But if you do this, the revision numbers in the RCS master no longer -correspond to those of CVS. Technically, this is not a problem, but -it can become difficult to keep track of what is in the CVS repository -and what is not. So we suggest that you return from time to time to -CVS-only operation, by committing your local changes back to the -repository using @kbd{C-u C-x v v cvs @key{RET}}. - -@node Revision Tags -@subsection Revision Tags -@cindex tags and version control - - In a VCS with per-file revision numbers (such as SCCS, RCS, or CVS) -@dfn{tag} is a named set of file versions (one for each registered -file) that you can treat as a unit. In a VCS with per-repository -version numbers (Subversion and most later ones) a tag is simply -a symbolic name for a revision. - - One important kind of tag is a @dfn{release}, a (theoretically) -stable version of the system that is ready for distribution to users. - -@menu -* Making Revision Tags:: The tag facilities. -* Revision Tag Caveats:: Things to be careful of when using tags. -@end menu - -@node Making Revision Tags -@subsubsection Making and Using Revision Tags - - There are two basic commands for tags; one makes a -tag with a given name, the other retrieves a named tag. - -@table @code -@kindex C-x v s -@findex vc-create-tag -@item C-x v s @var{name} @key{RET} -Define the working revision of every registered file in or under the -current directory as a tag named @var{name} -(@code{vc-create-tag}). - -@kindex C-x v r -@findex vc-retrieve-tag -@item C-x v r @var{name} @key{RET} -For all registered files at or below the current directory level, -retrieve the tagged revision @var{name}. This command will -switch to a branch if @var{name} is a branch name and your VCS -distinguishes branches from tags. -(@code{vc-retrieve-tag}). - -This command reports an error if any files are locked at or below the -current directory, without changing anything; this is to avoid -overwriting work in progress. -@end table - -Tags are inexpensive, so you need not hesitate to create them whenever -they are useful. Branches vary in cost depending on your VCS; in -older ones they may be expensive. - - You can give a tag or branch name as an argument to @kbd{C-x v =} or -@kbd{C-x v ~} -@iftex -(@pxref{Old Revisions,,,emacs, the Emacs Manual}). -@end iftex -@ifnottex -(@pxref{Old Revisions}). -@end ifnottex -Thus, you can use it to compare a tagged version against the current files, -or two tagged versions against each other. - -@node Revision Tag Caveats -@subsubsection Revision Tag Caveats - - For SCCS, VC implements tags itself; these tags are visible only -through VC. Most later systems (including CVS, Subversion, bzr, git, -and hg) have a native tag facility, and VC uses it where -available; those tags will be visible even when you bypass VC. - - There is no support for VC tags using GNU Arch yet. - - Under older VCSes (SCCS, RCS, CVS, early versions of Subversion), -renaming and deletion could create some difficulties with tags. This is -not a VC-specific problem, but a general design issue in version -control systems that was not solved effectively until the earliest -third-generation systems. - - In a file-oriented VCS, when you rename a registered file you need -to rename its master along with it; the command @code{vc-rename-file} -will do this automatically. If you are using SCCS, you must also -update the records of the tag, to mention the file by its new name -(@code{vc-rename-file} does this, too). An old tag that refers to a -master file that no longer exists under the recorded name is invalid; -VC can no longer retrieve it. It would be beyond the scope of this -manual to explain enough about RCS and SCCS to explain how to update -the tags by hand. - - Using @code{vc-rename-file} makes the tag remain valid for -retrieval, but it does not solve all problems. For example, some of the -files in your program probably refer to others by name. At the very -least, the makefile probably mentions the file that you renamed. If you -retrieve an old tag, the renamed file is retrieved under its new -name, which is not the name that the makefile expects. So the program -won't really work as retrieved. - @node Miscellaneous VC @subsection Miscellaneous Commands and Features of VC @@ -309,50 +14,54 @@ won't really work as retrieved. * Change Logs and VC:: Generating a change log file from log entries. * Renaming and VC:: A command to rename both the source and master file correctly. +* Revision Tags:: Symbolic names for revisions. * Version Headers:: Inserting version control headers into working files. @end menu @node Change Logs and VC @subsubsection Change Logs and VC - If you use RCS or CVS for a program and also maintain a change log -file for it + If you use RCS or CVS for a program with a @file{ChangeLog} file @iftex (@pxref{Change Log,,,emacs, the Emacs Manual}), @end iftex @ifnottex (@pxref{Change Log}), @end ifnottex -you can generate change log entries automatically from the version -control log entries: +you can generate change log entries from the version control log +entries of previous commits. + + Note that this only works with RCS or CVS. This procedure would be +particularly incorrect on a modern changeset-based version control +system, where changes to the @file{ChangeLog} file would normally be +committed as part of a changeset. In that case, you should write the +change log entries first, then pull them into the @samp{*vc-log*} +buffer when you commit +@iftex +(@pxref{Log Buffer,,,emacs, the Emacs Manual}). +@end iftex +@ifnottex +(@pxref{Log Buffer}). +@end ifnottex @table @kbd @item C-x v a @kindex C-x v a @findex vc-update-change-log -Visit the current directory's change log file and, for registered files -in that directory, create new entries for versions checked in since the -most recent entry in the change log file. +Visit the current directory's @file{ChangeLog} file and, for +registered files in that directory, create new entries for versions +committed since the most recent change log entry (@code{vc-update-change-log}). -This command works with RCS or CVS only, not with any of the other -back ends. - @item C-u C-x v a As above, but only find entries for the current buffer's file. - -@item M-1 C-x v a -As above, but find entries for all the currently visited files that are -maintained with version control. This works only with RCS, and it puts -all entries in the log for the default directory, which may not be -appropriate. @end table For example, suppose the first line of @file{ChangeLog} is dated 1999-04-10, and that the only check-in since then was by Nathaniel -Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log -messages that start with `#'.}. Then @kbd{C-x v a} visits -@file{ChangeLog} and inserts text like this: +Bowditch to @file{rcs2log} on 1999-05-22 with log entry @samp{Ignore +log messages that start with `#'.}. Then @kbd{C-x v a} inserts this +@file{ChangeLog} entry: @iftex @medbreak @@ -369,17 +78,11 @@ messages that start with `#'.}. Then @kbd{C-x v a} visits @end iftex @noindent -You can then edit the new change log entry further as you wish. - - Some of the new change log entries may duplicate what's already in -ChangeLog. You will have to remove these duplicates by hand. - - Normally, the log entry for file @file{foo} is displayed as @samp{* -foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted -if the text of the log entry starts with @w{@samp{(@var{functionname}): -}}. For example, if the log entry for @file{vc.el} is -@samp{(vc-do-command): Check call-process status.}, then the text in -@file{ChangeLog} looks like this: +If the version control log entry specifies a function name (in +parenthesis at the beginning of a line), that is reflected in the +@file{ChangeLog} entry. For example, if a log entry for @file{vc.el} +is @samp{(vc-do-command): Check call-process status.}, the +@file{ChangeLog} entry is: @iftex @medbreak @@ -395,92 +98,108 @@ if the text of the log entry starts with @w{@samp{(@var{functionname}): @medbreak @end iftex - When @kbd{C-x v a} adds several change log entries at once, it groups -related log entries together if they all are checked in by the same -author at nearly the same time. If the log entries for several such -files all have the same text, it coalesces them into a single entry. -For example, suppose the most recent check-ins have the following log -entries: + When @kbd{C-x v a} adds several change log entries at once, it +groups related log entries together if they all are checked in by the +same author at nearly the same time. If the log entries for several +such files all have the same text, it coalesces them into a single +entry. -@flushleft -@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.} -@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.} -@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.} -@end flushleft +@node Renaming and VC +@subsubsection Renaming VC Work Files and Master Files +@cindex renaming version-controlled files -@noindent -They appear like this in @file{ChangeLog}: +@table @kbd +@item M-x vc-rename-file +Prompt for two file names, @var{VAR} and @var{OLD}, and rename them in +the version-controlled working tree. +@end table -@iftex -@medbreak -@end iftex -@smallexample -@group -1999-04-01 Nathaniel Bowditch +@findex vc-rename-file + If you wish to rename a registered file in a version-controlled +working tree, use the command @kbd{M-x vc-rename-file}. This prompts +for two arguments: the file you wish to rename, followed by the new +name; then it performs the renaming through the version control +system. + + On modern version control systems that have built-in support for +renaming, the renaming operation takes effect immediately in the +working tree, and takes effect in the repository when you commit the +renamed file. The renamed file retains the full change history of the +original file. + + On CVS and older version control systems, the @code{vc-rename-file} +command actually works by creating a copy of the old file under the +new name, registering it, and deleting the old file. In this case, +the change history is not preserved. - * vc.texinfo: Fix expansion typos. +@node Revision Tags +@subsubsection Revision Tags +@cindex revision tag +@cindex tags for version control - * vc.el, vc-hooks.el: Don't call expand-file-name. -@end group -@end smallexample -@iftex -@medbreak -@end iftex + Most version control systems allow you to apply a @dfn{revision tag} +to a specific version of a version-controlled tree. On modern +changeset-based version control systems, a revision tag is simply a +symbolic name for a particular revision. On older file-based systems +like CVS, each tag is added to the entire set of version-controlled +files, allowing them to be handled as a unit. Revision tags are +commonly used to identify releases that are distributed to users. - Normally, @kbd{C-x v a} separates log entries by a blank line, but you -can mark several related log entries to be clumped together (without an -intervening blank line) by starting the text of each related log entry -with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label -itself is not copied to @file{ChangeLog}. For example, suppose the log -entries are: + There are two basic commands for tags; one makes a tag with a given +name, the other retrieves a named tag. -@flushleft -@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.} -@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.} -@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.} -@end flushleft +@table @code +@kindex C-x v s +@findex vc-create-tag +@item C-x v s @var{name} @key{RET} +Define the working revision of every registered file in or under the +current directory as a tag named @var{name} +(@code{vc-create-tag}). -@noindent -Then the text in @file{ChangeLog} looks like this: +@kindex C-x v r +@findex vc-retrieve-tag +@item C-x v r @var{name} @key{RET} +For all registered files at or below the current directory level, +retrieve the tagged revision @var{name}. This command will switch to a +branch if @var{name} is a branch name and your VCS distinguishes +branches from tags. (@code{vc-retrieve-tag}). -@iftex -@medbreak -@end iftex -@smallexample -@group -1999-04-01 Nathaniel Bowditch +This command reports an error if any files are locked at or below the +current directory, without changing anything; this is to avoid +overwriting work in progress. +@end table - * vc.texinfo: Fix expansion typos. - * vc.el, vc-hooks.el: Don't call expand-file-name. -@end group -@end smallexample + You can give a tag or branch name as an argument to @kbd{C-x v =} or +@kbd{C-x v ~} @iftex -@medbreak +(@pxref{Old Revisions,,,emacs, the Emacs Manual}). @end iftex +@ifnottex +(@pxref{Old Revisions}). +@end ifnottex +Thus, you can use it to compare a tagged version against the current files, +or two tagged versions against each other. - A log entry whose text begins with @samp{#} is not copied to -@file{ChangeLog}. For example, if you merely fix some misspellings in -comments, you can log the change with an entry beginning with @samp{#} -to avoid putting such trivia into @file{ChangeLog}. - -@node Renaming and VC -@subsubsection Renaming VC Work Files and Master Files - -@findex vc-rename-file - When you rename a registered file, you must also rename its master -file correspondingly to get proper results. Use @code{vc-rename-file} -to rename the source file as you specify, and rename its master file -accordingly. It also updates any tags (@pxref{Revision Tags}) that -mention the file, so that they use the new name; despite this, the -tag thus modified may not completely work (@pxref{Revision Tag Caveats}). - - Some back ends do not provide an explicit rename operation to their -repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} -on the original and renamed buffers and provide the necessary edit -log. + On SCCS, VC implements tags itself; these tags are visible only +through VC. Most later systems (including CVS, Subversion, bzr, git, +and hg) have a native tag facility, and VC uses it where available; +those tags will be visible even when you bypass VC. - You cannot use @code{vc-rename-file} on a file that is locked by -someone else. + In a file-oriented VCS, when you rename a registered file you need +to rename its master along with it; the command @code{vc-rename-file} +will do this automatically. If you are using SCCS, you must also +update the records of the tag, to mention the file by its new name +(@code{vc-rename-file} does this, too). An old tag that refers to a +master file that no longer exists under the recorded name is invalid; +VC can no longer retrieve it. It would be beyond the scope of this +manual to explain enough about RCS and SCCS to explain how to update +the tags by hand. Using @code{vc-rename-file} makes the tag remain +valid for retrieval, but it does not solve all problems. For example, +some of the files in your program probably refer to others by name. +At the very least, the makefile probably mentions the file that you +renamed. If you retrieve an old tag, the renamed file is retrieved +under its new name, which is not the name that the makefile expects. +So the program won't really work as retrieved. @node Version Headers @subsubsection Inserting Version Control Headers @@ -592,10 +311,9 @@ these systems, exclude its name from the list. To disable VC entirely, set this variable to @code{nil}. The order of systems in the list is significant: when you visit a file -registered in more than one system (@pxref{Local Version Control}), VC -uses the system that comes first in @code{vc-handled-backends} by -default. The order is also significant when you register a file for -the first time, see +registered in more than one system, VC uses the system that comes +first in @code{vc-handled-backends} by default. The order is also +significant when you register a file for the first time, see @iftex @ref{Registering,,,emacs, the Emacs Manual}, @end iftex @@ -708,37 +426,16 @@ the variable @code{vc-mistrust-permissions} affects SCCS use, but @node CVS Options @subsubsection Options specific for CVS -@cindex locking (CVS) - By default, CVS does not use locking to coordinate the activities of -several users; anyone can change a work file at any time. However, -there are ways to restrict this, resulting in behavior that resembles -locking. - -@cindex CVSREAD environment variable (CVS) - For one thing, you can set the @env{CVSREAD} environment variable -(the value you use makes no difference). If this variable is defined, -CVS makes your work files read-only by default. In Emacs, you must -type @kbd{C-x v v} to make the file writable, so that editing works -in fact similar as if locking was used. Note however, that no actual -locking is performed, so several users can make their files writable -at the same time. When setting @env{CVSREAD} for the first time, make -sure to check out all your modules anew, so that the file protections -are set correctly. - -@cindex cvs watch feature -@cindex watching files (CVS) - Another way to achieve something similar to locking is to use the -@dfn{watch} feature of CVS. If a file is being watched, CVS makes it -read-only by default, and you must also use @kbd{C-x v v} in Emacs to -make it writable. VC calls @code{cvs edit} to make the file writable, -and CVS takes care to notify other developers of the fact that you -intend to change the file. See the CVS documentation for details on -using the watch feature. +@vindex vc-cvs-global-switches + You can specify additional command line options to pass to all CVS +operations in the variable @code{vc-cvs-global-switches}. These +switches are inserted immediately after the @code{cvs} command, before +the name of the operation to invoke. @vindex vc-stay-local @vindex vc-cvs-stay-local @cindex remote repositories (CVS) - When a file's repository is on a remote machine, VC tries to keep + When using a CVS repository on a remote machine, VC can try keeping network interactions to a minimum. This is controlled by the variable @code{vc-cvs-stay-local}. There is another variable, @code{vc-stay-local}, which enables the feature also for other back @@ -746,36 +443,58 @@ ends that support it, including CVS. In the following, we will talk only about @code{vc-cvs-stay-local}, but everything applies to @code{vc-stay-local} as well. -If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses -only the entry in the local CVS subdirectory to determine the file's -state (and possibly information returned by previous CVS commands). -One consequence of this is that when you have modified a file, and -somebody else has already checked in other changes to the file, you -are not notified of it until you actually try to commit. (But you can -try to pick up any recent changes from the repository first, using -@kbd{C-x v m @key{RET}}, + If @code{vc-cvs-stay-local} is @code{t} (the default), VC determines +the version control status of each file using only the entry in the +local CVS subdirectory and the information returned by previous CVS +commands. As a consequence, if you have modified a file and somebody +else has checked in other changes, you will not be notified of the +conflict until you try to commit. + + If you change @code{vc-cvs-stay-local} to @code{nil}, VC queries the +remote repository @emph{before} it decides what to do in +@code{vc-next-action} (@kbd{C-x v v}), just as it does for local +repositories. + + You can also set @code{vc-cvs-stay-local} to a regular expression +that is matched against the repository host name; VC then stays local +only for repositories from hosts that match the pattern. + +@cindex automatic version backups + When using a remote repository, Emacs normally makes @dfn{automatic +version backups} of the original versions of each edited file. These +local backups are made whenever you save the first changes to a file, +and they are removed after you commit your changes to the repository. +(Note that these are not the same as ordinary Emacs backup files; @iftex -@pxref{Merging,,,emacs, the Emacs Manual}). +@pxref{Backup,,,emacs, the Emacs Manual}.) @end iftex @ifnottex -@pxref{Merging}). +@pxref{Backup}.) @end ifnottex +Commands like @kbd{C-x v =} and @kbd{C-x v u} make use of automatic +version backups, if possible, to avoid having to access the network. - When @code{vc-cvs-stay-local} is @code{t}, VC also makes local -version backups, so that simple diff and revert operations are -completely local (@pxref{Version Backups}). + Setting @code{vc-cvs-stay-local} to @code{nil} disables the making +of automatic version backups. - On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil}, -then VC queries the remote repository @emph{before} it decides what to -do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local -repositories. It also does not make any version backups. - - You can also set @code{vc-cvs-stay-local} to a regular expression -that is matched against the repository host name; VC then stays local -only for repositories from hosts that match the pattern. +@cindex manual version backups + Automatic version backups have names of the form +@w{@code{@var{file}.~@var{version}.~}}. This is similar to the name +that @kbd{C-x v ~} saves old versions to +@iftex +(@pxref{Old Revisions,,,emacs, the Emacs Manual}), +@end iftex +@ifnottex +(@pxref{Old Revisions}), +@end ifnottex +except for the additional dot (@samp{.}) after the version. The +relevant VC commands can use both kinds of version backups. The main +difference is that the ``manual'' version backups made by @kbd{C-x v +~} are not deleted automatically when you commit. -@vindex vc-cvs-global-switches - You can specify additional command line options to pass to all CVS -operations in the variable @code{vc-cvs-global-switches}. These -switches are inserted immediately after the @code{cvs} command, before -the name of the operation to invoke. +@cindex locking (CVS) + CVS does not use locking by default, but there are ways to enable +locking-like behavior using its @env{CVSREAD} or @dfn{watch} feature; +see the CVS documentation for details. If that case, you can use +@kbd{C-x v v} in Emacs to toggle locking, as you would for a +locking-based version control system (@pxref{VC With A Locking VCS}). -- cgit v1.2.1 From 6196cffecf7dcc2a777025137db6ab77ff45a105 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 21 Dec 2011 01:58:39 -0800 Subject: Spelling fixes. --- doc/misc/auth.texi | 2 +- lisp/ChangeLog.12 | 2 +- lisp/calc/calc-alg.el | 2 +- lisp/calendar/holidays.el | 2 +- lisp/gnus/nndiary.el | 4 ++-- lisp/international/robin.el | 6 +++--- lisp/net/ntlm.el | 2 +- lisp/net/tramp.el | 2 +- lisp/progmodes/ada-stmt.el | 2 +- lisp/term.el | 4 ++-- lisp/textmodes/remember.el | 2 +- src/print.c | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index b64562f6875..60bb6e7cdac 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -281,7 +281,7 @@ for any of the prompts. Note that the password needs to be evaluated if it's a function. It's wrapped in a function to provide some security. -Later, after a successful login, @code{nnimal.el} calls the +Later, after a successful login, @code{nnimap.el} calls the @code{:save-function} like so: @example diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 0dd5a6ec7a3..55335533b7a 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -27413,7 +27413,7 @@ which has been added in Emacs 21.1. (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode) (awk-mode): Use it. - (make-local-hook): Suppress warning about obsoleteness. + (make-local-hook): Suppress warning about obsolescence. * progmodes/cc-engine.el, cc-align.el, cc-cmds.el (c-append-backslashes-forward, c-delete-backslashes-forward) diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 274f399fe6a..5ad1e58b45c 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -1841,7 +1841,7 @@ expr)))) ;;; Simplify a polynomial in list form by stripping off high-end zeros. -;;; This always leaves the constant part, i.e., nil->nil and nonnil->nonnil. +;;; This always leaves the constant part, i.e., nil->nil and non-nil->non-nil. (defun math-poly-simplify (p) (and p (if (Math-zerop (nth (1- (length p)) p)) diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 3ba1078f62d..42c95f39faa 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -723,7 +723,7 @@ STRING)). Returns nil if it is not visible in the current calendar window." (let ((m displayed-month) (y displayed-year)) (calendar-increment-month m y (- 11 month)) - (if (> m 9) ; is november visible? + (if (> m 9) ; Is November visible? (list (list (list month day y) string))))) (defun holiday-float (month dayname n string &optional day) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 25557ad7119..29f0695c74e 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -1161,7 +1161,7 @@ all. This may very well take some time.") (defun nndiary-parse-schedule-value (str min-or-values max) ;; Parse the schedule string STR, or signal an error. - ;; Signals are caught by `nndary-schedule'. + ;; Signals are caught by `nndiary-schedule'. (if (string-match "[ \t]*\\*[ \t]*" str) ;; unspecified nil @@ -1204,7 +1204,7 @@ all. This may very well take some time.") ;; - Returns nil if `*' ;; - Otherwise returns a list of integers and/or ranges (BEG . END) ;; The exception is the Timze-Zone value which is always of the form (STR). - ;; Signals are caught by `nndary-schedule'. + ;; Signals are caught by `nndiary-schedule'. (let ((header (format "^X-Diary-%s: \\(.*\\)$" head))) (goto-char (point-min)) (if (not (re-search-forward header nil t)) diff --git a/lisp/international/robin.el b/lisp/international/robin.el index 443a292f4c1..c50277686ff 100644 --- a/lisp/international/robin.el +++ b/lisp/international/robin.el @@ -50,9 +50,9 @@ ;; identified by a string called package name. Use robin-define-package ;; to define a robin package. -;; (robin-define-package NAME DOCTSTRING -;; (INPUT1 OUPUT1) -;; (INPUT2 OUPUT2) +;; (robin-define-package NAME DOCSTRING +;; (INPUT1 OUTPUT1) +;; (INPUT2 OUTPUT2) ;; ...) ;; NAME is a string identifying the robin package. It often starts with a diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el index 9af148e8faa..8bcb1ef2966 100644 --- a/lisp/net/ntlm.el +++ b/lisp/net/ntlm.el @@ -440,7 +440,7 @@ length of STR is LEN." (defun ntlm-smb-dohash (in key forw) "Return the hash value for a string IN and a string KEY. -Length of IN and KEY are 64. FORW non nill means forward, nil means +Length of IN and KEY are 64. FORW non-nil means forward, nil means backward." (let (pk1 ;string of length 56 c ;string of length 28 diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2848211fae9..473ba00fbc2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3506,7 +3506,7 @@ If the `tramp-methods' entry does not exist, return nil." (cond ((char-equal other-write ?w) (tramp-compat-octal-to-decimal "00002")) ((char-equal other-write ?-) 0) - (t (error "Nineth char `%c' must be one of `w-'" other-write))) + (t (error "Ninth char `%c' must be one of `w-'" other-write))) (cond ((char-equal other-execute-or-sticky ?x) (tramp-compat-octal-to-decimal "00001")) diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index e48055c9f50..b33da441eeb 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el @@ -56,7 +56,7 @@ ;; BUGS: ;;;> I have the following suggestions for the function template: 1) I ;;;> don't want it automatically assigning it a name for the return variable. I -;;;> never want it to be called "Result" because that is nondescriptive. If you +;;;> never want it to be called "Result" because that is nondescript. If you ;;;> must define a variable, give me the ability to specify its name. ;;;> ;;;> 2) You do not provide a type for variable 'Result'. Its type is the same diff --git a/lisp/term.el b/lisp/term.el index 484bc36363e..47cda9beeed 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -37,8 +37,8 @@ ;; -------------------------------------- ;; ;; While the message passing and the colorization surely introduce some -;; overhead this has became so small that IMHO is surely outweighted by -;; the benefits you get but, as usual, YMMV +;; overhead this has became so small that IMHO it is surely outweighed by +;; the benefits you get but, as usual, YMMV. ;; ;; Important caveat, when deciding the cursor/'gray keys' keycodes I had to ;; make a choice: on my Linux box this choice allows me to run all the diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 07a4fae9c30..c184a90dfc2 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -474,7 +474,7 @@ If this is nil, then `diary-file' will be used instead." (replace-match (let ((style (if (boundp 'calendar-date-style) calendar-date-style - ;; Don't complain about obsoleteness. + ;; Don't complain about obsolescence. (if (with-no-warnings european-calendar-style) 'european 'american)))) diff --git a/src/print.c b/src/print.c index fc36d29da7c..8e4a38c4ae9 100644 --- a/src/print.c +++ b/src/print.c @@ -620,7 +620,7 @@ A printed representation of an object is text which describes that object. */) printcharfun = Vprin1_to_string_buffer; PRINTPREPARE; print (object, printcharfun, NILP (noescape)); - /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */ + /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINISH */ PRINTFINISH; } -- cgit v1.2.1 From 0d373f73bcaf14863b186b74d6e80a5209e2720c Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Wed, 21 Dec 2011 06:30:00 -0500 Subject: * progmodes/cfengine.el: Add CFEngine 3.x syntax highlighting and support. --- lisp/ChangeLog | 13 +++++ lisp/progmodes/cfengine.el | 142 ++++++++++++++++++++++++++------------------- 2 files changed, 96 insertions(+), 59 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 27e8bcd0add..bc5764e3666 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2011-12-21 Teodor Zlatanov + + * progmodes/cfengine.el: Add Version. + + Add CFEngine 3.x syntax highlighting and support with + `cfengine3-mode', and rename the old `cfengine-mode' to + `cfengine2-mode'. Make `cfengine-mode' an automatic content-based + switcher between `cfengine3-mode' and `cfengine2-mode' by aliasing + it to `cfengine-auto-mode'. Rename variables specific to + `cfengine2-mode' from cfengine-* to cfengine2-*. Change the + modeline indicator to "CFE2" and "CFE3" depending on the mode, to + save space. Mark `cfengine-mode-abbrevs' as obsolete. + 2011-12-21 Chong Yidong * vc/vc-bzr.el (vc-bzr-rename-file): Don't pass ~ to Bzr in diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 823304bd250..ffe8edfaeb6 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -5,6 +5,7 @@ ;; Author: Dave Love ;; Maintainer: Ted Zlatanov ;; Keywords: languages +;; Version: 1.1 ;; This file is part of GNU Emacs. @@ -29,18 +30,18 @@ ;; The CFEngine 3.x support doesn't have Imenu support but patches are ;; welcome. -;; You can set it up so either cfengine-mode (2.x and earlier) or -;; cfengine3-mode (3.x) will be picked, depending on the buffer +;; You can set it up so either `cfengine2-mode' (2.x and earlier) or +;; `cfengine3-mode' (3.x) will be picked, depending on the buffer ;; contents: -;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-auto-mode)) +;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-mode)) ;; OR you can choose to always use a specific version, if you prefer -;; it +;; it: ;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine3-mode)) -;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine-mode)) -;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine-mode)) +;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine2-mode)) +;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine2-mode)) ;; This is not the same as the mode written by Rolf Ebert ;; , distributed with cfengine-2.0.5. It does @@ -49,31 +50,36 @@ ;;; Code: (defgroup cfengine () - "Editing Cfengine files." + "Editing CFEngine files." :group 'languages) (defcustom cfengine-indent 2 - "*Size of a Cfengine indentation step in columns." + "*Size of a CFEngine indentation step in columns." :group 'cfengine :type 'integer) +(defvar cfengine-mode-debug nil + "Whether `cfengine-mode' should print debugging info.") + (defcustom cfengine-mode-abbrevs nil - "Abbrevs for Cfengine mode." + "Abbrevs for CFEngine2 mode." :group 'cfengine :type '(repeat (list (string :tag "Name") (string :tag "Expansion") (choice :tag "Hook" (const nil) function)))) +(make-obsolete-variable 'cfengine-mode-abbrevs 'edit-abbrevs "24.1") + ;; Taken from the doc for pre-release 2.1. (eval-and-compile - (defconst cfengine-actions + (defconst cfengine2-actions '("acl" "alerts" "binservers" "broadcast" "control" "classes" "copy" "defaultroute" "disks" "directories" "disable" "editfiles" "files" "filters" "groups" "homeservers" "ignore" "import" "interfaces" "links" "mailserver" "methods" "miscmounts" "mountables" "processes" "packages" "rename" "required" "resolve" "shellcommands" "tidy" "unmount" - ;; cfservd + ;; Keywords for cfservd. "admit" "grant" "deny") "List of the action keywords supported by Cfengine. This includes those for cfservd as well as cfagent.") @@ -98,11 +104,11 @@ This includes those for cfservd as well as cfagent.") '(string int real slist ilist rlist irange rrange counter)) "List of the CFEngine 3.x variable types.")) -(defvar cfengine-font-lock-keywords +(defvar cfengine2-font-lock-keywords `(;; Actions. ;; List the allowed actions explicitly, so that errors are more obvious. (,(concat "^[ \t]*" (eval-when-compile - (regexp-opt cfengine-actions t)) + (regexp-opt cfengine2-actions t)) ":") 1 font-lock-keyword-face) ;; Classes. @@ -117,46 +123,54 @@ This includes those for cfservd as well as cfagent.") (defvar cfengine3-font-lock-keywords `( + ;; Defuns. This happens early so they don't get caught by looser + ;; patterns. + (,(concat "\\<" cfengine3-defuns-regex "\\>" + "[ \t]+\\<\\([[:alnum:]_]+\\)\\>" + "[ \t]+\\<\\([[:alnum:]_]+\\)" + ;; Optional parentheses with variable names inside. + "\\(?:(\\([^)]*\\))\\)?") + (1 font-lock-builtin-face) + (2 font-lock-constant-face) + (3 font-lock-function-name-face) + (4 font-lock-variable-name-face nil t)) + + ;; Class selectors. (,(concat "^[ \t]*" cfengine3-class-selector-regex) 1 font-lock-keyword-face) + + ;; Categories. (,(concat "^[ \t]*" cfengine3-category-regex) 1 font-lock-builtin-face) + ;; Variables, including scope, e.g. module.var ("[@$](\\([[:alnum:]_.]+\\))" 1 font-lock-variable-name-face) ("[@$]{\\([[:alnum:]_.]+\\)}" 1 font-lock-variable-name-face) + ;; Variable definitions. ("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) - ;; CFEngine 3.x faces - ;; defuns - (,(concat "\\<" cfengine3-defuns-regex "\\>" - "[ \t]+\\<\\([[:alnum:]_]+\\)\\>" - "[ \t]+\\<\\([[:alnum:]_]+\\)\\((\\([^)]*\\))\\)?") - (1 font-lock-builtin-face) - (2 font-lock-constant-name-face) - (3 font-lock-function-name-face) - (5 font-lock-variable-name-face)) - ;; variable types + ;; Variable types. (,(concat "\\<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\>") 1 font-lock-type-face))) -(defvar cfengine-imenu-expression +(defvar cfengine2-imenu-expression `((nil ,(concat "^[ \t]*" (eval-when-compile - (regexp-opt cfengine-actions t)) + (regexp-opt cfengine2-actions t)) ":[^:]") 1) ("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1) ("Variables/classes" "\\[ \t]+\\([[:alnum:]_]+\\)" 1)) - "`imenu-generic-expression' for Cfengine mode.") + "`imenu-generic-expression' for CFEngine mode.") -(defun cfengine-outline-level () - "`outline-level' function for Cfengine mode." +(defun cfengine2-outline-level () + "`outline-level' function for CFEngine mode." (if (looking-at "[^:]+\\(?:[:]+\\)$") (length (match-string 1)))) -(defun cfengine-beginning-of-defun () - "`beginning-of-defun' function for Cfengine mode. +(defun cfengine2-beginning-of-defun () + "`beginning-of-defun' function for CFEngine mode. Treats actions as defuns." (unless (<= (current-column) (current-indentation)) (end-of-line)) @@ -165,8 +179,8 @@ Treats actions as defuns." (goto-char (point-min))) t) -(defun cfengine-end-of-defun () - "`end-of-defun' function for Cfengine mode. +(defun cfengine2-end-of-defun () + "`end-of-defun' function for CFEngine mode. Treats actions as defuns." (end-of-line) (if (re-search-forward "^[[:alpha:]]+: *$" nil t) @@ -176,7 +190,7 @@ Treats actions as defuns." ;; Fixme: Should get an extra indent step in editfiles BeginGroup...s. -(defun cfengine-indent-line () +(defun cfengine2-indent-line () "Indent a line in Cfengine mode. Intended as the value of `indent-line-function'." (let ((pos (- (point-max) (point)))) @@ -283,15 +297,17 @@ Intended as the value of `indent-line-function'." (narrow-to-defun) (back-to-indentation) (setq parse (parse-partial-sexp (point-min) (point))) - (message "%S" parse) + (when cfengine-mode-debug + (message "%S" parse)) + (cond - ;; body/bundle blocks start at 0 + ;; Body/bundle blocks start at 0. ((looking-at (concat cfengine3-defuns-regex "\\>")) (indent-line-to 0)) - ;; categories are indented one step + ;; Categories are indented one step. ((looking-at (concat cfengine3-category-regex "[ \t]*$")) (indent-line-to cfengine-indent)) - ;; class selectors are indented two steps + ;; Class selectors are indented two steps. ((looking-at (concat cfengine3-class-selector-regex "[ \t]*$")) (indent-line-to (* 2 cfengine-indent))) ;; Outdent leading close brackets one step. @@ -303,11 +319,17 @@ Intended as the value of `indent-line-function'." (backward-sexp) (current-column))) (error nil))) - ;; inside a string and it starts before this line + ;; Inside a string and it starts before this line. ((and (nth 3 parse) (< (nth 8 parse) (save-excursion (beginning-of-line) (point)))) (indent-line-to 0)) - ;; inside a defun, but not a nested list (depth is 1) + + ;; Inside a defun, but not a nested list (depth is 1). This is + ;; a promise, usually. + + ;; Indent to cfengine-indent times the nested depth + ;; plus 2. That way, promises indent deeper than class + ;; selectors, which in turn are one deeper than categories. ((= 1 (nth 0 parse)) (indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent))) ;; Inside brackets/parens: indent to start column of non-comment @@ -411,18 +433,18 @@ Intended as the value of `indent-line-function'." (set (make-local-variable 'parse-sexp-ignore-comments) t)) (defun cfengine-common-syntax (table) - ;; the syntax defaults seem OK to give reasonable word movement + ;; The syntax defaults seem OK to give reasonable word movement. (modify-syntax-entry ?# "<" table) (modify-syntax-entry ?\n ">#" table) (modify-syntax-entry ?\" "\"" table) - ;; variable substitution: + ;; Variable substitution. (modify-syntax-entry ?$ "." table) - ;; Doze path separators: + ;; Doze path separators. (modify-syntax-entry ?\\ "." table)) ;;;###autoload -(define-derived-mode cfengine3-mode prog-mode "CFEngine3" - "Major mode for editing cfengine input. +(define-derived-mode cfengine3-mode prog-mode "CFE3" + "Major mode for editing CFEngine3 input. There are no special keybindings by default. Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves @@ -434,46 +456,46 @@ to the action header." (setq font-lock-defaults '(cfengine3-font-lock-keywords nil nil nil beginning-of-defun)) - ;; use defuns as the essential syntax block + ;; Use defuns as the essential syntax block. (set (make-local-variable 'beginning-of-defun-function) #'cfengine3-beginning-of-defun) (set (make-local-variable 'end-of-defun-function) #'cfengine3-end-of-defun)) ;;;###autoload -(define-derived-mode cfengine-mode prog-mode "Cfengine" - "Major mode for editing cfengine input. +(define-derived-mode cfengine2-mode prog-mode "CFE2" + "Major mode for editing CFEngine2 input. There are no special keybindings by default. Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves to the action header." (cfengine-common-settings) - (cfengine-common-syntax cfengine-mode-syntax-table) + (cfengine-common-syntax cfengine2-mode-syntax-table) ;; Shell commands can be quoted by single, double or back quotes. ;; It's debatable whether we should define string syntax, but it ;; should avoid potential confusion in some cases. - (modify-syntax-entry ?\' "\"" cfengine-mode-syntax-table) - (modify-syntax-entry ?\` "\"" cfengine-mode-syntax-table) + (modify-syntax-entry ?\' "\"" cfengine2-mode-syntax-table) + (modify-syntax-entry ?\` "\"" cfengine2-mode-syntax-table) - (set (make-local-variable 'indent-line-function) #'cfengine-indent-line) + (set (make-local-variable 'indent-line-function) #'cfengine2-indent-line) (set (make-local-variable 'outline-regexp) "[ \t]*\\(\\sw\\|\\s_\\)+:+") - (set (make-local-variable 'outline-level) #'cfengine-outline-level) + (set (make-local-variable 'outline-level) #'cfengine2-outline-level) (set (make-local-variable 'fill-paragraph-function) #'cfengine-fill-paragraph) - (define-abbrev-table 'cfengine-mode-abbrev-table cfengine-mode-abbrevs) + (define-abbrev-table 'cfengine2-mode-abbrev-table cfengine-mode-abbrevs) (setq font-lock-defaults - '(cfengine-font-lock-keywords nil nil nil beginning-of-line)) + '(cfengine2-font-lock-keywords nil nil nil beginning-of-line)) ;; Fixme: set the args of functions in evaluated classes to string ;; syntax, and then obey syntax properties. - (setq imenu-generic-expression cfengine-imenu-expression) + (setq imenu-generic-expression cfengine2-imenu-expression) (set (make-local-variable 'beginning-of-defun-function) - #'cfengine-beginning-of-defun) - (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun)) + #'cfengine2-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) #'cfengine2-end-of-defun)) ;;;###autoload (defun cfengine-auto-mode () - "Choose between `cfengine-mode' and `cfengine3-mode' depending + "Choose between `cfengine2-mode' and `cfengine3-mode' depending on the buffer contents" (let ((v3 nil)) (save-restriction @@ -481,7 +503,9 @@ on the buffer contents" (while (not (or (eobp) v3)) (setq v3 (looking-at (concat cfengine3-defuns-regex "\\>"))) (forward-line))) - (if v3 (cfengine3-mode) (cfengine-mode)))) + (if v3 (cfengine3-mode) (cfengine2-mode)))) + +(defalias 'cfengine-mode 'cfengine-auto-mode) (provide 'cfengine3) (provide 'cfengine) -- cgit v1.2.1 From 728a1f2bbbf6af5166f52af7fefac72fa83b495c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= Date: Wed, 21 Dec 2011 07:20:40 -0500 Subject: * lisp/battery.el (battery-linux-sysfs): Add missing parameters from acpi. --- lisp/ChangeLog | 4 ++++ lisp/battery.el | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc5764e3666..cf029ddb03e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-21 Jérémy Compostella + + * battery.el (battery-linux-sysfs): Add missing parameters from acpi. + 2011-12-21 Teodor Zlatanov * progmodes/cfengine.el: Add Version. diff --git a/lisp/battery.el b/lisp/battery.el index 3b245ed644d..bb899f2beae 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -421,10 +421,15 @@ format introduced in Linux version 2.4.25. The following %-sequences are provided: %c Current capacity (mAh or mWh) +%r Current rate %B Battery status (verbose) +%d Temperature (in degrees Celsius) %p Battery load percentage -%L AC line status (verbose)" - (let (charging-state +%L AC line status (verbose) +%m Remaining time (to charge or discharge) in minutes +%h Remaining time (to charge or discharge) in hours +%t Remaining time (to charge or discharge) in the form `h:min'" + (let (charging-state rate temperature hours (charge-full 0.0) (charge-now 0.0) (energy-full 0.0) @@ -444,6 +449,12 @@ The following %-sequences are provided: (and (re-search-forward "POWER_SUPPLY_STATUS=\\(.*\\)$" nil t) (member charging-state '("Unknown" "Full" nil)) (setq charging-state (match-string 1))) + (when (re-search-forward + "POWER_SUPPLY_\\(CURRENT\\|POWER\\)_NOW=\\([0-9]*\\)$" + nil t) + (setq rate (float (string-to-number (match-string 2))))) + (when (re-search-forward "POWER_SUPPLY_TEMP=\\([0-9]*\\)$" nil t) + (setq temperature (match-string 1))) (let (full-string now-string) ;; Sysfs may list either charge (mAh) or energy (mWh). ;; Keep track of both, and choose which to report later. @@ -466,12 +477,30 @@ The following %-sequences are provided: (setq energy-full (+ energy-full (string-to-number full-string)) energy-now (+ energy-now - (string-to-number now-string))))))))) + (string-to-number now-string)))))) + (goto-char (point-min)) + (when (and energy-now rate (not (zerop rate)) + (re-search-forward + "POWER_SUPPLY_VOLTAGE_NOW=\\([0-9]*\\)$" nil t)) + (let ((remaining (if (string= charging-state "Discharging") + energy-now + (- energy-full energy-now)))) + (setq hours (/ (/ (* remaining (string-to-number + (match-string 1))) + rate) + 10000000.0))))))) (list (cons ?c (cond ((or (> charge-full 0) (> charge-now 0)) (number-to-string charge-now)) ((or (> energy-full 0) (> energy-now 0)) (number-to-string energy-now)) (t "N/A"))) + (cons ?r (if rate (format "%.1f" (/ rate 1000000.0)) "N/A")) + (cons ?m (if hours (format "%d" (* hours 60)) "N/A")) + (cons ?h (if hours (format "%d" hours) "N/A")) + (cons ?t (if hours + (format "%d:%02d" hours (* (- hours (floor hours)) 60)) + "N/A")) + (cons ?d (or temperature "N/A")) (cons ?B (or charging-state "N/A")) (cons ?p (cond ((> charge-full 0) (format "%.1f" -- cgit v1.2.1 From 5da6dcc815adb1dbcaf0c43141dacdf7aa4b0589 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 21 Dec 2011 15:02:38 +0100 Subject: text.texi: add a section about Org Mode. This section describes general concepts behind Org Mode and redirects to the Org Manual when necessary. --- doc/emacs/text.texi | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index c27a2c2936d..37a85a89ea2 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -21,7 +21,10 @@ are also often useful for editing programs. the file contains ordinary text, use Text mode, which customizes Emacs in small ways for the syntactic conventions of text. Outline mode provides special commands for operating on text with an outline -structure. +structure. Org mode extends Outline mode and turn Emacs into a +full-fledged organizer: you can manage TODO lists, store notes and +publish them in many formats. + @iftex @xref{Outline Mode}. @end iftex @@ -70,6 +73,7 @@ for editing such pictures. * Case:: Changing the case of text. * Text Mode:: The major modes for editing text files. * Outline Mode:: Editing outlines. +* Org Mode:: The Emacs organizer. * TeX Mode:: Editing input to the formatter TeX. * HTML Mode:: Editing HTML and SGML files. * Nroff Mode:: Editing input to the formatter nroff. @@ -1250,6 +1254,143 @@ automatically by putting this in your init file (@pxref{Init File}): (eval-after-load "outline" '(require 'foldout)) @end example +@node Org Mode +@section Org Mode +@kindex TAB @r{(Org Mode)} +@kindex S-TAB @r{(Org Mode)} +@cindex organizer +@cindex planner +@findex org-mode +@cindex fold +@cindex headline +@kindex M- @r{(Org Mode)} +@kindex M- @r{(Org Mode)} +@kindex M- @r{(Org Mode)} +@kindex M- @r{(Org Mode)} +@kindex S-M- @r{(Org Mode)} +@kindex S-M- @r{(Org Mode)} +@kindex S-M- @r{(Org Mode)} +@kindex S-M- @r{(Org Mode)} + +Org mode extends Outline mode to turn Emacs into an organizer and an +authoring system. + +When editing a file ending with the @file{.org} extension, Emacs +automatically uses @code{org-mode} as the major mode. In this mode, +headlines start with one (or more) leading star(s) and comments start +with the @code{#} character at the beginning of a line. + +@example +* This is the first headline +** This is a first sub-headline +* This is the second headline + +Some content here. + +# Some comment here. +@end example + +From here, you can use Org mode as a simple outliner: @key{TAB} on a +headline will cycle through the various folding states of a subtree, +and @key{S-TAB} anywhere in the buffer will (un)fold the whole +structure. + +You can also manipulate the structure of your document by moving a +headline up and down with @key{M-} and @key{M-}, or by +promoting and demoting a headline with @key{M-} and +@key{M-}. If you want to act on the whole subtree (i.e. the +headline and its content, including other headlines), simply add the +@kbd{Shift} key and use @key{S-M-}, @key{S-M-}, +@key{S-M-} and @key{S-M-}. + +For further details, see @ref{Document Structure,,,org, The Org Manual}. + +@menu +* Org as an organizer:: Manage TODO lists and agendas +* Org as an authoring system:: Export to various formats +@end menu + +@node Org as an organizer +@subsection Org as an organizer + +@cindex TODO keywords +@kindex C-c C-t @r{(Org Mode)} +@kindex C-c C-s @r{(Org Mode)} +@kindex C-c C-d @r{(Org Mode)} +@vindex org-todo-keywords +@findex org-todo +@findex org-agenda +@cindex scheduled +@cindex deadline +@cindex agenda + +Each headline can be turned into a TODO item calling @code{org-todo} +with @key{C-c C-t} anywhere on it. This will add the TODO keyword +@code{TODO}. Hit @key{C-c C-t} to cycle through the list of available +TODO keywords: you can configure the variable @code{org-todo-keywords} +to use your own list of keywords. + +Now that you have something to do, let's add a date to it: pressing +@key{C-c C-s} on a headline will add @code{SCHEDULED} below it, and +you will be prompted for a date through the calendar. @key{C-c C-d} +has the same effect, except that the item will have a @code{DEADLINE} +instead. + +Now that some TODO items are planned in the current file, add it to +the list of agenda files with @key{C-c [}. Calling the interactive +command @code{org-agenda} will prompt you for what you want to see: a +list of things to do this week, a list of TODO items with specific +keywords, etc. + +For further details, see @ref{TODO items,,,org, The Org Manual} and +@ref{Dates and times,,,org, The Org Manual}. + +@node Org as an authoring system +@subsection Org as an authoring system +@cindex export +@findex org-export +@cindex publish +@cindex code block +@cindex quote + +You may want to format your Org notes nicely and to prepare them for +export and publication. Org supports simple text formatting: + +@example +- This text is /emphasized/ +- This item uses *a bold font* +- This text is _underlined_ +- This text uses =a teletype font= +@end example + +If a paragraph is a quote or an example, you can use specific +environments: + +@example +#+begin_quote +``This is a quote.'' +#+end_quote + +#+begin_example +This is an example. +#+end_example +@end example + +These environments will be displayed in a specific way with respect +to the selected export/publish backend. + +To export the current buffer, press the @key{C-c C-e} key anywhere in +an Org buffer. Supported export formats include @code{HTML}, La@TeX{} +and @file{.odt} (OpenDocument format.) Depending on your system +installation, you can also directly export to @code{pdf}. + +To export several files at once to a specific directory either locally +or on the Internet, you will need to define a list of projects through +the variable @code{org-publish-project-alist}. + +For further details, see @ref{Exporting,,,org, The Org Manual} and +@ref{Publishing,,,org, The Org Manual}. + @node TeX Mode @section @TeX{} Mode @cindex @TeX{} mode -- cgit v1.2.1 From bace743a4a6760cdb3620b0b50396c73ffd16b52 Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Wed, 21 Dec 2011 19:33:38 +0100 Subject: * files.el (file-remote-p): Fix docstring. (Bug#10319) --- lisp/ChangeLog | 4 ++++ lisp/files.el | 53 +++++++++++++++++++++++++++++++++++------------------ 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf029ddb03e..2cf35375245 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-21 Drew Adams + + * files.el (file-remote-p): Fix docstring. (Bug#10319) + 2011-12-21 Jérémy Compostella * battery.el (battery-linux-sysfs): Add missing parameters from acpi. diff --git a/lisp/files.el b/lisp/files.el index 40b6e7d56b4..0f7386511f6 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -917,24 +917,41 @@ See `load-file' for a different interface to `load'." (defun file-remote-p (file &optional identification connected) "Test whether FILE specifies a location on a remote system. -Returns nil or a string identifying the remote connection (ideally -a prefix of FILE). For example, the remote identification for filename -\"/user@host:/foo\" could be \"/user@host:\". -A file is considered \"remote\" if accessing it is likely to be slower or -less reliable than accessing local files. -Furthermore, relative file names do not work across remote connections. - -IDENTIFICATION specifies which part of the identification shall -be returned as string. IDENTIFICATION can be the symbol -`method', `user', `host' or `localname'; any other value is -handled like nil and means to return the complete identification -string. - -If CONNECTED is non-nil, the function returns an identification only -if FILE is located on a remote system, and a connection is established -to that remote system. - -`file-remote-p' will never open a connection on its own." +A file is considered remote if accessing it is likely to +be slower or less reliable than accessing local files. + +`file-remote-p' never opens a new remote connection. It can +only reuse a connection that is already open. + +Return nil or a string identifying the remote connection +\(ideally a prefix of FILE). Return nil if FILE is a relative +file name. + +When IDENTIFICATION is nil, the returned string is a complete +remote identifier: with components method, user, and host. The +components are those present in FILE, with defaults filled in for +any that are missing. + +IDENTIFICATION can specify which part of the identification to +return. IDENTIFICATION can be the symbol `method', `user', +`host', or `localname'. Any other value is handled like nil and +means to return the complete identification. The string returned +for IDENTIFICATION `localname' can differ depending on whether +there is an existing connection. + +If CONNECTED is non-nil, return an identification only if FILE is +located on a remote system and a connection is established to +that remote system. + +Tip: You can use this expansion of remote identifier components + to derive a new remote file name from an existing one. For + example, if FILE is \"/sudo::/path/to/file\" then + + \(concat \(file-remote-p FILE) \"/bin/sh\") + + returns a remote file name for file \"/bin/sh\" that has the + same remote identifier as FILE but expanded; a name such as + \"/sudo:root@myhost:/bin/sh\"." (let ((handler (find-file-name-handler file 'file-remote-p))) (if handler (funcall handler 'file-remote-p file identification connected) -- cgit v1.2.1 From 0ab393996c1c1345b2f969e987329e5e4010ddda Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 22 Dec 2011 05:56:49 +0200 Subject: doc/emacs/building.texi (Debugger Operation): Fix a typo in "@end iftex". --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/building.texi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 8e2b278f84b..6cf181199c5 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-12-22 Eli Zaretskii + + * building.texi (Debugger Operation): Fix a typo: "@end iftext" + should be @end iftex". + 2011-12-21 Chong Yidong * maintaining.texi (Advanced C-x v v): Use fileset terminology. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 47a3329f88d..880335830bd 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -550,7 +550,7 @@ This is the basic interface for interacting with a debugger, used by @kbd{M-x gud-gdb} and other commands listed in @iftex the preceding section. -@end iftext +@end iftex @ifnottex @ref{Starting GUD}. @end ifnottex -- cgit v1.2.1 From 2785d02431f6f90b5013e490f9ad5c21dd51f6de Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 22 Dec 2011 18:14:41 +0800 Subject: More updates for VC documentation. * doc/emacs/vc1-xtra.texi (Version Headers): Note that these are for Subversion, CVS, etc. only. (General VC Options): De-document vc-keep-workfiles. Fix RCS-isms. * doc/emacs/maintaining.texi (Change Log Commands): Don't specially mention vc-update-change-log which is CVS-only. --- doc/emacs/ChangeLog | 10 +++ doc/emacs/building.texi | 2 +- doc/emacs/maintaining.texi | 24 ++----- doc/emacs/vc1-xtra.texi | 167 +++++++++++++-------------------------------- 4 files changed, 65 insertions(+), 138 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 6cf181199c5..0621fa4e003 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,13 @@ +2011-12-22 Chong Yidong + + * maintaining.texi (Change Log Commands): Don't specially mention + vc-update-change-log which is CVS-only. + + * vc1-xtra.texi (Version Headers): Note that these are for + Subversion, CVS, etc. only. + (General VC Options): De-document vc-keep-workfiles. Fix + RCS-isms. + 2011-12-22 Eli Zaretskii * building.texi (Debugger Operation): Fix a typo: "@end iftext" diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 880335830bd..963bd510f67 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -565,7 +565,7 @@ Mode}). Completion is available for most debugger commands commands to repeat them. @iftex See the next section -@end iftext +@end iftex @ifnottex @xref{Commands of GUD}, @end ifnottex diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 488bdf87320..68a34ca3a77 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1438,13 +1438,11 @@ different revision with @kbd{C-u C-x v v}. @section Change Logs @cindex change log - A change log file contains a chronological record of when and why you -have changed a program, consisting of a sequence of entries describing -individual changes. Normally it is kept in a file called -@file{ChangeLog} in the same directory as the file you are editing, or -one of its parent directories. A single @file{ChangeLog} file can -record changes for all the files in its directory and all its -subdirectories. + Many software projects keep a @dfn{change log}. This is a file, +normally named @file{ChangeLog}, containing a chronological record of +when and how the program was changed. Sometimes, there are several +change log files, each recording the changes in one directory or +directory tree. @menu * Change Log Commands:: Commands for editing change log files. @@ -1476,7 +1474,7 @@ rather than starting a new item. You can combine multiple changes of the same nature. If you don't enter any text after the initial @kbd{C-x 4 a}, any subsequent -@kbd{C-x 4 a} adds another symbol to the change. +@kbd{C-x 4 a} adds another symbol to the change log entry. @vindex add-log-always-start-new-record If @code{add-log-always-start-new-record} is non-@code{nil}, @@ -1514,15 +1512,7 @@ ordering of entries. Version control systems are another way to keep track of changes in your program and keep a change log. In the VC log buffer, typing @kbd{C-c C-a} (@code{log-edit-insert-changelog}) inserts the relevant -Change Log entry, if one exists (@pxref{Log Buffer}). You can also -insert a VC log entry into a Change Log buffer by typing @kbd{C-x v a} -(@code{vc-update-change-log}) in the Change Log buffer -@iftex -(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}). -@end iftex -@ifnottex -(@pxref{Change Logs and VC}). -@end ifnottex +Change Log entry, if one exists. @xref{Log Buffer}. @node Format of ChangeLog @subsection Format of ChangeLog diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 700003db58a..8df5bfbd551 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -204,123 +204,63 @@ So the program won't really work as retrieved. @node Version Headers @subsubsection Inserting Version Control Headers - Sometimes it is convenient to put version identification strings -directly into working files. Certain special strings called -@dfn{version headers} are replaced in each successive version by the -number of that version, the name of the user who created it, and other -relevant information. All of the back ends that VC supports have such -a mechanism, except GNU Arch. - - VC does not normally use the information contained in these headers. -The exception is RCS---with RCS, version headers are sometimes more -reliable than the master file to determine which version of the file -you are editing. - - Searching for RCS version headers is controlled by the variable -@code{vc-consult-headers}. If it is non-@code{nil} (the default), -Emacs searches for headers to determine the version number you are -editing. Setting it to @code{nil} disables this feature. - - Note that although CVS uses the same kind of version headers as RCS -does, VC never searches for these headers if you are using CVS, -regardless of the above setting. + On Subversion, CVS, RCS, and SCCS, you can put certain special +strings called @dfn{version headers} into a work file. When the file +is committed, the version control system automatically puts the +revision number, the name of the user who made the commit, and other +relevant information into the version header. + +@vindex vc-consult-headers + VC does not normally use the information in the version headers. As +an exception, when using RCS, Emacs uses the version header, if there +is one, to determine the file version, since it is often more reliable +than the RCS master file. To inhibit using the version header this +way, change the variable @code{vc-consult-headers} to @code{nil}. @kindex C-x v h @findex vc-insert-headers - You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to -insert a suitable header string. - -@table @kbd -@item C-x v h -Insert headers in a file for use with your version-control system. -@end table - @vindex vc-@var{backend}-header - The default header string is @samp{@w{$}Id$} for RCS and -@samp{@w{%}W%} for SCCS. You can specify other headers to insert by -setting the variables @code{vc-@var{backend}-header} where -@var{backend} is @code{rcs} or @code{sccs}. - - Instead of a single string, you can specify a list of strings; then -each string in the list is inserted as a separate header on a line of -its own. - - It may be necessary to use apparently-superfluous backslashes when -writing the strings that you put in this variable. For instance, you -might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra -backslash prevents the string constant from being interpreted as a -header, if the Emacs Lisp file containing it is maintained with -version control. - -@vindex vc-comment-alist - Each header is inserted surrounded by tabs, inside comment delimiters, -on a new line at point. Normally the ordinary comment -start and comment end strings of the current mode are used, but for -certain modes, there are special comment delimiters for this purpose; -the variable @code{vc-comment-alist} specifies them. Each element of -this list has the form @code{(@var{mode} @var{starter} @var{ender})}. + To insert a suitable header string into the current buffer, type +@kbd{C-x v h} (@code{vc-insert-headers}). This command works only on +Subversion, CVS, RCS, and SCCS. The variable +@code{vc-@var{backend}-header} contains the list of keywords to insert +into the version header; for instance, CVS uses @code{vc-cvs-header}, +whose default value is @code{'("\$Id\$")}. (The extra backslashes +prevent the string constant from being interpreted as a header, if the +Emacs Lisp file defining it is maintained with version control.) The +@kbd{C-x v h} command inserts each keyword in the list on a new line +at point, surrounded by tabs, and inside comment delimiters if +necessary. @vindex vc-static-header-alist The variable @code{vc-static-header-alist} specifies further strings to add based on the name of the buffer. Its value should be a list of elements of the form @code{(@var{regexp} . @var{format})}. Whenever -@var{regexp} matches the buffer name, @var{format} is inserted as part -of the header. A header line is inserted for each element that matches -the buffer name, and for each string specified by -@code{vc-@var{backend}-header}. The header line is made by processing the -string from @code{vc-@var{backend}-header} with the format taken from the -element. The default value for @code{vc-static-header-alist} is as follows: - -@example -@group -(("\\.c$" . - "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\ -#endif /* lint */\n")) -@end group -@end example - -@noindent -It specifies insertion of text of this form: - -@example -@group - -#ifndef lint -static char vcid[] = "@var{string}"; -#endif /* lint */ -@end group -@end example - -@noindent -Note that the text above starts with a blank line. - - If you use more than one version header in a file, put them close -together in the file. The mechanism in @code{revert-buffer} that -preserves markers may not handle markers positioned between two version -headers. +@var{regexp} matches the buffer name, @var{format} is also inserted as +part of the version header. A @samp{%s} in @var{format} is replaced +with the file's version control type. @node Customizing VC @subsection Customizing VC @vindex vc-handled-backends -The variable @code{vc-handled-backends} determines which version + The variable @code{vc-handled-backends} determines which version control systems VC should handle. The default value is @code{(RCS CVS SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems that are currently supported. If you want VC to ignore one or more of -these systems, exclude its name from the list. To disable VC entirely, -set this variable to @code{nil}. +these systems, exclude its name from the list. To disable VC +entirely, set this variable to @code{nil}. -The order of systems in the list is significant: when you visit a file -registered in more than one system, VC uses the system that comes + The order of systems in the list is significant: when you visit a +file registered in more than one system, VC uses the system that comes first in @code{vc-handled-backends} by default. The order is also -significant when you register a file for the first time, see +significant when you register a file for the first time @iftex -@ref{Registering,,,emacs, the Emacs Manual}, +(@pxref{Registering,,,emacs, the Emacs Manual}). @end iftex @ifnottex -@ref{Registering}, +(@pxref{Registering}). @end ifnottex -for details. @menu * General VC Options:: Options that apply to multiple back ends. @@ -337,40 +277,27 @@ maintained with version control. If you want to make backup files even for files that use version control, set the variable @code{vc-make-backup-files} to a non-@code{nil} value. -@vindex vc-keep-workfiles - Normally the work file exists all the time, whether it is locked or -not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking -in a new version with @kbd{C-x v v} deletes the work file; but any -attempt to visit the file with Emacs creates it again. (With CVS, work -files are always kept.) - @vindex vc-follow-symlinks - Editing a version-controlled file through a symbolic link can be -dangerous. It bypasses the version control system---you can edit the -file without locking it, and fail to check your changes in. Also, -your changes might overwrite those of another user. To protect against -this, VC checks each symbolic link that you visit, to see if it points -to a file under version control. - - The variable @code{vc-follow-symlinks} controls what to do when a -symbolic link points to a version-controlled file. If it is @code{nil}, -VC only displays a warning message. If it is @code{t}, VC automatically -follows the link, and visits the real file instead, telling you about -this in the echo area. If the value is @code{ask} (the default), VC -asks you each time whether to follow the link. +@cindex symbolic links (and version control) + Editing a version-controlled file through a symbolic link may cause +unexpected results, if you are unaware that the underlying file is +version-controlled. The variable @code{vc-follow-symlinks} controls +what Emacs does if you try to visit a symbolic link pointing to a +version-controlled file. If the value is @code{ask} (the default), +Emacs asks for confirmation. If it is @code{nil}, Emacs just displays +a warning message. If it is @code{t}, Emacs automatically follows the +link and visits the real file instead. @vindex vc-suppress-confirm If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v} and @kbd{C-x v i} can save the current buffer without asking, and -@kbd{C-x v u} also operates without asking for confirmation. (This -variable does not affect @kbd{C-x v c}; that operation is so drastic -that it should always ask for confirmation.) +@kbd{C-x v u} also operates without asking for confirmation. @vindex vc-command-messages VC mode does much of its work by running the shell commands for the -appropriate backend. If @code{vc-command-messages} is non-@code{nil}, VC -displays messages to indicate which shell commands it runs, and -additional messages when the commands finish. +appropriate version control system. If @code{vc-command-messages} is +non-@code{nil}, VC displays messages to indicate which shell commands +it runs, and additional messages when the commands finish. @vindex vc-path You can specify additional directories to search for version control -- cgit v1.2.1 From d031f2c7b72ba418abc4bc9622a25bd4fa7d8a6c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 22 Dec 2011 18:16:45 +0800 Subject: * vc/vc-hooks.el (vc-keep-workfiles): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/vc/vc-hooks.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2cf35375245..0ecab2b569c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-22 Chong Yidong + + * vc/vc-hooks.el (vc-keep-workfiles): Doc fix. + 2011-12-21 Drew Adams * files.el (file-remote-p): Fix docstring. (Bug#10319) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 148f6cde930..c9e30772318 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -114,9 +114,9 @@ Otherwise, not displayed." :group 'vc) (defcustom vc-keep-workfiles t - "If non-nil, don't delete working files after registering changes. -If the back-end is CVS, workfiles are always kept, regardless of the -value of this flag." + "Whether to keep work files on disk after commits, on a locking VCS. +This variable has no effect on modern merging-based version +control systems." :type 'boolean :group 'vc) -- cgit v1.2.1 From 5ccaba1fdb812151ebc7040d14fd3c2aaaba4bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 22 Dec 2011 14:58:40 +0100 Subject: * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc. --- src/ChangeLog | 4 ++++ src/nsfont.m | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e40a7f3fbe0..87750228f43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-12-22 Jan Djärv + + * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc. + 2011-12-21 Jan Djärv * nsterm.m (x_free_frame_resources): Release diff --git a/src/nsfont.m b/src/nsfont.m index 080af447b0a..eb57f5e5953 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -155,7 +155,6 @@ ns_spec_to_descriptor (Lisp_Object font_spec) if (family != nil) { fdesc = [fdesc fontDescriptorWithFamily: family]; - [fdesc autorelease]; } [fdAttrs release]; -- cgit v1.2.1 From 1c4757d6962cf08eb30cc7675557ff38507f58a8 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 23 Dec 2011 00:32:46 +0200 Subject: * progmodes/grep.el (rgrep): Fix docstring. Fixes: debbugs:10185 --- lisp/ChangeLog | 4 ++++ lisp/progmodes/grep.el | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ecab2b569c..2967979eff6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-22 Juri Linkov + + * progmodes/grep.el (rgrep): Fix docstring. (Bug#10185) + 2011-12-22 Chong Yidong * vc/vc-hooks.el (vc-keep-workfiles): Doc fix. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index b379ce67fd7..38b17a9b1ee 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -959,7 +959,10 @@ can use \\[next-error] (M-x next-error), or \\\\[compile-goto-err in the grep output buffer, to go to the lines where grep found matches. -This command shares argument histories with \\[lgrep] and \\[grep-find]." +This command shares argument histories with \\[lgrep] and \\[grep-find]. + +When called programmatically and FILES is nil, REGEXP is expected +to specify a command to run." (interactive (progn (grep-compute-defaults) -- cgit v1.2.1 From db7ab02fe1ddf4ba6a5d523c4462afdb3fd11dc5 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 23 Dec 2011 01:30:10 +0200 Subject: Small doc fixes. --- doc/lispref/modes.texi | 2 +- etc/NEWS | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 9d652901e53..fcb7c772936 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -701,7 +701,7 @@ init file.) @cindex help for major mode @cindex documentation for major mode - The @code{describe-mode} function is provides information about major + The @code{describe-mode} function provides information about major modes. It is normally bound to @kbd{C-h m}. It uses the value of the variable @code{major-mode} (@pxref{Major Modes}), which is why every major mode command needs to set that variable. diff --git a/etc/NEWS b/etc/NEWS index 95d47de5bba..5e274f987e5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -548,7 +548,7 @@ the lines in the current rectangle. With a prefix argument, this prompts for a number to count from and for a format string. +++ -** The default value of redisplay-dont-change is now t +** The default value of redisplay-dont-pause is now t This makes Emacs feel more responsive to editing commands that arrive at high rate, e.g. if you lean on some key, because stopping redisplay in the middle (when this variable is nil) forces more expensive -- cgit v1.2.1 From 60ff536cc3ed1f53a6fd2d453894beca63888a72 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 23 Dec 2011 01:44:27 +0100 Subject: lisp/desktop.el (desktop-internal-v2s): Fix typos in docstring (bug#10353). --- lisp/ChangeLog | 4 ++++ lisp/desktop.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2967979eff6..834244dcc72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-23 Juanma Barranquero + + * desktop.el (desktop-internal-v2s): Fix typos in docstring (bug#10353). + 2011-12-22 Juri Linkov * progmodes/grep.el (rgrep): Fix docstring. (Bug#10185) diff --git a/lisp/desktop.el b/lisp/desktop.el index 8a61bec0eea..34a51eb51dc 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -702,9 +702,9 @@ is nil, ask the user where to save the desktop." ;; ---------------------------------------------------------------------------- (defun desktop-internal-v2s (value) "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE. -TXT is a string that when read and evaluated yields value. +TXT is a string that when read and evaluated yields VALUE. QUOTE may be `may' (value may be quoted), -`must' (values must be quoted), or nil (value may not be quoted)." +`must' (value must be quoted), or nil (value must not be quoted)." (cond ((or (numberp value) (null value) (eq t value) (keywordp value)) (cons 'may (prin1-to-string value))) -- cgit v1.2.1 From cb5e207c74eb289482bdab37d9c298ec88987062 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 23 Dec 2011 11:48:54 +0000 Subject: Fix unstable fontification inside templates. --- lisp/ChangeLog | 18 ++++++++++++ lisp/progmodes/cc-fonts.el | 21 ++------------ lisp/progmodes/cc-langs.el | 38 +++++++++++++++----------- lisp/progmodes/cc-mode.el | 68 ++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 98 insertions(+), 47 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 834244dcc72..f1a3a452367 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2011-12-23 Alan Mackenzie + + Fix unstable fontification inside templates. + + * progmodes/cc-langs.el (c-before-font-lock-functions): newly + created from the singular version. The (c c++ objc) entry now + additionally has c-set-fl-decl-start. The other languages (apart + from AWK) have that as a single entry. + + * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): The + functionality for "local" declarations has been extracted to + c-set-fl-decl-start. + + * progmodes/cc-mode.el: (c-common-init, c-after-change): Changes + due to pluralisation of c-before-font-lock-functions. + (c-set-fl-decl-start): New function, extracted from + c-font-lock-enclosing-decls and enhanced. + 2011-12-23 Juanma Barranquero * desktop.el (desktop-internal-v2s): Fix typos in docstring (bug#10353). diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index c6c8bd107f6..97cfe808322 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1538,25 +1538,8 @@ casts and declarations are fontified. Used on level 2 and higher." ;; prevent a repeat invocation. See elisp/lispref page "Search-based ;; Fontification". (let* ((paren-state (c-parse-state)) - (start (point)) - (bod-lim (max (- (point) 500) (point-min))) - decl-context bo-decl in-typedef type-type ps-elt) - - ;; First, are we actually in a "local" declaration? - (setq decl-context (c-beginning-of-decl-1 bod-lim) - bo-decl (point) - in-typedef (looking-at c-typedef-key)) - (if in-typedef (c-forward-token-2)) - (when (and (eq (car decl-context) 'same) - (< bo-decl start)) - ;; Are we genuinely at a type? - (setq type-type (c-forward-type t)) - (if (and type-type - (or (not (eq type-type 'maybe)) - (looking-at c-symbol-key))) - (c-font-lock-declarators limit t in-typedef))) - - ;; Secondly, are we in any nested struct/union/class/etc. braces? + decl-context in-typedef ps-elt) + ;; Are we in any nested struct/union/class/etc. braces? (while paren-state (setq ps-elt (car paren-state) paren-state (cdr paren-state)) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 96f0887eec0..2b6dc7a9df7 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -485,28 +485,34 @@ The functions are called even when font locking isn't enabled. When the mode is initialized, the functions are called with parameters \(point-min) and \(point-max).") -(c-lang-defconst c-before-font-lock-function - "If non-nil, a function called just before font locking. -Typically it will extend the region about to be fontified \(see +(c-lang-defconst c-before-font-lock-functions + ;; For documentation see the following c-lang-defvar of the same name. + ;; The value here may be a list of functions or a single function. + t 'c-set-fl-decl-start + (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP c-set-fl-decl-start) + awk 'c-awk-extend-and-syntax-tablify-region) +(c-lang-defvar c-before-font-lock-functions + (let ((fs (c-lang-const c-before-font-lock-functions))) + (if (listp fs) + fs + (list fs))) + "If non-nil, a list of functions called just before font locking. +Typically they will extend the region about to be fontified \(see below) and will set `syntax-table' text properties on the region. -It takes 3 parameters, the BEG, END, and OLD-LEN supplied to -every after-change function; point is undefined on both entry and -exit; on entry, the buffer will have been widened and match-data -will have been saved; the return value is ignored. +These functions will be run in the order given. Each of them +takes 3 parameters, the BEG, END, and OLD-LEN supplied to every +after-change function; point is undefined on both entry and exit; +on entry, the buffer will have been widened and match-data will +have been saved; the return value is ignored. -The function may extend the region to be fontified by setting the +The functions may extend the region to be fontified by setting the buffer local variables c-new-BEG and c-new-END. -The function is called even when font locking is disabled. +The functions are called even when font locking is disabled. -When the mode is initialized, this function is called with -parameters \(point-min), \(point-max) and ." - t nil - (c c++ objc) 'c-neutralize-syntax-in-and-mark-CPP - awk 'c-awk-extend-and-syntax-tablify-region) -(c-lang-defvar c-before-font-lock-function - (c-lang-const c-before-font-lock-function)) +When the mode is initialized, these functions are called with +parameters \(point-min), \(point-max) and .") ;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK). diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 36b95f4b3f5..01111d2b536 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -633,13 +633,13 @@ compatible with old code; callers should always specify it." (setq c-new-BEG (point-min)) (setq c-new-END (point-max)) (save-excursion - (if c-get-state-before-change-functions - (mapc (lambda (fn) - (funcall fn (point-min) (point-max))) - c-get-state-before-change-functions)) - (if c-before-font-lock-function - (funcall c-before-font-lock-function (point-min) (point-max) - (- (point-max) (point-min)))))) + (mapc (lambda (fn) + (funcall fn (point-min) (point-max))) + c-get-state-before-change-functions) + (mapc (lambda (fn) + (funcall fn (point-min) (point-max) + (- (point-max) (point-min)))) + c-before-font-lock-functions))) (set (make-local-variable 'outline-regexp) "[^#\n\^M]") (set (make-local-variable 'outline-level) 'c-outline-level) @@ -881,7 +881,7 @@ Note that the style variables are always made local to the buffer." ;; Point is undefined both before and after this function call, the buffer ;; has been widened, and match-data saved. The return value is ignored. ;; - ;; This function is the C/C++/ObjC value of `c-before-font-lock-function'. + ;; This function is in the C/C++/ObjC value of `c-before-font-lock-functions'. ;; ;; Note: SPEED _MATTERS_ IN THIS FUNCTION!!! ;; @@ -1026,7 +1026,7 @@ Note that the style variables are always made local to the buffer." ;; these caches from inside them, and we must thus be sure that this ;; has already been executed. ;; - ;; This calls the language variable c-before-font-lock-function, if non nil. + ;; This calls the language variable c-before-font-lock-functions, if non nil. ;; This typically sets `syntax-table' properties. (c-save-buffer-state () @@ -1066,9 +1066,53 @@ Note that the style variables are always made local to the buffer." ;; larger than (beg end). (setq c-new-BEG beg c-new-END end) - (if c-before-font-lock-function - (save-excursion - (funcall c-before-font-lock-function beg end old-len))))))) + (save-excursion + (mapc (lambda (fn) + (funcall fn beg end old-len)) + c-before-font-lock-functions)))))) + +(defun c-set-fl-decl-start (beg end old-len) + ;; If the beginning of line containing c-new-BEG is in the middle of a + ;; "local" declaration (i.e. one which does not start outside of braces + ;; enclosing this pos, such as a struct), set c-new-BEG to (at most) the + ;; beginning of that declaration. Note that declarations, in this sense, + ;; can be nested. c-new-BEG will be used later by c-font-lock-declarations. + ;; + ;; This function is an element of c-before-font-lock-functions, being called + ;; (indirectly) from an after-change function. The after-change-functions' + ;; parameters BEG, OLD and OLD-LEN are ignored here. + (when font-lock-mode + (goto-char (c-point 'bol c-new-BEG)) + (let ((lit-limits (c-literal-limits)) + bod-lim bo-decl) + + (when lit-limits ; Comment or string. + (goto-char (car lit-limits))) + (setq bod-lim (max (- (point) 500) (point-min))) + + (while + ;; Go to a less nested declaration each time round this loop. + (and + (eq (car (c-beginning-of-decl-1 bod-lim)) 'same) + (progn (setq bo-decl (point)) + ;; Are we looking at a keyword such as "template" or + ;; "typedef" which can decorate a type, or the type itself? + (when (or (looking-at c-prefix-spec-kwds-re) + (c-forward-type t)) + ;; We've found another candidate position. + (setq c-new-BEG (min c-new-BEG bo-decl)) + (goto-char bo-decl)) + t) + ;; Try and go out a level to search again. + (progn + (c-backward-syntactic-ws bod-lim) + (or (memq (char-before) '(?\( ?\[)) + (and (eq (char-before) ?\<) + (eq (c-get-char-property + (1- (point)) 'syntax-table) + c-<-as-paren-syntax)))) + (not (bobp))) + (backward-char))))) ; back over (, [, <. (defun c-after-font-lock-init () ;; Put on `font-lock-mode-hook'. -- cgit v1.2.1 From 9022ae07ee78e37adae69b7b55cabc926a7459f7 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 23 Dec 2011 14:14:12 +0100 Subject: Fix bug#10354. * doc/lispref/variables.texi (Variables with Restricted Values): Change reference to variable. --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/variables.texi | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index a03521d449b..5b90c2a1f9f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-12-23 Juanma Barranquero + + * variables.texi (Variables with Restricted Values): + Change reference to variable (bug#10354). + 2011-12-13 Martin Rudalics * windows.texi (Splitting Windows): Use t instead of non-nil diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 091765043e3..62f5092497a 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1998,6 +1998,6 @@ This variable holds a list of all variables of type @code{DEFVAR_BOOL}. Attempting to assign them any other value will result in an error: @example -(setq window-min-height 5.0) -@error{} Wrong type argument: integerp, 5.0 +(setq undo-limit 1000.0) +@error{} Wrong type argument: integerp, 1000.0 @end example -- cgit v1.2.1 From bffcee0ae34feab9b8b6f7d769f1107418eab724 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 23 Dec 2011 15:31:35 +0100 Subject: * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for existence of source file. (Bug#10325) --- lisp/ChangeLog | 5 +++++ lisp/net/ange-ftp.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1a3a452367..4f7d61b9cb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-23 Michael Albinus + + * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for + existence of source file. (Bug#10325) + 2011-12-23 Alan Mackenzie Fix unstable fontification inside templates. diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 06d200c4e3e..b7fdd9a9bd8 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3637,6 +3637,10 @@ so return the size on the remote host exactly. See RFC 3659." (setq filename (expand-file-name filename) newname (expand-file-name newname)) + (or (file-exists-p filename) + (signal 'file-error + (list "Copy file" "no such file or directory" filename))) + ;; canonicalize newname if a directory. (if (file-directory-p newname) (setq newname (expand-file-name (file-name-nondirectory filename) newname))) -- cgit v1.2.1 From d048e1e6bd3f634ca8308003e67967f134098c6c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 23 Dec 2011 16:51:51 +0200 Subject: Fix assertion violation in pop_it when org-indent-mode is used. src/xdisp.c (handle_invisible_prop): Handle correctly an invisible property that ends at ZV, so that the bidi iteration could be resumed from there (after widening). --- src/ChangeLog | 6 ++++++ src/xdisp.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 87750228f43..a3521bcd031 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-12-23 Eli Zaretskii + + * xdisp.c (handle_invisible_prop): Handle correctly an invisible + property that ends at ZV, so that the bidi iteration could be + resumed from there (after widening). + 2011-12-22 Jan Djärv * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc. diff --git a/src/xdisp.c b/src/xdisp.c index 41d393a65a7..90375ba1a33 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4090,10 +4090,11 @@ handle_invisible_prop (struct it *it) while (invis_p); /* The position newpos is now either ZV or on visible text. */ - if (it->bidi_p && newpos < ZV) + if (it->bidi_p) { EMACS_INT bpos = CHAR_TO_BYTE (newpos); - int on_newline = FETCH_BYTE (bpos) == '\n'; + int on_newline = + bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n'; int after_newline = newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n'; @@ -4111,16 +4112,16 @@ handle_invisible_prop (struct it *it) SET_TEXT_POS (tpos, newpos, bpos); reseat_1 (it, tpos, 0); - /* If we reseat on a newline, we need to prep the + /* If we reseat on a newline/ZV, we need to prep the bidi iterator for advancing to the next character - after the newline, keeping the current paragraph + after the newline/EOB, keeping the current paragraph direction (so that PRODUCE_GLYPHS does TRT wrt prepending/appending glyphs to a glyph row). */ if (on_newline) { it->bidi_it.first_elt = 0; it->bidi_it.paragraph_dir = pdir; - it->bidi_it.ch = '\n'; + it->bidi_it.ch = (bpos == ZV_BYTE) ? -1 : '\n'; it->bidi_it.nchars = 1; it->bidi_it.ch_len = 1; } -- cgit v1.2.1 From 341cf6ac7ae9d58c4edc6de7b7499a1bcb58ab37 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 24 Dec 2011 21:16:53 +0200 Subject: * lisp/window.el (window--state-get-1): Set `FORCE' arg of `mark' to t. Fixes: debbugs:10348 --- lisp/ChangeLog | 5 +++++ lisp/window.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f7d61b9cb1..f8f8e7eb695 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-24 Juri Linkov + + * window.el (window--state-get-1): Set `FORCE' arg of `mark' to t. + (Bug#10348) + 2011-12-23 Michael Albinus * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for diff --git a/lisp/window.el b/lisp/window.el index 16a38ca03c6..0014d85a816 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -3604,7 +3604,7 @@ specific buffers." (with-current-buffer (window-buffer window) (let ((point (window-point-1 window)) (start (window-start window)) - (mark (mark))) + (mark (mark t))) `((buffer ,(buffer-name buffer) (selected . ,selected) -- cgit v1.2.1 From 3ba1a2ad82e1936f03b46b1db284945af806788b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 24 Dec 2011 21:24:10 +0200 Subject: Add the bug number #10360 to the entry for 2011-12-23T14:51:51Z!eliz@gnu.org. The real fix for bug 10360 is in 2011-12-23T14:51:51Z!eliz@gnu.org. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a3521bcd031..3a0264e394b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,7 +2,7 @@ * xdisp.c (handle_invisible_prop): Handle correctly an invisible property that ends at ZV, so that the bidi iteration could be - resumed from there (after widening). + resumed from there (after widening). (Bug#10360) 2011-12-22 Jan Djärv -- cgit v1.2.1 From be8b11bb321086c7edfdcf4ac079d694e6a8b97b Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 24 Dec 2011 19:32:31 +0000 Subject: Introduce a mechanism to widen the region used in context font locking. Use this to protect declarations from losing their contexts. --- lisp/ChangeLog | 23 +++++ lisp/progmodes/cc-langs.el | 26 +++++- lisp/progmodes/cc-mode.el | 204 +++++++++++++++++++++++++++++++-------------- 3 files changed, 187 insertions(+), 66 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8f8e7eb695..8c368473871 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2011-12-24 Alan Mackenzie + + Introduce a mechanism to widen the region used in context font + locking. Use this to protect declarations from losing their + contexts. + + * progmodes/cc-langs.el (c-before-font-lock-functions): replace + c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming). + (c-before-context-fontification-functions): new defvar, a list of + functions to be run just before context (etc.) font locking. + + * progmodes/cc-mode.el (c-extend-font-lock-region-for-macros): + new, functionality extracted from + c-neutralize-syntax-in-and-mark-CPP. + (c-in-after-change-fontification): new variable. + (c-after-change): Set c-in-after-change-fontification. + (c-set-fl-decl-start): Rejig its interface, so it can be called + from both after-change and context fontifying. + (c-change-set-fl-decl-start, c-context-set-fl-decl-start): new + functions. + (c-standard-font-lock-fontify-region-function): new variable. + (c-font-lock-fontify-region): new function. + 2011-12-24 Juri Linkov * window.el (window--state-get-1): Set `FORCE' arg of `mark' to t. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 2b6dc7a9df7..2aca885ca35 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -488,8 +488,9 @@ parameters \(point-min) and \(point-max).") (c-lang-defconst c-before-font-lock-functions ;; For documentation see the following c-lang-defvar of the same name. ;; The value here may be a list of functions or a single function. - t 'c-set-fl-decl-start - (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP c-set-fl-decl-start) + t 'c-change-set-fl-decl-start + (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP + c-change-set-fl-decl-start) awk 'c-awk-extend-and-syntax-tablify-region) (c-lang-defvar c-before-font-lock-functions (let ((fs (c-lang-const c-before-font-lock-functions))) @@ -514,6 +515,27 @@ The functions are called even when font locking is disabled. When the mode is initialized, these functions are called with parameters \(point-min), \(point-max) and .") +(c-lang-defconst c-before-context-fontification-functions + awk nil + t 'c-context-set-fl-decl-start) + ;; For documentation see the following c-lang-defvar of the same name. + ;; The value here may be a list of functions or a single function. +(c-lang-defvar c-before-context-fontification-functions + (let ((fs (c-lang-const c-before-context-fontification-functions))) + (if (listp fs) + fs + (list fs))) + "If non-nil, a list of functions called just before context (or +other non-change) fontification is done. Typically they will +extend the region. + +These functions will be run in the order given. Each of them +takes 2 parameters, the BEG and END of the region to be +fontified. Point is undefined on both entry and exit. On entry, +the buffer will have been widened and match-data will have been +saved; the return value is a cons of the adjusted +region, (NEW-BEG . NEW-END).") + ;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK). (c-lang-defconst c-at-vsemi-p-fn diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 01111d2b536..1bc0741b0aa 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -599,8 +599,8 @@ that requires a literal mode spec at compile time." ;; Buffer local variables defining the region to be fontified by a font lock ;; after-change function. They are set in c-after-change to -;; after-change-function's BEG and END, and may be modified by a -;; `c-before-font-lock-function'. +;; after-change-functions' BEG and END, and may be modified by functions in +;; `c-before-font-lock-functions'. (defvar c-new-BEG 0) (make-variable-buffer-local 'c-new-BEG) (defvar c-new-END 0) @@ -830,6 +830,35 @@ Note that the style variables are always made local to the buffer." ; with a c-cpp-delimiter category property (setq c-old-EOM (point))) +(defun c-extend-font-lock-region-for-macros (begg endd &optional old-len) + ;; Extend the region (BEGG ENDD) to cover all (possibly changed) + ;; preprocessor macros; return the cons (new-BEG . new-END). OLD-LEN should + ;; be either the old length parameter when called from an + ;; after-change-function, or nil otherwise. This defun uses the variables + ;; c-old-BOM, c-new-BOM. + ;; + ;; Point is undefined on both entry and exit to this function. The buffer + ;; will have been widened on entry. + (let (limits new-beg new-end) + (goto-char c-old-BOM) ; already set to old start of macro or begg. + (setq new-beg + (min begg + (if (setq limits (c-state-literal-at (point))) + (cdr limits) ; go forward out of any string or comment. + (point)))) + + (goto-char endd) + (if (setq limits (c-state-literal-at (point))) + (goto-char (car limits))) ; go backward out of any string or comment. + (if (c-beginning-of-macro) + (c-end-of-macro)) + (setq new-end (max endd + (if old-len + (+ (- c-old-EOM old-len) (- endd begg)) + c-old-EOM) + (point))) + (cons new-beg new-end))) + (defun c-neutralize-CPP-line (beg end) ;; BEG and END bound a region, typically a preprocessor line. Put a ;; "punctuation" syntax-table property on syntactically obtrusive @@ -886,26 +915,14 @@ Note that the style variables are always made local to the buffer." ;; Note: SPEED _MATTERS_ IN THIS FUNCTION!!! ;; ;; This function might make hidden buffer changes. - (c-save-buffer-state (limits) + (c-save-buffer-state (new-bounds) ;; First determine the region, (c-new-BEG c-new-END), which will get font ;; locked. It might need "neutralizing". This region may not start ;; inside a string, comment, or macro. - (goto-char c-old-BOM) ; already set to old start of macro or begg. - (setq c-new-BEG - (min c-new-BEG - (if (setq limits (c-state-literal-at (point))) - (cdr limits) ; go forward out of any string or comment. - (point)))) - - (goto-char endd) - (if (setq limits (c-state-literal-at (point))) - (goto-char (car limits))) ; go backward out of any string or comment. - (if (c-beginning-of-macro) - (c-end-of-macro)) - (setq c-new-END (max c-new-END - (+ (- c-old-EOM old-len) (- endd begg)) - (point))) - + (setq new-bounds (c-extend-font-lock-region-for-macros + c-new-BEG c-new-END old-len)) + (setq c-new-BEG (car new-bounds) + c-new-END (cdr new-bounds)) ;; Clear all old relevant properties. (c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table '(1)) (c-clear-char-property-with-value c-new-BEG c-new-END 'category 'c-cpp-delimiter) @@ -1015,6 +1032,11 @@ Note that the style variables are always made local to the buffer." c-get-state-before-change-functions)) )))) +(defvar c-in-after-change-fontification nil) +(make-variable-buffer-local 'c-in-after-change-fontification) +;; A flag to prevent region expanding stuff being done twice for after-change +;; fontification. + (defun c-after-change (beg end old-len) ;; Function put on `after-change-functions' to adjust various caches ;; etc. Prefer speed to finesse here, since there will be an order @@ -1066,63 +1088,113 @@ Note that the style variables are always made local to the buffer." ;; larger than (beg end). (setq c-new-BEG beg c-new-END end) + (setq c-in-after-change-fontification t) (save-excursion (mapc (lambda (fn) (funcall fn beg end old-len)) c-before-font-lock-functions)))))) -(defun c-set-fl-decl-start (beg end old-len) - ;; If the beginning of line containing c-new-BEG is in the middle of a - ;; "local" declaration (i.e. one which does not start outside of braces - ;; enclosing this pos, such as a struct), set c-new-BEG to (at most) the - ;; beginning of that declaration. Note that declarations, in this sense, - ;; can be nested. c-new-BEG will be used later by c-font-lock-declarations. +(defun c-set-fl-decl-start (pos) + ;; If the beginning of the line containing POS is in the middle of a "local" + ;; declaration (i.e. one which does not start outside of braces enclosing + ;; POS, such as a struct), return the beginning of that declaration. + ;; Otherwise return POS. Note that declarations, in this sense, can be + ;; nested. ;; - ;; This function is an element of c-before-font-lock-functions, being called - ;; (indirectly) from an after-change function. The after-change-functions' - ;; parameters BEG, OLD and OLD-LEN are ignored here. - (when font-lock-mode - (goto-char (c-point 'bol c-new-BEG)) - (let ((lit-limits (c-literal-limits)) - bod-lim bo-decl) - - (when lit-limits ; Comment or string. - (goto-char (car lit-limits))) - (setq bod-lim (max (- (point) 500) (point-min))) - - (while - ;; Go to a less nested declaration each time round this loop. - (and - (eq (car (c-beginning-of-decl-1 bod-lim)) 'same) - (progn (setq bo-decl (point)) - ;; Are we looking at a keyword such as "template" or - ;; "typedef" which can decorate a type, or the type itself? - (when (or (looking-at c-prefix-spec-kwds-re) - (c-forward-type t)) - ;; We've found another candidate position. - (setq c-new-BEG (min c-new-BEG bo-decl)) - (goto-char bo-decl)) - t) - ;; Try and go out a level to search again. - (progn - (c-backward-syntactic-ws bod-lim) - (or (memq (char-before) '(?\( ?\[)) - (and (eq (char-before) ?\<) - (eq (c-get-char-property - (1- (point)) 'syntax-table) - c-<-as-paren-syntax)))) - (not (bobp))) - (backward-char))))) ; back over (, [, <. - + ;; This function is called indirectly from font locking stuff - either from + ;; c-after-change (to prepare for after-change font-lockng) or from font + ;; lock context (etc.) fontification. + (let ((lit-limits (c-literal-limits)) + (new-pos pos) + bod-lim bo-decl) + (goto-char (c-point 'bol new-pos)) + (when lit-limits ; Comment or string. + (goto-char (car lit-limits))) + (setq bod-lim (max (- (point) 500) (point-min))) + + (while + ;; Go to a less nested declaration each time round this loop. + (and + (eq (car (c-beginning-of-decl-1 bod-lim)) 'same) + (progn (setq bo-decl (point)) + ;; Are we looking at a keyword such as "template" or + ;; "typedef" which can decorate a type, or the type itself? + (when (or (looking-at c-prefix-spec-kwds-re) + (c-forward-type t)) + ;; We've found another candidate position. + (setq new-pos (min new-pos bo-decl)) + (goto-char bo-decl)) + t) + ;; Try and go out a level to search again. + (progn + (c-backward-syntactic-ws bod-lim) + (or (memq (char-before) '(?\( ?\[)) + (and (eq (char-before) ?\<) + (eq (c-get-char-property + (1- (point)) 'syntax-table) + c-<-as-paren-syntax)))) + (not (bobp))) + (backward-char)) + new-pos)) ; back over (, [, <. + +(defun c-change-set-fl-decl-start (beg end old-len) + ;; Set c-new-BEG to the beginning of a "local" declaration if it('s BOL) is + ;; inside one. This is called from an after-change-function, but the + ;; parameters BEG END and OLD-LEN are ignored. See `c-set-fl-decl-start' + ;; for the detailed functionality. + (if font-lock-mode + (setq c-new-BEG (c-set-fl-decl-start c-new-BEG)))) + +(defun c-context-set-fl-decl-start (beg end) + ;; Return a cons (NEW-BEG . END), where NEW-BEG is the beginning of a + ;; "local" declaration (BOL at) NEW is inside or BEG. See + ;; `c-set-fl-decl-start' for the detailed functionality. + (cons (c-set-fl-decl-start beg) end)) + +(defvar c-standard-font-lock-fontify-region-function nil + "Standard value of `font-lock-fontify-region-function'") + +(defun c-font-lock-fontify-region (beg end &optional verbose) + ;; Effectively advice around `font-lock-fontify-region' which extends the + ;; region (BEG END), for example, to avoid context fontification chopping + ;; off the start of the context. Do not do anything if it's already been + ;; done (i.e. from and after-change fontification. An example (C++) where + ;; this used to happen is this: + ;; + ;; template + ;; + ;; + ;; void myfunc(T* p) {} + ;; + ;; Type a space in the first blank line, and the fontification of the next + ;; line was fouled up by context fontification. + (let ((new-beg beg) (new-end end) new-region) + (if c-in-after-change-fontification + (setq c-in-after-change-fontification nil) + (save-restriction + (widen) + (save-excursion + (mapc (lambda (fn) + (setq new-region (funcall fn new-beg new-end)) + (setq new-beg (car new-region) new-end (cdr new-region))) + c-before-context-fontification-functions)))) + (funcall c-standard-font-lock-fontify-region-function + new-beg new-end verbose))) + (defun c-after-font-lock-init () - ;; Put on `font-lock-mode-hook'. + ;; Put on `font-lock-mode-hook'. This function ensures our after-change + ;; function will get excuted before the font-lock one. Amongst other + ;; things. (remove-hook 'after-change-functions 'c-after-change t) - (add-hook 'after-change-functions 'c-after-change nil t)) + (add-hook 'after-change-functions 'c-after-change nil t) + (setq c-standard-font-lock-fontify-region-function + (default-value 'font-lock-fontify-region-function))) (defun c-font-lock-init () "Set up the font-lock variables for using the font-lock support in CC Mode. This does not load the font-lock package. Use after -`c-basic-common-init' and after cc-fonts has been loaded." +`c-basic-common-init' and after cc-fonts has been loaded. +This function is called from `c-common-init', once per mode initialization." (set (make-local-variable 'font-lock-defaults) `(,(if (c-major-mode-is 'awk-mode) @@ -1136,6 +1208,10 @@ This does not load the font-lock package. Use after c-beginning-of-syntax (font-lock-mark-block-function . c-mark-function))) + + (make-local-variable 'font-lock-fontify-region-function) + (setq font-lock-fontify-region-function 'c-font-lock-fontify-region) + (if (featurep 'xemacs) (make-local-hook 'font-lock-mode-hook)) (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t)) -- cgit v1.2.1 From ca22b785992df70ddc30ec471484e0204a384277 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 25 Dec 2011 10:06:42 +0100 Subject: * callint.c (Fcall_interactively): Don't truncate prompt string. --- src/ChangeLog | 4 ++++ src/callint.c | 11 ++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3a0264e394b..a1210e08424 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-12-24 Andreas Schwab + + * callint.c (Fcall_interactively): Don't truncate prompt string. + 2011-12-23 Eli Zaretskii * xdisp.c (handle_invisible_prop): Handle correctly an invisible diff --git a/src/callint.c b/src/callint.c index 80e24f6c8ee..25a4713e270 100644 --- a/src/callint.c +++ b/src/callint.c @@ -274,8 +274,6 @@ invoke it. If KEYS is omitted or nil, the return value of ptrdiff_t i, nargs; int foo; - char prompt1[100]; - char *tem1; int arg_from_tty = 0; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; int key_count; @@ -491,13 +489,8 @@ invoke it. If KEYS is omitted or nil, the return value of tem = string; for (i = 1; *tem; i++) { - strncpy (prompt1, tem + 1, sizeof prompt1 - 1); - prompt1[sizeof prompt1 - 1] = 0; - tem1 = strchr (prompt1, '\n'); - if (tem1) *tem1 = 0; - - visargs[0] = build_string (prompt1); - if (strchr (prompt1, '%')) + visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n")); + if (strchr (SSDATA (visargs[0]), '%')) callint_message = Fformat (i, visargs); else callint_message = visargs[0]; -- cgit v1.2.1 From 28796b3a4a606e835300ce853c17a24e90da9bf0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 25 Dec 2011 10:55:37 +0100 Subject: * etags.c (C_entries): Properly skip over string and character constants inside brackets. (Bug#10357) --- lib-src/ChangeLog | 5 +++++ lib-src/etags.c | 36 +++++++++++++++++++----------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 40404828e0f..e989473219c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-25 Andreas Schwab + + * etags.c (C_entries): Properly skip over string and character + constants and comments inside brackets. (Bug#10357) + 2011-12-04 Juanma Barranquero * emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0; diff --git a/lib-src/etags.c b/lib-src/etags.c index 30d90e9d911..8852c9faea4 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -3189,24 +3189,12 @@ C_entries (int c_ext, FILE *inf) } continue; } - else if (bracketlev > 0) - { - switch (c) - { - case ']': - if (--bracketlev > 0) - continue; - break; - case '\0': - CNL_SAVE_DEFINEDEF (); - break; - } - continue; - } else switch (c) { case '"': inquote = TRUE; + if (bracketlev > 0) + continue; if (inattribute) break; switch (fvdef) @@ -3224,9 +3212,11 @@ C_entries (int c_ext, FILE *inf) continue; case '\'': inchar = TRUE; + if (bracketlev > 0) + continue; if (inattribute) break; - if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) + if (fvdef != finlist && fvdef != fignore && fvdef != vignore) { fvextern = FALSE; fvdef = fvnone; @@ -3238,6 +3228,8 @@ C_entries (int c_ext, FILE *inf) incomm = TRUE; lp++; c = ' '; + if (bracketlev > 0) + continue; } else if (/* cplpl && */ *lp == '/') { @@ -3270,7 +3262,7 @@ C_entries (int c_ext, FILE *inf) for (cp = newlb.buffer; cp < lp-1; cp++) if (!iswhite (*cp)) { - if (*cp == '*' && *(cp+1) == '/') + if (*cp == '*' && cp[1] == '/') { cp++; cpptoken = TRUE; @@ -3284,7 +3276,17 @@ C_entries (int c_ext, FILE *inf) continue; case '[': bracketlev++; - continue; + continue; + default: + if (bracketlev > 0) + { + if (c == ']') + --bracketlev; + else if (c == '\0') + CNL_SAVE_DEFINEDEF (); + continue; + } + break; } /* switch (c) */ -- cgit v1.2.1 From 2170cb536dd1b4860618bf4ab7f1311c0d35e5a3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 25 Dec 2011 18:46:49 +0800 Subject: Fix GDB/MI inline completion. * progmodes/gdb-mi.el (gdb-input): Accept command and handler function as separate arguments. (gdb-init-1, gdb-non-stop-handler, gdb-check-target-async) (gdb-tooltip-print-1, gud-watch, gdb-speedbar-update) (gdb-var-list-children, gdb-var-set-format, gdb-var-delete-1) (gdb-var-delete-children, gdb-edit-value, gdb-var-update) (gdb-stopped, def-gdb-auto-update-trigger) (gdb-place-breakpoints, gdb-select-thread, gdb-select-frame) (gdb-get-changed-registers, gdb-get-main-selected-frame): Callers changed. (gud-gdbmi-completions): New function. (gdb): Use it for generating the completion table. * progmodes/gud.el (gud-gdb-fetch-lines-filter): Just use gud-gdb-marker-filter without taking it as an argument. (gud-gdb-run-command-fetch-lines): Caller changed. (gud-gdb-completion-function): New variable. (gud-gdb-completion-at-point): Use it. (gud-gdb-completions-1): Split from gud-gdb-completions. --- lisp/ChangeLog | 22 +++++ lisp/progmodes/gdb-mi.el | 214 +++++++++++++++++++++++++---------------------- lisp/progmodes/gud.el | 104 +++++++++++------------ 3 files changed, 187 insertions(+), 153 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c368473871..f5b3c92f8c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2011-12-25 Chong Yidong + + * progmodes/gud.el (gud-gdb-fetch-lines-filter): Just use + gud-gdb-marker-filter without taking it as an argument. + (gud-gdb-run-command-fetch-lines): Caller changed. + (gud-gdb-completion-function): New variable. + (gud-gdb-completion-at-point): Use it. + (gud-gdb-completions-1): Split from gud-gdb-completions. + + * progmodes/gdb-mi.el (gdb-input): Accept command and handler + function as separate arguments. + (gdb-init-1, gdb-non-stop-handler, gdb-check-target-async) + (gdb-tooltip-print-1, gud-watch, gdb-speedbar-update) + (gdb-var-list-children, gdb-var-set-format, gdb-var-delete-1) + (gdb-var-delete-children, gdb-edit-value, gdb-var-update) + (gdb-stopped, def-gdb-auto-update-trigger) + (gdb-place-breakpoints, gdb-select-thread, gdb-select-frame) + (gdb-get-changed-registers, gdb-get-main-selected-frame): Callers + changed. + (gud-gdbmi-completions): New function. + (gdb): Use it for generating the completion table. + 2011-12-24 Alan Mackenzie Introduce a mechanism to widen the region used in context font diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 9ad76f2cfec..128ff4bb143 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -811,8 +811,8 @@ detailed description of this mode. (define-key gud-minor-mode-map [left-margin C-mouse-3] 'gdb-mouse-jump) - (set (make-local-variable 'comint-prompt-regexp) - "^(.*gdb[+]?) *") + (set (make-local-variable 'gud-gdb-completion-function) + 'gud-gdbmi-completions) (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point nil 'local) @@ -862,31 +862,28 @@ detailed description of this mode. (set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter) (gdb-input ;; Needs GDB 6.4 onwards - (list (concat "-inferior-tty-set " - (or - ;; The process can run on a remote host. - (process-get (get-process "gdb-inferior") 'remote-tty) - (process-tty-name (get-process "gdb-inferior")))) - 'ignore)) + (concat "-inferior-tty-set " + (or + ;; The process can run on a remote host. + (process-get (get-process "gdb-inferior") 'remote-tty) + (process-tty-name (get-process "gdb-inferior")))) + 'ignore) (if (eq window-system 'w32) - (gdb-input (list "-gdb-set new-console off" 'ignore))) - (gdb-input (list "-gdb-set height 0" 'ignore)) + (gdb-input "-gdb-set new-console off" 'ignore)) + (gdb-input "-gdb-set height 0" 'ignore) (when gdb-non-stop - (gdb-input (list "-gdb-set non-stop 1" 'gdb-non-stop-handler))) + (gdb-input "-gdb-set non-stop 1" 'gdb-non-stop-handler)) - (gdb-input (list "-enable-pretty-printing" 'ignore)) + (gdb-input "-enable-pretty-printing" 'ignore) ;; find source file and compilation directory here (if gdb-create-source-file-list - (gdb-input - ; Needs GDB 6.2 onwards. - (list "-file-list-exec-source-files" 'gdb-get-source-file-list))) - (gdb-input - ; Needs GDB 6.0 onwards. - (list "-file-list-exec-source-file" 'gdb-get-source-file)) - (gdb-input - (list "-gdb-show prompt" 'gdb-get-prompt))) + ;; Needs GDB 6.2 onwards. + (gdb-input "-file-list-exec-source-files" 'gdb-get-source-file-list)) + ;; Needs GDB 6.0 onwards. + (gdb-input "-file-list-exec-source-file" 'gdb-get-source-file) + (gdb-input "-gdb-show prompt" 'gdb-get-prompt)) (defun gdb-non-stop-handler () (goto-char (point-min)) @@ -897,8 +894,8 @@ detailed description of this mode. (setq gdb-non-stop nil) (setq gdb-supports-non-stop nil)) (setq gdb-supports-non-stop t) - (gdb-input (list "-gdb-set target-async 1" 'ignore)) - (gdb-input (list "-list-target-features" 'gdb-check-target-async)))) + (gdb-input "-gdb-set target-async 1" 'ignore) + (gdb-input "-list-target-features" 'gdb-check-target-async))) (defun gdb-check-target-async () (goto-char (point-min)) @@ -906,7 +903,7 @@ detailed description of this mode. (message "Target doesn't support non-stop mode. Turning it off.") (setq gdb-non-stop nil) - (gdb-input (list "-gdb-set non-stop 0" 'ignore)))) + (gdb-input "-gdb-set non-stop 0" 'ignore))) (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") @@ -951,9 +948,8 @@ detailed description of this mode. (goto-char (point-min)) (if (search-forward "expands to: " nil t) (unless (looking-at "\\S-+.*(.*).*") - (gdb-input - (list (concat "-data-evaluate-expression " expr) - `(lambda () (gdb-tooltip-print ,expr)))))))) + (gdb-input (concat "-data-evaluate-expression " expr) + `(lambda () (gdb-tooltip-print ,expr))))))) (defun gdb-init-buffer () (set (make-local-variable 'gud-minor-mode) 'gdbmi) @@ -1083,9 +1079,8 @@ With arg, enter name of variable to be watched in the minibuffer." (concat (if (derived-mode-p 'gdb-registers-mode) "$") (tooltip-identifier-from-point (point))))))) (set-text-properties 0 (length expr) nil expr) - (gdb-input - (list (concat "-var-create - * " expr "") - `(lambda () (gdb-var-create-handler ,expr))))))) + (gdb-input (concat "-var-create - * " expr "") + `(lambda () (gdb-var-create-handler ,expr)))))) (message "gud-watch is a no-op in this mode.")))) (defun gdb-var-create-handler (expr) @@ -1114,7 +1109,7 @@ With arg, enter name of variable to be watched in the minibuffer." (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame) (not (gdb-pending-p 'gdb-speedbar-timer))) ;; Dummy command to update speedbar even when idle. - (gdb-input (list "-environment-pwd" 'gdb-speedbar-timer-fn)) + (gdb-input "-environment-pwd" 'gdb-speedbar-timer-fn) ;; Keep gdb-pending-triggers non-nil till end. (gdb-add-pending 'gdb-speedbar-timer))) @@ -1135,12 +1130,9 @@ With arg, enter name of variable to be watched in the minibuffer." ; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards. (defun gdb-var-list-children (varnum) - (gdb-input - (list (concat "-var-update " varnum) 'ignore)) - (gdb-input - (list (concat "-var-list-children --all-values " - varnum) - `(lambda () (gdb-var-list-children-handler ,varnum))))) + (gdb-input (concat "-var-update " varnum) 'ignore) + (gdb-input (concat "-var-list-children --all-values " varnum) + `(lambda () (gdb-var-list-children-handler ,varnum)))) (defun gdb-var-list-children-handler (varnum) (let* ((var-list nil) @@ -1172,13 +1164,11 @@ With arg, enter name of variable to be watched in the minibuffer." "Set the output format for a variable displayed in the speedbar." (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) (varnum (car var))) - (gdb-input - (list (concat "-var-set-format " varnum " " format) 'ignore)) + (gdb-input (concat "-var-set-format " varnum " " format) 'ignore) (gdb-var-update))) (defun gdb-var-delete-1 (var varnum) - (gdb-input - (list (concat "-var-delete " varnum) 'ignore)) + (gdb-input (concat "-var-delete " varnum) 'ignore) (setq gdb-var-list (delq var gdb-var-list)) (dolist (varchild gdb-var-list) (if (string-match (concat (car var) "\\.") (car varchild)) @@ -1197,17 +1187,15 @@ With arg, enter name of variable to be watched in the minibuffer." (defun gdb-var-delete-children (varnum) "Delete children of variable object at point from the speedbar." - (gdb-input - (list (concat "-var-delete -c " varnum) 'ignore))) + (gdb-input (concat "-var-delete -c " varnum) 'ignore)) (defun gdb-edit-value (_text _token _indent) "Assign a value to a variable displayed in the speedbar." (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) (varnum (car var)) (value)) (setq value (read-string "New value: ")) - (gdb-input - (list (concat "-var-assign " varnum " " value) - `(lambda () (gdb-edit-value-handler ,value)))))) + (gdb-input (concat "-var-assign " varnum " " value) + `(lambda () (gdb-edit-value-handler ,value))))) (defconst gdb-error-regexp "\\^error,msg=\\(\".+\"\\)") @@ -1219,8 +1207,7 @@ With arg, enter name of variable to be watched in the minibuffer." ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. (defun gdb-var-update () (if (not (gdb-pending-p 'gdb-var-update)) - (gdb-input - (list "-var-update --all-values *" 'gdb-var-update-handler))) + (gdb-input "-var-update --all-values *" 'gdb-var-update-handler)) (gdb-add-pending 'gdb-var-update)) (defun gdb-var-update-handler () @@ -1700,13 +1687,17 @@ static char *magick[] = { gdb-continuation string "\"\n")) (setq gdb-continuation nil)))) -(defun gdb-input (item) - (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-log)) +(defun gdb-input (command handler-function) + "Send COMMAND to GDB via the MI interface. +Run the function HANDLER-FUNCTION, with no arguments, once the command is +complete." + (if gdb-enable-debug (push (list 'send-item command handler-function) + gdb-debug-log)) (setq gdb-token-number (1+ gdb-token-number)) - (setcar item (concat (number-to-string gdb-token-number) (car item))) - (push (cons gdb-token-number (car (cdr item))) gdb-handler-alist) + (setq command (concat (number-to-string gdb-token-number) command)) + (push (cons gdb-token-number handler-function) gdb-handler-alist) (process-send-string (get-buffer-process gud-comint-buffer) - (concat (car item) "\n"))) + (concat command "\n"))) ;; NOFRAME is used for gud execution control commands (defun gdb-current-context-command (command) @@ -1893,15 +1884,16 @@ is running." (let ((record-type (cadr output-record)) (arg1 (nth 2 output-record)) (arg2 (nth 3 output-record))) - (if (eq record-type 'gdb-error) - (gdb-done-or-error arg2 arg1 'error) - (if (eq record-type 'gdb-done) - (gdb-done-or-error arg2 arg1 'done) - ;; Suppress "No registers." since GDB 6.8 and earlier duplicates MI - ;; error message on internal stream. Don't print to GUD buffer. - (unless (and (eq record-type 'gdb-internals) - (string-equal (read arg1) "No registers.\n")) - (funcall record-type arg1)))))) + (cond ((eq record-type 'gdb-error) + (gdb-done-or-error arg2 arg1 'error)) + ((eq record-type 'gdb-done) + (gdb-done-or-error arg2 arg1 'done)) + ;; Suppress "No registers." GDB 6.8 and earlier + ;; duplicates MI error message on internal stream. + ;; Don't print to GUD buffer. + ((not (and (eq record-type 'gdb-internals) + (string-equal (read arg1) "No registers.\n"))) + (funcall record-type arg1))))) (setq gdb-output-sink 'user) ;; Remove padding. @@ -1994,11 +1986,10 @@ current thread and update GDB buffers." ;; -data-list-register-names needs to be issued for any stopped ;; thread (when (not gdb-register-names) - (gdb-input - (list (concat "-data-list-register-names" - (if gdb-supports-non-stop - (concat " --thread " thread-id))) - 'gdb-register-names-handler))) + (gdb-input (concat "-data-list-register-names" + (if gdb-supports-non-stop + (concat " --thread " thread-id))) + 'gdb-register-names-handler)) ;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler ;;; because synchronous GDB doesn't give these fields with CLI. @@ -2065,9 +2056,7 @@ current thread and update GDB buffers." ;; (frontend MI commands should not print to this stream) (defun gdb-console (output-field) (setq gdb-filter-output - (gdb-concat-output - gdb-filter-output - (read output-field)))) + (gdb-concat-output gdb-filter-output (read output-field)))) (defun gdb-done-or-error (output-field token-number type) (if (string-equal token-number "") @@ -2105,12 +2094,11 @@ current thread and update GDB buffers." (assq-delete-all token-number gdb-handler-alist))))) (defun gdb-concat-output (so-far new) - (let ((sink gdb-output-sink)) - (cond - ((eq sink 'user) (concat so-far new)) - ((eq sink 'emacs) - (gdb-append-to-partial-output new) - so-far)))) + (cond + ((eq gdb-output-sink 'user) (concat so-far new)) + ((eq gdb-output-sink 'emacs) + (gdb-append-to-partial-output new) + so-far))) (defun gdb-append-to-partial-output (string) (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer) @@ -2320,9 +2308,8 @@ trigger argument when describing buffer types with (memq signal ,signal-list)) (when (not (gdb-pending-p (cons (current-buffer) ',trigger-name))) - (gdb-input - (list ,gdb-command - (gdb-bind-function-to-buffer ',handler-name (current-buffer)))) + (gdb-input ,gdb-command + (gdb-bind-function-to-buffer ',handler-name (current-buffer))) (gdb-add-pending (cons (current-buffer) ',trigger-name)))))) ;; Used by disassembly buffer only, the rest use @@ -2449,13 +2436,10 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See ;; Only want one breakpoint icon at each location. (gdb-put-breakpoint-icon (string-equal flag "y") bptno (string-to-number line))) - (gdb-input - (list (concat "list " file ":1") - 'ignore)) - (gdb-input - (list "-file-list-exec-source-file" - `(lambda () (gdb-get-location - ,bptno ,line ,flag)))))))))) + (gdb-input (concat "list " file ":1") 'ignore) + (gdb-input "-file-list-exec-source-file" + `(lambda () (gdb-get-location + ,bptno ,line ,flag))))))))) (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") @@ -2785,7 +2769,7 @@ on the current line." (def-gdb-thread-buffer-command gdb-select-thread (let ((new-id (bindat-get-field thread 'id))) (gdb-setq-thread-number new-id) - (gdb-input (list (concat "-thread-select " new-id) 'ignore)) + (gdb-input (concat "-thread-select " new-id) 'ignore) (gdb-update)) "Select the thread at current line of threads buffer.") @@ -3541,8 +3525,8 @@ member." (if (gdb-buffer-shows-main-thread-p) (let ((new-level (bindat-get-field frame 'level))) (setq gdb-frame-number new-level) - (gdb-input (list (concat "-stack-select-frame " new-level) - 'ignore)) + (gdb-input (concat "-stack-select-frame " new-level) + 'ignore) (gdb-update)) (error "Could not select frame for non-current thread")) (error "Not recognized as frame line")))) @@ -3770,14 +3754,11 @@ member." ;; Needs GDB 6.4 onwards (used to fail with no stack). (defun gdb-get-changed-registers () - (if (and (gdb-get-buffer 'gdb-registers-buffer) - (not (gdb-pending-p 'gdb-get-changed-registers))) - (progn - (gdb-input - (list - "-data-list-changed-registers" - 'gdb-changed-registers-handler)) - (gdb-add-pending 'gdb-get-changed-registers)))) + (when (and (gdb-get-buffer 'gdb-registers-buffer) + (not (gdb-pending-p 'gdb-get-changed-registers))) + (gdb-input "-data-list-changed-registers" + 'gdb-changed-registers-handler) + (gdb-add-pending 'gdb-get-changed-registers))) (defun gdb-changed-registers-handler () (gdb-delete-pending 'gdb-get-changed-registers) @@ -3815,9 +3796,8 @@ is set in them." thread. Called from `gdb-update'." (if (not (gdb-pending-p 'gdb-get-main-selected-frame)) (progn - (gdb-input - (list (gdb-current-context-command "-stack-info-frame") - 'gdb-frame-handler)) + (gdb-input (gdb-current-context-command "-stack-info-frame") + 'gdb-frame-handler) (gdb-add-pending 'gdb-get-main-selected-frame)))) (defun gdb-frame-handler () @@ -4259,6 +4239,42 @@ BUFFER nil or omitted means use the current buffer." (set-window-margins window left-margin-width right-margin-width))))) + +;;; Functions for inline completion. + +(defvar gud-gdb-fetch-lines-in-progress) +(defvar gud-gdb-fetch-lines-string) +(defvar gud-gdb-fetch-lines-break) +(defvar gud-gdb-fetched-lines) + +(defun gud-gdbmi-completions (context command) + "Completion table for GDB/MI commands. +COMMAND is the prefix for which we seek completion. +CONTEXT is the text before COMMAND on the line." + (let ((gud-gdb-fetch-lines-in-progress t) + (gud-gdb-fetch-lines-string nil) + (gud-gdb-fetch-lines-break (length context)) + (gud-gdb-fetched-lines nil) + ;; This filter dumps output lines to `gud-gdb-fetched-lines'. + (gud-marker-filter #'gud-gdbmi-fetch-lines-filter) + complete-list) + (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) + (gdb-input (concat "complete " context command) + (lambda () (setq gud-gdb-fetch-lines-in-progress nil))) + (while gud-gdb-fetch-lines-in-progress + (accept-process-output (get-buffer-process gud-comint-buffer)))) + (gud-gdb-completions-1 gud-gdb-fetched-lines))) + +(defun gud-gdbmi-fetch-lines-filter (string) + "Custom filter function for `gud-gdbmi-completions'." + (setq string (concat gud-gdb-fetch-lines-string + (gud-gdbmi-marker-filter string))) + (while (string-match "\n" string) + (push (substring string gud-gdb-fetch-lines-break (match-beginning 0)) + gud-gdb-fetched-lines) + (setq string (substring string (match-end 0)))) + "") + (provide 'gdb-mi) ;;; gdb-mi.el ends here diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index de8da09768d..7215ac4ea73 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -756,6 +756,8 @@ directory and source-file directory for your debugger." (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point nil 'local) + (set (make-local-variable 'gud-gdb-completion-function) 'gud-gdb-completions) + (local-set-key "\C-i" 'completion-at-point) (setq comint-prompt-regexp "^(.*gdb[+]?) *") (setq paragraph-start comint-prompt-regexp) @@ -768,6 +770,12 @@ directory and source-file directory for your debugger." ;; context-sensitive command completion. We preserve that feature ;; in the GUD buffer by using a GDB command designed just for Emacs. +(defvar gud-gdb-completion-function nil + "Completion function for GDB commands. +It receives two arguments: COMMAND, the prefix for which we seek +completion; and CONTEXT, the text before COMMAND on the line. +It should return a list of completion strings.") + ;; The completion process filter indicates when it is finished. (defvar gud-gdb-fetch-lines-in-progress) @@ -806,28 +814,32 @@ CONTEXT is the text before COMMAND on the line." (and complete-list (string-match "^Undefined command: \"complete\"" (car complete-list)) (error "This version of GDB doesn't support the `complete' command")) - ;; Sort the list like readline. - (setq complete-list (sort complete-list (function string-lessp))) - ;; Remove duplicates. - (let ((first complete-list) - (second (cdr complete-list))) - (while second - (if (string-equal (car first) (car second)) - (setcdr first (setq second (cdr second))) - (setq first second - second (cdr second))))) - ;; Add a trailing single quote if there is a unique completion - ;; and it contains an odd number of unquoted single quotes. - (and (= (length complete-list) 1) - (let ((str (car complete-list)) - (pos 0) - (count 0)) - (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos) - (setq count (1+ count) - pos (match-end 0))) - (and (= (mod count 2) 1) - (setq complete-list (list (concat str "'")))))) - complete-list)) + (gud-gdb-completions-1 complete-list))) + +;; This function is also used by `gud-gdbmi-completions'. +(defun gud-gdb-completions-1 (complete-list) + ;; Sort the list like readline. + (setq complete-list (sort complete-list (function string-lessp))) + ;; Remove duplicates. + (let ((first complete-list) + (second (cdr complete-list))) + (while second + (if (string-equal (car first) (car second)) + (setcdr first (setq second (cdr second))) + (setq first second + second (cdr second))))) + ;; Add a trailing single quote if there is a unique completion + ;; and it contains an odd number of unquoted single quotes. + (and (= (length complete-list) 1) + (let ((str (car complete-list)) + (pos 0) + (count 0)) + (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos) + (setq count (1+ count) + pos (match-end 0))) + (and (= (mod count 2) 1) + (setq complete-list (list (concat str "'")))))) + complete-list) (defun gud-gdb-completion-at-point () "Return the data to complete the GDB command before point." @@ -838,7 +850,7 @@ CONTEXT is the text before COMMAND on the line." (point)))) (list start end (completion-table-dynamic - (apply-partially #'gud-gdb-completions + (apply-partially gud-gdb-completion-function (buffer-substring (comint-line-beginning-position) start)))))) @@ -851,11 +863,11 @@ CONTEXT is the text before COMMAND on the line." ;; The completion process filter is installed temporarily to slurp the ;; output of GDB up to the next prompt and build the completion list. -(defun gud-gdb-fetch-lines-filter (string filter) +(defun gud-gdb-fetch-lines-filter (string) "Filter used to read the list of lines output by a command. STRING is the output to filter. -It is passed through FILTER before we look at it." - (setq string (funcall filter string)) +It is passed through `gud-gdb-marker-filter' before we look at it." + (setq string (gud-gdb-marker-filter string)) (setq string (concat gud-gdb-fetch-lines-string string)) (while (string-match "\n" string) (push (substring string gud-gdb-fetch-lines-break (match-beginning 0)) @@ -880,17 +892,6 @@ It is passed through FILTER before we look at it." (defvar gud-gdb-fetched-stack-frame nil "Stack frames we are fetching from GDB.") -;(defun gud-gdb-get-scope-data (text token indent) -; ;; checkdoc-params: (indent) -; "Fetch data associated with a stack frame, and expand/contract it. -;Data to do this is retrieved from TEXT and TOKEN." -; (let ((args nil) (scope nil)) -; (gud-gdb-run-command-fetch-lines "info args") -; -; (gud-gdb-run-command-fetch-lines "info local") -; -; )) - (defun gud-gdb-get-stackframe (buffer) "Extract the current stack frame out of the GUD GDB BUFFER." (let ((newlst nil) @@ -934,21 +935,16 @@ It is passed through FILTER before we look at it." BUFFER is the current buffer which may be the GUD buffer in which to run. SKIP is the number of chars to skip on each line, it defaults to 0." (with-current-buffer gud-comint-buffer - (if (and (eq gud-comint-buffer buffer) - (save-excursion - (goto-char (point-max)) - (forward-line 0) - (not (looking-at comint-prompt-regexp)))) - nil - ;; Much of this copied from GDB complete, but I'm grabbing the stack - ;; frame instead. + (unless (and (eq gud-comint-buffer buffer) + (save-excursion + (goto-char (point-max)) + (forward-line 0) + (not (looking-at comint-prompt-regexp)))) (let ((gud-gdb-fetch-lines-in-progress t) (gud-gdb-fetched-lines nil) (gud-gdb-fetch-lines-string nil) (gud-gdb-fetch-lines-break (or skip 0)) - (gud-marker-filter - `(lambda (string) - (gud-gdb-fetch-lines-filter string ',gud-marker-filter)))) + (gud-marker-filter #'gud-gdb-fetch-lines-filter)) ;; Issue the command to GDB. (gud-basic-call command) ;; Slurp the output. @@ -3422,7 +3418,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference." ((xdb pdb) (concat "p " expr)) (sdb (concat expr "/")))) -(declare-function gdb-input "gdb-mi" (item)) +(declare-function gdb-input "gdb-mi" (command handler)) (declare-function tooltip-expr-to-print "tooltip" (event)) (declare-function tooltip-event-buffer "tooltip" (event)) @@ -3468,12 +3464,12 @@ so they have been disabled.")) (if (eq gud-minor-mode 'gdbmi) (if gdb-macro-info (gdb-input - (list (concat - "server macro expand " expr "\n") - `(lambda () (gdb-tooltip-print-1 ,expr)))) + (concat + "server macro expand " expr "\n") + `(lambda () (gdb-tooltip-print-1 ,expr))) (gdb-input - (list (concat cmd "\n") - `(lambda () (gdb-tooltip-print ,expr))))) + (concat cmd "\n") + `(lambda () (gdb-tooltip-print ,expr)))) (setq gud-tooltip-original-filter (process-filter process)) (set-process-filter process 'gud-tooltip-process-output) (gud-basic-call cmd)) -- cgit v1.2.1 From 3d992aa0700903718a0f3d0d2be1b6879878f2b9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 25 Dec 2011 22:16:00 +0800 Subject: More updates to Maintaining chapter of Emacs manual. * files.texi (Misc File Ops): Mention vc-delete-file. * maintaining.texi (Tags): Mention Semantic. (Create Tags Table, Etags Regexps): Copyedits. (Find Tag): Mention minibuffer completion. (List Tags): Mention completion-at-point. Completion is actually available in M-x list-tags. * programs.texi (Symbol Completion): Mention completion-at-point explicitly. * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC. Document vc-delete-file. --- admin/FOR-RELEASE | 6 +- doc/emacs/ChangeLog | 16 +++ doc/emacs/emacs.texi | 5 +- doc/emacs/files.texi | 13 +- doc/emacs/maintaining.texi | 303 ++++++++++++++++++++++----------------------- doc/emacs/programs.texi | 20 +-- doc/emacs/vc1-xtra.texi | 54 +++++--- etc/NEWS | 4 +- 8 files changed, 225 insertions(+), 196 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index fc36fb6e1d7..667a3e8effd 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -153,7 +153,7 @@ indent.texi cyd killing.texi cyd kmacro.texi cyd macos.texi -maintaining.texi +maintaining.texi cyd major.texi mark.texi cyd mini.texi @@ -172,8 +172,8 @@ search.texi cyd sending.texi text.texi cyd trouble.texi -vc-xtra.texi -vc1-xtra.texi +vc-xtra.texi cyd +vc1-xtra.texi cyd windows.texi cyd xresources.texi diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 0621fa4e003..dfa8006e03c 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,19 @@ +2011-12-25 Chong Yidong + + * maintaining.texi (Tags): Mention Semantic. + (Create Tags Table, Etags Regexps): Copyedits. + (Find Tag): Mention minibuffer completion. + (List Tags): Mention completion-at-point. Completion is actually + available in M-x list-tags. + + * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC. + Document vc-delete-file. + + * files.texi (Misc File Ops): Mention vc-delete-file. + + * programs.texi (Symbol Completion): Mention completion-at-point + explicitly. + 2011-12-22 Chong Yidong * maintaining.texi (Change Log Commands): Don't specially mention diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index b12cdf6ddd1..7f703fbaad0 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -782,9 +782,8 @@ Multiple Branches of a File Miscellaneous Commands and Features of VC * Change Logs and VC:: Generating a change log file from log entries. -* Renaming and VC:: A command to rename both the source and master - file correctly. -* Revision Tags:: Symbolic names for revisions. +* VC Delete/Rename:: Deleting and renaming version-controlled files. +* Revision Tags:: Symbolic names for revisions. * Version Headers:: Inserting version control headers into working files. Customizing VC diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 96c38f4190e..9b2322e1850 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1485,6 +1485,12 @@ argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes them delete outright, instead of using the Trash, regardless of @code{delete-by-moving-to-trash}. +@ifnottex + If a file is under version control (@pxref{Version Control}), you +should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x +delete-file}. @xref{VC Delete/Rename}. +@end ifnottex + @findex copy-file @cindex copying files @kbd{M-x copy-file} reads the file @var{old} and writes a new file @@ -1514,10 +1520,9 @@ applies to all the remaining commands in this section. All of them ask for confirmation when the new file name already exists, too. @ifnottex - Note that if a file is under version control (@pxref{Version -Control}), you normally ought to rename it via the version control -system instead, using @kbd{M-x vc-rename-file}. @xref{Renaming and -VC}. + If a file is under version control (@pxref{Version Control}), you +should rename it using @kbd{M-x vc-rename-file} instead of @kbd{M-x +rename-file}. @xref{VC Delete/Rename}. @end ifnottex @findex add-name-to-file diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 68a34ca3a77..88bd5949b47 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1188,7 +1188,7 @@ Unmark the file or directory on the current line. If the region is active, unmark all the files in the region (@code{vc-dir-unmark}). @item U -If point is on a file entry, umark all files with the same status; if +If point is on a file entry, unmark all files with the same status; if point is on a directory entry, unmark all files in that directory tree (@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all files and directories. @@ -1567,8 +1567,8 @@ Of course, you should substitute the proper years and copyright holder. @cindex tags and tag tables A @dfn{tag} is a reference to a subunit in a program or in a -document. In program source code, tags reference syntactic elements -of the program: functions, subroutines, data types, macros, etc. In a +document. In source code, tags reference syntactic elements of the +program: functions, subroutines, data types, macros, etc. In a document, tags reference chapters, sections, appendices, etc. Each tag specifies the name of the file where the corresponding subunit is defined, and the position of the subunit's definition in that file. @@ -1582,34 +1582,36 @@ a Yacc parser, or from Lex scanner definitions; @file{.i} preprocessed C files; and Fortran files produced by preprocessing @file{.fpp} source files. - To produce a tags table, you use the @samp{etags} command, -submitting it a document or the source code of a program. -@samp{etags} writes the tags to a @dfn{tags table file}, or @dfn{tags -file} in short. The conventional name for a tags file is @file{TAGS}. +@cindex etags + To produce a tags table, you run the @command{etags} shell command +on a document or the source code file. The @samp{etags} program +writes the tags to a @dfn{tags table file}, or @dfn{tags file} in +short. The conventional name for a tags file is @file{TAGS}. +@xref{Create Tags Table}. - Emacs uses the information recorded in tags tables in commands that -search or replace through multiple source files: these commands use -the names of the source files recorded in the tags table to know which -files to search. Other commands, such as @kbd{M-.}, which finds the -definition of a function, use the recorded information about the -function names and positions to find the source file and the position -within that file where the function is defined. + Emacs provides many commands for searching and replacing using the +information recorded in tags tables. For instance, the @kbd{M-.} +(@code{find-tag}) jumps to the location of a specified function +definition in its source file. @xref{Find Tag}. @cindex C++ class browser, tags @cindex tags, C++ @cindex class browser, C++ @cindex Ebrowse - See also the Ebrowse facility, which is tailored for C++. -@xref{Top,, Ebrowse, ebrowse, Ebrowse User's Manual}. + The Ebrowse facility is similar to @command{etags} but specifically +tailored for C++. @xref{Top,, Ebrowse, ebrowse, Ebrowse User's +Manual}. The Semantic package provides another way to generate and +use tags, separate from the @command{etags} facility. +@xref{Semantic}. @menu * Tag Syntax:: Tag syntax for various types of code and text files. -* Create Tags Table:: Creating a tags table with @code{etags}. +* Create Tags Table:: Creating a tags table with @command{etags}. * Etags Regexps:: Create arbitrary tags using regular expressions. * Select Tags Table:: How to visit a tags table. * Find Tag:: Commands to find the definition of a specific tag. * Tags Search:: Using a tags table for searching and replacing. -* List Tags:: Listing and finding tags defined in a file. +* List Tags:: Using tags for completion, and listing them. @end menu @node Tag Syntax @@ -1631,7 +1633,7 @@ and @samp{--no-members} can make the tags table file much smaller. You can tag function declarations and external variables in addition to function definitions by giving the @samp{--declarations} option to -@code{etags}. +@command{etags}. @item In C++ code, in addition to all the tag constructs of C code, member @@ -1648,15 +1650,15 @@ Tags for variables and functions in classes are named @samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}. @item -In La@TeX{} text, the argument of any of the commands @code{\chapter}, +In La@TeX{} documents, the arguments for @code{\chapter}, @code{\section}, @code{\subsection}, @code{\subsubsection}, @code{\eqno}, @code{\label}, @code{\ref}, @code{\cite}, @code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry}, @code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand}, -@code{\newenvironment} or @code{\renewenvironment} is a tag.@refill +@code{\newenvironment} and @code{\renewenvironment} are tags. Other commands can make tags as well, if you specify them in the -environment variable @env{TEXTAGS} before invoking @code{etags}. The +environment variable @env{TEXTAGS} before invoking @command{etags}. The value of this environment variable should be a colon-separated list of command names. For example, @@ -1788,9 +1790,9 @@ Regexps}) to handle other formats and languages. @node Create Tags Table @subsection Creating Tags Tables -@cindex @code{etags} program +@cindex @command{etags} program - The @code{etags} program is used to create a tags table file. It knows + The @command{etags} program is used to create a tags table file. It knows the syntax of several languages, as described in @iftex the previous section. @@ -1798,53 +1800,46 @@ the previous section. @ifnottex @ref{Tag Syntax}. @end ifnottex -Here is how to run @code{etags}: +Here is how to run @command{etags}: @example etags @var{inputfiles}@dots{} @end example @noindent -The @code{etags} program reads the specified files, and writes a tags +The @command{etags} program reads the specified files, and writes a tags table named @file{TAGS} in the current working directory. You can optionally specify a different file name for the tags table by using the @samp{--output=@var{file}} option; specifying @file{-} as a file name prints the tags table to standard output. - If the specified files don't exist, @code{etags} looks for + If the specified files don't exist, @command{etags} looks for compressed versions of them and uncompresses them to read them. Under -MS-DOS, @code{etags} also looks for file names like @file{mycode.cgz} +MS-DOS, @command{etags} also looks for file names like @file{mycode.cgz} if it is given @samp{mycode.c} on the command line and @file{mycode.c} does not exist. - @code{etags} recognizes the language used in an input file based on -its file name and contents. You can specify the language with the -@samp{--language=@var{name}} option, described below. - - If the tags table data become outdated due to changes in the files -described in the table, the way to update the tags table is the same -way it was made in the first place. If the tags table fails to record -a tag, or records it for the wrong file, then Emacs cannot possibly -find its definition until you update the tags table. However, if the -position recorded in the tags table becomes a little bit wrong (due to -other editing), the worst consequence is a slight delay in finding the -tag. Even if the stored position is very far wrong, Emacs will still -find the tag, after searching most of the file for it. That delay is -hardly noticeable with today's computers. + If the tags table becomes outdated due to changes in the files +described in it, you can update it by running the @command{etags} +program again. If the tags table does not record a tag, or records it +for the wrong file, then Emacs will not be able to find that +definition until you update the tags table. But if the position +recorded in the tags table becomes a little bit wrong (due to other +editing), Emacs will still be able to find the right position, with a +slight delay. Thus, there is no need to update the tags table after each edit. You should update a tags table when you define new tags that you want to have listed, or when you move tag definitions from one file to another, or when changes become substantial. - One tags table can virtually include another. Specify the included -tags file name with the @samp{--include=@var{file}} option when -creating the file that is to include it. The latter file then acts as -if it covered all the source files specified in the included file, as -well as the files it directly contains. + You can make a tags table @dfn{include} another tags table, by +passing the @samp{--include=@var{file}} option to @command{etags}. It +then covers all the files covered by the included tags file, as well +as its own. If you specify the source files with relative file names when you run -@code{etags}, the tags file will contain file names relative to the +@command{etags}, the tags file will contain file names relative to the directory where the tags file was initially written. This way, you can move an entire directory tree containing both the tags file and the source files, and the tags file will still refer correctly to the source @@ -1857,40 +1852,41 @@ example, when writing the tags to @file{/dev/stdout}. pointing to a tags file in a different directory, because this would generally render the file names invalid. - If you specify absolute file names as arguments to @code{etags}, then + If you specify absolute file names as arguments to @command{etags}, then the tags file will contain absolute file names. This way, the tags file will still refer to the same files even if you move it, as long as the source files remain in the same place. Absolute file names start with @samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows. - When you want to make a tags table from a great number of files, you -may have problems listing them on the command line, because some systems -have a limit on its length. The simplest way to circumvent this limit -is to tell @code{etags} to read the file names from its standard input, -by typing a dash in place of the file names, like this: + When you want to make a tags table from a great number of files, +you may have problems listing them on the command line, because some +systems have a limit on its length. You can circumvent this limit by +telling @command{etags} to read the file names from its standard +input, by typing a dash in place of the file names, like this: @smallexample find . -name "*.[chCH]" -print | etags - @end smallexample - Use the option @samp{--language=@var{name}} to specify the language -explicitly. You can intermix these options with file names; each one -applies to the file names that follow it. Specify -@samp{--language=auto} to tell @code{etags} to resume guessing the -language from the file names and file contents. Specify -@samp{--language=none} to turn off language-specific processing -entirely; then @code{etags} recognizes tags by regexp matching alone -(@pxref{Etags Regexps}). + @command{etags} recognizes the language used in an input file based +on its file name and contents. You can specify the language +explicitly with the @samp{--language=@var{name}} option. You can +intermix these options with file names; each one applies to the file +names that follow it. Specify @samp{--language=auto} to tell +@command{etags} to resume guessing the language from the file names +and file contents. Specify @samp{--language=none} to turn off +language-specific processing entirely; then @command{etags} recognizes +tags by regexp matching alone (@pxref{Etags Regexps}). The option @samp{--parse-stdin=@var{file}} is mostly useful when -calling @code{etags} from programs. It can be used (only once) in -place of a file name on the command line. @code{Etags} will read from +calling @command{etags} from programs. It can be used (only once) in +place of a file name on the command line. @command{etags} will read from standard input and mark the produced tags as belonging to the file @var{file}. - @samp{etags --help} outputs the list of the languages @code{etags} + @samp{etags --help} outputs the list of the languages @command{etags} knows, and the file name rules for guessing the language. It also prints -a list of all the available @code{etags} options, together with a short +a list of all the available @command{etags} options, together with a short explanation. If followed by one or more @samp{--language=@var{lang}} options, it outputs detailed information about how tags are generated for @var{lang}. @@ -1898,21 +1894,22 @@ options, it outputs detailed information about how tags are generated for @node Etags Regexps @subsection Etags Regexps - The @samp{--regex} option provides a general way of recognizing tags -based on regexp matching. You can freely intermix this option with -file names, and each one applies to the source files that follow it. -If you specify multiple @samp{--regex} options, all of them are used -in parallel. The syntax is: + The @samp{--regex} option to @command{etags} allows tags to be +recognized by regular expression matching. You can intermix this +option with file names; each one applies to the source files that +follow it. If you specify multiple @samp{--regex} options, all of +them are used in parallel. The syntax is: @smallexample --regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} @end smallexample - The essential part of the option value is @var{tagregexp}, the -regexp for matching tags. It is always used anchored, that is, it -only matches at the beginning of a line. If you want to allow -indented tags, use a regexp that matches initial whitespace; start it -with @samp{[ \t]*}. +@noindent +The essential part of the option value is @var{tagregexp}, the regexp +for matching tags. It is always used anchored, that is, it only +matches at the beginning of a line. If you want to allow indented +tags, use a regexp that matches initial whitespace; start it with +@samp{[ \t]*}. In these regular expressions, @samp{\} quotes the next character, and all the GCC character escape sequences are supported (@samp{\a} for @@ -1929,7 +1926,7 @@ completion on tag names more reliably. You can find some examples below. The @var{modifiers} are a sequence of zero or more characters that -modify the way @code{etags} does the matching. A regexp with no +modify the way @command{etags} does the matching. A regexp with no modifiers is applied sequentially to each line of the input file, in a case-sensitive way. The modifiers and their meanings are: @@ -1954,22 +1951,22 @@ etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \ @end smallexample @noindent -Here @code{etags} chooses the parsing language for @file{voo.doo} and -@file{bar.ber} according to their contents. @code{etags} also uses +Here @command{etags} chooses the parsing language for @file{voo.doo} and +@file{bar.ber} according to their contents. @command{etags} also uses @var{reg1} to recognize additional tags in @file{voo.doo}, and both @var{reg1} and @var{reg2} to recognize additional tags in @file{bar.ber}. @var{reg1} is checked against each line of @file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while @var{reg2} is checked against the whole @file{bar.ber} file, -permitting multi-line matches, in a case-sensitive way. @code{etags} +permitting multi-line matches, in a case-sensitive way. @command{etags} uses only the Lisp tags rules, with no user-specified regexp matching, to recognize tags in @file{los.er}. You can restrict a @samp{--regex} option to match only files of a given language by using the optional prefix @var{@{language@}}. (@samp{etags --help} prints the list of languages recognized by -@code{etags}.) This is particularly useful when storing many -predefined regular expressions for @code{etags} in a file. The +@command{etags}.) This is particularly useful when storing many +predefined regular expressions for @command{etags} in a file. The following example tags the @code{DEFVAR} macros in the Emacs source files, for the C language only: @@ -1979,7 +1976,7 @@ files, for the C language only: @noindent When you have complex regular expressions, you can store the list of -them in a file. The following option syntax instructs @code{etags} to +them in a file. The following option syntax instructs @command{etags} to read two files of regular expressions. The regular expressions contained in the second file are matched without regard to case. @@ -1988,9 +1985,9 @@ contained in the second file are matched without regard to case. @end smallexample @noindent -A regex file for @code{etags} contains one regular expression per +A regex file for @command{etags} contains one regular expression per line. Empty lines, and lines beginning with space or tab are ignored. -When the first character in a line is @samp{@@}, @code{etags} assumes +When the first character in a line is @samp{@@}, @command{etags} assumes that the rest of the line is the name of another file of regular expressions; thus, one such file can include another file. All the other lines are taken to be regular expressions. If the first @@ -2053,14 +2050,14 @@ etags --language=none \ @node Select Tags Table @subsection Selecting a Tags Table -@vindex tags-file-name @findex visit-tags-table - Emacs has at any time one @dfn{selected} tags table, and all the + Emacs has at any time one @dfn{selected} tags table. All the commands for working with tags tables use the selected one. To select a tags table, type @kbd{M-x visit-tags-table}, which reads the tags table file name as an argument, with @file{TAGS} in the default directory as the default. +@vindex tags-file-name Emacs does not actually read in the tags table contents until you try to use them; all @code{visit-tags-table} does is store the file name in the variable @code{tags-file-name}, and setting the variable @@ -2124,27 +2121,25 @@ Pop back to where you previously invoked @kbd{M-.} and friends. @kindex M-. @findex find-tag - @kbd{M-.}@: (@code{find-tag}) is the command to find the definition of -a specified tag. It searches through the tags table for that tag, as a -string, and then uses the tags table info to determine the file that the -definition is in and the approximate character position in the file of -the definition. Then @code{find-tag} visits that file, moves point to -the approximate character position, and searches ever-increasing -distances away to find the tag definition. - - If an empty argument is given (just type @key{RET}), the balanced -expression in the buffer before or around point is used as the -@var{tag} argument. @xref{Expressions}. + @kbd{M-.}@: (@code{find-tag}) prompts for a tag name and jumps to +its source definition. It works by searching through the tags table +for that tag's file and approximate character position, visiting that +file, and searching for the tag definition at ever-increasing +distances away from the recorded approximate position. + + When entering the tag argument to @kbd{M-.}, the usual minibuffer +completion commands can be used (@pxref{Completion}), with the tag +names in the selected tags table as completion candidates. If you +specify an empty argument, the balanced expression in the buffer +before or around point is the default argument. @xref{Expressions}. You don't need to give @kbd{M-.} the full name of the tag; a part -will do. This is because @kbd{M-.} finds tags in the table which -contain @var{tag} as a substring. However, it prefers an exact match -to a substring match. To find other tags that match the same -substring, give @code{find-tag} a numeric argument, as in @kbd{C-u -M-.}; this does not read a tag name, but continues searching the tags -table's text for another tag containing the same substring last used. -If you have a real @key{META} key, @kbd{M-0 M-.}@: is an easier -alternative to @kbd{C-u M-.}. +will do. @kbd{M-.} finds tags which contain that argument as a +substring. However, it prefers an exact match to a substring match. +To find other tags that match the same substring, give @code{find-tag} +a numeric argument, as in @kbd{C-u M-.} or @kbd{M-0 M-.}; this does +not read a tag name, but continues searching the tags table's text for +another tag containing the same substring last used. @kindex C-x 4 . @findex find-tag-other-window @@ -2152,23 +2147,23 @@ alternative to @kbd{C-u M-.}. @findex find-tag-other-frame Like most commands that can switch buffers, @code{find-tag} has a variant that displays the new buffer in another window, and one that -makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes -the command @code{find-tag-other-window}. The latter is @w{@kbd{C-x 5 .}}, -which invokes @code{find-tag-other-frame}. +makes a new frame for it. The former is @w{@kbd{C-x 4 .}} +(@code{find-tag-other-window}), and the latter is @w{@kbd{C-x 5 .}} +(@code{find-tag-other-frame}). - To move back to places you've found tags recently, use @kbd{C-u - -M-.}; more generally, @kbd{M-.} with a negative numeric argument. This -command can take you to another buffer. @w{@kbd{C-x 4 .}} with a negative -argument finds the previous tag location in another window. + To move back to previous tag definitions, use @kbd{C-u - M-.}; more +generally, @kbd{M-.} with a negative numeric argument. Similarly, +@w{@kbd{C-x 4 .}} with a negative argument finds the previous tag +location in another window. @kindex M-* @findex pop-tag-mark @vindex find-tag-marker-ring-length - As well as going back to places you've found tags recently, you can go -back to places @emph{from where} you found them. Use @kbd{M-*}, which -invokes the command @code{pop-tag-mark}, for this. Typically you would -find and study the definition of something with @kbd{M-.} and then -return to where you were with @kbd{M-*}. + As well as going back to places you've found tags recently, you can +go back to places @emph{from where} you found them, using @kbd{M-*} +(@code{pop-tag-mark}). Thus you can find and examine the definition +of something with @kbd{M-.} and then return to where you were with +@kbd{M-*}. Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to a depth determined by the variable @code{find-tag-marker-ring-length}. @@ -2212,10 +2207,10 @@ can follow its progress. As soon as it finds an occurrence, @kindex M-, @findex tags-loop-continue - Having found one match, you probably want to find all the rest. To find -one more match, type @kbd{M-,} (@code{tags-loop-continue}) to resume the -@code{tags-search}. This searches the rest of the current buffer, followed -by the remaining files of the tags table.@refill + Having found one match, you probably want to find all the rest. +Type @kbd{M-,} (@code{tags-loop-continue}) to resume the +@code{tags-search}, finding one more match. This searches the rest of +the current buffer, followed by the remaining files of the tags table. @findex tags-query-replace @kbd{M-x tags-query-replace} performs a single @@ -2252,56 +2247,56 @@ have to search (those which are not already visited in Emacs buffers). Buffers in which no match is found are quickly killed; the others continue to exist. - It may have struck you that @code{tags-search} is a lot like -@code{grep}. You can also run @code{grep} itself as an inferior of -Emacs and have Emacs show you the matching lines one by one. + As an alternative to @code{tags-search}, you can run @command{grep} +as a subprocess and have Emacs show you the matching lines one by one. @xref{Grep Searching}. @node List Tags @subsection Tags Table Inquiries @table @kbd +@item C-M-i +@itemx M-@key{TAB} +Perform completion on the text around point, using the selected tags +table if one is loaded (@code{completion-at-point}). @item M-x list-tags @key{RET} @var{file} @key{RET} Display a list of the tags defined in the program file @var{file}. @item M-x tags-apropos @key{RET} @var{regexp} @key{RET} Display a list of all tags matching @var{regexp}. @end table +@cindex completion (symbol names) + In most programming language modes, you can type @kbd{C-M-i} or +@kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol +at point. If there is a selected tags table, this command can use it +to generate completion candidates. @xref{Symbol Completion}. + @findex list-tags - @kbd{M-x list-tags} reads the name of one of the files described by -the selected tags table, and displays a list of all the tags defined in -that file. The ``file name'' argument is really just a string to -compare against the file names recorded in the tags table; it is read as -a string rather than as a file name. Therefore, completion and -defaulting are not available, and you must enter the file name the same -way it appears in the tags table. Do not include a directory as part of -the file name unless the file name recorded in the tags table includes a -directory. + @kbd{M-x list-tags} reads the name of one of the files covered by +the selected tags table, and displays a list of tags defined in that +file. Do not include a directory as part of the file name unless the +file name recorded in the tags table includes a directory. @findex tags-apropos @vindex tags-apropos-verbose - @kbd{M-x tags-apropos} is like @code{apropos} for tags -(@pxref{Apropos}). It finds all the tags in the selected tags table -whose entries match @var{regexp}, and displays them. If the variable -@code{tags-apropos-verbose} is non-@code{nil}, it displays the names -of the tags files together with the tag names. - @vindex tags-tag-face @vindex tags-apropos-additional-actions - You can customize the appearance of the output by setting the -variable @code{tags-tag-face} to a face. You can display additional -output with @kbd{M-x tags-apropos} by customizing the variable -@code{tags-apropos-additional-actions}---see its documentation for -details. - - You can also use the collection of tag names to complete a symbol -name in the buffer. @xref{Symbol Completion}. - - You can use @kbd{M-x next-file} to visit the files in the selected -tags table. The first time this command is called, it visits the -first file in the tags table. Each subsequent call visits the next -file in the table, unless a prefix argument is supplied, in which case -it returns to the first file. + @kbd{M-x tags-apropos} is like @code{apropos} for tags +(@pxref{Apropos}). It displays a list of tags in the selected tags +table whose entries match @var{regexp}. If the variable +@code{tags-apropos-verbose} is non-@code{nil}, it displays the names +of the tags files together with the tag names. You can customize the +appearance of the output by setting the variable @code{tags-tag-face} +to a face. You can display additional output by customizing the +variable @code{tags-apropos-additional-actions}; see its documentation +for details. + +@findex next-file + @kbd{M-x next-file} visits files covered by the selected tags table. +The first time it is called, it visits the first file covered by the +table. Each subsequent call visits the next covered file, unless a +prefix argument is supplied, in which case it returns to the first +file. @node EDE @section Emacs Development Environment diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index e2051a93c60..7301ecfea8a 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1291,18 +1291,18 @@ for switching graphical windows, so you should type @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} instead. @cindex tags-based completion - In-buffer symbol completion generates its completion list in a -number of different ways. If Semantic mode is enabled, Emacs tries to -use the Semantic parser data for completion (@pxref{Semantic}). If -Semantic mode is not enabled or it fails at performing completion, -Emacs normally tries to complete using a tags table (@pxref{Tags}). - +@findex completion-at-point @cindex Lisp symbol completion @cindex completion (Lisp symbols) - In Emacs Lisp mode, completion is performed using the function, -variable, and property names defined in the current Emacs session. If -there is an open parenthesis immediately before the beginning of the -partial symbol, only symbols with function definitions are considered. + In most programming language modes, @kbd{C-M-i} (or +@kbd{M-@key{TAB}}) invokes the command @code{completion-at-point}, +which generates its completion list in a flexible way. If Semantic +mode is enabled, it tries to use the Semantic parser data for +completion (@pxref{Semantic}). If Semantic mode is not enabled or +fails at performing completion, it tries to complete using the +selected tags table (@pxref{Tags}). If in Emacs Lisp mode, it +performs completion using the function, variable, or property names +defined in the current Emacs session. In all other respects, in-buffer symbol completion behaves like minibuffer completion. For instance, if Emacs cannot complete to a diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 8df5bfbd551..b65e6f96a6e 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -12,8 +12,7 @@ @menu * Change Logs and VC:: Generating a change log file from log entries. -* Renaming and VC:: A command to rename both the source and master - file correctly. +* VC Delete/Rename:: Deleting and renaming version-controlled files. * Revision Tags:: Symbolic names for revisions. * Version Headers:: Inserting version control headers into working files. @end menu @@ -104,33 +103,48 @@ same author at nearly the same time. If the log entries for several such files all have the same text, it coalesces them into a single entry. -@node Renaming and VC -@subsubsection Renaming VC Work Files and Master Files +@node VC Delete/Rename +@subsubsection Deleting and Renaming Version-Controlled Files @cindex renaming version-controlled files @table @kbd +@item M-x vc-delete-file +Prompt for a file name, delete the file from the working tree, and +schedule the deletion for committing. + @item M-x vc-rename-file -Prompt for two file names, @var{VAR} and @var{OLD}, and rename them in -the version-controlled working tree. +Prompt for two file names, @var{VAR} and @var{OLD}, rename them in the +working tree, and schedule the renaming for committing. @end table -@findex vc-rename-file - If you wish to rename a registered file in a version-controlled -working tree, use the command @kbd{M-x vc-rename-file}. This prompts -for two arguments: the file you wish to rename, followed by the new -name; then it performs the renaming through the version control -system. +@findex vc-delete-file + If you wish to delete a version-controlled file, use the command +@kbd{M-x vc-delete-file}. This prompts for the file name, and deletes +it via the version control system. The file is removed from the +working tree, and in the VC Directory buffer +@iftex +(@pxref{VC Directory Mode}), +@end iftex +@ifnottex +(@pxref{VC Directory Mode}), +@end ifnottex +it is displayed with the @samp{removed} status. When you commit it, +the deletion takes effect in the repository. - On modern version control systems that have built-in support for -renaming, the renaming operation takes effect immediately in the +@findex vc-rename-file + To rename a version-controlled file, type @kbd{M-x vc-rename-file}. +This prompts for two arguments: the name of the file you wish to +rename, and the new name; then it performs the renaming via the +version control system. The renaming takes effect immediately in the working tree, and takes effect in the repository when you commit the -renamed file. The renamed file retains the full change history of the -original file. +renamed file. - On CVS and older version control systems, the @code{vc-rename-file} -command actually works by creating a copy of the old file under the -new name, registering it, and deleting the old file. In this case, -the change history is not preserved. + On modern version control systems that have built-in support for +renaming, the renamed file retains the full change history of the +original file. On CVS and older version control systems, the +@code{vc-rename-file} command actually works by creating a copy of the +old file under the new name, registering it, and deleting the old +file. In this case, the change history is not preserved. @node Revision Tags @subsubsection Revision Tags diff --git a/etc/NEWS b/etc/NEWS index 5e274f987e5..95d1854744b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -97,10 +97,10 @@ and also when HOME is set to C:\ by default. ** Completion *** shell-mode uses pcomplete rules, with the standard completion UI. - ++++ *** Many packages have been changed to use `completion-at-point' rather than their own completion code. - ++++ *** `completion-at-point' now handles tags and semantic completion. --- *** Completion in a non-minibuffer now tries to detect the end of completion -- cgit v1.2.1 From c40a7de7814a0b1d0c98e1d58513ec1e47230e1b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 26 Dec 2011 18:36:41 +0800 Subject: Update Abbrevs and Dired chapters of Emacs manual. * dired.texi (Dired Enter, Misc Dired Features): Document dired-use-ls-dired changes. Mention quit-window. (Dired Navigation): Add index entries. (Dired Visiting): Fix View Mode xref. (Marks vs Flags): Prefer C-/ binding for undo. (Subdirectories in Dired): Add xrefs. (Misc Dired Features): Document some Emacs 24 changes. Add index entries. * abbrevs.texi (Abbrev Concepts): No need to mention abbrev-mode variable, since it is explained in Minor Modes node. (Defining Abbrevs): Copyedits. (Expanding Abbrevs): State default of abbrev-all-caps. Prefer the C-/ binding for undo. (Dabbrev Customization): Add xrefs for case-fold-search and case-replace. * dired-xtra.texi (Subdir Switches): Add xref. * maintaining.texi (VC Directory Commands): Mention quit-window. --- admin/FOR-RELEASE | 4 +- doc/emacs/ChangeLog | 23 +++++++ doc/emacs/abbrevs.texi | 82 ++++++++++++------------- doc/emacs/dired-xtra.texi | 26 ++++---- doc/emacs/dired.texi | 148 ++++++++++++++++++++++++++------------------- doc/emacs/maintaining.texi | 6 ++ etc/NEWS | 2 +- 7 files changed, 167 insertions(+), 124 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 667a3e8effd..65f98c85496 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -124,7 +124,7 @@ TUTORIAL.zh ** Check the manual. -abbrevs.texi +abbrevs.texi cyd ack.texi anti.texi arevert-xtra.texi cyd @@ -136,7 +136,7 @@ cal-xtra.texi cmdargs.texi commands.texi cyd custom.texi -dired.texi +dired.texi cyd dired-xtra.texi display.texi cyd emacs.texi diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index dfa8006e03c..7857295de92 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,26 @@ +2011-12-26 Chong Yidong + + * dired.texi (Dired Enter, Misc Dired Features): Document + dired-use-ls-dired changes. Mention quit-window. + (Dired Navigation): Add index entries. + (Dired Visiting): Fix View Mode xref. + (Marks vs Flags): Prefer C-/ binding for undo. + (Subdirectories in Dired): Add xrefs. + (Misc Dired Features): Document some Emacs 24 changes. Add index + entries. + + * abbrevs.texi (Abbrev Concepts): No need to mention abbrev-mode + variable, since it is explained in Minor Modes node. + (Defining Abbrevs): Copyedits. + (Expanding Abbrevs): State default of abbrev-all-caps. Prefer the + C-/ binding for undo. + (Dabbrev Customization): Add xrefs for case-fold-search and + case-replace. + + * dired-xtra.texi (Subdir Switches): Add xref. + + * maintaining.texi (VC Directory Commands): Mention quit-window. + 2011-12-25 Chong Yidong * maintaining.texi (Tags): Mention Semantic. diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index 2eafadf4841..5868010806c 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -45,17 +45,14 @@ expanding to @samp{find outer otter}, then you can insert @samp{find outer otter.} into the buffer by typing @kbd{f o o .}. @findex abbrev-mode -@vindex abbrev-mode @cindex Abbrev mode @cindex mode, Abbrev - Abbrevs expand only when Abbrev mode (a minor mode) is enabled. -Disabling Abbrev mode does not cause abbrev definitions to be forgotten, -but they do not expand until Abbrev mode is enabled again. The command -@kbd{M-x abbrev-mode} toggles Abbrev mode; with a numeric argument, it -turns Abbrev mode on if the argument is positive, off otherwise. -@xref{Minor Modes}. @code{abbrev-mode} is also a variable; Abbrev mode is -on when the variable is non-@code{nil}. The variable @code{abbrev-mode} -automatically becomes local to the current buffer when it is set. + Abbrevs expand only when Abbrev mode, a buffer-local minor mode, is +enabled. Disabling Abbrev mode does not cause abbrev definitions to +be forgotten, but they do not expand until Abbrev mode is enabled +again. The command @kbd{M-x abbrev-mode} toggles Abbrev mode; with a +numeric argument, it turns Abbrev mode on if the argument is positive, +off otherwise. @xref{Minor Modes}. Abbrevs can have @dfn{mode-specific} definitions, active only in one major mode. Abbrevs can also have @dfn{global} definitions that are active in @@ -108,22 +105,18 @@ region as the expansion of the abbrev being defined. @kindex C-x a l @findex add-mode-abbrev The command @kbd{C-x a l} (@code{add-mode-abbrev}) is similar, but -defines a mode-specific abbrev. Mode-specific abbrevs are active only in a -particular major mode. @kbd{C-x a l} defines an abbrev for the major mode -in effect at the time @kbd{C-x a l} is typed. The arguments work the same -as for @kbd{C-x a g}. +defines a mode-specific abbrev for the current major mode. The +arguments work the same as for @kbd{C-x a g}. @kindex C-x a i g @findex inverse-add-global-abbrev @kindex C-x a i l @findex inverse-add-mode-abbrev - If the abbrev text itself is already in the buffer, you can use the -commands @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and -@kbd{C-x a i l} (@code{inverse-add-mode-abbrev}) to define it as an -abbrev by specify the expansion in the minibuffer. These commands are -called ``inverse'' because they invert the meaning of the two text -strings they use (one from the buffer and one read with the -minibuffer). + @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and @kbd{C-x a i +l} (@code{inverse-add-mode-abbrev}) perform the opposite task: if the +abbrev text is already in the buffer, you use these commands to define +an abbrev by specifying the expansion in the minibuffer. These +commands will expand the abbrev text used for the definition. @findex define-mode-abbrev @findex define-global-abbrev @@ -132,8 +125,8 @@ expansion in the buffer using the command @code{define-global-abbrev}. It reads two arguments---the abbrev, and its expansion. The command @code{define-mode-abbrev} does likewise for a mode-specific abbrev. - To change the definition of an abbrev, just define a new definition. -When the abbrev has a prior definition, the abbrev definition commands + To change the definition of an abbrev, just make a new definition. +When an abbrev has a prior definition, the abbrev definition commands ask for confirmation before replacing it. @findex kill-all-abbrevs @@ -155,11 +148,11 @@ The most common way to use an abbrev is to insert it and then insert a punctuation or whitespace character to expand it. @vindex abbrev-all-caps - Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find -outer otter}; @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into -@samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the -variable @code{abbrev-all-caps} (setting it non-@code{nil} specifies -@samp{FIND OUTER OTTER}). + Abbrev expansion preserves case: @samp{foo} expands to @samp{find +outer otter}, and @samp{Foo} to @samp{Find outer otter}. @samp{FOO} +expands to @samp{Find Outer Otter} by default, but if you change the +variable @code{abbrev-all-caps} to a non-@code{nil} value, it expands +to @samp{FIND OUTER OTTER}. These commands are used to control abbrev expansion: @@ -196,14 +189,14 @@ punctuation with @kbd{C-q}. Thus, @kbd{foo C-q ,} leaves @samp{foo,} in the buffer, not expanding it. @findex unexpand-abbrev - If you expand an abbrev by mistake, you can undo the expansion and -bring back the abbrev itself by typing @kbd{C-_} to undo (@pxref{Undo}). -This also undoes the insertion of the non-word character that expanded -the abbrev. If the result you want is the terminating non-word -character plus the unexpanded abbrev, you must reinsert the terminating -character, quoting it with @kbd{C-q}. You can also use the command -@kbd{M-x unexpand-abbrev} to cancel the last expansion without -deleting the terminating character. + If you expand an abbrev by mistake, you can undo the expansion by +typing @kbd{C-/} (@code{undo}). @xref{Undo}. This undoes the +insertion of the abbrev expansion and brings back the abbrev text. If +the result you want is the terminating non-word character plus the +unexpanded abbrev, you must reinsert the terminating character, +quoting it with @kbd{C-q}. You can also use the command @kbd{M-x +unexpand-abbrev} to cancel the last expansion without deleting the +terminating character. @findex expand-region-abbrevs @kbd{M-x expand-region-abbrevs} searches through the region for defined @@ -409,12 +402,11 @@ you are expanding. @vindex dabbrev-case-fold-search This feature is controlled by the variable -@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored in -this search; if it is @code{nil}, the word and the expansion must match -in case. If the value of @code{dabbrev-case-fold-search} is -@code{case-fold-search}, which is true by default, then the variable -@code{case-fold-search} controls whether to ignore case while searching -for expansions. +@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored +in this search; if it is @code{nil}, the word and the expansion must +match in case. If the value is @code{case-fold-search} (the default), +then the variable @code{case-fold-search} controls whether to ignore +case while searching for expansions (@pxref{Search Case}). @vindex dabbrev-case-replace Normally, dynamic abbrev expansion preserves the case pattern @@ -425,10 +417,10 @@ expansion to that case pattern. The variable @code{dabbrev-case-replace} controls whether to preserve the case pattern of the dynamic abbrev. If it is @code{t}, the dynamic abbrev's case pattern is preserved in most cases; if it is -@code{nil}, the expansion is always copied verbatim. If the value of -@code{dabbrev-case-replace} is @code{case-replace}, which is true by -default, then the variable @code{case-replace} controls whether to -copy the expansion verbatim. +@code{nil}, the expansion is always copied verbatim. If the value is +@code{case-replace} (the default), then the variable +@code{case-replace} controls whether to copy the expansion verbatim +(@pxref{Replacement and Case}). However, if the expansion contains a complex mixed case pattern, and the dynamic abbrev matches this pattern as far as it goes, then the diff --git a/doc/emacs/dired-xtra.texi b/doc/emacs/dired-xtra.texi index efb05226ba8..52ccccce58c 100644 --- a/doc/emacs/dired-xtra.texi +++ b/doc/emacs/dired-xtra.texi @@ -7,24 +7,24 @@ @node Subdir Switches @section Subdirectory Switches in Dired -You can insert subdirectories with specified @code{ls} switches in -Dired buffers using @kbd{C-u i}. You can change the @code{ls} +You can insert subdirectories with specified @command{ls} switches in +Dired buffers using @kbd{C-u i}. You can change the @command{ls} switches of an already inserted subdirectory using @kbd{C-u l}. Dired preserves the switches if you revert the buffer. Deleting a subdirectory forgets about its switches. -Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u}) -to reinsert or delete subdirectories that were inserted with explicit -switches can bypass Dired's machinery for remembering (or forgetting) -switches. Deleting a subdirectory using @code{dired-undo} does not -forget its switches. When later reinserted using @kbd{i}, it will be -reinserted using its old switches. Using @code{dired-undo} to -reinsert a subdirectory that was deleted using the regular -Dired commands (not @code{dired-undo}) will originally insert it with -its old switches. Reverting the buffer, however, will relist it using -the buffer's default switches. If any of this yields problems, you -can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. +Using @code{dired-undo} (@pxref{Marks vs Flags}) to reinsert or delete +subdirectories that were inserted with explicit switches can bypass +Dired's machinery for remembering (or forgetting) switches. Deleting +a subdirectory using @code{dired-undo} does not forget its switches. +When later reinserted using @kbd{i}, it will be reinserted using its +old switches. Using @code{dired-undo} to reinsert a subdirectory that +was deleted using the regular Dired commands (not @code{dired-undo}) +will originally insert it with its old switches. Reverting the +buffer, however, will relist it using the buffer's default switches. +If any of this yields problems, you can easily correct the situation +using @kbd{C-u i} or @kbd{C-u l}. Dired does not remember the @code{R} switch. Inserting a subdirectory with switches that include the @code{R} switch is equivalent to diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index b6ed47fdb3f..5097565830e 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -73,32 +73,45 @@ completion commands can be used in the minibuffer; in particular, a directory name. The variable @code{dired-listing-switches} specifies the options to -give to @code{ls} for listing the directory; this string @emph{must} -contain @samp{-l}. If you use a prefix argument with the @code{dired} -command, you can specify the @code{ls} switches with the minibuffer -before you enter the directory specification. No matter how they are -specified, the @code{ls} switches can include short options (that is, -single characters) requiring no arguments, and long options (starting -with @samp{--}) whose arguments are specified with @samp{=}. +give to @command{ls} for listing the directory; this string +@emph{must} contain @samp{-l}. If you use a prefix argument with the +@code{dired} command, you can specify the @command{ls} switches with the +minibuffer before you enter the directory specification. No matter +how they are specified, the @command{ls} switches can include short +options (that is, single characters) requiring no arguments, and long +options (starting with @samp{--}) whose arguments are specified with +@samp{=}. @vindex dired-use-ls-dired - Note that Dired automatically adds the option @samp{--dired}, if -your @code{ls} program supports it, unless you explicitly set -the variable @code{dired-use-ls-dired} to @code{nil}. Without this -option, Dired will have trouble parsing some @samp{unusual} file-names. -See the documentation of @code{dired-use-ls-dired} for more details. - - On MS-Windows and MS-DOS systems, Emacs @emph{emulates} @code{ls}; -see @ref{ls in Lisp}, for options and peculiarities of that emulation. + If your @command{ls} program supports the @samp{--dired} option, +Dired automatically passes it that option; this causes @command{ls} to +emit special escape sequences for certain unusual file names, without +which Dired will not be able to parse those names. The first time you +run Dired in an Emacs session, it checks whether @command{ls} supports +the @samp{--dired} option by calling it once with that option. If the +exit code is 0, Dired will subsequently use the @samp{--dired} option; +otherwise it will not. You can inhibit this check by customizing the +variable @code{dired-use-ls-dired}. The value @code{unspecified} (the +default) means to perform the check; any other non-@code{nil} value +means to use the @samp{--dired} option; and @code{nil} means not to +use the @samp{--dired} option. + + On MS-Windows and MS-DOS systems, Emacs emulates @command{ls}. +@xref{ls in Lisp}, for options and peculiarities of this emulation. @findex dired-other-window @kindex C-x 4 d @findex dired-other-frame @kindex C-x 5 d - To display the Dired buffer in another window rather than in the -selected window, use @kbd{C-x 4 d} (@code{dired-other-window}) instead -of @kbd{C-x d}. @kbd{C-x 5 d} (@code{dired-other-frame}) uses a -separate frame to display the Dired buffer. + To display the Dired buffer in another window, use @kbd{C-x 4 d} +(@code{dired-other-window}) instead of @kbd{C-x d}. @kbd{C-x 5 d} +(@code{dired-other-frame}) displays the Dired buffer in a separate +frame. + +@kindex q @r{(Dired)} +@findex quit-window + Typing @kbd{q} (@code{quit-window}) buries the Dired buffer, and +deletes its window if the window was created just for that buffer. @node Dired Navigation @section Navigation in the Dired Buffer @@ -124,7 +137,11 @@ minibuffer, and moves point to the line in the Dired buffer describing that file. @cindex searching Dired buffers +@findex dired-isearch-filenames @vindex dired-isearch-filenames +@findex dired-isearch-filenames-regexp +@kindex M-s f C-s @r{(Dired)} +@kindex M-s f M-C-s @r{(Dired)} @kbd{M-s f C-s} (@code{dired-isearch-filenames}) performs a forward incremental search in the Dired buffer, looking for matches only amongst the file names and ignoring the rest of the text in the @@ -331,18 +348,16 @@ another window, but do not select that window (@code{dired-display-file}). @item Mouse-1 @itemx Mouse-2 @findex dired-mouse-find-file-other-window -Visit the file named by the line you click on +Visit the file whose name you clicked on (@code{dired-mouse-find-file-other-window}). This uses another window to display the file, like the @kbd{o} command. @item v @kindex v @r{(Dired)} @findex dired-view-file -View the file described on the current line, using @kbd{M-x view-file} -(@code{dired-view-file}). Viewing a file with @code{view-file} is -like visiting it, but is slanted toward moving around in the file -conveniently and does not allow changing the file. @xref{Misc File -Ops, View File, Miscellaneous File Operations}. +View the file described on the current line, with View mode +(@code{dired-view-file}). View mode provides convenient commands to +navigate the buffer but forbids changing it; @xref{View Mode}. @item ^ @kindex ^ @r{(Dired)} @@ -520,9 +535,9 @@ the regular expression @var{regexp} @kbd{% m}, except that it searches the file contents instead of the file name. -@item C-x u +@item C-/ +@itemx C-x u @itemx C-_ -@itemx C-/ @kindex C-_ @r{(Dired)} @findex dired-undo Undo changes in the Dired buffer, such as adding or removing @@ -615,7 +630,7 @@ Like the other commands in this section, this command operates on the Rename the specified files (@code{dired-do-rename}). If you rename a single file, the argument @var{new} is the new name of the file. If you rename several files, the argument @var{new} is the directory into -which to move the files (this is like the shell command @code{mv}). +which to move the files (this is like the shell command @command{mv}). Dired automatically changes the visited file name of buffers associated with renamed files so that they refer to the new names. @@ -625,7 +640,7 @@ with renamed files so that they refer to the new names. @cindex hard links (in Dired) @item H @var{new} @key{RET} Make hard links to the specified files (@code{dired-do-hardlink}). -This is like the shell command @code{ln}. The argument @var{new} is +This is like the shell command @command{ln}. The argument @var{new} is the directory to make the links in, or (if making just one link) the name to give the link. @@ -642,9 +657,10 @@ link. @kindex M @r{(Dired)} @cindex changing file permissions (in Dired) @item M @var{modespec} @key{RET} -Change the mode (also called ``permission bits'') of the specified files -(@code{dired-do-chmod}). @var{modespec} can be in octal or symbolic -notation like arguments handled by the @code{chmod} program. +Change the mode (also called @dfn{permission bits}) of the specified +files (@code{dired-do-chmod}). @var{modespec} can be in octal or +symbolic notation, like arguments handled by the @command{chmod} +program. @findex dired-do-chgrp @kindex G @r{(Dired)} @@ -663,8 +679,8 @@ this.) @vindex dired-chown-program The variable @code{dired-chown-program} specifies the name of the -program to use to do the work (different systems put @code{chown} in -different places). +program to use to do the work (different systems put @command{chown} +in different places). @findex dired-do-touch @kindex T @r{(Dired)} @@ -952,17 +968,17 @@ The backup file is the first file given to @code{diff}. @cindex subdirectories in Dired @cindex expanding subdirectories in Dired - A Dired buffer displays just one directory in the normal case; -but you can optionally include its subdirectories as well. + A Dired buffer usually displays just one directory, but you can +optionally include its subdirectories as well. The simplest way to include multiple directories in one Dired buffer is -to specify the options @samp{-lR} for running @code{ls}. (If you give a +to specify the options @samp{-lR} for running @command{ls}. (If you give a numeric argument when you run Dired, then you can specify these options in the minibuffer.) That produces a recursive directory listing showing all subdirectories at all levels. More often, you will want to show only specific subdirectories. You -can do this with the @kbd{i} command: +can do this with @kbd{i} (@code{dired-maybe-insert-subdir}): @table @kbd @findex dired-maybe-insert-subdir @@ -973,25 +989,27 @@ can do this with the @kbd{i} command: Insert the contents of a subdirectory later in the buffer. @end table -Use the @kbd{i} (@code{dired-maybe-insert-subdir}) command on a line -that describes a file which is a directory. It inserts the contents of -that directory into the same Dired buffer, and moves there. Inserted -subdirectory contents follow the top-level directory of the Dired -buffer, just as they do in @samp{ls -lR} output. - -If the subdirectory's contents are already present in the buffer, the -@kbd{i} command just moves to it. - -In either case, @kbd{i} sets the Emacs mark before moving, so @kbd{C-u -C-@key{SPC}} takes you back to the old position in the buffer (the line -describing that subdirectory). You can also use @samp{^} to return -to the parent directory in the same Dired buffer. - -Use the @kbd{l} command (@code{dired-do-redisplay}) to update the -subdirectory's contents. Use @kbd{C-u k} on the subdirectory header -line to remove the subdirectory listing (@pxref{Dired Updating}). You -can also hide and show inserted subdirectories (@pxref{Hiding -Subdirectories}). +@noindent +If you use this command on a line that describes a file which is a +directory, it inserts the contents of that directory into the same +Dired buffer, and moves there. Inserted subdirectory contents follow +the top-level directory of the Dired buffer, just as they do in +@samp{ls -lR} output. + + If the subdirectory's contents are already present in the buffer, +the @kbd{i} command just moves to it. + + In either case, @kbd{i} sets the Emacs mark before moving, so +@kbd{C-u C-@key{SPC}} returns to your previous position in the Dired +buffer (@pxref{Setting Mark}). You can also use @samp{^} to return to +the parent directory in the same Dired buffer (@pxref{Dired +Visiting}). + + Use the @kbd{l} command (@code{dired-do-redisplay}) to update the +subdirectory's contents, and use @kbd{C-u k} on the subdirectory +header line to remove the subdirectory listing (@pxref{Dired +Updating}). You can also hide and show inserted subdirectories +(@pxref{Hiding Subdirectories}). @ifnottex @include dired-xtra.texi @@ -1209,10 +1227,10 @@ tell @command{find} what condition to test. To use this command, you need to know how to use @command{find}. @vindex find-ls-option - The format of listing produced by these commands is controlled by the -variable @code{find-ls-option}, whose default value specifies using -options @samp{-ld} for @code{ls}. If your listings are corrupted, you -may need to change the value of this variable. + The format of listing produced by these commands is controlled by +the variable @code{find-ls-option}, whose default value specifies +using options @samp{-ld} for @command{ls}. If your listings are +corrupted, you may need to change the value of this variable. @findex locate @findex locate-with-filter @@ -1338,10 +1356,14 @@ rotation is lossless, and uses an external utility called JpegTRAN. @kindex + @r{(Dired)} @findex dired-create-directory The command @kbd{+} (@code{dired-create-directory}) reads a -directory name, and creates the directory if it does not already -exist. +directory name, and creates that directory. It signals an error if +the directory already exists. @cindex searching multiple files via Dired +@kindex M-s a C-s @r{(Dired)} +@kindex M-s a M-C-s @r{(Dired)} +@findex dired-do-isearch +@findex dired-do-isearch-regexp The command @kbd{M-s a C-s} (@code{dired-do-isearch}) begins a ``multi-file'' incremental search on the marked files. If a search fails at the end of a file, typing @kbd{C-s} advances to the next diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 88bd5949b47..6ce298c1795 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1183,6 +1183,12 @@ point is on a directory entry, mark all files in that directory tree (@code{vc-dir-mark-all-files}). With a prefix argument, mark all listed files and directories. +@kindex q @r{(VC Directory)} +@findex quit-window +@item q +Bury the VC Directory buffer, and delete its window if the window was +created just for that buffer. + @item u Unmark the file or directory on the current line. If the region is active, unmark all the files in the region (@code{vc-dir-unmark}). diff --git a/etc/NEWS b/etc/NEWS index 95d1854744b..f37f562ec82 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -665,7 +665,7 @@ The new function dbus-register-service registers a service known name on a D-Bus without simultaneously registering a property or a method. ** Dired-x - +--- *** dired-jump and dired-jump-other-window called with a prefix argument read a file name from the minibuffer instead of using buffer-file-name. -- cgit v1.2.1 From 93d5ca1fbb1a5244483816a1a92f8934a30e589f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 26 Dec 2011 19:00:38 +0100 Subject: * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus can scroll. (create_and_show_popup_menu): Always use menu_position_func for Gtk3. Fixes: debbugs:10361 --- src/ChangeLog | 7 +++++++ src/xmenu.c | 23 +++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a1210e08424..2c3644f14fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-12-26 Jan Djärv + + * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus + can scroll. + (create_and_show_popup_menu): Always use menu_position_func for + Gtk3 (Bug#10361). + 2011-12-24 Andreas Schwab * callint.c (Fcall_interactively): Don't truncate prompt string. diff --git a/src/xmenu.c b/src/xmenu.c index 4b7bbfd73dc..ba99b8ac1e3 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -102,6 +102,9 @@ along with GNU Emacs. If not, see . */ #ifdef USE_GTK #include "gtkutil.h" +#ifdef HAVE_GTK3 +#include "xgselect.h" +#endif #endif #include "menu.h" @@ -408,7 +411,15 @@ x_menu_wait_for_event (void *data) else ntp = &next_time; +#ifdef HAVE_GTK3 + /* Gtk3 have arrows on menus when they don't fit. When the pointer is + over an arrow, a timeout scrolls it a bit. Use xg_select so that + timeout gets triggered. */ + + xg_select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp); +#else select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp); +#endif } } #endif /* ! MSDOS */ @@ -1435,6 +1446,13 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */ struct next_popup_x_y popup_x_y; int specpdl_count = SPECPDL_INDEX (); + int use_pos_func = ! for_click; + +#ifdef HAVE_GTK3 + /* Always use position function for Gtk3. Otherwise menus may become + too small to show anything. */ + use_pos_func = 1; +#endif if (! FRAME_X_P (f)) abort (); @@ -1446,7 +1464,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, G_CALLBACK (menu_highlight_callback)); xg_crazy_callback_abort = 0; - if (! for_click) + if (use_pos_func) { /* Not invoked by a click. pop up at x/y. */ pos_func = menu_position_func; @@ -1461,7 +1479,8 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */ } - else + + if (for_click) { for (i = 0; i < 5; i++) if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) -- cgit v1.2.1 From 27f03d6c1531ba4515023614b0938284d125fcc3 Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Mon, 26 Dec 2011 20:56:26 -0800 Subject: Update release notes to reflect a fixed, reported bug. --- etc/MH-E-NEWS | 5 +++++ lisp/mh-e/ChangeLog | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index f02b795a6b9..92c75ffb6cf 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -39,6 +39,11 @@ addition of "trunk." The `mh-showing-mode' variable is now defined with `define-minor-mode' (closes SF #482666). +*** Desktop fails to restore MH-Folder buffers + +When restoring MH folders from ".emacs.desktop", Emacs now opens them in +the expected `mh-folder' mode instead of `dired-mode' (closes SF #1510145) + * Changes in MH-E 8.2 diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 02e531120be..48e93ecdb72 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -122,7 +122,7 @@ * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block. * mh-folder.el: Use boundp instead of fboundp when testing - existence of desktop-buffer-mode-handlers. + existence of desktop-buffer-mode-handlers (closes SF #1510145). 2011-05-10 Jim Meyering -- cgit v1.2.1 From fbfa898c40875c8bba361de88f31230b816ff801 Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Tue, 27 Dec 2011 14:10:34 -0800 Subject: Update release notes to reflect a fixed, reported bug. --- etc/MH-E-NEWS | 5 +++++ lisp/mh-e/ChangeLog | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 92c75ffb6cf..8b96d08c17a 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -44,6 +44,11 @@ The `mh-showing-mode' variable is now defined with `define-minor-mode' When restoring MH folders from ".emacs.desktop", Emacs now opens them in the expected `mh-folder' mode instead of `dired-mode' (closes SF #1510145) +*** *MH-E Log* buffer can point to removed directory +This was caused by using `set-buffer' instead of +`with-current-buffer.' This has been fixed thanks to Stefan Monnier +(closes SF #1903293). + * Changes in MH-E 8.2 diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 48e93ecdb72..ce8a7e56d60 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -232,7 +232,8 @@ (mh-handle-process-error, mh-variant-info): * mh-comp.el (mh-forward): * mh-alias.el (mh-alias-local-users, mh-alias-which-file-has-alias): - (mh-alias-add-alias-to-file): Use with-current-buffer. + (mh-alias-add-alias-to-file): Use with-current-buffer (closes SF + #1903293). 2009-11-04 Stefan Monnier -- cgit v1.2.1 From 9ca4c014c87716b8712f710cbc8bbdf1421a08fc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 27 Dec 2011 18:48:53 -0500 Subject: * variables.texi (Creating Buffer-Local): Warn against misuses of make-variable-buffer-local. Fixes: debbugs:10258 --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/variables.texi | 2 ++ 2 files changed, 7 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2db274f2703..51143c27859 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-12-27 Stefan Monnier + + * variables.texi (Creating Buffer-Local): Warn against misuses of + make-variable-buffer-local (bug#10258). + 2011-08-28 Dani Moncayo (tiny change) * lists.texi (Building Lists): Fix typo. diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 1c86a7eb65c..c4f091484e6 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1268,6 +1268,8 @@ needed if you use the @var{local} argument to @code{add-hook} or This function marks @var{variable} (a symbol) automatically buffer-local, so that any subsequent attempt to set it will make it local to the current buffer at the time. +Contrary to @code{make-local-variable} with which it is often confused, this +cannot be undone, and affects the behavior of the variable in all buffers. A peculiar wrinkle of this feature is that binding the variable (with @code{let} or other binding constructs) does not create a buffer-local -- cgit v1.2.1 From 29a8b279e3a7764e424bc66711d1f79bf75242de Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 28 Dec 2011 02:40:35 +0000 Subject: mm-view.el (mm-display-inline-fontify): Add comment. --- lisp/gnus/ChangeLog | 7 ++++++- lisp/gnus/mm-view.el | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c26c0a0a5b1..1fff67074e7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,6 +1,11 @@ +2011-12-28 Katsumi Yamaoka + + * mm-view.el (mm-display-inline-fontify): Add comment. + 2011-12-15 Juri Linkov - * mm-decode.el (mm-inline-media-tests): Add missing `mm-handle-media-subtype'. + * mm-decode.el (mm-inline-media-tests): Add missing + `mm-handle-media-subtype'. 2011-12-09 Tassilo Horn diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 854ca3497da..f14b47e86e4 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -602,6 +602,7 @@ If MODE is not set, try to find mode automatically." ;; I find font-lock a bit too verbose. (let ((font-lock-verbose nil)) ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. + ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes. (set (make-local-variable 'font-lock-mode-hook) nil) (set (make-local-variable 'font-lock-support-mode) nil) (setq buffer-file-name (mm-handle-filename handle)) -- cgit v1.2.1 From 51281b3202901a846f7427e630a9615b1d55eac8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 28 Dec 2011 13:23:47 +0800 Subject: Fix GDB mode line for gdb-create-source-file-list nil. * lisp/progmodes/gdb-mi.el (gdb-get-source-file-list) (gdb-get-source-file): Move mode line update to gdb-get-source-file. Fixes: debbugs:10087 --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/gdb-mi.el | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5b3c92f8c2..78cc1862c2f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-12-28 Chong Yidong + + * progmodes/gdb-mi.el (gdb-get-source-file-list) + (gdb-get-source-file): Move mode line update to + gdb-get-source-file (Bug#10087). + 2011-12-25 Chong Yidong * progmodes/gud.el (gud-gdb-fetch-lines-filter): Just use diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 128ff4bb143..1c38c59bba6 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -3787,9 +3787,7 @@ is set in them." (dolist (buffer (buffer-list)) (with-current-buffer buffer (when (member buffer-file-name gdb-source-file-list) - (gdb-init-buffer)))) - (gdb-force-mode-line-update - (propertize "ready" 'face font-lock-variable-name-face))) + (gdb-init-buffer))))) (defun gdb-get-main-selected-frame () "Trigger for `gdb-frame-handler' which uses main current @@ -4128,7 +4126,9 @@ buffers, if required." (gdb-get-buffer-create 'gdb-breakpoints-buffer) (if (and gdb-show-main gdb-main-file) (let ((pop-up-windows t)) - (display-buffer (gud-find-file gdb-main-file)))))) + (display-buffer (gud-find-file gdb-main-file))))) + (gdb-force-mode-line-update + (propertize "ready" 'face font-lock-variable-name-face))) ;;from put-image (defun gdb-put-string (putstring pos &optional dprop &rest sprops) -- cgit v1.2.1 From 8d80ef01d987f052dc8ee641cc65189299e230de Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 27 Dec 2011 22:59:21 -0800 Subject: doc: Use clearer notations for permissions. * doc/lispref/files.texi (File Attributes, Changing Files): Use a more-natural notation for octal numbers. * doc/misc/gnus.texi (Mail Source Customization, Mail Back End Variables): Use octal notation for file permissions, which are normally thought of in octal. (Mail Back End Variables): Use more-plausible modes in example. --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/files.texi | 11 +++-------- doc/misc/ChangeLog | 7 +++++++ doc/misc/gnus.texi | 6 +++--- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5b90c2a1f9f..d4f9ab747ed 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-12-28 Paul Eggert + + * files.texi (File Attributes, Changing Files): + Use a more-natural notation for octal numbers. + 2011-12-23 Juanma Barranquero * variables.texi (Variables with Restricted Values): diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 86ecfd122ef..b6d0b5c7ed2 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1115,15 +1115,10 @@ This function recursively follows symbolic links at all levels. @end group @group -(set-file-modes "~/junk/diffs" 438) +(set-file-modes "~/junk/diffs" #o666) @result{} nil @end group -@group -(format "%o" 438) - @result{} "666" ; @r{Convert to octal.} -@end group - @group % ls -l diffs -rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs @@ -1570,10 +1565,10 @@ the bitwise complement of the ``umask'' value. The argument @var{mode} must be an integer. On most systems, only the low 9 bits of @var{mode} are meaningful. You can use the Lisp construct -for octal character codes to enter @var{mode}; for example, +for octal numbers to enter @var{mode}; for example, @example -(set-default-file-modes ?\644) +(set-default-file-modes #o644) @end example Saving a modified version of an existing file does not count as creating diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index dcf816e7fd3..3b0e5251d5e 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,10 @@ +2011-12-28 Paul Eggert + + * gnus.texi (Mail Source Customization, Mail Back End Variables): + Use octal notation for file permissions, which are normally + thought of in octal. + (Mail Back End Variables): Use more-plausible modes in example. + 2011-12-20 Alan Mackenzie * cc-mode.texi: Update version string 5.31 -> 5.32. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 8ed57699df5..86aaadf8ae8 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -15033,7 +15033,7 @@ number. @item mail-source-default-file-modes @vindex mail-source-default-file-modes -All new mail files will get this file mode. The default is 384. +All new mail files will get this file mode. The default is @code{#o600}. @item mail-source-movemail-program @vindex mail-source-movemail-program @@ -15123,10 +15123,10 @@ default file modes the new mail files get: @lisp (add-hook 'nnmail-pre-get-new-mail-hook - (lambda () (set-default-file-modes 511))) + (lambda () (set-default-file-modes #o700))) (add-hook 'nnmail-post-get-new-mail-hook - (lambda () (set-default-file-modes 551))) + (lambda () (set-default-file-modes #o775))) @end lisp @item nnmail-use-long-file-names -- cgit v1.2.1 From 0e5317f7e42c1008c40305a94afcdff509a475be Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 28 Dec 2011 16:55:49 +0900 Subject: coding.c: (Fdefine_coding_system_internal): Make an utf-8 base coding-system ASCII compatible only when it does not produce BOM on encoding (Bug#10383). --- src/ChangeLog | 6 ++++++ src/coding.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2c3644f14fa..f10e2955164 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-12-28 Kenichi Handa + + * coding.c (Fdefine_coding_system_internal): Make an utf-8 base + coding-system ASCII compatible only when it does not produce BOM + on encoding (Bug#10383). + 2011-12-26 Jan Djärv * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus diff --git a/src/coding.c b/src/coding.c index e15d725af3a..2db5385c932 100644 --- a/src/coding.c +++ b/src/coding.c @@ -9999,8 +9999,6 @@ usage: (define-coding-system-internal ...) */) { Lisp_Object bom; - CODING_ATTR_ASCII_COMPAT (attrs) = Qt; - if (nargs < coding_arg_utf8_max) goto short_args; @@ -10014,6 +10012,8 @@ usage: (define-coding-system-internal ...) */) CHECK_CODING_SYSTEM (val); } ASET (attrs, coding_attr_utf_bom, bom); + if (NILP (bom)) + CODING_ATTR_ASCII_COMPAT (attrs) = Qt; category = (CONSP (bom) ? coding_category_utf_8_auto : NILP (bom) ? coding_category_utf_8_nosig -- cgit v1.2.1 From 98c8795ab766f4fb8d94db4ee1b0fb29fae31c07 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 29 Dec 2011 12:34:44 +0100 Subject: * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property also for alternative shells. (tramp-open-connection-setup-interactive-shell): Check, whether the shell is a busybox. (tramp-send-command): Don't suppress multiple prompts for busyboxes, it hurts. --- lisp/ChangeLog | 9 +++++++++ lisp/net/tramp-sh.el | 17 +++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 78cc1862c2f..c66322b56fe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2011-12-29 Michael Albinus + + * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property + also for alternative shells. + (tramp-open-connection-setup-interactive-shell): Check, whether + the shell is a busybox. + (tramp-send-command): Don't suppress multiple prompts for + busyboxes, it hurts. + 2011-12-28 Chong Yidong * progmodes/gdb-mi.el (gdb-get-source-file-list) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 446a27c65d3..994e1a03f97 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3618,7 +3618,8 @@ file exists and nonzero exit status otherwise." vec 'file-error "Couldn't find a shell which groks tilde expansion")) (tramp-message - vec 5 "Starting remote shell `%s' for tilde expansion" shell) + vec 5 "Starting remote shell `%s' for tilde expansion" + (tramp-set-connection-property vec "remote-shell" shell)) (tramp-open-shell vec shell)) (t (tramp-message @@ -3785,6 +3786,17 @@ process to set up. VEC specifies the connection." ;; Disable unexpected output. (tramp-send-command vec "mesg n; biff n" t) + ;; Busyboxes tend to behave strange. We check for the existence. + (with-connection-property vec "busybox" + (tramp-send-command + vec + (format + "%s --version" (tramp-get-connection-property vec "remote-shell" "echo")) + t) + (with-current-buffer (process-buffer proc) + (let ((case-fold-search t)) + (and (string-match "busybox" (buffer-string)) t)))) + ;; IRIX64 bash expands "!" even when in single quotes. This ;; destroys our shell functions, we must disable it. See ;; . @@ -4397,7 +4409,8 @@ function waits for output unless NOOUTPUT is set." ;; We mark the command string that it can be erased in the output buffer. (tramp-set-connection-property p "check-remote-echo" t) (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark))) - (when (string-match "<<'EOF'" command) + (when (and (string-match "<<'EOF'" command) + (not (tramp-get-connection-property vec "busybox" nil))) ;; Unset $PS1 when using here documents, in order to avoid ;; multiple prompts. (setq command (concat "(PS1= ; " command "\n)"))) -- cgit v1.2.1 From fec0aaa40d858f86395a9b684d97a62c99bac2c2 Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Thu, 29 Dec 2011 08:12:18 -0500 Subject: Fix earlier ChangeLog message from 2011-12-21T11:30:00Z!tzz@lifelogs.com. --- lisp/ChangeLog | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c66322b56fe..37286d0780c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -108,16 +108,25 @@ 2011-12-21 Teodor Zlatanov - * progmodes/cfengine.el: Add Version. - - Add CFEngine 3.x syntax highlighting and support with - `cfengine3-mode', and rename the old `cfengine-mode' to - `cfengine2-mode'. Make `cfengine-mode' an automatic content-based - switcher between `cfengine3-mode' and `cfengine2-mode' by aliasing - it to `cfengine-auto-mode'. Rename variables specific to - `cfengine2-mode' from cfengine-* to cfengine2-*. Change the - modeline indicator to "CFE2" and "CFE3" depending on the mode, to - save space. Mark `cfengine-mode-abbrevs' as obsolete. + * progmodes/cfengine.el: Add Version. Improve CFEngine 3.x syntax + highlighting and support. Fix up comments for capitalization. + (cfengine-mode-debug): New var. + (cfengine3-mode): Change the modeline indicator to "CFE3". + (cfengine3-font-lock-keywords): Improve defun highlighting. + (cfengine2-actions): Rename from `cfengine-actions'. + (cfengine2-font-lock-keywords): Rename from + `cfengine-font-lock-keywords'. + (cfengine2-imenu-expression): Rename from + `cfengine-imenu-expression'. + (cfengine2-outline-level): Rename from `cfengine-outline-level'. + (cfengine2-beginning-of-defun): Rename from + `cfengine-beginning-of-defun'. + (cfengine2-end-of-defun): Rename from `cfengine-end-of-defun'. + (cfengine2-indent-line): Rename from `cfengine-indent-line'. + (cfengine2-mode): Rename from `cfengine-mode'. Change the + modeline indicator to "CFE2". + (cfengine-mode): Defalias to `cfengine-auto-mode'. + (cfengine-mode-abbrevs): Mark obsolete. 2011-12-21 Chong Yidong -- cgit v1.2.1 From 0ed49f9399f8865af366b7b8763aa07dd181f325 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 29 Dec 2011 23:58:42 +0800 Subject: Cleanups for the new Org section in the Emacs manual. * doc/emacs/text.texi (Org Mode): Copyedits. Refer to Outline Format for example. Add index entries. (Org Organizer, Org Authoring): Nodes renamed. Copyedits. --- doc/emacs/ChangeLog | 6 ++ doc/emacs/emacs.texi | 1 + doc/emacs/text.texi | 208 +++++++++++++++++++++++++++------------------------ 3 files changed, 116 insertions(+), 99 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 7857295de92..6e0819621a2 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2011-12-29 Chong Yidong + + * text.texi (Org Mode): Copyedits. Refer to Outline Format for + example. Add index entries. + (Org Organizer, Org Authoring): Nodes renamed. Copyedits. + 2011-12-26 Chong Yidong * dired.texi (Dired Enter, Misc Dired Features): Document diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 7f703fbaad0..f5f0ffe8ef4 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -548,6 +548,7 @@ Commands for Human Languages * Case:: Changing the case of text. * Text Mode:: The major modes for editing text files. * Outline Mode:: Editing outlines. +* Org Mode:: The Emacs organizer. * TeX Mode:: Editing input to the formatter TeX. * HTML Mode:: Editing HTML and SGML files. * Nroff Mode:: Editing input to the formatter nroff. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 37a85a89ea2..e4bc31e0266 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1256,117 +1256,139 @@ automatically by putting this in your init file (@pxref{Init File}): @node Org Mode @section Org Mode -@kindex TAB @r{(Org Mode)} -@kindex S-TAB @r{(Org Mode)} @cindex organizer @cindex planner -@findex org-mode -@cindex fold -@cindex headline -@kindex M- @r{(Org Mode)} -@kindex M- @r{(Org Mode)} -@kindex M- @r{(Org Mode)} -@kindex M- @r{(Org Mode)} -@kindex S-M- @r{(Org Mode)} -@kindex S-M- @r{(Org Mode)} -@kindex S-M- @r{(Org Mode)} -@kindex S-M- @r{(Org Mode)} - -Org mode extends Outline mode to turn Emacs into an organizer and an -authoring system. +@findex Org mode +@findex mode, Org -When editing a file ending with the @file{.org} extension, Emacs -automatically uses @code{org-mode} as the major mode. In this mode, -headlines start with one (or more) leading star(s) and comments start -with the @code{#} character at the beginning of a line. - -@example -* This is the first headline -** This is a first sub-headline -* This is the second headline - -Some content here. +@findex org-mode + Org mode is a variant of Outline mode for using Emacs as an +organizer and/or authoring system. Files with names ending in the +extension @file{.org} are opened in Org mode (@pxref{Choosing Modes}). +To explicitly switch to Org mode, type @kbd{M-x org-mode}. -# Some comment here. -@end example + In Org mode, as in Outline mode, each entry has a heading line that +starts with one or more @samp{*} characters. @xref{Outline Format}. +In addition, any line that begins with the @samp{#} character is +treated as a comment. -From here, you can use Org mode as a simple outliner: @key{TAB} on a -headline will cycle through the various folding states of a subtree, -and @key{S-TAB} anywhere in the buffer will (un)fold the whole -structure. +@kindex TAB @r{(Org Mode)} +@findex org-cycle + Org mode provides commands for easily viewing and manipulating the +outline structure. The simplest of these commands is @key{TAB} +(@code{org-cycle}). If invoked on a heading line, it cycles through +the different visibility states of the subtree: (i) showing only that +heading line, (ii) showing only the heading line and the heading lines +of its direct children, if any, and (iii) showing the entire subtree. +If invoked in a body line, the global binding for @key{TAB} is +executed. -You can also manipulate the structure of your document by moving a -headline up and down with @key{M-} and @key{M-}, or by -promoting and demoting a headline with @key{M-} and -@key{M-}. If you want to act on the whole subtree (i.e. the -headline and its content, including other headlines), simply add the -@kbd{Shift} key and use @key{S-M-}, @key{S-M-}, -@key{S-M-} and @key{S-M-}. +@kindex S-TAB @r{(Org Mode)} +@findex org-shifttab + Typing @key{S-TAB} (@code{org-shifttab}) anywhere in an Org mode +buffer cycles the visibility of the entire outline structure, between +(i) showing only top-level heading lines, (ii) showing all heading +lines but no body lines, and (iii) showing everything. -For further details, see @ref{Document Structure,,,org, The Org Manual}. +@kindex M- @r{(Org Mode)} +@kindex M- @r{(Org Mode)} +@kindex M- @r{(Org Mode)} +@kindex M- @r{(Org Mode)} +@findex org-metaup +@findex org-metadown +@findex org-metaleft +@findex org-metaright + You can move an entire entry up or down in the buffer, including its +body lines and subtree (if any), by typing @kbd{M-} +(@code{org-metaup}) or @kbd{M-} (@code{org-metadown}) on the +heading line. Similarly, you can promote or demote a heading line +with @kbd{M-} (@code{org-metaleft}) and @kbd{M-} +(@code{org-metaright}). These commands execute their global bindings +if invoked on a body line. + + The following subsections give basic instructions for using Org mode +as an organizer and as an authoring system. @xref{Top,The Org Mode +Manual,,org, The Org Manual}, for details. @menu -* Org as an organizer:: Manage TODO lists and agendas -* Org as an authoring system:: Export to various formats +* Org Organizer:: Managing TODO lists and agendas. +* Org Authoring:: Exporting Org buffers to various formats. @end menu -@node Org as an organizer +@node Org Organizer @subsection Org as an organizer +@cindex TODO item +@cindex Org agenda -@cindex TODO keywords @kindex C-c C-t @r{(Org Mode)} +@findex org-todo +@vindex org-todo-keywords + You can tag an Org entry as a @dfn{TODO} item by typing @kbd{C-c +C-t} (@code{org-todo}) anywhere in the entry. This adds the keyword +@samp{TODO} to the heading line. Typing @kbd{C-c C-t} again switches +the keyword to @samp{DONE}; another @kbd{C-c C-t} removes the keyword +entirely, and so forth. You can customize the keywords used by +@kbd{C-c C-t} via the variable @code{org-todo-keywords}. + @kindex C-c C-s @r{(Org Mode)} @kindex C-c C-d @r{(Org Mode)} -@vindex org-todo-keywords -@findex org-todo +@findex org-schedule +@findex org-deadline + Apart from marking an entry as TODO, you can attach a date to it, by +typing @kbd{C-c C-s} (@code{org-schedule}) in the entry. This prompts +for a date by popping up the Emacs Calendar (@pxref{Calendar/Diary}), +and then adds the tag @samp{SCHEDULED}, together with the selected +date, beneath the heading line. The command @kbd{C-c C-d} +(@code{org-deadline}) has the same effect, except that it uses the tag +@code{DEADLINE}. + +@kindex C-c [ @r{(Org Mode)} +@findex org-agenda-file-to-front +@vindex org-agenda-files + Once you have some TODO items planned in an Org file, you can add +that file to the list of @dfn{agenda files} by typing @kbd{C-c [} +(@code{org-agenda-file-to-front}). Org mode is designed to let you +easily maintain multiple agenda files, e.g.@: for organizing different +aspects of your life. The list of agenda files is stored in the +variable @code{org-agenda-files}. + @findex org-agenda -@cindex scheduled -@cindex deadline -@cindex agenda - -Each headline can be turned into a TODO item calling @code{org-todo} -with @key{C-c C-t} anywhere on it. This will add the TODO keyword -@code{TODO}. Hit @key{C-c C-t} to cycle through the list of available -TODO keywords: you can configure the variable @code{org-todo-keywords} -to use your own list of keywords. - -Now that you have something to do, let's add a date to it: pressing -@key{C-c C-s} on a headline will add @code{SCHEDULED} below it, and -you will be prompted for a date through the calendar. @key{C-c C-d} -has the same effect, except that the item will have a @code{DEADLINE} -instead. - -Now that some TODO items are planned in the current file, add it to -the list of agenda files with @key{C-c [}. Calling the interactive -command @code{org-agenda} will prompt you for what you want to see: a -list of things to do this week, a list of TODO items with specific -keywords, etc. - -For further details, see @ref{TODO items,,,org, The Org Manual} and -@ref{Dates and times,,,org, The Org Manual}. - -@node Org as an authoring system + To view items coming from your agenda files, type @kbd{M-x +org-agenda}. This command prompts for what you want to see: a list of +things to do this week, a list of TODO items with specific keywords, +etc. +@ifnottex +@xref{Agenda Views,,,org, The Org Manual}, for details. +@end ifnottex + +@node Org Authoring @subsection Org as an authoring system -@cindex export -@findex org-export -@cindex publish -@cindex code block -@cindex quote +@cindex Org exporting -You may want to format your Org notes nicely and to prepare them for -export and publication. Org supports simple text formatting: +@findex org-export +@kindex C-c C-e @r{(Org mode)} + You may want to format your Org notes nicely and to prepare them for +export and publication. To export the current buffer, type @kbd{C-c +C-e} (@code{org-export}) anywhere in an Org buffer. This command +prompts for an export format; currently supported formats include +HTML, La@TeX{}, OpenDocument (@file{.odt}), and PDF. Some formats, +such as PDF, require certain system tools to be installed. + +@vindex org-publish-project-alist + To export several files at once to a specific directory, either +locally or over the network, you must define a list of projects +through the variable @code{org-publish-project-alist}. See its +documentation for details. + + Org supports a simple markup scheme for applying text formatting to +exported documents: @example - This text is /emphasized/ -- This item uses *a bold font* +- This text is *in bold* - This text is _underlined_ - This text uses =a teletype font= -@end example - -If a paragraph is a quote or an example, you can use specific -environments: -@example #+begin_quote ``This is a quote.'' #+end_quote @@ -1376,19 +1398,7 @@ This is an example. #+end_example @end example -These environments will be displayed in a specific way with respect -to the selected export/publish backend. - -To export the current buffer, press the @key{C-c C-e} key anywhere in -an Org buffer. Supported export formats include @code{HTML}, La@TeX{} -and @file{.odt} (OpenDocument format.) Depending on your system -installation, you can also directly export to @code{pdf}. - -To export several files at once to a specific directory either locally -or on the Internet, you will need to define a list of projects through -the variable @code{org-publish-project-alist}. - -For further details, see @ref{Exporting,,,org, The Org Manual} and + For further details, see @ref{Exporting,,,org, The Org Manual} and @ref{Publishing,,,org, The Org Manual}. @node TeX Mode -- cgit v1.2.1 From 43da4d0843adc5e642d9b9b58f01ad4822c6d600 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Thu, 29 Dec 2011 17:20:26 +0100 Subject: doc/lispref/frames.texi: Document w32 font backends (bug#10399). --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/frames.texi | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index d4f9ab747ed..1e7132f78d9 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-12-29 Daniel Colascione + + * frames.texi (Font and Color Parameters): + Document w32 font backends (bug#10399). + 2011-12-28 Paul Eggert * files.texi (File Attributes, Changing Files): diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index dad1f28026e..33293de9e0f 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -888,9 +888,11 @@ and bar becomes a narrower bar). A list of symbols, specifying the @dfn{font backends} to use for drawing fonts in the frame, in order of priority. On X, there are currently two available font backends: @code{x} (the X core font -driver) and @code{xft} (the Xft font driver). On other systems, there -is only one available font backend, so it does not make sense to -modify this frame parameter. +driver) and @code{xft} (the Xft font driver). On Windows, there +are currently two available font backends: @code{gdi} and +@code{uniscribe}. On other systems, there is only one available +font backend, so it does not make sense to modify this frame +parameter. @vindex background-mode, a frame parameter @item background-mode -- cgit v1.2.1 From 2cae5ba432fc30042950c073b7ec7807bb98bcde Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 29 Dec 2011 19:08:46 +0100 Subject: doc/lispref/frames.texi (Font and Color Parameters): Add @pxref. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/frames.texi | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 1e7132f78d9..152cd0d3ed7 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2011-12-29 Juanma Barranquero + + * frames.texi (Font and Color Parameters): Add @pxref. + 2011-12-29 Daniel Colascione * frames.texi (Font and Color Parameters): diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 33293de9e0f..06d212c27f2 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -888,11 +888,11 @@ and bar becomes a narrower bar). A list of symbols, specifying the @dfn{font backends} to use for drawing fonts in the frame, in order of priority. On X, there are currently two available font backends: @code{x} (the X core font -driver) and @code{xft} (the Xft font driver). On Windows, there -are currently two available font backends: @code{gdi} and -@code{uniscribe}. On other systems, there is only one available -font backend, so it does not make sense to modify this frame -parameter. +driver) and @code{xft} (the Xft font driver). On Windows, there are +currently two available font backends: @code{gdi} and +@code{uniscribe} (@pxref{Windows Fonts,,, emacs, The GNU Emacs +Manual}). On other systems, there is only one available font backend, +so it does not make sense to modify this frame parameter. @vindex background-mode, a frame parameter @item background-mode -- cgit v1.2.1 From 09450bae84788f9645716e17006e222adf1dec7f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Dec 2011 12:44:31 -0800 Subject: emacs: fix an auto-save permissions race condition * fileio.c (auto_saving_dir_umask): New static var. (Fmake_directory_internal): Use it. (do_auto_save_make_dir): Set it, instead of invoking chmod after creating the directory. The old code temporarily assigns too-generous permissions to the directory. (do_auto_save_eh): Clear it. (Fdo_auto_save): Catch all errrors, not just file errors, so that the var is always cleared. --- src/ChangeLog | 12 ++++++++++++ src/fileio.c | 17 +++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f10e2955164..6c0185b7386 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2011-12-29 Paul Eggert + + emacs: fix an auto-save permissions race condition + * fileio.c (auto_saving_dir_umask): New static var. + (Fmake_directory_internal): Use it. + (do_auto_save_make_dir): Set it, instead of invoking chmod after + creating the directory. The old code temporarily assigns + too-generous permissions to the directory. + (do_auto_save_eh): Clear it. + (Fdo_auto_save): Catch all errrors, not just file errors, so + that the var is always cleared. + 2011-12-28 Kenichi Handa * coding.c (Fdefine_coding_system_internal): Make an utf-8 base diff --git a/src/fileio.c b/src/fileio.c index 3306085491e..27ae8b82204 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -90,6 +90,9 @@ along with GNU Emacs. If not, see . */ /* Nonzero during writing of auto-save files */ static int auto_saving; +/* Nonzero umask during creation of auto-save directories */ +static int auto_saving_dir_umask; + /* Set by auto_save_1 to mode of original file so Fwrite_region will create a new file with the same mode as the original */ static int auto_save_mode_bits; @@ -2062,7 +2065,7 @@ DEFUN ("make-directory-internal", Fmake_directory_internal, #ifdef WINDOWSNT if (mkdir (dir) != 0) #else - if (mkdir (dir, 0777) != 0) + if (mkdir (dir, 0777 & ~auto_saving_dir_umask) != 0) #endif report_file_error ("Creating directory", list1 (directory)); @@ -5205,16 +5208,18 @@ do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */ static Lisp_Object do_auto_save_make_dir (Lisp_Object dir) { - Lisp_Object mode; + Lisp_Object result; - call2 (Qmake_directory, dir, Qt); - XSETFASTINT (mode, 0700); - return Fset_file_modes (dir, mode); + auto_saving_dir_umask = 077; + result = call2 (Qmake_directory, dir, Qt); + auto_saving_dir_umask = 0; + return result; } static Lisp_Object do_auto_save_eh (Lisp_Object ignore) { + auto_saving_dir_umask = 0; return Qnil; } @@ -5282,7 +5287,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) dir = Ffile_name_directory (listfile); if (NILP (Ffile_directory_p (dir))) internal_condition_case_1 (do_auto_save_make_dir, - dir, Fcons (Fcons (Qfile_error, Qnil), Qnil), + dir, Qt, do_auto_save_eh); UNGCPRO; } -- cgit v1.2.1 From b9110d6a11deb9b1035da53812473f792891ad34 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Dec 2011 12:57:11 -0800 Subject: Add Bug#. --- src/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6c0185b7386..4c62a9d0e82 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,13 +1,13 @@ 2011-12-29 Paul Eggert - emacs: fix an auto-save permissions race condition + emacs: fix an auto-save permissions race condition (Bug#10400) * fileio.c (auto_saving_dir_umask): New static var. (Fmake_directory_internal): Use it. (do_auto_save_make_dir): Set it, instead of invoking chmod after creating the directory. The old code temporarily assigns too-generous permissions to the directory. (do_auto_save_eh): Clear it. - (Fdo_auto_save): Catch all errrors, not just file errors, so + (Fdo_auto_save): Catch all errors, not just file errors, so that the var is always cleared. 2011-12-28 Kenichi Handa -- cgit v1.2.1 From 6bb72cbd8b784aebbc8212dfc28bbfcfbb4b8867 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Dec 2011 13:08:18 -0800 Subject: * files.el (move-file-to-trash): Preserve default file modes on error. --- lisp/ChangeLog | 4 ++++ lisp/files.el | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37286d0780c..d1f00198ca8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-29 Paul Eggert + + * files.el (move-file-to-trash): Preserve default file modes on error. + 2011-12-29 Michael Albinus * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property diff --git a/lisp/files.el b/lisp/files.el index 0f7386511f6..4cb033617c7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6457,12 +6457,14 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, ;; Ensure that the trash directory exists; otherwise, create it. (let ((saved-default-file-modes (default-file-modes))) - (set-default-file-modes ?\700) - (unless (file-exists-p trash-files-dir) - (make-directory trash-files-dir t)) - (unless (file-exists-p trash-info-dir) - (make-directory trash-info-dir t)) - (set-default-file-modes saved-default-file-modes)) + (unwind-protect + (progn + (set-default-file-modes #o700) + (unless (file-exists-p trash-files-dir) + (make-directory trash-files-dir t)) + (unless (file-exists-p trash-info-dir) + (make-directory trash-info-dir t))) + (set-default-file-modes saved-default-file-modes))) ;; Try to move to trash with .trashinfo undo information (save-excursion -- cgit v1.2.1 From a0562b3d54b898ea9da9359b16ec1fd7ec4f16d6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Dec 2011 13:55:33 -0800 Subject: Add Bug#. --- lisp/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d1f00198ca8..2c1d59d45a5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2011-12-29 Paul Eggert * files.el (move-file-to-trash): Preserve default file modes on error. + (Bug#10401) 2011-12-29 Michael Albinus -- cgit v1.2.1 From dbf17d8b483f08f9506c19ef95e894fca62b8ec7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Dec 2011 14:08:29 -0800 Subject: * epg.el (epg--make-temp-file): Avoid permission race conditions when creating temporary directories and files on older Emacs. --- lisp/ChangeLog | 3 +++ lisp/epg.el | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c1d59d45a5..ba05002cc69 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-12-29 Paul Eggert + * epg.el (epg--make-temp-file): Avoid permission race conditions + when creating temporary directories and files on older Emacs. + * files.el (move-file-to-trash): Preserve default file modes on error. (Bug#10401) diff --git a/lisp/epg.el b/lisp/epg.el index 133e76da96c..8e784257d54 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1951,14 +1951,16 @@ The returned file name (created by appending some random characters at the end of PREFIX, and expanding against `temporary-file-directory' if necessary), is guaranteed to point to a newly created empty file. You can then use `write-region' to write new data into the file." - (let (tempdir tempfile) + (let (tempdir tempfile orig-modes) (setq prefix (expand-file-name prefix (if (featurep 'xemacs) (temp-directory) temporary-file-directory))) + (setq orig-modes (default-file-modes)) (unwind-protect (let (file) ;; First, create a temporary directory. + (set-default-file-modes #o700) (while (condition-case () (progn (setq tempdir (make-temp-name @@ -1969,14 +1971,12 @@ You can then use `write-region' to write new data into the file." (make-directory tempdir)) ;; let's try again. (file-already-exists t))) - (set-file-modes tempdir 448) ;; Second, create a temporary file in the tempdir. ;; There *is* a race condition between `make-temp-name' ;; and `write-region', but we don't care it since we are ;; in a private directory now. (setq tempfile (make-temp-name (concat tempdir "/EMU"))) (write-region "" nil tempfile nil 'silent) - (set-file-modes tempfile 384) ;; Finally, make a hard-link from the tempfile. (while (condition-case () (progn @@ -1986,6 +1986,7 @@ You can then use `write-region' to write new data into the file." ;; let's try again. (file-already-exists t))) file) + (set-default-file-modes orig-modes) ;; Cleanup the tempfile. (and tempfile (file-exists-p tempfile) -- cgit v1.2.1 From 9858f6c326dfad35733b0dc86231bdd97f2b7703 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 29 Dec 2011 18:52:49 -0800 Subject: Spelling fixes. --- doc/emacs/fortran-xtra.texi | 2 +- doc/misc/calc.texi | 2 +- doc/misc/nxml-mode.texi | 3 +-- doc/misc/reftex.texi | 30 +++++++++++++++--------------- etc/NEWS.19 | 2 +- etc/NEWS.22 | 2 +- lib-src/ebrowse.c | 2 +- lisp/ChangeLog.7 | 2 +- lisp/allout-widgets.el | 2 +- lisp/cedet/semantic/lex-spp.el | 2 +- lisp/emacs-lisp/avl-tree.el | 2 +- lisp/emacs-lisp/bytecomp.el | 2 +- lisp/frame.el | 2 +- lisp/gnus/ChangeLog | 2 +- lisp/gnus/gnus-agent.el | 2 +- lisp/gnus/gnus-int.el | 2 +- lisp/gnus/mm-util.el | 2 +- lisp/gnus/nndiary.el | 4 ++-- lisp/gnus/nnir.el | 2 +- lisp/language/english.el | 2 +- lisp/mh-e/mh-e.el | 2 +- lisp/minibuffer.el | 2 +- lisp/nxml/rng-valid.el | 2 +- lisp/obsolete/pgg-parse.el | 2 +- lisp/org/ChangeLog | 4 ++-- lisp/org/ob-latex.el | 2 +- lisp/org/org-exp.el | 2 +- lisp/play/dunnet.el | 2 +- lisp/progmodes/cc-engine.el | 4 ++-- lisp/progmodes/cc-mode.el | 8 ++++---- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/prolog.el | 4 ++-- lisp/speedbar.el | 2 +- lisp/textmodes/bibtex.el | 2 +- lisp/textmodes/reftex-vars.el | 2 +- lisp/textmodes/rst.el | 2 +- lisp/vc/vc-cvs.el | 2 +- lisp/vc/vc-mtn.el | 2 +- src/bidi.c | 2 +- src/fns.c | 2 +- src/font.h | 2 +- src/process.c | 2 +- src/search.c | 2 +- src/w32term.c | 2 +- src/xdisp.c | 2 +- 45 files changed, 66 insertions(+), 67 deletions(-) diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi index e5853a17dd0..833265359ac 100644 --- a/doc/emacs/fortran-xtra.texi +++ b/doc/emacs/fortran-xtra.texi @@ -22,7 +22,7 @@ extensions @samp{.f90}, @samp{.f95}, @samp{.f03} and @samp{.f08}. Customize @code{auto-mode-alist} to add more extensions. GNU Fortran supports both free and fixed form. This manual mainly documents Fortran mode, but the corresponding F90 mode features are mentioned when -revelant. +relevant. Fortran mode provides special motion commands for Fortran statements and subprograms, and indentation commands that understand Fortran diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index d0c15c1940e..99029e0a83a 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -11100,7 +11100,7 @@ pairwise relatively prime) is @texline @math{15\times 19\times 28 = 7980} years. @infoline 15*19*28 = 7980 years. This is the length of a Julian cycle. Working backwards, the previous -year in which all three cycles began was 4713 BC, and so Scalinger +year in which all three cycles began was 4713 BC, and so Scaliger chose that year as the beginning of a Julian cycle. Since at the time there were no historical records from before 4713 BC, using this year as a starting point had the advantage of avoiding negative year diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi index 27603440413..0cb0a82a468 100644 --- a/doc/misc/nxml-mode.texi +++ b/doc/misc/nxml-mode.texi @@ -878,7 +878,7 @@ the document in different ways, since the XML Recommendation does not require XML parsers to read the DTD. With DTDs, it was impractical to get validation without using an external DTD or reference to an parameter entity. With RELAX NG and other schema languages, you can -simulataneously get the benefits of validation and standalone XML +simultaneously get the benefits of validation and standalone XML documents. Therefore, I recommend that you do not reference an external DOCTYPE in your XML documents. @@ -908,4 +908,3 @@ specification are not enforced. @end itemize @bye - diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 3944b712338..e7e794926b7 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -90,7 +90,7 @@ Don't be discouraged by the size of this manual, which covers Nutshell}). You can go back later to other parts of this document when needed. -@insertcopying +@insertcopying @menu * Introduction:: Quick-Start information. @@ -157,7 +157,7 @@ Citations * Citation Info:: View the corresponding database entry. * Chapterbib and Bibunits:: Multiple bibliographies in a Document. * Citations Outside LaTeX:: How to make citations in Emails etc. -* BibTeX Database Subsets:: Extract parts of a big database. +* BibTeX Database Subsets:: Extract parts of a big database. Index Support @@ -1672,7 +1672,7 @@ support for citations helps to select the correct key quickly. * Citation Info:: View the corresponding database entry. * Chapterbib and Bibunits:: Multiple bibliographies in a Document. * Citations Outside LaTeX:: How to make citations in Emails etc. -* BibTeX Database Subsets:: Extract parts of a big database. +* BibTeX Database Subsets:: Extract parts of a big database. @end menu @node Creating Citations, Citation Styles, , Citations @@ -1776,12 +1776,12 @@ separate @code{\cite} macro for each of it. @item e Create a new BibTeX database file which contains all @i{marked} entries in the selection buffer. If no entries are marked, all entries are -selected. +selected. @item E Create a new BibTeX database file which contains all @i{unmarked} entries in the selection buffer. If no entries are marked, all entries -are selected. +are selected. @item @key{TAB} Enter a citation key with completion. This may also be a key which does @@ -3215,7 +3215,7 @@ way. Before calling a @b{Ref@TeX{}} function, the style hook should always test for the availability of the function, so that the style file will -also work for people who do not use @b{Ref@TeX{}}. +also work for people who do not use @b{Ref@TeX{}}. Additions made with style files in the way described below remain local to the current document. For example, if one package uses AMSTeX, the @@ -3714,7 +3714,7 @@ Produce a list of all duplicate labels in the document. Create a new BibTeX database file with all entries referenced in document. The command prompts for a filename and writes the collected entries to that file. Only entries referenced in the current document with -any @code{\cite}-like macros are used. +any @code{\cite}-like macros are used. The sequence in the new file is the same as it was in the old database. @end deffn @@ -3819,7 +3819,7 @@ only in that frame. So when creating that frame (with @kbd{d} key in an ordinary TOC window), the automatic recentering is turned on. When the frame gets destroyed, automatic recentering is turned off again. -This feature can be turned on and off from the menu +This feature can be turned on and off from the menu (Ref->Options). @end defopt @@ -4095,7 +4095,7 @@ Possible values for this option are: t @r{This means to trust any label prefixes found.} regexp @r{If a regexp, only prefixes matched by the regexp are trusted.} list @r{List of accepted prefixes, as strings. The colon is part of} - @r{the prefix, e.g. ("fn:" "eqn:" "item:").} + @r{the prefix, e.g. ("fn:" "eqn:" "item:").} nil @r{Never trust a label prefix.} @end example The only disadvantage of using this feature is that the label context @@ -5179,11 +5179,11 @@ Fixed bug with @samp{%F} in a label prefix. Added new escapes @noindent @b{Version 4.24} @itemize @bullet -@item +@item Inserting citation commands now prompts for optional arguments when called with a prefix argument. Related new options are @code{reftex-cite-prompt-optional-args} and -@code{reftex-cite-cleanup-optional-args}. +@code{reftex-cite-cleanup-optional-args}. @item New option @code{reftex-trust-label-prefix}. Configure this variable if you'd like RefTeX to base its classification of labels on prefixes. @@ -5199,7 +5199,7 @@ after words. Disabled indexing in comment lines. @noindent @b{Version 4.22} @itemize @bullet -@item +@item New command @code{reftex-create-bibtex-file} to create a new database with all entries referenced in the current document. @item @@ -5209,7 +5209,7 @@ from entries marked in a citation selection buffer. @noindent @b{Version 4.21} @itemize @bullet -@item +@item Renaming labels from the toc buffer with key @kbd{M-%}. @end itemize @@ -5342,7 +5342,7 @@ default stuff which has been moved to a constant. @item Environments like theorems can be placed into the TOC by putting entries for @samp{"begin@{theorem@}"} in -@code{reftex-setion-levels}. +@code{reftex-section-levels}. @end itemize @noindent @b{Version 4.06} @@ -5425,7 +5425,7 @@ File search further refined. New option @code{reftex-file-extensions}. document, all labels and associated context. New keys @kbd{i}, @kbd{l}, and @kbd{c}. New options @code{reftex-toc-include-labels}, @code{reftex-toc-include-context}, -@code{reftex-toc-include-file-boundaries}. +@code{reftex-toc-include-file-boundaries}. @end itemize @noindent @b{Version 3.41} diff --git a/etc/NEWS.19 b/etc/NEWS.19 index df6c4893f87..bfed2112a3a 100644 --- a/etc/NEWS.19 +++ b/etc/NEWS.19 @@ -5032,7 +5032,7 @@ if it is `memq' in the list. ** If you call `get-buffer-window' passing t as its second argument, it will only search for windows on visible frames. Previously, passing t -as the secord argument caused `get-buffer-window' to search all +as the second argument caused `get-buffer-window' to search all frames, visible or not. ** If you call `other-buffer' with a nil or omitted second argument, it diff --git a/etc/NEWS.22 b/etc/NEWS.22 index 70c7b0e018b..5cb7955006f 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 @@ -3035,7 +3035,7 @@ appropriate `sql-interactive-mode' wrapper for the current setting of ** Fortran mode changes *** F90 mode and Fortran mode have support for `hs-minor-mode' (hideshow). -It cannot deal with every code format, but ought to handle a sizeable +It cannot deal with every code format, but ought to handle a sizable majority. *** F90 mode and Fortran mode have new navigation commands diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 7395f2c8fdd..9af4f4faf41 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -981,7 +981,7 @@ make_namespace (char *name, struct sym *context) } -/* Find the symbol for namespace NAME. If not found, retrun NULL */ +/* Find the symbol for namespace NAME. If not found, return NULL */ static struct sym * check_namespace (char *name, struct sym *context) diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index b05707abe5c..5036cf1fcce 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 @@ -13739,7 +13739,7 @@ (isearch-toggle-specified-input-method): Set the above variables. (isearch-toggle-input-method): Likewise. (isearch-process-search-multibyte-characters): Give - iseach-input-method as arg to read-multilingual-string. + isearch-input-method as arg to read-multilingual-string. * international/mule-cmds.el (read-multilingual-string): Adjusted for the previous change of variables related to input methods. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 715879534b0..4a25374d8fe 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -1635,7 +1635,7 @@ Use this to redecorate only the item, when you know that its situation with respect to siblings, parent, and offspring is unchanged from its last decoration. Use `allout-decorate-item-and-context' instead to reassess and adjust -relevent context, when suitable." +relevant context, when suitable." (if (not (equal (widget-get item-widget :last-decorated-tick) allout-command-counter)) (let ((was-modified (buffer-modified-p)) diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index cf82da303ce..6b6bf180b1a 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -577,7 +577,7 @@ and what valid VAL values are." (cond ;; CASE 3: Merge symbols together. ((eq (semantic-lex-token-class v) 'spp-symbol-merge) - ;; We need to merge the tokens in the 'text segement together, + ;; We need to merge the tokens in the 'text segment together, ;; and produce a single symbol from it. (let ((newsym (mapconcat (lambda (tok) diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el index bc1efc118ef..1db12eb94f6 100644 --- a/lisp/emacs-lisp/avl-tree.el +++ b/lisp/emacs-lisp/avl-tree.el @@ -31,7 +31,7 @@ ;; deleting, and retrieving data from an AVL tree containing n elements ;; is O(log n). It is somewhat more rigidly balanced than other ;; self-balancing binary trees (such as red-black trees and AA trees), -;; making insertion slighty slower, deletion somewhat slower, and +;; making insertion slightly slower, deletion somewhat slower, and ;; retrieval somewhat faster (the asymptotic scaling is of course the ;; same for all types). Thus it may be a good choice when the tree will ;; be relatively static, i.e. data will be retrieved more often than diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 29c5f3f092b..8c63428cdf1 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3725,7 +3725,7 @@ that suppresses all warnings during execution of BODY." (defun byte-compile-if (form) (byte-compile-form (car (cdr form))) ;; Check whether we have `(if (fboundp ...' or `(if (boundp ...' - ;; and avoid warnings about the relevent symbols in the consequent. + ;; and avoid warnings about the relevant symbols in the consequent. (let ((clause (nth 1 form)) (donetag (byte-compile-make-tag))) (if (null (nthcdr 3 form)) diff --git a/lisp/frame.el b/lisp/frame.el index af668f80961..3405de651c7 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -396,7 +396,7 @@ there (in decreasing order of priority)." ;; Finally, get rid of the old frame. (delete-frame frame-initial-frame t)) - ;; Otherwise, we don't need all that rigamarole; just apply + ;; Otherwise, we don't need all that rigmarole; just apply ;; the new parameters. (let (newparms allparms tail) (setq allparms (append initial-frame-alist diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1fff67074e7..a6e88088ee4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -4713,7 +4713,7 @@ 2010-10-24 Lars Magne Ingebrigtsen * nnimap.el (nnimap-request-head): New function. - (nnimap-request-move-article): Try to be slighly faster by not + (nnimap-request-move-article): Try to be slightly faster by not requesting the entire message when moving. (nnimap-transform-headers): Don't bug out on bodiless articles. (nnimap-send-command): Have no outstanding messages if the IMAP server diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index bf7f31e6392..d268dd7b0c1 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -4031,7 +4031,7 @@ If REREAD is not nil, downloaded articles are marked as unread." ;; gnus-agent-regenerate-group can remove the article ID of every ;; article (with the exception of the last ID in the list - it's ;; special) that no longer appears in the overview. In this - ;; situtation, the last article ID in the list implies that it, + ;; situation, the last article ID in the list implies that it, ;; and every article ID preceding it, have been fetched from the ;; server. diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 2e102634727..320a7aa017d 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -356,7 +356,7 @@ If it is down, start it up (again)." infos data)) (defun gnus-retrieve-group-data-early (gnus-command-method infos) - "Start early async retrival of data from GNUS-COMMAND-METHOD." + "Start early async retrieval of data from GNUS-COMMAND-METHOD." (when (stringp gnus-command-method) (setq gnus-command-method (gnus-server-to-method gnus-command-method))) (funcall (gnus-get-function gnus-command-method 'retrieve-group-data-early) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 129609df10d..a114fb64ded 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -424,7 +424,7 @@ corresponding number of an iso-8859 charset." ;; Cf. http://thread.gmane.org/v9lkng5nwy.fsf@marauder.physik.uni-ulm.de "List of IBM codepage numbers. -The codepage mappings slighly differ between IBM and other vendors. +The codepage mappings slightly differ between IBM and other vendors. See \"ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/IBM/README.TXT\". If an element is a number corresponding to a supported windows diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 29f0695c74e..b0c31907d96 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -71,7 +71,7 @@ ;; * nndiary-get-new-mail, nndiary-mail-source and nndiary-split-methods: ;; NNDiary has some experimental parts, in the sense Gnus normally uses only -;; one mail back ends for mail retreival and splitting. This back end is +;; one mail back ends for mail retrieval and splitting. This back end is ;; also an attempt to make it behave differently. For Gnus developers: as ;; you can see if you snarf into the code, that was not a very difficult ;; thing to do. Something should be done about the respooling breakage @@ -224,7 +224,7 @@ The hooks will be called with the article in the current buffer." (defvoo nndiary-get-new-mail nil "Whether nndiary gets new mail and split it. Contrary to traditional mail back ends, this variable can be set to t -even if your primary mail back end also retreives mail. In such a case, +even if your primary mail back end also retrieves mail. In such a case, NDiary uses its own mail-sources and split-methods.") (defvoo nndiary-nov-is-evil nil diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 3d0fc78dca7..ceeaeda9309 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -304,7 +304,7 @@ is `(valuefunc member)'." ;;; User Customizable Variables: (defgroup nnir nil - "Search groups in Gnus with assorted seach engines." + "Search groups in Gnus with assorted search engines." :group 'gnus) (defcustom nnir-ignored-newsgroups "" diff --git a/lisp/language/english.el b/lisp/language/english.el index dd96d38a197..44201755589 100644 --- a/lisp/language/english.el +++ b/lisp/language/english.el @@ -30,7 +30,7 @@ ;; We need nothing special to support English on Emacs. Selecting ;; English as a language environment is one of the ways to reset -;; various multilingual environment to the original settting. +;; various multilingual environment to the original setting. ;;; Code: diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 77ff914b0cc..9d0ece0f505 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -342,7 +342,7 @@ Name of the Previous sequence.") "Non-nil means that we have \"flists\".") (defvar mh-index-data-file ".mhe_index" - "MH-E specific file where index seach info is stored.") + "MH-E specific file where index search info is stored.") (defvar mh-letter-header-field-regexp "^\\([A-Za-z][A-Za-z0-9-]*\\):") diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 11e195d4f7f..d9a2f976acd 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2672,7 +2672,7 @@ the same set of elements." mergedpat)) ;; New pos from the start. (newpos (length (completion-pcm--pattern->string pointpat))) - ;; Do it afterwards because it changes `pointpat' by sideeffect. + ;; Do it afterwards because it changes `pointpat' by side effect. (merged (completion-pcm--pattern->string (nreverse mergedpat)))) (setq suffix (completion--merge-suffix merged newpos suffix)) diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el index 1f69f5d7bf3..c0bad849735 100644 --- a/lisp/nxml/rng-valid.el +++ b/lisp/nxml/rng-valid.el @@ -570,7 +570,7 @@ Return t if there is work to do, nil otherwise." (rng-clear-cached-state remove-start (1- pos))) ;; sync up with cached validation state (setq continue nil) - ;; do this before settting rng-validate-up-to-date-end + ;; do this before setting rng-validate-up-to-date-end ;; in case we get a quit (rng-mark-xmltok-errors) (rng-mark-xmltok-dependent-regions) diff --git a/lisp/obsolete/pgg-parse.el b/lisp/obsolete/pgg-parse.el index 3d4539d9466..4e086e0d8aa 100644 --- a/lisp/obsolete/pgg-parse.el +++ b/lisp/obsolete/pgg-parse.el @@ -53,7 +53,7 @@ (defcustom pgg-parse-symmetric-key-algorithm-alist '((1 . IDEA) (2 . 3DES) (4 . CAST5) (5 . SAFER-SK128)) - "Alist of the assigned number to the simmetric key algorithm." + "Alist of the assigned number to the symmetric key algorithm." :group 'pgg-parse :type '(repeat (cons (sexp :tag "Number") (sexp :tag "Type")))) diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 6f835c7bfa4..ac328d10910 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -322,7 +322,7 @@ 2011-07-28 Nicolas Goaziou * org-capture.el (org-capture): If no file is associated to - current buffer, check dired buffer and try to retreive a possibly + current buffer, check dired buffer and try to retrieve a possibly directory associated. 2011-07-28 Eric Schulte @@ -948,7 +948,7 @@ 2011-07-28 Nicolas Goaziou * org-latex.el (org-export-latex-preprocess): Rely on - `org-export-footnotes-markers' to retreive definition of the + `org-export-footnotes-markers' to retrieve definition of the current footnote during export. 2011-07-28 Nicolas Goaziou diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index c27ca33080a..731d83096d8 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -171,7 +171,7 @@ Extracted from `org-export-as-pdf' in org-latex.el." pdffile))) (defun org-babel-prep-session:latex (session params) - "Return an error because LaTeX doesn't support sesstions." + "Return an error because LaTeX doesn't support sessions." (error "LaTeX does not support sessions")) (provide 'ob-latex) diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 35a51649452..20275714a0e 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el @@ -2290,7 +2290,7 @@ TYPE must be a string, any of: (plist-get org-export-opt-plist (intern (concat ":" key))))) (save-match-data - ;; If arguments are provided, first retreive them properly + ;; If arguments are provided, first retrieve them properly ;; (in ARGS, as a list), then replace them in VAL. (when args (setq args (org-split-string args ",") args2 nil) diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 696442ee8cb..36f405eedc7 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -2183,7 +2183,7 @@ A hole leads north." nil nil nil nil nil (list obj-box) ;; stair-landing nil nil nil - (list obj-axe) ;; smal-crawlspace + (list obj-axe) ;; small-crawlspace nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil (list obj-special) ;; fourth-vermont-intersection diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0865ddfed69..57ee3943bbe 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -2153,14 +2153,14 @@ comment at the start of cc-engine.el for more info." (if (> pos c-state-nonlit-pos-cache-limit) (setq c-state-nonlit-pos-cache-limit pos)) pos)))) - + (defun c-state-literal-at (here) ;; If position HERE is inside a literal, return (START . END), the ;; boundaries of the literal (which may be outside the accessible bit of the ;; buffer). Otherwise, return nil. ;; ;; This function is almost the same as `c-literal-limits'. Previously, it - ;; differed in that it was a lower level function, and that it rigourously + ;; differed in that it was a lower level function, and that it rigorously ;; followed the syntax from BOB. `c-literal-limits' is now (2011-12) ;; virtually identical to this function. (save-restriction diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 1bc0741b0aa..bf7d6bfed12 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1102,7 +1102,7 @@ Note that the style variables are always made local to the buffer." ;; nested. ;; ;; This function is called indirectly from font locking stuff - either from - ;; c-after-change (to prepare for after-change font-lockng) or from font + ;; c-after-change (to prepare for after-change font-locking) or from font ;; lock context (etc.) fontification. (let ((lit-limits (c-literal-limits)) (new-pos pos) @@ -1165,7 +1165,7 @@ Note that the style variables are always made local to the buffer." ;; ;; ;; void myfunc(T* p) {} - ;; + ;; ;; Type a space in the first blank line, and the fontification of the next ;; line was fouled up by context fontification. (let ((new-beg beg) (new-end end) new-region) @@ -1180,10 +1180,10 @@ Note that the style variables are always made local to the buffer." c-before-context-fontification-functions)))) (funcall c-standard-font-lock-fontify-region-function new-beg new-end verbose))) - + (defun c-after-font-lock-init () ;; Put on `font-lock-mode-hook'. This function ensures our after-change - ;; function will get excuted before the font-lock one. Amongst other + ;; function will get executed before the font-lock one. Amongst other ;; things. (remove-hook 'after-change-functions 'c-after-change t) (add-hook 'after-change-functions 'c-after-change nil t) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 6ce415b563d..9bc4af2a072 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -7855,7 +7855,7 @@ Restore the pre-completion window configuration if possible." If point is on a keyword, help for that keyword will be shown. If point is on a routine name or in the argument list of a routine, help for that routine will be displayed. Works for system routines and -keywords, it pulls up text help. For other routies and keywords, +keywords, it pulls up text help. For other routines and keywords, visits the source file, finding help in the header (if `idlwave-help-source-try-header' is non-nil) or the routine definition itself." diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 0efc2ca231b..389746e2850 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -3262,7 +3262,7 @@ STRING should be given if the last search was by `string-match' on STRING." (defun prolog-clause-start (&optional not-allow-methods) "Return the position at the start of the head of the current clause. If NOTALLOWMETHODS is non-nil then do not match on methods in -objects (relevent only if 'prolog-system' is set to 'sicstus)." +objects (relevant only if 'prolog-system' is set to 'sicstus)." (save-excursion (let ((notdone t) (retval (point-min))) @@ -3328,7 +3328,7 @@ objects (relevent only if 'prolog-system' is set to 'sicstus)." (defun prolog-clause-end (&optional not-allow-methods) "Return the position at the end of the current clause. If NOTALLOWMETHODS is non-nil then do not match on methods in -objects (relevent only if 'prolog-system' is set to 'sicstus)." +objects (relevant only if 'prolog-system' is set to 'sicstus)." (save-excursion (beginning-of-line) ; Necessary since we use "^...." for the search. (if (re-search-forward diff --git a/lisp/speedbar.el b/lisp/speedbar.el index efe7832aca6..33b76e7658e 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3063,7 +3063,7 @@ a function if appropriate." (let* ((speedbar-frame (speedbar-current-frame)) (fn (get-text-property (point) 'speedbar-function)) (tok (get-text-property (point) 'speedbar-token)) - ;; The 1-,+ is safe because scaning starts AFTER the point + ;; The 1-,+ is safe because scanning starts AFTER the point ;; specified. This lets the search include the character the ;; cursor is on. (tp (previous-single-property-change diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 8df2e81c723..16b83802d1f 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -5140,7 +5140,7 @@ Return the URL or nil if none can be generated." (message "No URL known.")) url))) -;; We could combine multiple seach results with set operations +;; We could combine multiple search results with set operations ;; AND, OR, MINUS, and NOT. Would this be useful? ;; How complicated are searches in real life? ;; We could also have other searches such as "publication year newer than...". diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 1b503c78afd..bca07324d19 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1750,7 +1750,7 @@ The option is ignored when `reftex-use-fonts' is nil." (defcustom reftex-highlight-selection 'cursor "*Non-nil mean, highlight selected text in selection and *toc* buffers. Normally, the text near the cursor is the selected text, and it is -highlighted. This is the entry most keys in the selction and *toc* +highlighted. This is the entry most keys in the selection and *toc* buffers act on. However, if you mainly use the mouse to select an item, you may find it nice to have mouse-triggered highlighting instead or as well. The variable may have one of these values: diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index f2dba1575c2..88983e7c98a 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -2348,7 +2348,7 @@ of (COLUMN-NUMBER . LINE) pairs." )) (defun rst-shift-region-right (pfxarg) - "Indent region ridigly, by a few characters to the right. + "Indent region rigidly, by a few characters to the right. This function first computes all possible alignment columns by inspecting the lines preceding the region for bulleted or enumerated list items. If the leftmost column is beyond the diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 7d6c3caf7ff..5506b701102 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -319,7 +319,7 @@ its parents." (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) (error "%s is not a valid symbolic tag name" rev) - ;; If the input revison is a valid symbolic tag name, we create it + ;; If the input revision is a valid symbolic tag name, we create it ;; as a branch, commit and switch to it. (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index f49ad09b5d7..0a0d4d4d1de 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -193,7 +193,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (unless contents-done (vc-mtn-command nil 0 file "revert"))) -;; (defun vc-mtn-roolback (files) +;; (defun vc-mtn-rollback (files) ;; ) (defun vc-mtn-print-log (files buffer &optional shortlog start-revision limit) diff --git a/src/bidi.c b/src/bidi.c index e0337927ec5..ea4405cbda7 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1132,7 +1132,7 @@ bidi_find_paragraph_start (EMACS_INT pos, EMACS_INT pos_byte) Note that this function gives the paragraph separator the same direction as the preceding paragraph, even though Emacs generally - views the separartor as not belonging to any paragraph. */ + views the separator as not belonging to any paragraph. */ void bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) { diff --git a/src/fns.c b/src/fns.c index 04b51d10d9b..3154db62ec7 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3254,7 +3254,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string, /* Base64-decode the data at FROM of LENGTH bytes into TO. If MULTIBYTE is nonzero, the decoded result should be in multibyte - form. If NCHARS_RETRUN is not NULL, store the number of produced + form. If NCHARS_RETURN is not NULL, store the number of produced characters in *NCHARS_RETURN. */ static EMACS_INT diff --git a/src/font.h b/src/font.h index b6c1acf4a30..93c20262956 100644 --- a/src/font.h +++ b/src/font.h @@ -506,7 +506,7 @@ struct font_driver Lisp_Object type; /* 1 iff the font's foundry, family, and adstyle names are case - sensitve. */ + sensitive. */ int case_sensitive; /* Return a cache of font-entities on frame F. The cache must be a diff --git a/src/process.c b/src/process.c index 4b0f90b58af..e4673d24a2a 100644 --- a/src/process.c +++ b/src/process.c @@ -3492,7 +3492,7 @@ usage: (make-network-process &rest ARGS) */) || (NILP (buffer) && NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))) /* We dare not decode end-of-line format by setting VAL to Qraw_text, because the existing Emacs Lisp libraries - assume that they receive bare code including a sequene of + assume that they receive bare code including a sequence of CR LF. */ val = Qnil; else diff --git a/src/search.c b/src/search.c index 811ac74e194..2001477ed61 100644 --- a/src/search.c +++ b/src/search.c @@ -1302,7 +1302,7 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, checking if we can use boyer-moore search. If TRT is non-nil, we can use boyer-moore search only if TRT can be represented by the byte array of 256 elements. For that, - all non-ASCII case-equivalents of all case-senstive + all non-ASCII case-equivalents of all case-sensitive characters in STRING must belong to the same charset and row. */ diff --git a/src/w32term.c b/src/w32term.c index 29ac9d119b4..4788a8198f2 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3388,7 +3388,7 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar, if (whole) { /* Position scroll bar at rock bottom if the bottom of the - buffer is visible. This avoids shinking the thumb away + buffer is visible. This avoids shrinking the thumb away to nothing if it is held at the bottom of the buffer. */ if (position + portion >= whole && !draggingp) { diff --git a/src/xdisp.c b/src/xdisp.c index 90375ba1a33..0ddf9555bc0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13645,7 +13645,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, /* Non-zero means we've seen at least one glyph that came from a display string. */ int string_seen = 0; - /* Largest and smalles buffer positions seen so far during scan of + /* Largest and smallest buffer positions seen so far during scan of glyph row. */ EMACS_INT bpos_max = pos_before; EMACS_INT bpos_min = pos_after; -- cgit v1.2.1 From b30941dba07605b40efbf139eed2007d6b1e5445 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 30 Dec 2011 18:19:42 +0800 Subject: Update Sending Mail chapter of Emacs manual. * sending.texi (Sending Mail): Document initial mail buffer name, and changed multiple mail buffer behavior. (Mail Format): Put the example at the top of the section. (Mail Headers): Move discussion of "From" to the top. (Mail Sending): Document sendmail-query-once. (Citing Mail): Make it less Rmail-specific. --- admin/FOR-RELEASE | 2 +- doc/emacs/ChangeLog | 9 ++ doc/emacs/sending.texi | 305 ++++++++++++++++++++++--------------------------- etc/NEWS | 13 +-- 4 files changed, 155 insertions(+), 174 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 65f98c85496..e8e756081ed 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -169,7 +169,7 @@ regs.texi cyd rmail.texi screen.texi cyd search.texi cyd -sending.texi +sending.texi cyd text.texi cyd trouble.texi vc-xtra.texi cyd diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 6e0819621a2..73d9fc4d07f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,12 @@ +2011-12-30 Chong Yidong + + * sending.texi (Sending Mail): Document initial mail buffer name, + and changed multiple mail buffer behavior. + (Mail Format): Put the example at the top of the section. + (Mail Headers): Move discussion of "From" to the top. + (Mail Sending): Document sendmail-query-once. + (Citing Mail): Make it less Rmail-specific. + 2011-12-29 Chong Yidong * text.texi (Org Mode): Copyedits. Refer to Outline Format for diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 50ec852d740..1c6df362c78 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -11,10 +11,10 @@ @kindex C-x m @findex compose-mail - To send an @dfn{e-mail} message in Emacs, type @kbd{C-x m}. This -selects and initializes a buffer named @samp{*mail*}, where you can -edit the text and headers of the message. Finally, type @kbd{C-c C-s} -or @kbd{C-c C-c} to send the message. + To send an email message from Emacs, type @kbd{C-x m}. This +switches to a buffer named @samp{*unsent mail*}, where you can edit +the text and headers of the message. When done, type @kbd{C-c C-s} or +@kbd{C-c C-c} to send it. @table @kbd @item C-x m @@ -30,37 +30,28 @@ In the mail buffer, send the message and bury the buffer (@code{message-send-and-exit}). @end table + The mail buffer is an ordinary Emacs buffer, so you can switch to +other buffers while composing the mail. If you want to send another +mail before finishing the current one, type @kbd{C-x m} again to open +a new mail buffer whose name has a different numeric suffix +(@pxref{Misc Buffer}). If you invoke the command with a prefix +argument, @w{@kbd{C-u C-x m}}, Emacs switches back to the last mail +buffer, and asks if you want to erase the message in that buffer; if +you answer no, this lets you pick up editing the message where you +left off. + @kindex C-x 4 m @findex compose-mail-other-window @kindex C-x 5 m @findex compose-mail-other-frame -@noindent -The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does the -same as @kbd{C-x m}, except it displays the mail buffer in a different -window. The command @kbd{C-x 5 m} (@code{compose-mail-other-frame}) -creates a new frame for the mail buffer. - - Because the mail buffer is an ordinary Emacs buffer, you can switch -to other buffers while in the middle of composing mail, and switch -back later (or never). If you type @kbd{C-x m} again when you have -been composing another message but have not sent it, Emacs asks for -confirmation before erasing the old message. If you answer @kbd{n}, -Emacs selects the mail buffer with its old contents, so you can finish -the old message and send it. @kbd{C-u C-x m} is another way to do -this. Sending the message marks the mail buffer ``unmodified,'' which -avoids the need for confirmation when @kbd{C-x m} is next used. - - If you want to send another message before finishing the current -message, use the command @kbd{M-x rename-uniquely} to rename the -current mail buffer (@pxref{Misc Buffer}). Then you can use @kbd{C-x -m} to make a new mail buffer, and work with each mail buffer -independently. - - Before using Emacs to send mail, you may need to customize the -variable @code{send-mail-function} if your system is not set up to -deliver mail directly via SMTP (@pxref{Mail Sending}). In addition, -you may need to customize @code{user-mail-address} if the system -cannot receive mail via SMTP (@pxref{Mail Headers}). + The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does +the same as @kbd{C-x m}, except it displays the mail buffer in a +different window. The command @kbd{C-x 5 m} +(@code{compose-mail-other-frame}) does it in a new frame. + + When you type @kbd{C-c C-c} or @kbd{C-c C-s} to send the mail, Emacs +may ask you how it should deliver the mail---either directly via SMTP, +or using some other method. @xref{Mail Sending}, for details. @menu * Format: Mail Format. Format of a mail message. @@ -75,77 +66,91 @@ cannot receive mail via SMTP (@pxref{Mail Headers}). @node Mail Format @section The Format of the Mail Buffer - An email message must contain certain pieces of information, called -@dfn{headers}, which specify the message's sender, recipient(s), and -so on. - - At the top of the mail buffer is a set of @dfn{header fields}, where -you can enter this information. You can insert and edit header fields -using ordinary editing commands. @xref{Header Editing}, for commands -specific to editing header fields. - - Some header fields are automatically pre-initialized in the buffer, -when appropriate; other headers, such as @samp{Date} and -@samp{Message-Id}, are normally omitted from the mail buffer and -created automatically when the message is sent. - -@vindex mail-header-separator - The line in the buffer that says - -@smallexample ---text follows this line-- -@end smallexample - -@noindent -separates the header fields from the @dfn{body} (or @dfn{text}) of the -message. Everything above this line is treated as part of the -headers; everything below it is treated as the body. The delimiter -line itself does not appear in the message actually sent. The text -used for the delimiter line is controlled by the variable -@code{mail-header-separator}. - - Here is an example of what the headers and text in the mail buffer -might look like. + Here is an example of the contents of a mail buffer: @example -To: gnu@@example.org -CC: lungfish@@example.com, byob@@example.net -Subject: The Emacs Manual +To: subotai@@example.org +CC: mongol.soldier@@example.net, rms@@gnu.org +Subject: Re: What is best in life? +From: conan@@example.org --text follows this line-- -Please ignore this message. +To crush your enemies, see them driven before you, and to hear the +lamentation of their women. @end example +@noindent +At the top of the mail buffer is a set of @dfn{header fields}, which +are used for specifying information about the email's recipient(s), +subject, and so on. The above buffer contains header fields for +@samp{To}, @samp{Cc}, @samp{Subject}, and @samp{From}. Some header +fields are automatically pre-initialized in the mail buffer, when +appropriate. + + The line that says @samp{--text follows this line--} separates the +header fields from the @dfn{body} (or @dfn{text}) of the message. +Everything above that line is treated as part of the headers; +everything below it is treated as the body. The delimiter line itself +does not appear in the message actually sent. + + You can insert and edit header fields using ordinary editing +commands. @xref{Header Editing}, for commands specific to editing +header fields. Certain headers, such as @samp{Date} and +@samp{Message-Id}, are normally omitted from the mail buffer and are +created automatically when the message is sent. + @node Mail Headers @section Mail Header Fields @cindex headers (of mail message) A header field in the mail buffer starts with a field name at the beginning of a line, terminated by a colon. Upper and lower case are -equivalent in field names (and in mailing addresses also). After the -colon and optional whitespace comes the contents of the field. +equivalent in field names. After the colon and optional whitespace +comes the contents of the field. You can use any name you like for a header field, but normally -people use only standard field names with accepted meanings. Here is -a table of commonly-used fields. Emacs pre-initializes some of these, -depending on various options you can set. You can delete or alter any -header field before you send the message, if you wish. +people use only standard field names with accepted meanings. -@table @samp -@item From +@vindex user-full-name @vindex user-mail-address -The address of the sender (you). This should be a valid mailing -address, as replies will normally go there. Emacs initializes this -field using the variables @code{user-full-name} and -@code{user-mail-address}; see below. + The @samp{From} header field identifies the person sending the email +(i.e.@: you). This should be a valid mailing address, as replies are +normally sent there. The default contents of this header field are +computed from the variables @code{user-full-name} (which specifies +your full name) and @code{user-mail-address} (your email address). On +some operating systems, Emacs initializes these two variables using +environment variables (@pxref{General Variables}). If this +information is unavailable or wrong, you should customize the +variables yourself (@pxref{Easy Customization}). +@vindex mail-from-style + The value of the variable @code{mail-from-style} specifies how to +format the contents of the @samp{From} field: + +@table @asis +@item @code{nil} +Use just the address, as in @samp{king@@grassland.com}. +@item @code{parens} +Use both address and full name, as in:@* +@samp{king@@grassland.com (Elvis Parsley)}. +@item @code{angles} +Use both address and full name, as in:@* +@samp{Elvis Parsley }. +@item any other value +Use @code{angles} normally. But if the address must be ``quoted'' to +remain syntactically valid under the @code{angles} format but not +under the @code{parens} format, use @code{parens} instead. This is +the default. +@end table + + Apart from @samp{From}, here is a table of commonly-used fields: + +@table @samp @item To The mailing address(es) to which the message is addressed. To list -more than one address, use commas (not spaces) to separate them. +more than one address, use commas to separate them. @item Subject -A piece of text saying what the message is about. Most mail-reading -programs can display a summary of messages, listing the subject of -each message but not its text. +The subject of the message. @item CC Additional mailing address(es) to send the message to. This is like @@ -158,47 +163,38 @@ not appear in the header of the message actually sent. ``BCC'' stands for @dfn{blind carbon copies}. @item FCC -The name of one file, to which a copy of the sent message should be +The name of a file, to which a copy of the sent message should be appended. Emacs writes the message in mbox format, unless the file is in Babyl format (used by Rmail before Emacs 23), in which case Emacs -writes Babyl. If an Rmail buffer is visiting the file, Emacs updates -it accordingly. To specify more than one file, use several @samp{FCC} -fields, with one file name in each field. +writes in Babyl format. If an Rmail buffer is visiting the file, +Emacs updates it accordingly. To specify more than one file, use +several @samp{FCC} fields, with one file name in each field. @item Reply-to An address to which replies should be sent, instead of @samp{From}. -You can use this header if, for some reason, your @samp{From} address -is unable to receive replies. +This is used if, for some reason, your @samp{From} address cannot +receive replies. @item Mail-reply-to - This field takes precedence over @samp{Reply-to}. It is used because -some mailing lists set the @samp{Reply-to} field for their own purposes -(a somewhat controversial practice). +This field takes precedence over @samp{Reply-to}. It is used because +some mailing lists set the @samp{Reply-to} field for their own +purposes (a somewhat controversial practice). @item Mail-followup-to - This field contains one or more addresses. It is typically used when -you reply to a message from a mailing list that you are subscribed to. -It usually indicates that you want replies to go to the list, and that -you do not need an extra copy sent directly to you. - -@c Message mode handles this differently... -@c @vindex mail-mailing-lists -@c The variable @code{mail-mailing-lists} holds a list of mailing list -@c addresses that you are subscribed to. If it is non-@code{nil}, Emacs -@c inserts an appropriate @samp{Mail-followup-to} header when sending mail -@c to a mailing list. +One of more address(es) to use as default recipient(s) for follow-up +messages. This is typically used when you reply to a message from a +mailing list that you are subscribed to, and want replies to go to the +list without sending an extra copy to you. @item In-reply-to -A piece of text describing the message you are replying to. Some mail -systems can use this information to correlate related pieces of mail. -Normally, you never need to think about this, because it is filled in -automatically when you reply to a message in Rmail (or any other mail -program built into Emacs). +An identifier for the message you are replying to. Most mail readers +use this information to group related messages together. Normally, +this header is filled in automatically when you reply to a message in +any mail program built into Emacs. @item References -The Message-Ids of previous related messages (a Message-Id is a unique -identifier generated when a message is sent). Like -@samp{In-reply-to}, this is normally set up automatically for you. +Identifiers for previous related messages. Like @samp{In-reply-to}, +this is normally filled in automatically for you. @end table @noindent @@ -217,35 +213,6 @@ To: foo@@example.net, this@@example.net, @end group @end example -@vindex user-full-name -@vindex user-mail-address - The default contents of the @samp{From} header field are computed -from the variables @code{user-full-name} and @code{user-mail-address}. -On some operating systems, Emacs initializes these two variables using -environment variables (@pxref{General Variables}). If this -information is unavailable or wrong, you can customize the variables -yourself (@pxref{Easy Customization}). - -@vindex mail-from-style - The value of the variable @code{mail-from-style} specifies how to -format the address in the @samp{From} field: - -@table @asis -@item @code{nil} -Use just the address, as in @samp{king@@grassland.com}. -@item @code{parens} -Use both address and full name, as in:@* -@samp{king@@grassland.com (Elvis Parsley)}. -@item @code{angles} -Use both address and full name, as in:@* -@samp{Elvis Parsley }. -@item any other value -Use @code{angles} for most addresses. However, if the address must be -``quoted'' to remain syntactically-valid under the @code{angles} -format but not under the @code{parens} format, use @code{parens} -instead. This is the default. -@end table - @c There is also mail-specify-envelope-from and mail-envelope-from, but @c these are probably not topics for the Emacs manual. @@ -273,13 +240,12 @@ particular message, edit them as necessary before sending the message. @vindex mail-personal-alias-file You can define @dfn{mail aliases}, which are short mnemonic names -that stand for mail addresses or groups of mail addresses. By -default, mail aliases are defined in the file @file{~/.mailrc}. You -can specify a different file name to use, by setting the variable +that stand for one or more mailing addresses. By default, mail +aliases are defined in the file @file{~/.mailrc}. You can specify a +different file name to use, by setting the variable @code{mail-personal-alias-file}. - To define an alias in @file{.mailrc}, write a line in the following -format: + To define an alias in @file{.mailrc}, write a line like this: @example alias @var{nick} @var{fulladdresses} @@ -409,33 +375,39 @@ showing a list of possible coding systems. @cindex Sendmail @cindex Mailclient @vindex send-mail-function - The variable @code{send-mail-function} controls how the default mail -user agent sends mail. Its value should be a function, which can be -one of the following: + The variable @code{send-mail-function} controls how the message is +delivered. Its value should be a function, which can be one of the +following: @table @code +@item sendmail-query-once +This function queries for a delivery method (one of the other entries +in this list), and uses that method for this message. Then it saves +the method to @code{send-mail-function}, so that the method is used +for future deliveries. This is the default, unless you have already +configured the @code{smtpmail-send-it} method. + +@item smtpmail-send-it +Send mail through an external mail host, such as your Internet service +provider's outgoing SMTP mail server. If you have not told Emacs how +to contact the SMTP server, it prompts for this information (which is +saved in the variables @code{smtpmail-smtp-server} and +@code{smtpmail-auth-credentials}). @xref{Top,,Emacs SMTP Library, +smtpmail, Sending mail via SMTP}. + @item sendmail-send-it -Send mail using the system's default @command{sendmail} (or -@command{sendmail}-compatible) program. This is the default on Unix -and GNU, and works provided the system is a valid @dfn{mail host} -(that is, provided it can deliver mail via SMTP). +Send mail using the system's default @command{sendmail} program, or +equivalent. This requires the system to be set up for delivering mail +directly via SMTP. @item mailclient-send-it -Pass the mail buffer on to the system's designated mail client (see -@file{mailclient.el}). This is the default on Mac OS X and -MS-Windows. - -@item smtpmail-send-it -Send mail through an external mail host (e.g., your Internet service -provider's SMTP server). You will need to tell Emacs how to contact -the SMTP server, by customizing the variables -@code{smtpmail-smtp-server} and @code{smtpmail-auth-credentials}. -@xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}. +Pass the mail buffer on to the system's designated mail client. See +the commentary section in the file @file{mailclient.el} for details. @item feedmail-send-it This is similar to @code{sendmail-send-it}, but allows you to queue messages for later sending. See the commentary section in the file -@file{feedmail.el} for more information. +@file{feedmail.el} for details. @end table @node Header Editing @@ -511,7 +483,8 @@ just inserts a tab character. @table @kbd @item C-c C-y -Yank the selected message from Rmail (@code{message-yank-original}). +Yank the selected message from the mail reader, as a citation +(@code{message-yank-original}). @item C-c C-q Fill each paragraph cited from another message (@code{message-fill-yanked-message}). @@ -522,9 +495,9 @@ Fill each paragraph cited from another message @findex message-yank-prefix You can use the command @kbd{C-c C-y} (@code{message-yank-original}) to @dfn{cite} a message that you are replying to. This inserts the -text of that message into the mail buffer. This command is active -only when the mail buffer is invoked from a mail program running in -Emacs, such as Rmail. +text of that message into the mail buffer. This command works only if +the mail buffer is invoked from a mail reader running in Emacs, such +as Rmail. By default, Emacs inserts the string @samp{>} in front of each line of the cited text; this prefix string is specified by the variable diff --git a/etc/NEWS b/etc/NEWS index f37f562ec82..c0058800919 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -116,7 +116,8 @@ and pops down the *Completions* buffer accordingly. ** Mail changes -The default of `send-mail-function' is now `sendmail-query-once', ++++ +*** The default of `send-mail-function' is now `sendmail-query-once', which asks the user (once) whether to use the smtpmail package to send email, or to use the old defaults that rely on external mail facilities (`sendmail-send-it' on GNU/Linux and other Unix-like @@ -156,14 +157,12 @@ If you had that set, then you need to put in your ~/.authinfo file instead. -*** sendmail changes +*** Mail mode changes (this is the old Mail mode, not Message mode) +++ -You can now add MIME attachments to outgoing messages with the new -command `mail-add-attachment'. - +**** New command `mail-add-attachment' for adding MIME attachments --- -The command `mail-attach-file' was renamed to `mail-insert-file'; the -old name is now an obsolete alias to the new name. +**** The command `mail-attach-file' was renamed to `mail-insert-file'. +The old name is now an obsolete alias to the new name. ** Emacs server and client changes +++ -- cgit v1.2.1 From 22bcf2046977620a7f37bbd4dff4be4a4fffc0ed Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 30 Dec 2011 17:27:15 -0800 Subject: Spelling fixes. --- admin/grammars/c.by | 2 +- doc/emacs/ack.texi | 2 +- doc/emacs/emacs.texi | 2 +- doc/emacs/modes.texi | 2 +- doc/misc/eieio.texi | 2 +- doc/misc/gnus.texi | 4 ++-- doc/misc/semantic.texi | 2 +- etc/AUTHORS | 2 +- etc/NEWS.21 | 2 +- etc/TODO | 2 +- etc/themes/manoj-dark-theme.el | 2 +- leim/quail/hebrew.el | 6 +++--- leim/quail/tibetan.el | 4 ++-- lib-src/make-docfile.c | 2 +- lisp/ChangeLog.13 | 4 ++-- lisp/ChangeLog.15 | 2 +- lisp/ChangeLog.9 | 2 +- lisp/cedet/semantic/mru-bookmark.el | 2 +- lisp/cedet/srecode/document.el | 2 +- lisp/emacs-lisp/authors.el | 2 +- lisp/emacs-lisp/crm.el | 2 +- lisp/emacs-lisp/pcase.el | 2 +- lisp/emulation/cua-base.el | 2 +- lisp/emulation/viper-cmd.el | 2 +- lisp/erc/ChangeLog.02 | 2 +- lisp/erc/ChangeLog.04 | 3 +-- lisp/fringe.el | 2 +- lisp/gnus/ChangeLog.2 | 4 ++-- lisp/gnus/gnus-cus.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/message.el | 2 +- lisp/gnus/nnmairix.el | 2 +- lisp/language/hanja-util.el | 2 +- lisp/mail/uudecode.el | 4 ++-- lisp/mh-e/mh-e.el | 2 +- lisp/mh-e/mh-letter.el | 2 +- lisp/mouse.el | 2 +- lisp/mpc.el | 2 +- lisp/net/socks.el | 2 +- lisp/net/tramp-gvfs.el | 2 +- lisp/net/tramp-smb.el | 2 +- lisp/org/ob-screen.el | 4 ++-- lisp/org/org-table.el | 2 +- lisp/play/cookie1.el | 2 +- lisp/progmodes/ada-xref.el | 2 +- lisp/progmodes/cc-engine.el | 2 +- lisp/progmodes/js.el | 3 ++- lisp/progmodes/meta-mode.el | 2 +- lisp/progmodes/verilog-mode.el | 8 ++++---- lisp/ps-mule.el | 2 +- lisp/select.el | 2 +- lisp/textmodes/texnfo-upd.el | 2 +- lisp/url/url-methods.el | 2 +- lisp/vc/pcvs-parse.el | 2 +- lisp/wid-edit.el | 2 +- lisp/window.el | 2 +- src/coding.h | 2 +- src/gtkutil.c | 2 +- src/nsfns.m | 2 +- src/term.c | 2 +- src/textprop.c | 2 +- src/xdisp.c | 2 +- test/cedet/tests/testvarnames.c | 7 +++---- 63 files changed, 77 insertions(+), 78 deletions(-) diff --git a/admin/grammars/c.by b/admin/grammars/c.by index b49f8ce76c7..8c9da9a901b 100644 --- a/admin/grammars/c.by +++ b/admin/grammars/c.by @@ -261,7 +261,7 @@ define ; ;; In C++, structures can have the same things as classes. -;; So delete this somday in the figure. +;; So delete this some day in the figure. ;; ;;structparts : semantic-list ;; (EXPANDFULL $1 structsubparts) diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index ae6338ce5a6..e6d1f8979d7 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -1183,7 +1183,7 @@ Martin Stjernholm co-authored CC Mode, a major editing mode for C, C@t{++}, Objective-C, Java, Pike, CORBA IDL, and AWK code. @item -Steve Strassman did not write @file{spook.el}, and even if he did, he +Steve Strassmann did not write @file{spook.el}, and even if he did, he really didn't mean for you to use it in an anarchistic way. @item diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index f5f0ffe8ef4..ca6162ff824 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1371,7 +1371,7 @@ Shapiro, Richard Sharman, Olin Shivers, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith, David Smith, Paul D.@: Smith, William Sommerfeld, Andre Spiegel, Michael Staats, Ulf Stegemann, Reiner Steib, Sam Steingold, Ake Stenhoff, Peter Stephenson, Ken Stevens, Andy Stewart, -Jonathan Stigelman, Martin Stjernholm, Kim F.@: Storm, Steve Strassman, +Jonathan Stigelman, Martin Stjernholm, Kim F.@: Storm, Steve Strassmann, Olaf Sylvester, Naoto Takahashi, Steven Tamm, Jean-Philippe Theberge, Jens T.@: Berger Thielemann, Spencer Thomas, Jim Thompson, Luc Teirlinck, David O'Toole, Tom Tromey, Enami Tsugutomo, Eli Tziperman, diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 4d574242c8d..40a36bd95ed 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -96,7 +96,7 @@ the rules of the language (@pxref{Indentation}). The keys that are commonly changed are @key{TAB}, @key{DEL}, and @kbd{C-j}. Many modes also define special commands of their own, usually bound in the prefix key @kbd{C-c}. Major modes can also alter user options and variables; -for instance, programming language modes typicaly set a buffer-local +for instance, programming language modes typically set a buffer-local value for the variable @code{comment-start}, which determines how source code comments are delimited (@pxref{Comments}). diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index d65c7a15f7b..17f064406f9 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -1893,7 +1893,7 @@ better in the Emacs environment. @enumerate @item -Allow subclasing of Emacs built-in types, such as faces, markers, and +Allow subclassing of Emacs built-in types, such as faces, markers, and buffers. @item Allow method overloading of method-like functions in Emacs. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 86aaadf8ae8..76bfbc4bb52 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -1328,7 +1328,7 @@ variable to @code{nil}. @vindex gnus-auto-subscribed-categories As if that wasn't enough, @code{gnus-auto-subscribed-categories} also -allows you to specify that new groups should be subcribed based on the +allows you to specify that new groups should be subscribed based on the category their select methods belong to. The default is @samp{(mail post-mail)}, meaning that all new groups from mail-like backends should be subscribed automatically. @@ -20043,7 +20043,7 @@ matches will use the @code{Message-ID}s of these matching articles.) This will ensure that you can raise/lower the score of an entire thread, even though some articles in the thread may not have complete @code{References} headers. Note that using this may lead to -undeterministic scores of the articles in the thread. (Using this match +nondeterministic scores of the articles in the thread. (Using this match key will lead to creation of @file{ADAPT} files.) @end table @end enumerate diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index 8c56d2dc9f8..3d74ebf042c 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi @@ -536,7 +536,7 @@ the buffer. @item bovine parser A parser using the bovine parser generator. It is an LL parser -suitible for small simple languages. +suitable for small simple languages. @item context diff --git a/etc/AUTHORS b/etc/AUTHORS index b7929dbf453..0c86e2b199a 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -3429,7 +3429,7 @@ Steve Nygard: changed unexnext.c Steve Purcell: changed nnimap.el -Steve Strassman: wrote spook.el +Steve Strassmann: wrote spook.el Steve Youngs: changed mh-utils.el mh-xemacs-compat.el mh-customize.el mh-e.el mh-comp.el mh-mime.el dns.el gnus-art.el browse-url.el diff --git a/etc/NEWS.21 b/etc/NEWS.21 index c018567c40d..60392b384fe 100644 --- a/etc/NEWS.21 +++ b/etc/NEWS.21 @@ -4639,7 +4639,7 @@ simpler form STRING as property value. *** Variable width and height spaces To display a space of fractional width or height, use a display -specification of the form `(LOCATION STRECH)'. If LOCATION is +specification of the form `(LOCATION STRETCH)'. If LOCATION is `(margin left-margin)', the space is displayed in the left marginal area, if it is `(margin right-margin)', it is displayed in the right marginal area, and if LOCATION is `(margin nil)' the space is diff --git a/etc/TODO b/etc/TODO index 2470747bfb5..c58fd6dda78 100644 --- a/etc/TODO +++ b/etc/TODO @@ -79,7 +79,7 @@ understand. I find it quite hard to figure out what compilation command it will use. I suggest totally rewriting that part of Flymake, using the simplest -mechanism that sufficies for the specific needs. That will be easy +mechanism that suffices for the specific needs. That will be easy for users to customize. ** Compute the list of active keymaps *after* reading the first event. diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index b06678636c7..ed3e6e334d0 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -20,7 +20,7 @@ ;;; Commentary: -;; I spend a lot of time workin in front of a screen (many hours in a +;; I spend a lot of time working in front of a screen (many hours in a ;; dimly lit room) and eye fatigue is an issue. This is a dark color ;; theme for emacs, which is easier on the eyes than light themes. diff --git a/leim/quail/hebrew.el b/leim/quail/hebrew.el index 7c7f6c6a8b5..aed9910000a 100644 --- a/leim/quail/hebrew.el +++ b/leim/quail/hebrew.el @@ -333,7 +333,7 @@ Additional mappings for Rafe and Yiddish ligatures. (quail-define-package "hebrew-full" "Hebrew" ",Hr$,1,T,K(B" nil "Hebrew Full method. -Provides access to all Hebrew characters suiltable to Modern Hebrew. +Provides access to all Hebrew characters suitable to Modern Hebrew. " nil t t t t nil nil nil nil nil t) (quail-define-rules @@ -456,7 +456,7 @@ Provides access to all Hebrew characters suiltable to Modern Hebrew. "Biblical Hebrew Tiro input method. Based on Society of Biblical Literature's Tiro keyboard layout. -Not suiltable for modern Hebrew input. +Not suitable for modern Hebrew input. 'q' is used to switch levels instead of Alt-Gr. Combining dot above (Called Masora dot) ($,1%G(B) is mapped to 'q1'. " nil t t t t nil nil nil nil nil t) @@ -602,7 +602,7 @@ Not suiltable for modern Hebrew input. "Biblical Hebrew SIL input method. Based on Society of Biblical Literature's SIL keyboard layout. -Phonetic and not suiltable for modern Hebrew input. +Phonetic and not suitable for modern Hebrew input. '`' is used to switch levels instead of Alt-Gr. Euro Sign (,F$(B) is mapped to 'Z'. " nil t t t t nil nil nil nil nil t) diff --git a/leim/quail/tibetan.el b/leim/quail/tibetan.el index ba47155524f..2bc50ace840 100644 --- a/leim/quail/tibetan.el +++ b/leim/quail/tibetan.el @@ -159,7 +159,7 @@ nil nil nil nil nil nil nil nil 'quail-tibetan-update-translation) -;; Here we build up a Quail map for a Tibtan sequence the whole of +;; Here we build up a Quail map for a Tibetan sequence the whole of ;; which can be one composition. ;; ;; A Tibetan syllable is typically structured as follows: @@ -224,7 +224,7 @@ ("F" . "M") ; anusvara ("g" . "u") ; zhabs kyu ("G" . "i") ; gi gu - ("H" . ",") ; viraama + ("H" . ",") ; virama ("j" . "o") ; naro ("J" . "e") ; 'greng bu ("k" . "ts") ; tsa diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 1ec365f3446..89737f04357 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -541,7 +541,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) maxargs--; /* In C code, `default' is a reserved word, so we spell it - `defalt'; unmangle that here. */ + `defalt'; demangle that here. */ if (ident_length == 6 && strncmp (ident_start, "defalt", 6) == 0) fprintf (out, "DEFAULT"); else diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13 index 558718a5a5f..a2d274fbcc0 100644 --- a/lisp/ChangeLog.13 +++ b/lisp/ChangeLog.13 @@ -1121,10 +1121,10 @@ * international/titdic-cnv.el (tit-process-header): Fix embedded coding tag. (titdic-convert): Bind coding-system-for-write to the coding - system specfied in the map file. Remove `charset' property after + system specified in the map file. Remove `charset' property after decoding. (miscdic-convert): Bind coding-system-for-write to the coding - system specfied for the map file. Fix LANGUAGE arg to + system specified for the map file. Fix LANGUAGE arg to quail-define-package. (batch-miscdic-convert): Check if a file is directory or not. diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15 index 6e13c1156ce..8d369f2e2f0 100644 --- a/lisp/ChangeLog.15 +++ b/lisp/ChangeLog.15 @@ -17621,7 +17621,7 @@ (batch-update-autoloads): Handle autoload-excludes on windows-nt. * mail/rmailedit.el (rmail-cease-edit): Give an error if the end of - the headers cannot be located. Simplify, subtracting superflous + the headers cannot be located. Simplify, subtracting superfluous save-excursions. 2009-10-15 Stefan Monnier diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9 index 252b3854f7a..ba90274edf0 100644 --- a/lisp/ChangeLog.9 +++ b/lisp/ChangeLog.9 @@ -13936,7 +13936,7 @@ * international/mule-cmds.el (help-xref-mule-regexp-template): New variable. - (describe-input-method): Temporarily activate the specfied input + (describe-input-method): Temporarily activate the specified input method to display the information. (describe-language-environment): Hyperlinks to mule related items. diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index 47915e8ad58..6f2b2a8b9c8 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -363,7 +363,7 @@ Argument PROMPT is the prompt to use when reading." (setq ans (assoc ans alist)) (if ans (cdr ans) - ;; no match. Custom word. Look it up somwhere? + ;; no match. Custom word. Look it up somewhere? nil) ))) diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el index e25905ead83..038719fbcff 100644 --- a/lisp/cedet/srecode/document.el +++ b/lisp/cedet/srecode/document.el @@ -167,7 +167,7 @@ doesn't always work correctly." ("str\\(ing\\)?" . "string") ("use?r" . "user") ("num\\(ber\\)?" . "number") - ("\\(^\\|\\s-\\)id\\($\\|\\s-\\)" . "Identifier") ;complex cause ;common sylable + ("\\(^\\|\\s-\\)id\\($\\|\\s-\\)" . "Identifier") ;complex cause ;common syllable ) "List of common English abbreviations or full words. These are nouns (as opposed to verbs) for use in creating expanded diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 596b32f24c3..f5330b3b65f 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -452,7 +452,7 @@ Changes to files in this list are not listed.") ("William Sommerfeld" :wrote "emacsclient.c" "scribe.el") ;; No longer distributed: emacsserver.c. ("Leigh Stoller" :changed "emacsclient.c" "server.el") - ("Steve Strassman" :wrote "spook.el") + ("Steve Strassmann" :wrote "spook.el") ("Shinichirou Sugou" :changed "etags.c") ;; No longer distributed: emacsserver.c. ("Sun Microsystems, Inc" :changed "emacsclient.c" "server.el" diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 3848ab7e6ea..d76490f37b8 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -143,7 +143,7 @@ nil if none. The value of FLAG is used to specify the type of completion operation. A value of nil specifies `try-completion'. A value of t specifies -`all-completions'. A value of lambda specifes a test for an exact match. +`all-completions'. A value of lambda specifies a test for an exact match. For more information on STRING, PREDICATE, and FLAG, see the Elisp Reference sections on 'Programmed Completion' and 'Basic Completion diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 6931ce75cb5..7709b59d137 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -685,7 +685,7 @@ Otherwise, it defers to REST which is a list of branches of the form (pcase--if `(,(if (stringp qpat) #'equal #'eq) ,sym ',qpat) (pcase--u1 matches code vars then-rest) (pcase--u else-rest)))) - (t (error "Unkown QPattern %s" qpat)))) + (t (error "Unknown QPattern %s" qpat)))) (provide 'pcase) diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index b17fa6b1471..5e107da15fc 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -84,7 +84,7 @@ ;; If you have just replaced a highlighted region with typed text, ;; you can repeat the replace with M-v. This will search forward -;; for a streach of text identical to the previous contents of the +;; for a stretch of text identical to the previous contents of the ;; region (i.e. the contents of register 0) and replace it with the ;; text you typed to replace the original region. Repeating M-v will ;; replace the next matching region and so on. diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index b6d487704f4..4c728b5de71 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -4397,7 +4397,7 @@ cursor move past the beginning of line." (defun viper-query-replace () "Query replace. -If a null string is suplied as the string to be replaced, +If a null string is supplied as the string to be replaced, the query replace mode will toggle between string replace and regexp replace." (interactive) diff --git a/lisp/erc/ChangeLog.02 b/lisp/erc/ChangeLog.02 index d20b6ca35a7..85914a72ae9 100644 --- a/lisp/erc/ChangeLog.02 +++ b/lisp/erc/ChangeLog.02 @@ -51,7 +51,7 @@ 2002-12-29 Damien Elmes * erc-track.el: - * (erc-track-get-active-buffer): remove superflous (+ arg 0) + * (erc-track-get-active-buffer): remove superfluous (+ arg 0) 2002-12-29 Alex Schroeder diff --git a/lisp/erc/ChangeLog.04 b/lisp/erc/ChangeLog.04 index ff47372b8e3..97d2f01a22d 100644 --- a/lisp/erc/ChangeLog.04 +++ b/lisp/erc/ChangeLog.04 @@ -1926,7 +1926,7 @@ * erc.el: erc-send-whitespace-lines: New variable. (erc-send-current-line): Use erc-send-whitespace-lines. Also, - removed superflous test for empty line in the mapc, since the + removed superfluous test for empty line in the mapc, since the blank line test should find all. I do like to be able to send an empty line when i want to! (erc-send-current-line): Check for point being in input line @@ -2092,4 +2092,3 @@ See ChangeLog.03 for earlier changes. ;; Local Variables: ;; coding: utf-8 ;; End: - diff --git a/lisp/fringe.el b/lisp/fringe.el index fa5ebb6f0c6..aac7e3ba5c7 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -30,7 +30,7 @@ ;; The code is influenced by scroll-bar.el and avoid.el. The author ;; gratefully acknowledge comments and suggestions made by Miles -;; Bader, Eli Zaretski, Richard Stallman, Pavel Janík and others which +;; Bader, Eli Zaretskii, Richard Stallman, Pavel Janík and others which ;; improved this package. ;;; Code: diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 64b15ce31b3..e47af13275e 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -970,9 +970,9 @@ * pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): New optional parameter key, overrides the key id used to store passphrase under (uses true key id from gpg output if nil). - (pgg-gpg-encrypt-region): Search for passphrase using user suplied + (pgg-gpg-encrypt-region): Search for passphrase using user supplied string STR, instead of (pgg-lookup-key STR t). - (pgg-gpg-encrypt-region): Store passphrase under user suplied + (pgg-gpg-encrypt-region): Store passphrase under user supplied string, instead of real key id taken from gpg output. (pgg-gpg-decrypt-region): Likewise. (pgg-gpg-sign-region): Likewise. diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 98f04263571..0721445b592 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -922,7 +922,7 @@ will add a new `thread' match for each article that has X in its `Message-ID's of these matching articles.) This will ensure that you can raise/lower the score of an entire thread, even though some articles in the thread may not have complete `References' headers. -Note that using this may lead to undeterministic scores of the +Note that using this may lead to nondeterministic scores of the articles in the thread. ") ,@types) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index d8db300efbd..52c814528a5 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -4257,7 +4257,7 @@ If NO-DISPLAY, don't generate a summary buffer." result)) (defun gnus-sort-gathered-threads (threads) - "Sort subtreads inside each gathered thread by `gnus-sort-gathered-threads-function'." + "Sort subthreads inside each gathered thread by `gnus-sort-gathered-threads-function'." (let ((result threads)) (while threads (when (stringp (caar threads)) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 5198618c2c3..01fc02cd130 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -6169,7 +6169,7 @@ If the current line has `message-yank-prefix', insert it on the new line." When sending via news, also check that the REFERENCES are less than 988 characters long, and if they are not, trim them until they are." - ;; 21 is the number suggested by USEAGE. + ;; 21 is the number suggested by USAGE. (let ((maxcount 21) (count 0) (cut 2) diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 4ad9d11f906..771e192c188 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el @@ -483,7 +483,7 @@ Other back ends might or might not work.") mfolder query threads))) ;; Check return value (cond - ((zerop rval) ; call was succesful + ((zerop rval) ; call was successful (nnmairix-call-backend "open-server" nnmairix-backend-server) ;; If we're dealing with nnml, rename files diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el index bd661083406..adb25c7e2e8 100644 --- a/lisp/language/hanja-util.el +++ b/lisp/language/hanja-util.el @@ -6438,7 +6438,7 @@ character. This variable is initialized by `hanja-init-load'.") ;; List of current conversion status. ;; The first element is the strating position of shown list. -;; It is a group number each splited by `hanja-list-width'. +;; It is a group number each split by `hanja-list-width'. ;; The second element is the position of selected element. ;; The third element is a list of suitable Hanja candidate. (defvar hanja-conversions diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el index 8652e67d3e1..e2630b5102c 100644 --- a/lisp/mail/uudecode.el +++ b/lisp/mail/uudecode.el @@ -197,10 +197,10 @@ If FILE-NAME is non-nil, save the result to FILE-NAME." (cond (done) ((> 0 remain) - (error "uucode line ends unexpectly") + (error "uucode line ends unexpectedly") (setq done t)) ((and (= (point) end) (not done)) - ;;(error "uucode ends unexpectly") + ;;(error "uucode ends unexpectedly") (setq done t)) ((= counter 3) (setq result (cons diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 9d0ece0f505..ffcc3488664 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -2508,7 +2508,7 @@ of citations entirely, choose \"None\"." "Seal-Send-Time:" "See-Also:" ; H. Spencer: News Article Format and Transmission, June 1994 "Sensitivity:" ; RFC 2156, 2421 - "Speach-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ + "Speech-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Status:" ; sendmail "Supersedes:" ; H. Spencer: News Article Format and Transmission, June 1994 "Telefax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index f269faf3a51..b526df25cc7 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -909,7 +909,7 @@ Any match found replaces the text from BEGIN to END." (with-output-to-temp-buffer completions-buffer (mh-display-completion-list (all-completions word choices) - ;; The `common-subtring' arg only works if it's a prefix. + ;; The `common-substring' arg only works if it's a prefix. (unless (and (functionp choices) (let ((bounds (funcall choices diff --git a/lisp/mouse.el b/lisp/mouse.el index 615062dc031..d1aba96ff16 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -62,7 +62,7 @@ typically sets point where you click the mouse). If value is an integer, the time elapsed between pressing and releasing the mouse button determines whether to follow the link or perform the normal Mouse-1 action (typically set point). -The absolute numeric value specifices the maximum duration of a +The absolute numeric value specifies the maximum duration of a \"short click\" in milliseconds. A positive value means that a short click follows the link, and a longer click performs the normal action. A negative value gives the opposite behavior. diff --git a/lisp/mpc.el b/lisp/mpc.el index 224131623f4..617ec8bd80d 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -2412,7 +2412,7 @@ This is used so that they can be compared with `eq', which is needed for (let* (songid ;The ID of the currently ffwd/rewinding song. songduration ;The duration of that song. songtime ;The time of the song last time we ran. - oldtime ;The timeoftheday last time we ran. + oldtime ;The time of day last time we ran. prevsongid) ;The song we're in the process leaving. (let ((fun (lambda () diff --git a/lisp/net/socks.el b/lisp/net/socks.el index d792077d861..ac8ec15929b 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -414,7 +414,7 @@ version.") ((= atype socks-address-type-name) (format "%c%s" (length address) address)) (t - (error "Unkown address type: %d" atype)))) + (error "Unknown address type: %d" atype)))) (info (gethash proc socks-connections)) request version) (or info (error "socks-send-command called on non-SOCKS connection %S" diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 27dff3aa8d9..abebed6115f 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -1209,7 +1209,7 @@ connection if a previous connection has died for some reason." (format "Opening connection for %s using %s" host method) (format "Opening connection for %s@%s using %s" user host method)) - ;; Enable auth-sorce and password-cache. + ;; Enable auth-source and password-cache. (tramp-set-connection-property vec "first-password-request" t) ;; There will be a callback of "askPassword" when a password is diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 73b9339e25a..c062ebbbfd2 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -973,7 +973,7 @@ If VEC has no cifs capabilities, exchange \"/\" by \"\\\\\"." (setq localname (if (string-match "^/?[^/]+\\(/.*\\)" localname) - ;; There is a share, sparated by "/". + ;; There is a share, separated by "/". (if (not (tramp-smb-get-cifs-capabilities vec)) (mapconcat (lambda (x) (if (equal x ?/) "\\" (char-to-string x))) diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 084beffd229..367d73f787a 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el @@ -38,7 +38,7 @@ (require 'ob-ref) (defvar org-babel-screen-location "screen" - "The command location for screen. + "The command location for screen. In case you want to use a different screen than one selected by your $PATH") (defvar org-babel-default-header-args:screen @@ -112,7 +112,7 @@ In case you want to use a different screen than one selected by your $PATH") (with-temp-file tmpfile (insert body) - ;; org-babel has superflous spaces + ;; org-babel has superfluous spaces (goto-char (point-min)) (delete-matching-lines "^ +$")) tmpfile)) diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 76e4eae4b45..cf28a5e80ae 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -2989,7 +2989,7 @@ them to individual field equations for each field." So @< and $< will always be replaced with @1 and $1, respectively. The advantage of these special markers are that structure editing of the table will not change them, while @1 and $1 will be modified -when a line/row is swaped out of that privileged position. So for +when a line/row is swapped out of that privileged position. So for formulas that use a range of rows or columns, it may often be better to anchor the formula with \"I\" row markers, or to offset from the borders of the table using the @< @> $< $> makers." diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index 837213665fc..acd3aa8c2cb 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el @@ -46,7 +46,7 @@ ;; In order to achieve total compatibility with strfile(1), cookie files ;; should start with two consecutive delimiters (and no comment). ;; -;; This code derives from Steve Strassman's 1987 spook.el package, but +;; This code derives from Steve Strassmann's 1987 spook.el package, but ;; has been generalized so that it supports multiple simultaneous ;; cookie databases and fortune files. It is intended to be called ;; from other packages such as yow.el and spook.el. diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index f30457992a3..9c53b1a9e23 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -1533,7 +1533,7 @@ the project file." ;; .ali file for a spec file. If we are, go to step 3. ;; 3- If the file is not found or step 2 failed: ;; find the name of the "other file", ie the body, and look - ;; for its associated .ali file by subtituing the extension + ;; for its associated .ali file by subtituting the extension ;; ;; We must also handle the case of separate packages and subprograms: ;; 4- If no ali file was found, we try to modify the file name by removing diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 57ee3943bbe..2d18498d6f4 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -2594,7 +2594,7 @@ comment at the start of cc-engine.el for more info." mstart) ; start of a macro. (save-excursion - ;; Each time round the following loop, we enter a succesively deeper + ;; Each time round the following loop, we enter a successively deeper ;; level of brace/paren nesting. (Except sometimes we "continue at ;; the existing level".) `pa+1' is a pos inside an opening ;; brace/paren/bracket, usually just after it. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f0c86265232..808d17dff54 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -369,7 +369,8 @@ Match group 1 is the name of the macro.") ;; must be h-end. ;; ;; js--pitem instances are never modified (with the exception -;; of the b-end field). Instead, modified copies are added at subseqnce parse points. +;; of the b-end field). Instead, modified copies are added at +;; subsequence parse points. ;; (The exception for b-end and its caveats is described below.) ;; diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index d0a34179cc8..53ae22b9908 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -384,7 +384,7 @@ Each entry is a list with the following elements: 1. Regexp matching the preceding text. 2. A number indicating the subgroup in the regexp containing the text. 3. A function returning an alist of possible completions. -4. Text to append after a succesful completion (if any). +4. Text to append after a successful completion (if any). Or alternatively: 1. Regexp matching the preceding text. diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 52e7b6e2429..f68398c6459 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -1423,7 +1423,7 @@ If set will become buffer local.") ["AUTOSENSE" (describe-function 'verilog-auto-sense) :help "Help on AUTOSENSE - sensitivity lists for always blocks"] ["AUTOTIEOFF" (describe-function 'verilog-auto-tieoff) - :help "Help on AUTOTIEOFF - tieing off unused outputs"] + :help "Help on AUTOTIEOFF - tying off unused outputs"] ["AUTOUNUSED" (describe-function 'verilog-auto-unused) :help "Help on AUTOUNUSED - terminating unused inputs"] ["AUTOWIRE" (describe-function 'verilog-auto-wire) @@ -1667,7 +1667,7 @@ This speeds up complicated regexp matches." ;; Similar to `delete-trailing-whitespace' but that's not present in XEmacs (save-excursion (goto-char (point-min)) - (while (re-search-forward "[ \t]+$" nil t) ;; Not syntatic WS as no formfeed + (while (re-search-forward "[ \t]+$" nil t) ;; Not syntactic WS as no formfeed (replace-match "" nil nil)))) (defvar compile-command) @@ -11725,7 +11725,7 @@ this is a recent change. To control this behavior, see `verilog-auto-reset-widths'. AUTORESET ties signals to deasserted, which is presumed to be zero. -Signals that match `verilog-active-low-regexp' will be deasserted by tieing +Signals that match `verilog-active-low-regexp' will be deasserted by tying them to a one. An example: @@ -11816,7 +11816,7 @@ finds all outputs in the module, and if that input is not otherwise declared as a register or wire, creates a tieoff. AUTORESET ties signals to deasserted, which is presumed to be zero. -Signals that match `verilog-active-low-regexp' will be deasserted by tieing +Signals that match `verilog-active-low-regexp' will be deasserted by tying them to a one. You can add signals you do not want included in AUTOTIEOFF with diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el index db5b57f8585..acf341e8879 100644 --- a/lisp/ps-mule.el +++ b/lisp/ps-mule.el @@ -1141,7 +1141,7 @@ It checks if all multi-byte characters in the region are printable or not." (aref ps-mule-font-spec-tables font-type) 0))) (ps-output-prologue (list (if (ps-mule-font-spec-src (cdr (car font-spec-alist))) - ;; We ignore a font specfied in ps-font-info-database. + ;; We ignore a font specified in ps-font-info-database. (format "/V%s VTOP%d def\n" fonttag font-type) (format "/V%s [ VTOP%d aload pop ] def\n V%s 0 /%s-latin1 /%s Latin1Encoding put\n" diff --git a/lisp/select.el b/lisp/select.el index 10c8f0b1efd..521d119792f 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -106,7 +106,7 @@ in `selection-converter-alist', which see." ((eq data-type 'STRING) 'iso-8859-1) (t - (error "Unknow selection data type: %S" type)))) + (error "Unknown selection data type: %S" type)))) data (if coding (decode-coding-string data coding) (string-to-multibyte data))) (setq next-selection-coding-system nil) diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 69d68a76d4b..df5f41eb925 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -41,7 +41,7 @@ ;; ;; Important note: We do NOT recommend use of these commands to update ;; the `Next', `Previous' and `Up' pointers on @node lines. Most -;; manuals, including those whose Texinfo files adhere to the strucure +;; manuals, including those whose Texinfo files adhere to the structure ;; described below, don't need these pointers, because makeinfo will ;; generate them automatically (see the node "makeinfo Pointer ;; Creation" in the Texinfo manual). By contrast, due to known bugs diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index 3b86ed45565..2f184dfca19 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -62,7 +62,7 @@ (defun url-scheme-default-loader (url &optional callback cbargs) "Signal an error for an unknown URL scheme." - (error "Unkown URL scheme: %s" (url-type url))) + (error "Unknown URL scheme: %s" (url-type url))) (defvar url-scheme--registering-proxy nil) diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el index 43292ed14e4..6d2724a1172 100644 --- a/lisp/vc/pcvs-parse.el +++ b/lisp/vc/pcvs-parse.el @@ -423,7 +423,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." (cvs-match "restoring \\(.*\\) from backup file .*$" (path 1)))) t) - ;; Is it a succesful merge? + ;; Is it a successful merge? ;; Figure out result of merging (ie, was there a conflict?) (let ((qfile (regexp-quote path))) (cvs-or diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 07eccaff4fb..c576cc0a4a6 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1687,7 +1687,7 @@ The value of the :type attribute should be an unconverted widget type." (eval-minibuffer prompt)) (defun widget-docstring (widget) - "Return the documentation string specificied by WIDGET, or nil if none. + "Return the documentation string specified by WIDGET, or nil if none. If WIDGET has a `:doc' property, that specifies the documentation string. Otherwise, try the `:documentation-property' property. If this is a function, call it with the widget's value as an argument; if diff --git a/lisp/window.el b/lisp/window.el index 0014d85a816..fffeb5f5e4e 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4814,7 +4814,7 @@ return the window used; otherwise return nil." "Display BUFFER by popping up a new window. The new window is created on the selected frame, or in `last-nonminibuffer-frame' if no windows can be created there. -If sucessful, return the new window; otherwise return nil." +If successful, return the new window; otherwise return nil." (let ((frame (or (window--frame-usable-p (selected-frame)) (window--frame-usable-p (last-nonminibuffer-frame)))) window) diff --git a/src/coding.h b/src/coding.h index b694e6c6b6e..ff2a69027e0 100644 --- a/src/coding.h +++ b/src/coding.h @@ -485,7 +485,7 @@ struct coding_system element. The following elements are OFFSET, ANNOTATION-TYPE, and a sequence of actual data for the annotation. OFFSET is a character position offset from dst_pos or src_pos, - ANNOTATION-TYPE specfies the meaning of the annotation and how to + ANNOTATION-TYPE specifies the meaning of the annotation and how to handle the following data.. */ int *charbuf; int charbuf_size, charbuf_used; diff --git a/src/gtkutil.c b/src/gtkutil.c index bc71685819e..a52bd26235f 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3052,7 +3052,7 @@ xg_update_submenu (GtkWidget *submenu, } } - /* Remove widgets from first structual change. */ + /* Remove widgets from first structural change. */ if (iter) { /* If we are adding new menu items below, we must remove from diff --git a/src/nsfns.m b/src/nsfns.m index e41b77e242a..ecefd716eb1 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1286,7 +1286,7 @@ This function is an internal primitive--use `make-frame' instead. */) "foreground", "Foreground", RES_TYPE_STRING); x_default_parameter (f, parms, Qbackground_color, build_string ("White"), "background", "Background", RES_TYPE_STRING); - /* FIXME: not suppported yet in Nextstep */ + /* FIXME: not supported yet in Nextstep */ x_default_parameter (f, parms, Qline_spacing, Qnil, "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); x_default_parameter (f, parms, Qleft_fringe, Qnil, diff --git a/src/term.c b/src/term.c index ae505f020f2..86b928ad9e3 100644 --- a/src/term.c +++ b/src/term.c @@ -1809,7 +1809,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str) glyphless_display_method in dispextern.h for the details. FOR_NO_FONT is nonzero if and only if this is for a character that - is not supproted by the coding system of the terminal. ACRONYM, if + is not supported by the coding system of the terminal. ACRONYM, if non-nil, is an acronym string for the character. The glyphs actually produced are of type CHAR_GLYPH. */ diff --git a/src/textprop.c b/src/textprop.c index a1c7593f568..8c63a58cf83 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -2227,7 +2227,7 @@ This also inhibits the use of the `intangible' text property. */); DEFVAR_LISP ("text-property-default-nonsticky", Vtext_property_default_nonsticky, - doc: /* Alist of properties vs the corresponding non-stickinesses. + doc: /* Alist of properties vs the corresponding non-stickiness. Each element has the form (PROPERTY . NONSTICKINESS). If a character in a buffer has PROPERTY, new text inserted adjacent to diff --git a/src/xdisp.c b/src/xdisp.c index 0ddf9555bc0..39b6813e774 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4339,7 +4339,7 @@ handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, int rv; if (CONSP (spec) - /* Simple specerties. */ + /* Simple specifications. */ && !EQ (XCAR (spec), Qimage) && !EQ (XCAR (spec), Qspace) && !EQ (XCAR (spec), Qwhen) diff --git a/test/cedet/tests/testvarnames.c b/test/cedet/tests/testvarnames.c index 51d8285730f..20d8133e8a0 100644 --- a/test/cedet/tests/testvarnames.c +++ b/test/cedet/tests/testvarnames.c @@ -31,7 +31,7 @@ struct independent var_indep_struct; struct { int unnamed_1; int unnamed_2; -} var_unamed_struct; +} var_unnamed_struct; struct { int unnamed_3; @@ -59,12 +59,12 @@ struct inline2struct in_var2; int test_1(int var_arg1) { var_// -1- - ; // #1# ("var_arg1" "var_indep_struct" "var_n_2" "var_n_3" "var_named_struct" "var_un_2" "var_un_3" "var_unamed_struct") + ; // #1# ("var_arg1" "var_indep_struct" "var_n_2" "var_n_3" "var_named_struct" "var_un_2" "var_un_3" "var_unnamed_struct") var_indep_struct.// -2- ; // #2# ( "indep_1" "indep_2" ) - var_unamed_struct.// -3- + var_unnamed_struct.// -3- ; // #3# ( "unnamed_1" "unnamed_2" ) var_named_struct.// -4- @@ -88,4 +88,3 @@ int test_1(int var_arg1) { in_var2.// -11- ; // #11# ( "named_3" "named_4") } - -- cgit v1.2.1 From 3778cdd8efa2a0a5ea06d00277499fd6e7300cd2 Mon Sep 17 00:00:00 2001 From: Antoine Levitt Date: Sat, 31 Dec 2011 10:16:41 +0200 Subject: Doc fix for window-scroll-functions. src/xdisp.c (syms_of_xdisp) : Add warning to the doc string advising against its use for altering the way windows are scrolled. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f10e2955164..e8b59fff9a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-12-31 Antoine Levitt + + * xdisp.c (syms_of_xdisp) : Add warning + to the doc string advising against its use for altering the way + windows are scrolled. + 2011-12-28 Kenichi Handa * coding.c (Fdefine_coding_system_internal): Make an utf-8 base diff --git a/src/xdisp.c b/src/xdisp.c index 39b6813e774..956799091d0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -28325,7 +28325,11 @@ all the functions in the list are called, with the frame as argument. */); Each function is called with two arguments, the window and its new display-start position. Note that these functions are also called by `set-window-buffer'. Also note that the value of `window-end' is not -valid when these functions are called. */); +valid when these functions are called. + +Warning: Do not use this feature to alter the way the window +is scrolled. It is not designed for that, and such use probably won't +work. */); Vwindow_scroll_functions = Qnil; DEFVAR_LISP ("window-text-change-functions", -- cgit v1.2.1 From 7c2b8880efc4c11f6c56b2bf13854d0e1bdd2d8d Mon Sep 17 00:00:00 2001 From: Antoine Levitt Date: Sat, 31 Dec 2011 10:25:48 +0200 Subject: Fix bug #9246 with scrolling in ERC under word-wrap. lisp/erc/erc-goodies.el (erc-scroll-to-bottom): Use post-command-hook rather than window-scroll-functions. Fixes a bug with scrolling under word-wrap on a tty. --- lisp/erc/ChangeLog | 6 ++++++ lisp/erc/erc-goodies.el | 32 +++++++++++++------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 1b67835cb07..354e8636702 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-31 Antoine Levitt + + * erc-goodies.el (erc-scroll-to-bottom): Use post-command-hook + rather than window-scroll-functions. Fixes a bug with word-wrap on + a tty. (Bug#9246) + 2011-11-28 Mike Kazantsev (tiny change) * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Updated regexp to diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index b2cf9e35622..6f24c59f4bd 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -60,7 +60,7 @@ argument to `recenter'." ((remove-hook 'erc-mode-hook 'erc-add-scroll-to-bottom) (dolist (buffer (erc-buffer-list)) (with-current-buffer buffer - (remove-hook 'window-scroll-functions 'erc-scroll-to-bottom t))))) + (remove-hook 'post-command-hook 'erc-scroll-to-bottom t))))) (defun erc-add-scroll-to-bottom () "A hook function for `erc-mode-hook' to recenter output at bottom of window. @@ -70,35 +70,29 @@ the value of `erc-input-line-position'. This works whenever scrolling happens, so it's added to `window-scroll-functions' rather than `erc-insert-post-hook'." - ;;(make-local-hook 'window-scroll-functions) - (add-hook 'window-scroll-functions 'erc-scroll-to-bottom nil t)) + (add-hook 'post-command-hook 'erc-scroll-to-bottom nil t)) -(defun erc-scroll-to-bottom (window display-start) +(defun erc-scroll-to-bottom () "Recenter WINDOW so that `point' is on the last line. This is added to `window-scroll-functions' by `erc-add-scroll-to-bottom'. You can control which line is recentered to by customizing the -variable `erc-input-line-position'. - -DISPLAY-START is ignored." - (if (window-live-p window) +variable `erc-input-line-position'." ;; Temporarily bind resize-mini-windows to nil so that users who have it ;; set to a non-nil value will not suffer from premature minibuffer ;; shrinkage due to the below recenter call. I have no idea why this ;; works, but it solves the problem, and has no negative side effects. ;; (Fran Litterio, 2003/01/07) - (let ((resize-mini-windows nil)) - (erc-with-selected-window window - (save-restriction - (widen) - (when (and erc-insert-marker - ;; we're editing a line. Scroll. - (> (point) erc-insert-marker)) - (save-excursion - (goto-char (point-max)) - (recenter (or erc-input-line-position -1)) - (sit-for 0)))))))) + (let ((resize-mini-windows nil)) + (save-restriction + (widen) + (when (and erc-insert-marker + ;; we're editing a line. Scroll. + (> (point) erc-insert-marker)) + (save-excursion + (goto-char (point-max)) + (recenter (or erc-input-line-position -1))))))) ;;; Make read only (define-erc-module readonly nil -- cgit v1.2.1 From 4baa020dd90f2925db503a92a0ab71cc49ddc89a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 31 Dec 2011 00:36:43 -0800 Subject: Add Bug#8828 to my 2011-06-15 entry. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e8b59fff9a9..937b96107bc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4433,7 +4433,7 @@ 2011-06-15 Paul Eggert - Integer overflow and signedness fixes (Bug#8873). + Integer overflow and signedness fixes (Bug#8873, Bug#8828). * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772. (GET_CCL_RANGE, IN_INT_RANGE): Use it. -- cgit v1.2.1 From 8d43f3cd8a2585eef72bedd0061dd8c1d66ae17c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 31 Dec 2011 12:06:21 +0200 Subject: Decode message headers of non-MIME messages in Rmail. lisp/mail/rmail.el (rmail-show-message-1): Decode any RFC2047 encoded headers of non-MIME messages, when rmail-enable-mime is non-nil. --- lisp/ChangeLog | 5 +++++ lisp/mail/rmail.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37286d0780c..401f1f4f540 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-31 Eli Zaretskii + + * mail/rmail.el (rmail-show-message-1): Decode any RFC2047 encoded + headers of non-MIME messages, when rmail-enable-mime is non-nil. + 2011-12-29 Michael Albinus * net/tramp-sh.el (tramp-find-shell): Set "remote-shell" property diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 1ea01bdadb8..2c94cfdf212 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2773,7 +2773,15 @@ The current mail message becomes the message displayed." (forward-line)) (goto-char (point-min))) ;; Copy the headers to the front of the message view buffer. - (rmail-copy-headers beg end)) + (rmail-copy-headers beg end) + ;; Decode any RFC2047 encoded message headers. + (if rmail-enable-mime + (with-current-buffer rmail-view-buffer + (rfc2047-decode-region + (point-min) + (progn + (search-forward "\n\n" nil 'move) + (point)))))) ;; highlight the message, activate any URL like text and add ;; special highlighting for and quoted material. (with-current-buffer rmail-view-buffer -- cgit v1.2.1 From 00791deef66c259fa53e7906d52f1064e210ccea Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 31 Dec 2011 06:20:32 -0500 Subject: Auto-commit of loaddefs files. --- lisp/ps-print.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ps-print.el b/lisp/ps-print.el index da804d99ae0..15e453a5d25 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -6658,7 +6658,7 @@ If FACE is not a valid face name, use default face." ;; But autoload them here to make the separation invisible. ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize -;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "01641c7c3af4e45e1c3afeb75a73120c") +;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "5c36356aa1f23d9da308debe8f2e4e49") ;;; Generated autoloads from ps-mule.el (defvar ps-multibyte-buffer nil "\ -- cgit v1.2.1 From 7bc7d2aa1b054bd3f723977a8cefd461163d3372 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 31 Dec 2011 13:33:09 +0200 Subject: Fix bug #10380 with description of C-n and C-p. doc/emacs/basic.texi (Moving Point): Fix the description of C-n and C-p. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/basic.texi | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 73d9fc4d07f..dbe32e9236a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-12-31 Eli Zaretskii + + * basic.texi (Moving Point): Fix the description of C-n and C-p. + (Bug#10380) + 2011-12-30 Chong Yidong * sending.texi (Sending Mail): Document initial mail buffer name, diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index abb65982873..14101ce4fdd 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -130,11 +130,13 @@ specifies how many copies of the character to insert @cindex moving the cursor To do more than insert characters, you have to know how to move point (@pxref{Point}). The keyboard commands @kbd{C-f}, @kbd{C-b}, -@kbd{C-n}, and @kbd{C-p} move point to the right, left, up and down +@kbd{C-n}, and @kbd{C-p} move point to the right, left, down, and up, respectively. You can also move point using the @dfn{arrow keys} present on most keyboards: @kbd{@key{right}}, @kbd{@key{left}}, @kbd{@key{down}}, and @kbd{@key{up}}; however, many Emacs users find -that it is slower to use the arrow keys than the control keys. +that it is slower to use the arrow keys than the control keys, because +you need to move your hand to the area of the keyboard where those +keys are located. You can also click the left mouse button to move point to the position clicked. Emacs also provides a variety of additional -- cgit v1.2.1 From 94d4c7dc47adbb7571206a60c6d7445a22ecf40e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 31 Dec 2011 15:43:38 +0100 Subject: * emacs-lisp/bytecomp.el (byte-compile-file): Fix indentation. --- lisp/ChangeLog | 4 +++ lisp/emacs-lisp/bytecomp.el | 62 ++++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 401f1f4f540..c7696651c67 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-12-31 Andreas Schwab + + * emacs-lisp/bytecomp.el (byte-compile-file): Fix indentation. + 2011-12-31 Eli Zaretskii * mail/rmail.el (rmail-show-message-1): Decode any RFC2047 encoded diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8c63428cdf1..4fc4fdb9e02 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1779,37 +1779,37 @@ The value is non-nil if there were no errors, nil if errors." (with-current-buffer output-buffer (goto-char (point-max)) (insert "\n") ; aaah, unix. - (if (file-writable-p target-file) - ;; We must disable any code conversion here. - (let* ((coding-system-for-write 'no-conversion) - ;; Write to a tempfile so that if another Emacs - ;; process is trying to load target-file (eg in a - ;; parallel bootstrap), it does not risk getting a - ;; half-finished file. (Bug#4196) - (tempfile (make-temp-name target-file)) - (kill-emacs-hook - (cons (lambda () (ignore-errors (delete-file tempfile))) - kill-emacs-hook))) - (if (memq system-type '(ms-dos 'windows-nt)) - (setq buffer-file-type t)) - (write-region (point-min) (point-max) tempfile nil 1) - ;; This has the intentional side effect that any - ;; hard-links to target-file continue to - ;; point to the old file (this makes it possible - ;; for installed files to share disk space with - ;; the build tree, without causing problems when - ;; emacs-lisp files in the build tree are - ;; recompiled). Previously this was accomplished by - ;; deleting target-file before writing it. - (rename-file tempfile target-file t) - (message "Wrote %s" target-file)) - ;; This is just to give a better error message than write-region - (signal 'file-error - (list "Opening output file" - (if (file-exists-p target-file) - "cannot overwrite file" - "directory not writable or nonexistent") - target-file))) + (if (file-writable-p target-file) + ;; We must disable any code conversion here. + (let* ((coding-system-for-write 'no-conversion) + ;; Write to a tempfile so that if another Emacs + ;; process is trying to load target-file (eg in a + ;; parallel bootstrap), it does not risk getting a + ;; half-finished file. (Bug#4196) + (tempfile (make-temp-name target-file)) + (kill-emacs-hook + (cons (lambda () (ignore-errors (delete-file tempfile))) + kill-emacs-hook))) + (if (memq system-type '(ms-dos 'windows-nt)) + (setq buffer-file-type t)) + (write-region (point-min) (point-max) tempfile nil 1) + ;; This has the intentional side effect that any + ;; hard-links to target-file continue to + ;; point to the old file (this makes it possible + ;; for installed files to share disk space with + ;; the build tree, without causing problems when + ;; emacs-lisp files in the build tree are + ;; recompiled). Previously this was accomplished by + ;; deleting target-file before writing it. + (rename-file tempfile target-file t) + (message "Wrote %s" target-file)) + ;; This is just to give a better error message than write-region + (signal 'file-error + (list "Opening output file" + (if (file-exists-p target-file) + "cannot overwrite file" + "directory not writable or nonexistent") + target-file))) (kill-buffer (current-buffer))) (if (and byte-compile-generate-call-tree (or (eq t byte-compile-generate-call-tree) -- cgit v1.2.1 From b8ecfdfefb31b4e8b08b65cb64787b4f284de133 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 1 Jan 2012 16:21:38 +0800 Subject: Updates to misc.texi in Emacs manual. * misc.texi (Gnus, Buffers of Gnus): Copyedits. (Gnus Startup): Note that the system might not be set up for news. Describe group levels more clearly. (Gnus Group Buffer, Gnus Summary Buffer): New nodes, split from Summary of Gnus. (Document View): Copyedits. Move zoom commads to DocView Navigation node. (DocView Navigation, DocView Searching, DocView Slicing) (DocView Conversion): Nodes renamed from Navigation, etc. * sending.texi (Mail Sending): Add message-kill-buffer-on-exit. --- admin/FOR-RELEASE | 1 - doc/emacs/ChangeLog | 14 ++ doc/emacs/emacs.texi | 11 +- doc/emacs/misc.texi | 424 ++++++++++++++++++++++++++----------------------- doc/emacs/sending.texi | 75 +++++---- 5 files changed, 280 insertions(+), 245 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index e8e756081ed..114ace6065a 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -154,7 +154,6 @@ killing.texi cyd kmacro.texi cyd macos.texi maintaining.texi cyd -major.texi mark.texi cyd mini.texi misc.texi diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index dbe32e9236a..30ba8779e72 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,17 @@ +2012-01-01 Chong Yidong + + * misc.texi (Gnus, Buffers of Gnus): Copyedits. + (Gnus Startup): Note that the system might not be set up for news. + Describe group levels more clearly. + (Gnus Group Buffer, Gnus Summary Buffer): New nodes, split from + Summary of Gnus. + (Document View): Copyedits. Move zoom commads to DocView + Navigation node. + (DocView Navigation, DocView Searching, DocView Slicing) + (DocView Conversion): Nodes renamed from Navigation, etc. + + * sending.texi (Mail Sending): Add message-kill-buffer-on-exit. + 2011-12-31 Eli Zaretskii * basic.texi (Moving Point): Fix the description of C-n and C-p. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index ca6162ff824..9db0bd4616e 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -919,10 +919,10 @@ Customizing the Calendar and Diary Document Viewing -* Navigation:: Navigation inside DocView buffers. -* Searching:: Searching inside documents. -* Slicing:: Specifying which part of pages should be displayed. -* Conversion:: Influencing and triggering conversion. +* DocView Navigation:: Navigating DocView buffers. +* DocView Searching:: Searching inside documents. +* DocView Slicing:: Specifying which part of a page is displayed. +* DocView Conversion:: Influencing and triggering conversion. Sending Mail @@ -974,7 +974,8 @@ Gnus * Buffers of Gnus:: The group, summary, and article buffers. * Gnus Startup:: What you should know about starting Gnus. -* Summary of Gnus:: A short description of the basic Gnus commands. +* Gnus Group Buffer:: A short description of Gnus group commands. +* Gnus Summary Buffer:: A short description of Gnus summary commands. Running Shell Commands from Emacs diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 714e7f3441c..3d86241a497 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -6,7 +6,7 @@ @chapter Miscellaneous Commands This chapter contains several brief topics that do not fit anywhere -else: viewing ``document files'', reading netnews, running shell +else: viewing ``document files'', reading Usenet news, running shell commands and shell subprocesses, using a single shared Emacs for utilities that expect to run an editor as a subprocess, printing hardcopy, sorting text, narrowing display to part of the buffer, @@ -23,12 +23,13 @@ various diversions and amusements. @node Gnus @section Gnus @cindex Gnus -@cindex reading netnews +@cindex Usenet news +@cindex newsreader -Gnus is an Emacs package primarily designed for reading and posting -Usenet news. It can also be used to read and respond to messages from a -number of other sources---mail, remote directories, digests, and so on. -Here we introduce Gnus and describe several basic features. + Gnus is an Emacs package primarily designed for reading and posting +Usenet news. It can also be used to read and respond to messages from +a number of other sources---email, remote directories, digests, and so +on. Here we introduce Gnus and describe several basic features. @ifnottex For full details, see @ref{Top, Gnus,, gnus, The Gnus Manual}. @end ifnottex @@ -37,198 +38,216 @@ For full details on Gnus, type @kbd{C-h i} and then select the Gnus manual. @end iftex -@findex gnus -To start Gnus, type @kbd{M-x gnus @key{RET}}. - @menu * Buffers of Gnus:: The group, summary, and article buffers. * Gnus Startup:: What you should know about starting Gnus. -* Summary of Gnus:: A short description of the basic Gnus commands. +* Gnus Group Buffer:: A short description of Gnus group commands. +* Gnus Summary Buffer:: A short description of Gnus summary commands. @end menu @node Buffers of Gnus @subsection Gnus Buffers -Unlike most Emacs packages, Gnus uses several buffers to display -information and to receive commands. The three Gnus buffers users use -most are the @dfn{group buffer}, the @dfn{summary buffer} and the -@dfn{article buffer}. - -The @dfn{group buffer} contains a list of newsgroups. This is the -first buffer Gnus displays when it starts up. It normally displays -only the groups to which you subscribe and that contain unread -articles. Use this buffer to select a specific group. - -The @dfn{summary buffer} lists one line for each article in a single -group. By default, the author, the subject and the line number are -displayed for each article, but this is customizable, like most aspects -of Gnus display. The summary buffer is created when you select a group -in the group buffer, and is killed when you exit the group. Use this -buffer to select an article. - -The @dfn{article buffer} displays the article. In normal Gnus usage, -you see this buffer but you don't select it---all useful -article-oriented commands work in the summary buffer. But you can -select the article buffer, and execute all Gnus commands from that -buffer, if you want to. + Gnus uses several buffers to display information and to receive +commands. The three most commonly-used Gnus buffers are the +@dfn{group buffer}, the @dfn{summary buffer} and the @dfn{article +buffer}. + + The @dfn{group buffer} contains a list of article sources (e.g.@: +newsgroups and email inboxes), which are collectively referred to as +@dfn{groups}. This is the first buffer Gnus displays when it starts +up. It normally displays only the groups to which you subscribe and +that contain unread articles. From this buffer, you can select a +group to read. + + The @dfn{summary buffer} lists the articles in a single group, +showing one article per line. By default, it displays each article's +author, subject, and line +@iftex +number. +@end iftex +@ifnottex +number, but this is customizable; @xref{Summary Buffer Format,,, gnus, +The Gnus Manual}. +@end ifnottex +The summary buffer is created when you select a group in the group +buffer, and is killed when you exit the group. + + From the summary buffer, you can choose an article to view. The +article is displayed in the @dfn{article buffer}. In normal Gnus +usage, you view this buffer but do not select it---all useful Gnus +commands can be invoked from the summary buffer. But you can select +the article buffer, and execute Gnus commands from it, if you wish. @node Gnus Startup @subsection When Gnus Starts Up -At startup, Gnus reads your @file{.newsrc} news initialization file -and attempts to communicate with the local news server, which is a -repository of news articles. The news server need not be the same -computer you are logged in on. - -If you start Gnus and connect to the server, but do not see any -newsgroups listed in the group buffer, type @kbd{L} or @kbd{A k} to get -a listing of all the groups. Then type @kbd{u} to toggle -subscription to groups. - -The first time you start Gnus, Gnus subscribes you to a few selected -groups. All other groups start out as @dfn{killed groups} for you; you -can list them with @kbd{A k}. All new groups that subsequently come to -exist at the news server become @dfn{zombie groups} for you; type @kbd{A -z} to list them. You can subscribe to a group shown in these lists -using the @kbd{u} command. - -When you quit Gnus with @kbd{q}, it automatically records in your -@file{.newsrc} and @file{.newsrc.eld} initialization files the -subscribed or unsubscribed status of all groups. You should normally -not edit these files manually, but you may if you know how. +@findex gnus +@cindex @file{.newsrc} file + If your system has been set up for reading Usenet news, getting +started with Gnus is easy---just type @kbd{M-x gnus}. + + On starting up, Gnus reads your @dfn{news initialization file}: a +file named @file{.newsrc} in your home directory which lists your +Usenet newsgroups and subscriptions (this file is not unique to Gnus; +it is used by many other newsreader programs). It then tries to +contact the system's default news server, which is typically specified +by the @samp{NNTPSERVER} environment variable. + + If your system does not have a default news server, or if you wish +to use Gnus for reading email, then before invoking @kbd{M-x gnus} you +need to tell Gnus where to get news and/or mail. To do this, +customize the variables @code{gnus-select-method} and/or +@code{gnus-secondary-select-methods}. +@iftex +See the Gnus manual for details. +@end iftex +@ifnottex +@xref{Finding the News,,, gnus, The Gnus Manual}. +@end ifnottex -@node Summary of Gnus -@subsection Summary of Gnus Commands + Once Gnus has started up, it displays the group buffer. By default, +the group buffer shows only a small number of @dfn{subscribed groups}. +Groups with other statuses---@dfn{unsubscribed}, @dfn{killed}, or +@dfn{zombie}---are hidden. The first time you start Gnus, any group +to which you are not subscribed is made into a killed group; any group +that subsequently appears on the news server becomes a zombie group. -Reading news is a two-step process: + To proceed, you must select a group in the group buffer to open the +summary buffer for that group; then, select an article in the summary +buffer to view its article buffer in a separate window. The following +sections explain how to use the group and summary buffers to do this. -@enumerate -@item -Choose a group in the group buffer. + To quit Gnus, type @kbd{q} in the group buffer. This automatically +records your group statuses in the files @file{.newsrc} and +@file{.newsrc.eld}, so that they take effect in subsequent Gnus +sessions. -@item -Select articles from the summary buffer. Each article selected is -displayed in the article buffer in a large window, below the summary -buffer in its small window. -@end enumerate +@node Gnus Group Buffer +@subsection Using the Gnus Group Buffer - Each Gnus buffer has its own special commands; the meanings of any -given key in the various Gnus buffers are usually analogous, even if -not identical. Here are commands for the group and summary buffers: + The following commands are available in the Gnus group buffer: @table @kbd -@kindex q @r{(Gnus Group mode)} -@findex gnus-group-exit -@item q -In the group buffer, update your @file{.newsrc} initialization file -and quit Gnus. +@kindex SPC @r{(Gnus Group mode)} +@findex gnus-group-read-group +@item @key{SPC} +Switch to the summary buffer for the group on the current line. -In the summary buffer, exit the current group and return to the -group buffer. Thus, typing @kbd{q} twice quits Gnus. +@kindex l @r{(Gnus Group mode)} +@kindex A s @r{(Gnus Group mode)} +@findex gnus-group-list-groups +@item l +@itemx A s +In the group buffer, list only the groups to which you subscribe and +which contain unread articles (this is the default listing). @kindex L @r{(Gnus Group mode)} +@kindex A u @r{(Gnus Group mode)} @findex gnus-group-list-all-groups @item L -In the group buffer, list all the groups available on your news -server (except those you have killed). This may be a long list! +@itemx A u +List all subscribed and unsubscribed groups, but not killed or zombie +groups. -@kindex l @r{(Gnus Group mode)} -@findex gnus-group-list-groups -@item l -In the group buffer, list only the groups to which you subscribe and -which contain unread articles. +@kindex A k @r{(Gnus Group mode)} +@findex gnus-group-list-all-groups +@item A k +List killed groups. + +@kindex A z @r{(Gnus Group mode)} +@findex gnus-group-list-all-groups +@item A z +List zombie groups. @kindex u @r{(Gnus Group mode)} @findex gnus-group-unsubscribe-current-group @cindex subscribe groups @cindex unsubscribe groups @item u -In the group buffer, unsubscribe from (or subscribe to) the group listed -in the line that point is on. When you quit Gnus by typing @kbd{q}, -Gnus lists in your @file{.newsrc} file which groups you have subscribed -to. The next time you start Gnus, you won't see this group, -because Gnus normally displays only subscribed-to groups. +Toggle the subscription status of the group on the current line +(i.e.@: turn a subscribed group into an unsubscribed group, or vice +versa). Invoking this on a killed or zombie group turns it into an +unsubscribed group. -@kindex C-k @r{(Gnus)} +@kindex C-k @r{(Gnus Group mode)} @findex gnus-group-kill-group @item C-k -In the group buffer, ``kill'' the current line's group---don't -even list it in @file{.newsrc} from now on. This affects future -Gnus sessions as well as the present session. +Kill the group on the current line. Killed groups are not recorded in +the @file{.newsrc} file, and they are not shown in the @kbd{l} or +@kbd{L} listings. -When you quit Gnus by typing @kbd{q}, Gnus writes information -in the file @file{.newsrc} describing all newsgroups except those you -have ``killed.'' +@kindex DEL @r{(Gnus Group mode)} +@item @key{DEL} +Move point to the previous group containing unread articles. -@kindex SPC @r{(Gnus)} -@findex gnus-group-read-group -@item @key{SPC} -In the group buffer, select the group on the line under the cursor -and display the first unread article in that group. +@kindex n @r{(Gnus Group mode)} +@findex gnus-group-next-unread-group +@findex gnus-summary-next-unread-article +@item n +Move point to the next unread group. -@need 1000 -In the summary buffer, +@kindex p @r{(Gnus Group mode)} +@findex gnus-group-prev-unread-group +@findex gnus-summary-prev-unread-article +@item p +Move point to the previous unread group. -@itemize @bullet -@item -Select the article on the line under the cursor if none is selected. +@kindex q @r{(Gnus Group mode)} +@findex gnus-group-exit +@item q +Update your Gnus settings, and quit Gnus. +@end table -@item -Scroll the text of the selected article (if there is one). +@node Gnus Summary Buffer +@subsection Using the Gnus Summary Buffer -@item -Select the next unread article if at the end of the current article. -@end itemize + The following commands are available in the Gnus summary buffer: -Thus, you can move through all the articles by repeatedly typing @key{SPC}. +@table @kbd +@kindex SPC @r{(Gnus Summary mode)} +@findex gnus-group-read-group +@item @key{SPC} +If there is no article selected, select the article on the current +line and display its article buffer. Otherwise, try scrolling the +selected article buffer in its window; on reaching the end of the +buffer, select the next unread article. -@kindex DEL @r{(Gnus)} -@item @key{DEL} -In the group buffer, move point to the previous group containing -unread articles. +Thus, you can read through all articles by repeatedly typing +@key{SPC}. +@kindex DEL @r{(Gnus Summary mode)} @findex gnus-summary-prev-page -In the summary buffer, scroll the text of the article backwards. +@item @key{DEL} +Scroll the text of the article backwards. -@kindex n @r{(Gnus)} +@kindex n @r{(Gnus Summary mode)} @findex gnus-group-next-unread-group @findex gnus-summary-next-unread-article @item n -Move point to the next unread group, or select the next unread article. +Select the next unread article. -@kindex p @r{(Gnus)} +@kindex p @r{(Gnus Summary mode)} @findex gnus-group-prev-unread-group @findex gnus-summary-prev-unread-article @item p -Move point to the previous unread group, or select the previous -unread article. - -@kindex C-n @r{(Gnus Group mode)} -@findex gnus-group-next-group -@kindex C-p @r{(Gnus Group mode)} -@findex gnus-group-prev-group -@kindex C-n @r{(Gnus Summary mode)} -@findex gnus-summary-next-subject -@kindex C-p @r{(Gnus Summary mode)} -@findex gnus-summary-prev-subject -@item C-n -@itemx C-p -Move point to the next or previous item, even if it is marked as read. -This does not select the article or group on that line. +Select the previous unread article. @kindex s @r{(Gnus Summary mode)} @findex gnus-summary-isearch-article @item s -In the summary buffer, do an incremental search of the current text in -the article buffer, just as if you switched to the article buffer and -typed @kbd{C-s}. +Do an incremental search on the selected article buffer, as if you +switched to the buffer and typed @kbd{C-s} (@pxref{Incremental +Search}). @kindex M-s @r{(Gnus Summary mode)} @findex gnus-summary-search-article-forward @item M-s @var{regexp} @key{RET} -In the summary buffer, search forward for articles containing a match -for @var{regexp}. +Search forward for articles containing a match for @var{regexp}. +@kindex q @r{(Gnus Summary mode)} +@item q +Exit the summary buffer and return to the group buffer. @end table @node Document View @@ -244,64 +263,54 @@ for @var{regexp}. @cindex document viewer (DocView) @findex doc-view-mode -DocView mode (@code{doc-view-mode}) is a viewer for DVI, PostScript -(PS), PDF, OpenDocument, and Microsoft Office documents. It provides -features such as slicing, zooming, and searching inside documents. It -works by converting the document to a set of images using the -@command{gs} (GhostScript) command and other external tools -@footnote{@code{gs} is a hard requirement. For DVI files, -@code{dvipdf} or @code{dvipdfm} is needed. For OpenDocument and -Microsoft Office documents, the @code{unoconv} tool is needed.}, and -displaying those images. + DocView mode is a major mode for viewing DVI, PostScript (PS), PDF, +OpenDocument, and Microsoft Office documents. It provides features +such as slicing, zooming, and searching inside documents. It works by +converting the document to a set of images using the @command{gs} +(GhostScript) command and other external tools @footnote{@code{gs} is +a hard requirement. For DVI files, @code{dvipdf} or @code{dvipdfm} is +needed. For OpenDocument and Microsoft Office documents, the +@code{unoconv} tool is needed.}, and displaying those images. @findex doc-view-toggle-display @findex doc-view-toggle-display @cindex doc-view-minor-mode - When you visit a document file with the exception of PostScript -files, Emacs automatically switches to DocView mode if possible -@footnote{The needed external tools for this document type have to be -available, emacs needs to run in a graphical frame, and PNG image -support has to be compiled into emacs. If any of these requirements -is not fulfilled, DocView falls back to an appropriate mode.}. When -you visit a PostScript file, Emacs switches to PS mode, a major mode -for editing PostScript files as text; however, it also enables DocView -minor mode, so you can type @kbd{C-c C-c} to view the document with -DocView. (PDF and DVI files, unlike PostScript files, are not usually -human-editable.) In either case, repeating @kbd{C-c C-c} -(@code{doc-view-toggle-display}) toggles between DocView and the file -text. - - You can explicitly toggle DocView mode with the command @code{M-x -doc-view-mode}, and DocView minor mode with the command @code{M-x + When you visit a document file that can be displayed with DocView +mode, Emacs automatically uses DocView mode @footnote{The needed +external tools for the document type must be available, and Emacs must +be running in a graphical frame and have PNG image support. If any of +these requirements is not fulfilled, Emacs falls back to another major +mode.}. As an exception, when you visit a PostScript file, Emacs +switches to PS mode, a major mode for editing PostScript files as +text; however, it also enables DocView minor mode, so you can type +@kbd{C-c C-c} to view the document with DocView. In either DocView +mode or DocView minor mode, repeating @kbd{C-c C-c} +(@code{doc-view-toggle-display}) toggles between DocView and the +underlying file contents. + + You can explicitly enable DocView mode with the command @code{M-x +doc-view-mode}. You can toggle DocView minor mode with @code{M-x doc-view-minor-mode}. When DocView mode starts, it displays a welcome screen and begins formatting the file, page by page. It displays the first page once that has been formatted. -@findex doc-view-enlarge -@findex doc-view-shrink -@vindex doc-view-resolution - When in DocView mode, you can enlarge or shrink the document with -@kbd{+} (@code{doc-view-enlarge}) and @kbd{-} -(@code{doc-view-shrink}). To specify the default size for DocView, -set or customize the variable @code{doc-view-resolution}. - To kill the DocView buffer, type @kbd{k} (@code{doc-view-kill-proc-and-buffer}). To bury it, type @kbd{q} (@code{quit-window}). @menu -* Navigation:: Navigation inside DocView buffers. -* Searching:: Searching inside documents. -* Slicing:: Specifying which part of pages should be displayed. -* Conversion:: Influencing and triggering conversion. +* Navigation: DocView Navigation. Navigating DocView buffers. +* Searching: DocView Searching. Searching inside documents. +* Slicing: DocView Slicing. Specifying which part of a page is displayed. +* Conversion: DocView Conversion. Influencing and triggering conversion. @end menu -@node Navigation -@subsection Navigation +@node DocView Navigation +@subsection DocView Navigation -When in DocView mode, you can scroll the current page using the usual + In DocView mode, you can scroll the current page using the usual Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and the arrow keys. @@ -315,6 +324,10 @@ displays the next page if you are at the end of the current page. @findex doc-view-next-page @findex doc-view-previous-page +@kindex n @r{(DocView mode)} +@kindex p @r{(DocView mode)} +@kindex C-x ] @r{(DocView mode)} +@kindex C-x [ @r{(DocView mode)} You can also display the next page by typing @kbd{n}, @key{next} or @kbd{C-x ]} (@code{doc-view-next-page}). To display the previous page, type @kbd{p}, @key{prior} or @kbd{C-x [} @@ -322,23 +335,38 @@ page, type @kbd{p}, @key{prior} or @kbd{C-x [} @findex doc-view-scroll-up-or-next-page @findex doc-view-scroll-down-or-previous-page - The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a -convenient way to advance through the document. It scrolls within the -current page or advances to the next. @key{DEL} moves backwards in a -similar way (@code{doc-view-scroll-down-or-previous-page}). +@kindex SPC @r{(DocView mode)} +@kindex DEL @r{(DocView mode)} + @key{SPC} (@code{doc-view-scroll-up-or-next-page}) is a convenient +way to advance through the document. It scrolls within the current +page or advances to the next. @key{DEL} moves backwards in a similar +way (@code{doc-view-scroll-down-or-previous-page}). @findex doc-view-first-page @findex doc-view-last-page @findex doc-view-goto-page +@kindex M-< @r{(DocView mode)} +@kindex M-> @r{(DocView mode)} To go to the first page, type @kbd{M-<} (@code{doc-view-first-page}); to go to the last one, type @kbd{M->} (@code{doc-view-last-page}). To jump to a page by its number, type @kbd{M-g M-g} or @kbd{M-g g} (@code{doc-view-goto-page}). -@node Searching -@subsection Searching - -While in DocView mode, you can search the file's text for a regular +@findex doc-view-enlarge +@findex doc-view-shrink +@vindex doc-view-resolution +@kindex + @r{(DocView mode)} +@kindex - @r{(DocView mode)} + You can enlarge or shrink the document with @kbd{+} +(@code{doc-view-enlarge}) and @kbd{-} (@code{doc-view-shrink}). These +commands work by reconverting the document at the new size. To +specify the default size for DocView, customize the variable +@code{doc-view-resolution}. + +@node DocView Searching +@subsection DocView Searching + + In DocView mode, you can search the file's text for a regular expression (@pxref{Regexps}). The interface for searching is inspired by @code{isearch} (@pxref{Incremental Search}). @@ -359,8 +387,8 @@ To force display of this tooltip, type @kbd{C-t} argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r} for a backward search. -@node Slicing -@subsection Slicing +@node DocView Slicing +@subsection DocView Slicing Documents often have wide margins for printing. They are annoying when reading the document on the screen, because they use up screen @@ -388,37 +416,33 @@ select the slice. (@code{doc-view-reset-slice}). Then DocView shows the entire page including its entire margins. -@node Conversion -@subsection Conversion +@node DocView Conversion +@subsection DocView Conversion @vindex doc-view-cache-directory @findex doc-view-clear-cache -For efficiency, DocView caches the images produced by @command{gs}. + For efficiency, DocView caches the images produced by @command{gs}. The name of this directory is given by the variable @code{doc-view-cache-directory}. You can clear the cache directory by typing @code{M-x doc-view-clear-cache}. @findex doc-view-kill-proc @findex doc-view-kill-proc-and-buffer - To force a reconversion of the currently viewed document, type -@kbd{r} or @kbd{g} (@code{revert-buffer}). To kill the converter -process associated with the current buffer, type @kbd{K} + To force reconversion of the currently viewed document, type @kbd{r} +or @kbd{g} (@code{revert-buffer}). To kill the converter process +associated with the current buffer, type @kbd{K} (@code{doc-view-kill-proc}). The command @kbd{k} (@code{doc-view-kill-proc-and-buffer}) kills the converter process and the DocView buffer. - The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-} -(@code{doc-view-shrink}) need to reconvert the document at the new -size. The current page is converted first. - @node Shell @section Running Shell Commands from Emacs @cindex subshell @cindex shell commands - Emacs has commands for passing single command lines to inferior shell -processes; it can also run a shell interactively with input and output -to an Emacs buffer named @samp{*shell*} or run a shell inside a terminal + Emacs has commands for passing single command lines to shell +subprocesses, and for running a shell interactively with input and +output to an Emacs buffer, and for running a shell in a terminal emulator window. @table @kbd diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 1c6df362c78..331a25ef813 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -328,11 +328,9 @@ in greater detail. @xref{Top,,Message, message, Message}. @node Mail Sending @subsection Mail Sending - There are two commands to send a message you have been editing: - @table @kbd @item C-c C-c -Send the message, and deselect the mail buffer (@code{message-send-and-exit}). +Send the message, and bury the mail buffer (@code{message-send-and-exit}). @item C-c C-s Send the message, and leave the mail buffer selected (@code{message-send}). @end table @@ -340,35 +338,24 @@ Send the message, and leave the mail buffer selected (@code{message-send}). @kindex C-c C-s @r{(Message mode)} @kindex C-c C-c @r{(Message mode)} @findex message-send - If you want to send a message and be done with it, type @kbd{C-c -C-c} (@code{mail-send-and-exit}). This sends the message and then -either deletes the window or switches to another buffer. It also +@vindex message-kill-buffer-on-exit + The usual command to send a message is @kbd{C-c C-c} +(@code{mail-send-and-exit}). This sends the message and then ``buries'' the mail buffer, putting it at the lowest priority for -reselection. This is the usual command for sending a message. +reselection. If you want it to kill the mail buffer instead, change +the variable @code{message-kill-buffer-on-exit} to @code{t}. @findex message-send-and-exit The command @kbd{C-c C-s} (@code{message-send}) sends the message -and marks the mail buffer unmodified, but leaves the buffer selected. -Use this command if you want to modify the message (perhaps with new -recipients) and send it again. +and leaves the buffer selected. Use this command if you want to +modify the message (perhaps with new recipients) and send it again. @vindex message-send-hook - Sending a message runs the hook @code{message-send-hook}. - - In a file-visiting buffer, sending the message does not clear the -modified flag, because only saving the file should do that. Also, you -don't get a warning if you try to send the same message twice. - -@vindex sendmail-coding-system - When you send a message containing non-@acronym{ASCII} characters, -they need to be encoded with a coding system (@pxref{Coding Systems}). -Usually the coding system is specified automatically by your chosen -language environment (@pxref{Language Environments}). You can -explicitly specify the coding system for outgoing mail by setting the -variable @code{sendmail-coding-system} (@pxref{Recognize Coding}). If -the coding system thus determined does not handle the characters in a -particular message, Emacs asks you to select the coding system to use, -showing a list of possible coding systems. + Sending a message runs the hook @code{message-send-hook}. It also +marks the mail buffer as unmodified, except if the mail buffer is also +a file-visiting buffer (in that case, only saving the file does that, +and you don't get a warning if you try to send the same message +twice). @cindex SMTP @cindex Feedmail @@ -376,24 +363,23 @@ showing a list of possible coding systems. @cindex Mailclient @vindex send-mail-function The variable @code{send-mail-function} controls how the message is -delivered. Its value should be a function, which can be one of the -following: +delivered. Its value should be one of the following functions: @table @code @item sendmail-query-once -This function queries for a delivery method (one of the other entries -in this list), and uses that method for this message. Then it saves -the method to @code{send-mail-function}, so that the method is used -for future deliveries. This is the default, unless you have already -configured the @code{smtpmail-send-it} method. +Query for a delivery method (one of the other entries in this list), +and use that method for this message; then save the method to +@code{send-mail-function}, so that it is used for future deliveries. +This is the default, unless you have already set the variables for +sending mail via @code{smtpmail-send-it} (see below). @item smtpmail-send-it -Send mail through an external mail host, such as your Internet service -provider's outgoing SMTP mail server. If you have not told Emacs how -to contact the SMTP server, it prompts for this information (which is -saved in the variables @code{smtpmail-smtp-server} and -@code{smtpmail-auth-credentials}). @xref{Top,,Emacs SMTP Library, -smtpmail, Sending mail via SMTP}. +Send mail using the through an external mail host, such as your +Internet service provider's outgoing SMTP mail server. If you have +not told Emacs how to contact the SMTP server, it prompts for this +information, which is saved in the variables +@code{smtpmail-smtp-server} and @code{smtpmail-auth-credentials}. +@xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}. @item sendmail-send-it Send mail using the system's default @command{sendmail} program, or @@ -410,6 +396,17 @@ messages for later sending. See the commentary section in the file @file{feedmail.el} for details. @end table +@vindex sendmail-coding-system + When you send a message containing non-@acronym{ASCII} characters, +they need to be encoded with a coding system (@pxref{Coding Systems}). +Usually the coding system is specified automatically by your chosen +language environment (@pxref{Language Environments}). You can +explicitly specify the coding system for outgoing mail by setting the +variable @code{sendmail-coding-system} (@pxref{Recognize Coding}). If +the coding system thus determined does not handle the characters in a +particular message, Emacs asks you to select the coding system to use, +showing a list of possible coding systems. + @node Header Editing @subsection Mail Header Editing -- cgit v1.2.1 From 7da5b94434256b084e7755d53e6708f6ff4f7dc1 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 1 Jan 2012 06:23:13 -0500 Subject: Auto-commit of loaddefs files. --- lisp/ldefs-boot.el | 594 ++++++++++++++++++++++++++--------------------------- 1 file changed, 292 insertions(+), 302 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index db511e1ce40..754764b9758 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -68,7 +68,7 @@ should return a grid vector array that is the new solution. ;;;*** ;;;### (autoloads (ada-mode ada-add-extensions) "ada-mode" "progmodes/ada-mode.el" -;;;;;; (20178 7273)) +;;;;;; (20197 58064)) ;;; Generated autoloads from progmodes/ada-mode.el (autoload 'ada-add-extensions "ada-mode" "\ @@ -88,7 +88,7 @@ Ada mode is the major mode for editing Ada code. ;;;*** ;;;### (autoloads (ada-header) "ada-stmt" "progmodes/ada-stmt.el" -;;;;;; (19845 45374)) +;;;;;; (20209 49217)) ;;; Generated autoloads from progmodes/ada-stmt.el (autoload 'ada-header "ada-stmt" "\ @@ -99,7 +99,7 @@ Insert a descriptive header at the top of the file. ;;;*** ;;;### (autoloads (ada-find-file) "ada-xref" "progmodes/ada-xref.el" -;;;;;; (20176 51947)) +;;;;;; (20222 61246)) ;;; Generated autoloads from progmodes/ada-xref.el (autoload 'ada-find-file "ada-xref" "\ @@ -398,7 +398,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) ;;;### (autoloads (align-newline-and-indent align-unhighlight-rule ;;;;;; align-highlight-rule align-current align-entire align-regexp -;;;;;; align) "align" "align.el" (20182 4358)) +;;;;;; align) "align" "align.el" (20188 43079)) ;;; Generated autoloads from align.el (autoload 'align "align" "\ @@ -489,7 +489,7 @@ A replacement function for `newline-and-indent', aligning as it goes. ;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation ;;;;;; allout-setup allout-auto-activation-helper) "allout" "allout.el" -;;;;;; (20178 7273)) +;;;;;; (20207 7484)) ;;; Generated autoloads from allout.el (autoload 'allout-auto-activation-helper "allout" "\ @@ -739,7 +739,7 @@ at the beginning of the current entry. Extending Allout -Allout exposure and authoring activites all have associated +Allout exposure and authoring activities all have associated hooks, by which independent code can cooperate with allout without changes to the allout core. Here are key ones: @@ -850,13 +850,13 @@ for details on preparing Emacs for automatic allout activation. ;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation ;;;;;; allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el" -;;;;;; (20167 36967)) +;;;;;; (20221 40442)) ;;; Generated autoloads from allout-widgets.el (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) (autoload 'allout-widgets-setup "allout-widgets" "\ -Commission or decommision allout-widgets-mode along with allout-mode. +Commission or decommission allout-widgets-mode along with allout-mode. Meant to be used by customization of `allout-widgets-auto-activation'. @@ -910,7 +910,7 @@ outline hot-spot navigation (see `allout-mode'). ;;;*** ;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp" -;;;;;; "net/ange-ftp.el" (20178 7273)) +;;;;;; "net/ange-ftp.el" (20213 46266)) ;;; Generated autoloads from net/ange-ftp.el (defalias 'ange-ftp-re-read-dir 'ange-ftp-reread-dir) @@ -965,7 +965,7 @@ the buffer *Birthday-Present-for-Name*. ;;;*** ;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) -;;;;;; "ansi-color" "ansi-color.el" (20164 60780)) +;;;;;; "ansi-color" "ansi-color.el" (20204 31303)) ;;; Generated autoloads from ansi-color.el (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ @@ -1027,7 +1027,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. ;;;*** ;;;### (autoloads (appt-activate appt-add) "appt" "calendar/appt.el" -;;;;;; (19956 37456)) +;;;;;; (20188 43079)) ;;; Generated autoloads from calendar/appt.el (autoload 'appt-add "appt" "\ @@ -1158,8 +1158,8 @@ Returns list of symbols and documentation found. ;;;*** -;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (20165 -;;;;;; 31925)) +;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (20201 +;;;;;; 55112)) ;;; Generated autoloads from arc-mode.el (autoload 'archive-mode "arc-mode" "\ @@ -1250,8 +1250,8 @@ Entering array mode calls the function `array-mode-hook'. ;;;*** -;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20172 -;;;;;; 54913)) +;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20204 +;;;;;; 31303)) ;;; Generated autoloads from textmodes/artist.el (autoload 'artist-mode "artist" "\ @@ -1792,7 +1792,7 @@ definition of \"random distance\".) ;;;*** ;;;### (autoloads (display-battery-mode battery) "battery" "battery.el" -;;;;;; (20127 62865)) +;;;;;; (20211 4536)) ;;; Generated autoloads from battery.el (put 'battery-mode-line-string 'risky-local-variable t) @@ -1861,7 +1861,7 @@ For non-interactive use see also `benchmark-run' and ;;;*** ;;;### (autoloads (bibtex-search-entry bibtex-mode bibtex-initialize) -;;;;;; "bibtex" "textmodes/bibtex.el" (20174 10230)) +;;;;;; "bibtex" "textmodes/bibtex.el" (20221 40442)) ;;; Generated autoloads from textmodes/bibtex.el (autoload 'bibtex-initialize "bibtex" "\ @@ -2727,7 +2727,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning) -;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20178 7273)) +;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20224 16567)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -2981,8 +2981,8 @@ See Info node `(calc)Defining Functions'. ;;;*** -;;;### (autoloads (calculator) "calculator" "calculator.el" (20141 -;;;;;; 9296)) +;;;### (autoloads (calculator) "calculator" "calculator.el" (20187 +;;;;;; 22214)) ;;; Generated autoloads from calculator.el (autoload 'calculator "calculator" "\ @@ -3103,7 +3103,7 @@ Obsoletes `c-forward-into-nomenclature'. ;;;*** ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" -;;;;;; (20172 54913)) +;;;;;; (20222 61246)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload 'c-guess-basic-syntax "cc-engine" "\ @@ -3215,7 +3215,7 @@ the absolute file name of the file if STYLE-NAME is nil. ;;;### (autoloads (awk-mode pike-mode idl-mode java-mode objc-mode ;;;;;; c++-mode c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" -;;;;;; (20168 57844)) +;;;;;; (20221 40442)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload 'c-initialize-cc-mode "cc-mode" "\ @@ -3443,7 +3443,7 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (20167 36967)) +;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (20189 63932)) ;;; Generated autoloads from progmodes/cc-vars.el (put 'c-basic-offset 'safe-local-variable 'integerp) (put 'c-backslash-column 'safe-local-variable 'integerp) @@ -3453,7 +3453,7 @@ and exists only for compatibility reasons. ;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program ;;;;;; declare-ccl-program ccl-dump ccl-compile) "ccl" "international/ccl.el" -;;;;;; (19943 25429)) +;;;;;; (20201 55112)) ;;; Generated autoloads from international/ccl.el (autoload 'ccl-compile "ccl" "\ @@ -3644,7 +3644,7 @@ OPERATOR := | de-sjis ;; If ARG_0 and ARG_1 are the first and second code point of - ;; JISX0208 character CHAR, and SJIS is the correponding + ;; JISX0208 character CHAR, and SJIS is the corresponding ;; Shift-JIS code, ;; (REG = ARG_0 en-sjis ARG_1) means: ;; ((REG = HIGH) @@ -3728,12 +3728,12 @@ Returns a form where all lambdas don't have any free variables. ;;;*** -;;;### (autoloads (cfengine-auto-mode cfengine-mode cfengine3-mode) -;;;;;; "cfengine" "progmodes/cfengine.el" (20168 57844)) +;;;### (autoloads (cfengine-auto-mode cfengine2-mode cfengine3-mode) +;;;;;; "cfengine" "progmodes/cfengine.el" (20211 4536)) ;;; Generated autoloads from progmodes/cfengine.el (autoload 'cfengine3-mode "cfengine" "\ -Major mode for editing cfengine input. +Major mode for editing CFEngine3 input. There are no special keybindings by default. Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves @@ -3741,8 +3741,8 @@ to the action header. \(fn)" t nil) -(autoload 'cfengine-mode "cfengine" "\ -Major mode for editing cfengine input. +(autoload 'cfengine2-mode "cfengine" "\ +Major mode for editing CFEngine2 input. There are no special keybindings by default. Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves @@ -3751,7 +3751,7 @@ to the action header. \(fn)" t nil) (autoload 'cfengine-auto-mode "cfengine" "\ -Choose between `cfengine-mode' and `cfengine3-mode' depending +Choose between `cfengine2-mode' and `cfengine3-mode' depending on the buffer contents \(fn)" nil nil) @@ -4215,7 +4215,7 @@ If FRAME cannot display COLOR, return nil. ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" -;;;;;; (20168 57844)) +;;;;;; (20197 58064)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ @@ -4706,7 +4706,7 @@ For details see `conf-mode'. Example: ;;;*** ;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) -;;;;;; "cookie1" "play/cookie1.el" (19845 45374)) +;;;;;; "cookie1" "play/cookie1.el" (20222 61246)) ;;; Generated autoloads from play/cookie1.el (autoload 'cookie "cookie1" "\ @@ -4778,7 +4778,7 @@ If FIX is non-nil, run `copyright-fix-years' instead. ;;;*** ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) -;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20178 7273)) +;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20201 55112)) ;;; Generated autoloads from progmodes/cperl-mode.el (put 'cperl-indent-level 'safe-local-variable 'integerp) (put 'cperl-brace-offset 'safe-local-variable 'integerp) @@ -4803,8 +4803,8 @@ default.) You can always quote (with \\[quoted-insert]) the left since most the time you mean \"less\". CPerl mode tries to guess whether you want to type pair <>, and inserts is if it appropriate. You can set `cperl-electric-parens-string' to the string that -contains the parenths from the above list you want to be electrical. -Electricity of parenths is controlled by `cperl-electric-parens'. +contains the parens from the above list you want to be electrical. +Electricity of parens is controlled by `cperl-electric-parens'. You may also set `cperl-electric-parens-mark' to have electric parens look for active mark and \"embrace\" a region if possible.' @@ -5022,7 +5022,7 @@ if ARG is omitted or nil. ;;;*** ;;;### (autoloads (completing-read-multiple) "crm" "emacs-lisp/crm.el" -;;;;;; (19845 45374)) +;;;;;; (20222 61246)) ;;; Generated autoloads from emacs-lisp/crm.el (autoload 'completing-read-multiple "crm" "\ @@ -5069,7 +5069,7 @@ Major mode to edit Cascading Style Sheets. ;;;*** ;;;### (autoloads (cua-selection-mode cua-mode) "cua-base" "emulation/cua-base.el" -;;;;;; (20127 62865)) +;;;;;; (20222 61246)) ;;; Generated autoloads from emulation/cua-base.el (defvar cua-mode nil "\ @@ -5614,7 +5614,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. ;;;*** ;;;### (autoloads (data-debug-new-buffer) "data-debug" "cedet/data-debug.el" -;;;;;; (20168 57844)) +;;;;;; (20207 7484)) ;;; Generated autoloads from cedet/data-debug.el (autoload 'data-debug-new-buffer "data-debug" "\ @@ -5624,8 +5624,8 @@ Create a new data-debug buffer with NAME. ;;;*** -;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20176 -;;;;;; 51947)) +;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20197 +;;;;;; 58064)) ;;; Generated autoloads from net/dbus.el (autoload 'dbus-handle-event "dbus" "\ @@ -5638,8 +5638,8 @@ If the HANDLER returns a `dbus-error', it is propagated as return message. ;;;*** -;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (20162 -;;;;;; 63140)) +;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (20187 +;;;;;; 22214)) ;;; Generated autoloads from progmodes/dcl-mode.el (autoload 'dcl-mode "dcl-mode" "\ @@ -5839,8 +5839,8 @@ The most useful commands are: ;;;*** ;;;### (autoloads (delimit-columns-rectangle delimit-columns-region -;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (20154 -;;;;;; 24929)) +;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (20197 +;;;;;; 58064)) ;;; Generated autoloads from delim-col.el (autoload 'delimit-columns-customize "delim-col" "\ @@ -5916,8 +5916,8 @@ with no args, if that value is non-nil. ;;;*** -;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20127 -;;;;;; 62865)) +;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20187 +;;;;;; 22214)) ;;; Generated autoloads from delsel.el (defalias 'pending-delete-mode 'delete-selection-mode) @@ -6014,7 +6014,7 @@ the first time the mode is used. ;;;*** ;;;### (autoloads (describe-char describe-text-properties) "descr-text" -;;;;;; "descr-text.el" (20170 13157)) +;;;;;; "descr-text.el" (20189 63932)) ;;; Generated autoloads from descr-text.el (autoload 'describe-text-properties "descr-text" "\ @@ -6042,7 +6042,7 @@ as well as widgets, buttons, overlays, and text properties. ;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir ;;;;;; desktop-load-default desktop-read desktop-remove desktop-save ;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop" -;;;;;; "desktop.el" (20165 31925)) +;;;;;; "desktop.el" (20212 25403)) ;;; Generated autoloads from desktop.el (defvar desktop-save-mode nil "\ @@ -6393,7 +6393,7 @@ Optional arguments are passed to `dig-invoke'. ;;;*** ;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window -;;;;;; dired dired-listing-switches) "dired" "dired.el" (20167 36967)) +;;;;;; dired dired-listing-switches) "dired" "dired.el" (20189 63932)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -6821,7 +6821,7 @@ strings when pressed twice. See `double-map' for details. ;;;*** -;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (19845 45374)) +;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20221 40442)) ;;; Generated autoloads from play/dunnet.el (autoload 'dunnet "dunnet" "\ @@ -7099,7 +7099,7 @@ To implement dynamic menus, either call this from ;;;;;; ebnf-eps-file ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ;;;;;; ebnf-spool-file ebnf-spool-directory ebnf-print-region ebnf-print-buffer ;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" -;;;;;; "progmodes/ebnf2ps.el" (20166 16092)) +;;;;;; "progmodes/ebnf2ps.el" (20203 10426)) ;;; Generated autoloads from progmodes/ebnf2ps.el (autoload 'ebnf-customize "ebnf2ps" "\ @@ -7597,7 +7597,7 @@ an EDE controlled project. ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" -;;;;;; "emacs-lisp/edebug.el" (20166 16092)) +;;;;;; "emacs-lisp/edebug.el" (20187 22214)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -8098,15 +8098,11 @@ Emacs Lisp mode) that support ElDoc.") ;;;*** ;;;### (autoloads (electric-layout-mode electric-pair-mode electric-indent-mode) -;;;;;; "electric" "electric.el" (20168 57844)) +;;;;;; "electric" "electric.el" (20187 22214)) ;;; Generated autoloads from electric.el (defvar electric-indent-chars '(10) "\ -Characters that should cause automatic reindentation. -Each entry of the list can be either a character or a cons of the -form (CHAR . PREDICATE) which means that CHAR should cause reindentation -only if PREDICATE returns non-nil. PREDICATE is called with no arguments -and with point before the inserted char.") +Characters that should cause automatic reindentation.") (defvar electric-indent-mode nil "\ Non-nil if Electric-Indent mode is enabled. @@ -8284,7 +8280,7 @@ Other values are interpreted as usual. ;;;*** ;;;### (autoloads (report-emacs-bug-query-existing-bugs report-emacs-bug) -;;;;;; "emacsbug" "mail/emacsbug.el" (20093 44623)) +;;;;;; "emacsbug" "mail/emacsbug.el" (20197 58064)) ;;; Generated autoloads from mail/emacsbug.el (autoload 'report-emacs-bug "emacsbug" "\ @@ -8305,7 +8301,7 @@ The result is an alist with items of the form (URL SUBJECT NO). ;;;;;; emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote ;;;;;; emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor ;;;;;; emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" -;;;;;; "vc/emerge.el" (20141 9296)) +;;;;;; "vc/emerge.el" (20204 31303)) ;;; Generated autoloads from vc/emerge.el (autoload 'emerge-files "emerge" "\ @@ -8580,7 +8576,7 @@ Insert selected KEYS after the point. ;;;*** ;;;### (autoloads (epa-dired-do-encrypt epa-dired-do-sign epa-dired-do-verify -;;;;;; epa-dired-do-decrypt) "epa-dired" "epa-dired.el" (19865 50420)) +;;;;;; epa-dired-do-decrypt) "epa-dired" "epa-dired.el" (20197 58064)) ;;; Generated autoloads from epa-dired.el (autoload 'epa-dired-do-decrypt "epa-dired" "\ @@ -8606,7 +8602,7 @@ Encrypt marked files. ;;;*** ;;;### (autoloads (epa-file-disable epa-file-enable epa-file-handler) -;;;;;; "epa-file" "epa-file.el" (20038 20303)) +;;;;;; "epa-file" "epa-file.el" (20197 58064)) ;;; Generated autoloads from epa-file.el (autoload 'epa-file-handler "epa-file" "\ @@ -9668,7 +9664,7 @@ for \\[find-tag] (which see). ;;;;;; ethio-fidel-to-sera-marker ethio-fidel-to-sera-region ethio-fidel-to-sera-buffer ;;;;;; ethio-sera-to-fidel-marker ethio-sera-to-fidel-region ethio-sera-to-fidel-buffer ;;;;;; setup-ethiopic-environment-internal) "ethio-util" "language/ethio-util.el" -;;;;;; (20175 31160)) +;;;;;; (20201 55112)) ;;; Generated autoloads from language/ethio-util.el (autoload 'setup-ethiopic-environment-internal "ethio-util" "\ @@ -9814,7 +9810,7 @@ Convert the Java escape sequences into corresponding Ethiopic characters. \(fn)" nil nil) (autoload 'ethio-find-file "ethio-util" "\ -Transliterate file content into Ethiopic dependig on filename suffix. +Transliterate file content into Ethiopic depending on filename suffix. \(fn)" nil nil) @@ -10533,8 +10529,8 @@ Copy directory-local variables to the -*- line. ;;;*** -;;;### (autoloads (filesets-init) "filesets" "filesets.el" (20178 -;;;;;; 7273)) +;;;### (autoloads (filesets-init) "filesets" "filesets.el" (20201 +;;;;;; 55112)) ;;; Generated autoloads from filesets.el (autoload 'filesets-init "filesets" "\ @@ -11040,7 +11036,7 @@ Flyspell whole buffer. ;;;### (autoloads (follow-delete-other-windows-and-split follow-mode ;;;;;; turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el" -;;;;;; (20178 7273)) +;;;;;; (20187 22214)) ;;; Generated autoloads from follow.el (autoload 'turn-on-follow-mode "follow" "\ @@ -11136,7 +11132,7 @@ play around with the following keys: ;;;*** ;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) -;;;;;; "forms" "forms.el" (20168 57844)) +;;;;;; "forms" "forms.el" (20197 58064)) ;;; Generated autoloads from forms.el (autoload 'forms-mode "forms" "\ @@ -11300,7 +11296,7 @@ and choose the directory as the fortune-file. ;;;*** ;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el" -;;;;;; (20182 4358)) +;;;;;; (20218 64194)) ;;; Generated autoloads from progmodes/gdb-mi.el (defvar gdb-enable-debug nil "\ @@ -11514,7 +11510,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST. ;;;*** ;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server -;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (20164 60780)) +;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (20187 22214)) ;;; Generated autoloads from gnus/gnus.el (when (fboundp 'custom-autoload) (custom-autoload 'gnus-select-method "gnus")) @@ -11567,7 +11563,7 @@ prompt the user for the name of an NNTP server to use. ;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group ;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize ;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent" -;;;;;; "gnus/gnus-agent.el" (20168 57844)) +;;;;;; "gnus/gnus-agent.el" (20221 40442)) ;;; Generated autoloads from gnus/gnus-agent.el (autoload 'gnus-unplugged "gnus-agent" "\ @@ -11658,7 +11654,7 @@ If CLEAN, obsolete (ignore). ;;;*** ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" -;;;;;; (20182 4358)) +;;;;;; (20207 7484)) ;;; Generated autoloads from gnus/gnus-art.el (autoload 'gnus-article-prepare-display "gnus-art" "\ @@ -11812,8 +11808,8 @@ Reminder user if there are unsent drafts. ;;;### (autoloads (gnus-convert-png-to-face gnus-convert-face-to-png ;;;;;; gnus-face-from-file gnus-x-face-from-file gnus-insert-random-x-face-header -;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (20088 -;;;;;; 26718)) +;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (20187 +;;;;;; 22214)) ;;; Generated autoloads from gnus/gnus-fun.el (autoload 'gnus-random-x-face "gnus-fun" "\ @@ -11876,7 +11872,7 @@ If gravatars are already displayed, remove them. ;;;*** ;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group) -;;;;;; "gnus-group" "gnus/gnus-group.el" (20179 28130)) +;;;;;; "gnus-group" "gnus/gnus-group.el" (20201 55112)) ;;; Generated autoloads from gnus/gnus-group.el (autoload 'gnus-fetch-group "gnus-group" "\ @@ -12051,7 +12047,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: ;;;*** ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) -;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20183 25152)) +;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20207 7484)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload 'gnus-msg-mail "gnus-msg" "\ @@ -12217,7 +12213,7 @@ See the documentation for these variables and functions for details. ;;;*** ;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el" -;;;;;; (20076 35541)) +;;;;;; (20207 7484)) ;;; Generated autoloads from gnus/gnus-spec.el (autoload 'gnus-update-format "gnus-spec" "\ @@ -12239,7 +12235,7 @@ Declare back end NAME with ABILITIES as a Gnus back end. ;;;*** ;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el" -;;;;;; (20172 54913)) +;;;;;; (20222 61246)) ;;; Generated autoloads from gnus/gnus-sum.el (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ @@ -12267,7 +12263,7 @@ Install the sync hooks. ;;;*** ;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el" -;;;;;; (20161 45793)) +;;;;;; (20207 7484)) ;;; Generated autoloads from gnus/gnus-win.el (autoload 'gnus-add-configuration "gnus-win" "\ @@ -12379,7 +12375,7 @@ Retrieve MAIL-ADDRESS gravatar and returns it. ;;;### (autoloads (zrgrep rgrep lgrep grep-find grep grep-mode grep-compute-defaults ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command -;;;;;; grep-window-height) "grep" "progmodes/grep.el" (20174 10230)) +;;;;;; grep-window-height) "grep" "progmodes/grep.el" (20212 25403)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@ -12525,6 +12521,9 @@ to go to the lines where grep found matches. This command shares argument histories with \\[lgrep] and \\[grep-find]. +When called programmatically and FILES is nil, REGEXP is expected +to specify a command to run. + \(fn REGEXP &optional FILES DIR CONFIRM)" t nil) (autoload 'zrgrep "grep" "\ @@ -12538,7 +12537,7 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'. ;;;*** -;;;### (autoloads (gs-load-image) "gs" "gs.el" (19845 45374)) +;;;### (autoloads (gs-load-image) "gs" "gs.el" (20188 43079)) ;;; Generated autoloads from gs.el (autoload 'gs-load-image "gs" "\ @@ -12552,7 +12551,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** ;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb -;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20178 7273)) +;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20215 1592)) ;;; Generated autoloads from progmodes/gud.el (autoload 'gud-gdb "gud" "\ @@ -13305,7 +13304,7 @@ be found in variable `hi-lock-interactive-patterns'. ;;;*** ;;;### (autoloads (hide-ifdef-mode) "hideif" "progmodes/hideif.el" -;;;;;; (20127 62865)) +;;;;;; (20197 58064)) ;;; Generated autoloads from progmodes/hideif.el (autoload 'hide-ifdef-mode "hideif" "\ @@ -13411,8 +13410,8 @@ Unconditionally turn off `hs-minor-mode'. ;;;;;; highlight-compare-buffers highlight-changes-rotate-faces ;;;;;; highlight-changes-previous-change highlight-changes-next-change ;;;;;; highlight-changes-remove-highlight highlight-changes-visible-mode -;;;;;; highlight-changes-mode) "hilit-chg" "hilit-chg.el" (20164 -;;;;;; 60780)) +;;;;;; highlight-changes-mode) "hilit-chg" "hilit-chg.el" (20188 +;;;;;; 43079)) ;;; Generated autoloads from hilit-chg.el (autoload 'highlight-changes-mode "hilit-chg" "\ @@ -13439,7 +13438,7 @@ buffer with the contents of a file \(fn &optional ARG)" t nil) (autoload 'highlight-changes-visible-mode "hilit-chg" "\ -Toggle visiblility of highlighting due to Highlight Changes mode. +Toggle visibility of highlighting due to Highlight Changes mode. With a prefix argument ARG, enable Highlight Changes Visible mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. @@ -13673,7 +13672,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and ;;;;;; holiday-bahai-holidays holiday-islamic-holidays holiday-christian-holidays ;;;;;; holiday-hebrew-holidays holiday-other-holidays holiday-local-holidays ;;;;;; holiday-oriental-holidays holiday-general-holidays) "holidays" -;;;;;; "calendar/holidays.el" (20107 16822)) +;;;;;; "calendar/holidays.el" (20209 49217)) ;;; Generated autoloads from calendar/holidays.el (define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1") @@ -13833,7 +13832,7 @@ Convert HTML to plain text in the current buffer. ;;;*** ;;;### (autoloads (htmlfontify-copy-and-link-dir htmlfontify-buffer) -;;;;;; "htmlfontify" "htmlfontify.el" (20183 25152)) +;;;;;; "htmlfontify" "htmlfontify.el" (20188 43079)) ;;; Generated autoloads from htmlfontify.el (autoload 'htmlfontify-buffer "htmlfontify" "\ @@ -13964,7 +13963,7 @@ bound to the current value of the filter. ;;;*** ;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) -;;;;;; "ibuffer" "ibuffer.el" (20162 19074)) +;;;;;; "ibuffer" "ibuffer.el" (20197 58671)) ;;; Generated autoloads from ibuffer.el (autoload 'ibuffer-list-buffers "ibuffer" "\ @@ -14147,7 +14146,7 @@ See also the variable `idlwave-shell-prompt-pattern'. ;;;*** ;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el" -;;;;;; (20168 57844)) +;;;;;; (20221 40442)) ;;; Generated autoloads from progmodes/idlwave.el (autoload 'idlwave-mode "idlwave" "\ @@ -14281,8 +14280,8 @@ The main features of this mode are ;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file ;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer ;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window -;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (20178 -;;;;;; 7273)) +;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (20203 +;;;;;; 10426)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -15163,7 +15162,7 @@ Convert old Emacs Devanagari characters to UCS. ;;;### (autoloads (inferior-lisp inferior-lisp-prompt inferior-lisp-load-command ;;;;;; inferior-lisp-program inferior-lisp-filter-regexp) "inf-lisp" -;;;;;; "progmodes/inf-lisp.el" (20168 57844)) +;;;;;; "progmodes/inf-lisp.el" (20197 58064)) ;;; Generated autoloads from progmodes/inf-lisp.el (defvar inferior-lisp-filter-regexp (purecopy "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'") "\ @@ -15230,7 +15229,7 @@ of `inferior-lisp-program'). Runs the hooks from ;;;;;; Info-goto-emacs-key-command-node Info-goto-emacs-command-node ;;;;;; Info-mode info-finder info-apropos Info-index Info-directory ;;;;;; Info-on-current-buffer info-standalone info-emacs-manual -;;;;;; info info-other-window) "info" "info.el" (20172 54913)) +;;;;;; info info-other-window) "info" "info.el" (20184 46008)) ;;; Generated autoloads from info.el (autoload 'info-other-window "info" "\ @@ -15735,7 +15734,7 @@ Add submenus to the File menu, to convert to and from various formats. ;;;;;; ispell-complete-word ispell-continue ispell-buffer ispell-comments-and-strings ;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell ;;;;;; ispell-help ispell-pdict-save ispell-word ispell-personal-dictionary) -;;;;;; "ispell" "textmodes/ispell.el" (20178 7273)) +;;;;;; "ispell" "textmodes/ispell.el" (20187 22214)) ;;; Generated autoloads from textmodes/ispell.el (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) @@ -16091,7 +16090,7 @@ by `jka-compr-installed'. ;;;*** -;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20167 36967)) +;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20222 61246)) ;;; Generated autoloads from progmodes/js.el (autoload 'js-mode "js" "\ @@ -16208,7 +16207,7 @@ and the return value is the length of the conversion. ;;;### (autoloads (kmacro-end-call-mouse kmacro-end-and-call-macro ;;;;;; kmacro-end-or-call-macro kmacro-start-macro-or-insert-counter ;;;;;; kmacro-call-macro kmacro-end-macro kmacro-start-macro kmacro-exec-ring-item) -;;;;;; "kmacro" "kmacro.el" (20164 60780)) +;;;;;; "kmacro" "kmacro.el" (20187 22214)) ;;; Generated autoloads from kmacro.el (global-set-key "\C-x(" 'kmacro-start-macro) (global-set-key "\C-x)" 'kmacro-end-macro) @@ -16366,7 +16365,7 @@ Use \\[describe-mode] for more info. ;;;### (autoloads (lao-compose-region lao-composition-function lao-transcribe-roman-to-lao-string ;;;;;; lao-transcribe-single-roman-syllable-to-lao lao-compose-string) -;;;;;; "lao-util" "language/lao-util.el" (20165 31925)) +;;;;;; "lao-util" "language/lao-util.el" (20188 43079)) ;;; Generated autoloads from language/lao-util.el (autoload 'lao-compose-string "lao-util" "\ @@ -16378,7 +16377,7 @@ Use \\[describe-mode] for more info. Transcribe a Romanized Lao syllable in the region FROM and TO to Lao string. Only the first syllable is transcribed. The value has the form: (START END LAO-STRING), where -START and END are the beggining and end positions of the Roman Lao syllable, +START and END are the beginning and end positions of the Roman Lao syllable, LAO-STRING is the Lao character transcription of it. Optional 3rd arg STR, if non-nil, is a string to search for Roman Lao @@ -16584,8 +16583,8 @@ See `linum-mode' for more information on Linum mode. ;;;*** -;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (20168 -;;;;;; 57844)) +;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (20203 +;;;;;; 10426)) ;;; Generated autoloads from loadhist.el (autoload 'unload-feature "loadhist" "\ @@ -17226,7 +17225,7 @@ The mail client is taken to be the handler of mailto URLs. ;;;### (autoloads (makefile-imake-mode makefile-bsdmake-mode makefile-makepp-mode ;;;;;; makefile-gmake-mode makefile-automake-mode makefile-mode) -;;;;;; "make-mode" "progmodes/make-mode.el" (20176 51947)) +;;;;;; "make-mode" "progmodes/make-mode.el" (20199 13366)) ;;; Generated autoloads from progmodes/make-mode.el (autoload 'makefile-mode "make-mode" "\ @@ -17356,7 +17355,7 @@ Previous contents of that buffer are killed first. ;;;*** ;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el" -;;;;;; (20178 7273)) +;;;;;; (20203 10426)) ;;; Generated autoloads from man.el (defalias 'manual-entry 'man) @@ -17466,7 +17465,7 @@ recursion depth in the minibuffer prompt. This is only useful if ;;;;;; message-forward-make-body message-forward message-recover ;;;;;; message-supersede message-cancel-news message-followup message-wide-reply ;;;;;; message-reply message-news message-mail message-mode) "message" -;;;;;; "gnus/message.el" (20183 25152)) +;;;;;; "gnus/message.el" (20222 61246)) ;;; Generated autoloads from gnus/message.el (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) @@ -17632,7 +17631,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (metapost-mode metafont-mode) "meta-mode" "progmodes/meta-mode.el" -;;;;;; (20164 60780)) +;;;;;; (20222 61246)) ;;; Generated autoloads from progmodes/meta-mode.el (autoload 'metafont-mode "meta-mode" "\ @@ -17784,7 +17783,7 @@ delete the draft message. ;;;*** -;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20170 13157)) +;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20222 61246)) ;;; Generated autoloads from mh-e/mh-e.el (put 'mh-progs 'risky-local-variable t) @@ -18378,7 +18377,7 @@ kill ring; mouse-1 or mouse-3 kills it. ;;;*** -;;;### (autoloads (mpc) "mpc" "mpc.el" (20178 7273)) +;;;### (autoloads (mpc) "mpc" "mpc.el" (20222 61246)) ;;; Generated autoloads from mpc.el (autoload 'mpc "mpc" "\ @@ -18565,7 +18564,7 @@ The default is 20. If LIMIT is negative, do not limit the listing. ;;;;;; coding-system-translation-table-for-decode coding-system-pre-write-conversion ;;;;;; coding-system-post-read-conversion lookup-nested-alist set-nested-alist ;;;;;; truncate-string-to-width store-substring string-to-sequence) -;;;;;; "mule-util" "international/mule-util.el" (19845 45374)) +;;;;;; "mule-util" "international/mule-util.el" (20197 58064)) ;;; Generated autoloads from international/mule-util.el (autoload 'string-to-sequence "mule-util" "\ @@ -18671,7 +18670,7 @@ Return the value of CODING-SYSTEM's `encode-translation-table' property. (autoload 'with-coding-priority "mule-util" "\ Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list. CODING-SYSTEMS is a list of coding systems. See `set-coding-system-priority'. -This affects the implicit sorting of lists of coding sysems returned by +This affects the implicit sorting of lists of coding systems returned by operations such as `find-coding-systems-region'. \(fn CODING-SYSTEMS &rest BODY)" nil (quote macro)) @@ -18800,13 +18799,13 @@ Open a network connection to HOST on PORT. ;;;*** -;;;### (autoloads (netrc-credentials) "netrc" "net/netrc.el" (19845 -;;;;;; 45374)) +;;;### (autoloads (netrc-credentials) "netrc" "net/netrc.el" (20188 +;;;;;; 43079)) ;;; Generated autoloads from net/netrc.el (autoload 'netrc-credentials "netrc" "\ Return a user name/password pair. -Port specifications will be prioritised in the order they are +Port specifications will be prioritized in the order they are listed in the PORTS list. \(fn MACHINE &rest PORTS)" nil nil) @@ -18814,7 +18813,7 @@ listed in the PORTS list. ;;;*** ;;;### (autoloads (open-network-stream) "network-stream" "net/network-stream.el" -;;;;;; (20122 44898)) +;;;;;; (20188 43079)) ;;; Generated autoloads from net/network-stream.el (autoload 'open-network-stream "network-stream" "\ @@ -18882,7 +18881,7 @@ values: capability command, and should return the command to switch on STARTTLS if the server supports STARTTLS, and nil otherwise. -:always-query-capabilies says whether to query the server for +:always-query-capabilities says whether to query the server for capabilities, even if we're doing a `plain' network connection. :client-certificate should either be a list where the first @@ -19186,7 +19185,7 @@ Start newsticker treeview. ;;;*** ;;;### (autoloads (nndiary-generate-nov-databases) "nndiary" "gnus/nndiary.el" -;;;;;; (20168 57844)) +;;;;;; (20221 40442)) ;;; Generated autoloads from gnus/nndiary.el (autoload 'nndiary-generate-nov-databases "nndiary" "\ @@ -19381,7 +19380,7 @@ the variable `nxml-enabled-unicode-blocks'. ;;;;;; org-babel-pop-to-session-maybe org-babel-load-in-session-maybe ;;;;;; org-babel-expand-src-block-maybe org-babel-view-src-block-info ;;;;;; org-babel-execute-maybe org-babel-execute-safely-maybe) "ob" -;;;;;; "org/ob.el" (20174 10230)) +;;;;;; "org/ob.el" (20189 63932)) ;;; Generated autoloads from org/ob.el (autoload 'org-babel-execute-safely-maybe "ob" "\ @@ -19773,7 +19772,7 @@ including a reproducible test case and send the message. ;;;;;; org-insert-link-global org-store-link org-run-like-in-org-mode ;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle ;;;;;; org-mode org-babel-do-load-languages) "org" "org/org.el" -;;;;;; (20170 13157)) +;;;;;; (20197 58064)) ;;; Generated autoloads from org/org.el (autoload 'org-babel-do-load-languages "org" "\ @@ -19997,7 +19996,7 @@ Call the customize function with org as argument. ;;;;;; org-diary org-agenda-list-stuck-projects org-tags-view org-todo-list ;;;;;; org-search-view org-agenda-list org-batch-store-agenda-views ;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda -;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (20178 7273)) +;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (20187 22214)) ;;; Generated autoloads from org/org-agenda.el (autoload 'org-agenda "org-agenda" "\ @@ -20398,7 +20397,7 @@ Set org-capture-templates to be similar to `org-remember-templates'. ;;;*** ;;;### (autoloads (org-clock-persistence-insinuate org-get-clocktable) -;;;;;; "org-clock" "org/org-clock.el" (20172 54913)) +;;;;;; "org-clock" "org/org-clock.el" (20187 22214)) ;;; Generated autoloads from org/org-clock.el (autoload 'org-get-clocktable "org-clock" "\ @@ -20509,7 +20508,7 @@ publishing directory. ;;;### (autoloads (org-insert-export-options-template org-export-as-org ;;;;;; org-export-visible org-export) "org-exp" "org/org-exp.el" -;;;;;; (20167 36967)) +;;;;;; (20221 40442)) ;;; Generated autoloads from org/org-exp.el (autoload 'org-export "org-exp" "\ @@ -21050,7 +21049,7 @@ line directly before or after the table. ;;;### (autoloads (org-publish-current-project org-publish-current-file ;;;;;; org-publish-all org-publish) "org-publish" "org/org-publish.el" -;;;;;; (20161 45793)) +;;;;;; (20189 63932)) ;;; Generated autoloads from org/org-publish.el (defalias 'org-publish-project 'org-publish) @@ -21160,7 +21159,7 @@ See also the variable `org-reverse-note-order'. ;;;*** ;;;### (autoloads (org-table-to-lisp orgtbl-mode turn-on-orgtbl) -;;;;;; "org-table" "org/org-table.el" (20168 57844)) +;;;;;; "org-table" "org/org-table.el" (20222 61246)) ;;; Generated autoloads from org/org-table.el (autoload 'turn-on-orgtbl "org-table" "\ @@ -21184,7 +21183,7 @@ The table is taken from the parameter TXT, or from the buffer at point. ;;;*** ;;;### (autoloads (org-export-as-taskjuggler-and-open org-export-as-taskjuggler) -;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (20166 16092)) +;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (20187 22214)) ;;; Generated autoloads from org/org-taskjuggler.el (autoload 'org-export-as-taskjuggler "org-taskjuggler" "\ @@ -21349,7 +21348,7 @@ See the command `outline-mode' for more information on this mode. ;;;### (autoloads (list-packages describe-package package-initialize ;;;;;; package-refresh-contents package-install-file package-install-from-buffer ;;;;;; package-install package-enable-at-startup) "package" "emacs-lisp/package.el" -;;;;;; (20168 57844)) +;;;;;; (20189 63932)) ;;; Generated autoloads from emacs-lisp/package.el (defvar package-enable-at-startup t "\ @@ -21459,8 +21458,8 @@ unknown are returned as nil. ;;;*** -;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (20168 -;;;;;; 57844)) +;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (20200 +;;;;;; 34235)) ;;; Generated autoloads from progmodes/pascal.el (autoload 'pascal-mode "pascal" "\ @@ -21535,7 +21534,7 @@ Check if KEY is in the cache. ;;;*** ;;;### (autoloads (pcase-let pcase-let* pcase) "pcase" "emacs-lisp/pcase.el" -;;;;;; (19863 8742)) +;;;;;; (20222 61246)) ;;; Generated autoloads from emacs-lisp/pcase.el (autoload 'pcase "pcase" "\ @@ -21606,7 +21605,7 @@ Completion rules for the `cvs' command. ;;;*** ;;;### (autoloads (pcomplete/tar pcomplete/make pcomplete/bzip2 pcomplete/gzip) -;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (20104 14925)) +;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (20193 60993)) ;;; Generated autoloads from pcmpl-gnu.el (autoload 'pcomplete/gzip "pcmpl-gnu" "\ @@ -21784,7 +21783,7 @@ Setup `shell-mode' to use pcomplete. ;;;### (autoloads (cvs-dired-use-hook cvs-dired-action cvs-status ;;;;;; cvs-update cvs-examine cvs-quickdir cvs-checkout) "pcvs" -;;;;;; "vc/pcvs.el" (20164 60780)) +;;;;;; "vc/pcvs.el" (20187 22214)) ;;; Generated autoloads from vc/pcvs.el (autoload 'cvs-checkout "pcvs" "\ @@ -21930,7 +21929,7 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'. ;;;*** ;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el" -;;;;;; (20093 44623)) +;;;;;; (20188 43079)) ;;; Generated autoloads from textmodes/picture.el (autoload 'picture-mode "picture" "\ @@ -22002,7 +22001,7 @@ by supplying an argument. Entry to this mode calls the value of `picture-mode-hook' if non-nil. Note that Picture mode commands will work outside of Picture mode, but -they are not defaultly assigned to keys. +they are not by default assigned to keys. \(fn)" t nil) @@ -22010,8 +22009,8 @@ they are not defaultly assigned to keys. ;;;*** -;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (20097 -;;;;;; 41737)) +;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (20197 +;;;;;; 58064)) ;;; Generated autoloads from gnus/plstore.el (autoload 'plstore-open "plstore" "\ @@ -22130,7 +22129,7 @@ Ignores leading comment characters. ;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview ;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript ;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el" -;;;;;; (20175 31160)) +;;;;;; (20201 55112)) ;;; Generated autoloads from printing.el (autoload 'pr-interface "printing" "\ @@ -22639,12 +22638,12 @@ Interactively, you have the following situations: M-x pr-ps-fast-fire RET The command prompts the user for a N-UP value and printing will - immediatelly be done using the current active printer. + immediately be done using the current active printer. C-u M-x pr-ps-fast-fire RET C-u 0 M-x pr-ps-fast-fire RET The command prompts the user for a N-UP value and also for a current - PostScript printer, then printing will immediatelly be done using the new + PostScript printer, then printing will immediately be done using the new current active printer. C-u 1 M-x pr-ps-fast-fire RET @@ -22665,7 +22664,7 @@ zero and the argument SELECT is treated as follows: If it's nil, send the image to the printer. If it's a list or an integer lesser or equal to zero, the command prompts - the user for a current PostScript printer, then printing will immediatelly + the user for a current PostScript printer, then printing will immediately be done using the new current active printer. If it's an integer equal to 1, the command prompts the user for a file name @@ -22678,7 +22677,7 @@ zero and the argument SELECT is treated as follows: instead of sending it to the printer. If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new - active printer and printing will immediatelly be done using the new active + active printer and printing will immediately be done using the new active printer. Otherwise, send the image to the printer. @@ -22705,7 +22704,7 @@ Noninteractively, the argument SELECT-PRINTER is treated as follows: If it's nil, the printing is sent to the current active text printer. If it's a symbol which it's defined in `pr-txt-printer-alist', it's the new - active printer and printing will immediatelly be done using the new active + active printer and printing will immediately be done using the new active printer. If it's non-nil, the command prompts the user for a new active text printer. @@ -22717,7 +22716,7 @@ are both set to t. ;;;*** -;;;### (autoloads (proced) "proced" "proced.el" (20053 39261)) +;;;### (autoloads (proced) "proced" "proced.el" (20197 58064)) ;;; Generated autoloads from proced.el (autoload 'proced "proced" "\ @@ -22733,7 +22732,7 @@ See `proced-mode' for a description of features available in Proced buffers. ;;;*** ;;;### (autoloads (run-prolog mercury-mode prolog-mode) "prolog" -;;;;;; "progmodes/prolog.el" (20176 51947)) +;;;;;; "progmodes/prolog.el" (20221 40442)) ;;; Generated autoloads from progmodes/prolog.el (autoload 'prolog-mode "prolog" "\ @@ -22832,8 +22831,8 @@ Typing \\\\[ps-run-goto-error] when the cursor is at the number ;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type -;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (20172 -;;;;;; 55048)) +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (20222 +;;;;;; 61437)) ;;; Generated autoloads from ps-print.el (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\ @@ -23030,7 +23029,7 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** ;;;### (autoloads (jython-mode python-mode python-after-info-look -;;;;;; run-python) "python" "progmodes/python.el" (20170 13157)) +;;;;;; run-python) "python" "progmodes/python.el" (20204 31303)) ;;; Generated autoloads from progmodes/python.el (add-to-list 'interpreter-mode-alist (cons (purecopy "jython") 'jython-mode)) @@ -23139,7 +23138,7 @@ them into characters should be done separately. ;;;;;; quail-defrule quail-install-decode-map quail-install-map ;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout ;;;;;; quail-define-package quail-use-package quail-title) "quail" -;;;;;; "international/quail.el" (20166 16092)) +;;;;;; "international/quail.el" (20201 55112)) ;;; Generated autoloads from international/quail.el (autoload 'quail-title "quail" "\ @@ -23845,8 +23844,8 @@ of master file. ;;;*** -;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (19845 -;;;;;; 45374)) +;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20221 +;;;;;; 40442)) ;;; Generated autoloads from textmodes/reftex-vars.el (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) @@ -23887,7 +23886,7 @@ This means the number of non-shy regexp grouping constructs ;;;### (autoloads (remember-diary-extract-entries remember-clipboard ;;;;;; remember-other-frame remember) "remember" "textmodes/remember.el" -;;;;;; (20161 45793)) +;;;;;; (20209 49217)) ;;; Generated autoloads from textmodes/remember.el (autoload 'remember "remember" "\ @@ -24000,16 +23999,16 @@ first comment line visible (if point is in a comment). ;;;*** ;;;### (autoloads (global-reveal-mode reveal-mode) "reveal" "reveal.el" -;;;;;; (20127 62865)) +;;;;;; (20207 7484)) ;;; Generated autoloads from reveal.el (autoload 'reveal-mode "reveal" "\ -Toggle decloaking of invisible text near point (Reveal mode). +Toggle uncloaking of invisible text near point (Reveal mode). With a prefix argument ARG, enable Reveal mode if ARG is positive, and disable it otherwise. If called from Lisp, enable Reveal mode if ARG is omitted or nil. -Reveral mode is a buffer-local minor mode. When enabled, it +Reveal mode is a buffer-local minor mode. When enabled, it reveals invisible text around point. \(fn &optional ARG)" t nil) @@ -24100,7 +24099,7 @@ variable. ;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers ;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers ;;;;;; rmail-user-mail-address-regexp rmail-movemail-variant-p) -;;;;;; "rmail" "mail/rmail.el" (20174 10633)) +;;;;;; "rmail" "mail/rmail.el" (20222 61246)) ;;; Generated autoloads from mail/rmail.el (autoload 'rmail-movemail-variant-p "rmail" "\ @@ -24374,7 +24373,7 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil. ;;;*** ;;;### (autoloads (rng-validate-mode) "rng-valid" "nxml/rng-valid.el" -;;;;;; (20178 7273)) +;;;;;; (20221 40442)) ;;; Generated autoloads from nxml/rng-valid.el (autoload 'rng-validate-mode "rng-valid" "\ @@ -24433,7 +24432,7 @@ must be equal. ;;;*** ;;;### (autoloads (robin-use-package robin-modify-package robin-define-package) -;;;;;; "robin" "international/robin.el" (20159 42847)) +;;;;;; "robin" "international/robin.el" (20209 49217)) ;;; Generated autoloads from international/robin.el (autoload 'robin-define-package "robin" "\ @@ -24504,7 +24503,7 @@ Toggle the use of ROT13 encoding for the current window. ;;;*** ;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el" -;;;;;; (20178 7273)) +;;;;;; (20221 40442)) ;;; Generated autoloads from textmodes/rst.el (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) @@ -25029,7 +25028,7 @@ during scrolling. ;;;*** ;;;### (autoloads (semantic-mode semantic-default-submodes) "semantic" -;;;;;; "cedet/semantic.el" (20172 54913)) +;;;;;; "cedet/semantic.el" (20187 22214)) ;;; Generated autoloads from cedet/semantic.el (defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\ @@ -25365,8 +25364,8 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** ;;;### (autoloads (server-save-buffers-kill-terminal server-mode -;;;;;; server-force-delete server-start) "server" "server.el" (20172 -;;;;;; 54913)) +;;;;;; server-force-delete server-start) "server" "server.el" (20188 +;;;;;; 43079)) ;;; Generated autoloads from server.el (put 'server-host 'risky-local-variable t) @@ -25433,7 +25432,7 @@ only these files will be asked to be saved. ;;;*** -;;;### (autoloads (ses-mode) "ses" "ses.el" (20172 54913)) +;;;### (autoloads (ses-mode) "ses" "ses.el" (20207 7484)) ;;; Generated autoloads from ses.el (autoload 'ses-mode "ses" "\ @@ -25673,7 +25672,7 @@ Set up file shadowing. ;;;*** ;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el" -;;;;;; (20168 57844)) +;;;;;; (20197 58064)) ;;; Generated autoloads from shell.el (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\ @@ -26040,8 +26039,8 @@ then `snmpv2-mode-hook'. ;;;*** -;;;### (autoloads (sunrise-sunset) "solar" "calendar/solar.el" (19886 -;;;;;; 45771)) +;;;### (autoloads (sunrise-sunset) "solar" "calendar/solar.el" (20188 +;;;;;; 43079)) ;;; Generated autoloads from calendar/solar.el (autoload 'sunrise-sunset "solar" "\ @@ -26338,7 +26337,7 @@ Spam reports will be queued with the method used when ;;;*** ;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar" -;;;;;; "speedbar.el" (20178 7273)) +;;;;;; "speedbar.el" (20221 40442)) ;;; Generated autoloads from speedbar.el (defalias 'speedbar 'speedbar-frame-mode) @@ -26382,7 +26381,7 @@ Return a vector containing the lines from `spook-phrases-file'. ;;;;;; sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix ;;;;;; sql-sybase sql-oracle sql-product-interactive sql-connect ;;;;;; sql-mode sql-help sql-add-product-keywords) "sql" "progmodes/sql.el" -;;;;;; (20178 7273)) +;;;;;; (20207 7484)) ;;; Generated autoloads from progmodes/sql.el (autoload 'sql-add-product-keywords "sql" "\ @@ -26878,7 +26877,7 @@ buffer. ;;;*** ;;;### (autoloads (srecode-template-mode) "srecode/srt-mode" "cedet/srecode/srt-mode.el" -;;;;;; (20160 63745)) +;;;;;; (20197 58064)) ;;; Generated autoloads from cedet/srecode/srt-mode.el (autoload 'srecode-template-mode "srecode/srt-mode" "\ @@ -27206,7 +27205,7 @@ The variable `tab-width' controls the spacing of tab stops. ;;;;;; table-recognize table-insert-row-column table-insert-column ;;;;;; table-insert-row table-insert table-point-left-cell-hook ;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook) -;;;;;; "table" "textmodes/table.el" (20179 28130)) +;;;;;; "table" "textmodes/table.el" (20189 63932)) ;;; Generated autoloads from textmodes/table.el (defvar table-cell-map-hook nil "\ @@ -27446,7 +27445,7 @@ specified. (autoload 'table-shorten-cell "table" "\ Shorten the current cell by N lines by shrinking the cell vertically. Shortening is done by removing blank lines from the bottom of the cell -and possibly from the top of the cell as well. Therefor, the cell +and possibly from the top of the cell as well. Therefore, the cell must have some bottom/top blank lines to be shorten effectively. This is applicable to all the cells aligned horizontally with the current one because they are also shortened in order to keep the rectangular @@ -27950,7 +27949,7 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** ;;;### (autoloads (serial-term ansi-term term make-term) "term" "term.el" -;;;;;; (20178 7273)) +;;;;;; (20209 49217)) ;;; Generated autoloads from term.el (autoload 'make-term "term" "\ @@ -28373,7 +28372,7 @@ Major mode to edit DocTeX files. ;;;*** ;;;### (autoloads (texi2info texinfo-format-region texinfo-format-buffer) -;;;;;; "texinfmt" "textmodes/texinfmt.el" (20183 25152)) +;;;;;; "texinfmt" "textmodes/texinfmt.el" (20187 22214)) ;;; Generated autoloads from textmodes/texinfmt.el (autoload 'texinfo-format-buffer "texinfmt" "\ @@ -28729,7 +28728,7 @@ This function performs no refilling of the changed text. ;;;### (autoloads (emacs-init-time emacs-uptime display-time-world ;;;;;; display-time-mode display-time display-time-day-and-date) -;;;;;; "time" "time.el" (20127 62865)) +;;;;;; "time" "time.el" (20187 22214)) ;;; Generated autoloads from time.el (defvar display-time-day-and-date nil "\ @@ -29053,7 +29052,7 @@ relative only to the time worked today, and not to past time. ;;;*** ;;;### (autoloads (batch-titdic-convert titdic-convert) "titdic-cnv" -;;;;;; "international/titdic-cnv.el" (20175 31160)) +;;;;;; "international/titdic-cnv.el" (20201 55112)) ;;; Generated autoloads from international/titdic-cnv.el (autoload 'titdic-convert "titdic-cnv" "\ @@ -29359,7 +29358,7 @@ BUFFER defaults to `trace-buffer'. ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion ;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers ;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp" -;;;;;; "net/tramp.el" (20179 28130)) +;;;;;; "net/tramp.el" (20209 49217)) ;;; Generated autoloads from net/tramp.el (defvar tramp-mode t "\ @@ -29790,7 +29789,7 @@ You might need to set `uce-mail-reader' before using this. ;;;;;; ucs-normalize-NFKC-string ucs-normalize-NFKC-region ucs-normalize-NFKD-string ;;;;;; ucs-normalize-NFKD-region ucs-normalize-NFC-string ucs-normalize-NFC-region ;;;;;; ucs-normalize-NFD-string ucs-normalize-NFD-region) "ucs-normalize" -;;;;;; "international/ucs-normalize.el" (20052 53218)) +;;;;;; "international/ucs-normalize.el" (20187 22214)) ;;; Generated autoloads from international/ucs-normalize.el (autoload 'ucs-normalize-NFD-region "ucs-normalize" "\ @@ -30053,7 +30052,7 @@ Handle file: and ftp: URLs. ;;;*** ;;;### (autoloads (url-open-stream url-gateway-nslookup-host) "url-gw" -;;;;;; "url/url-gw.el" (19864 29553)) +;;;;;; "url/url-gw.el" (20187 22214)) ;;; Generated autoloads from url/url-gw.el (autoload 'url-gateway-nslookup-host "url-gw" "\ @@ -30128,7 +30127,7 @@ accessible. ;;;*** ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p -;;;;;; url-http) "url-http" "url/url-http.el" (20167 36967)) +;;;;;; url-http) "url-http" "url/url-http.el" (20201 55112)) ;;; Generated autoloads from url/url-http.el (autoload 'url-http "url-http" "\ @@ -30576,7 +30575,7 @@ Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil. ;;;### (autoloads (uudecode-decode-region uudecode-decode-region-internal ;;;;;; uudecode-decode-region-external) "uudecode" "mail/uudecode.el" -;;;;;; (19845 45374)) +;;;;;; (20222 61246)) ;;; Generated autoloads from mail/uudecode.el (autoload 'uudecode-decode-region-external "uudecode" "\ @@ -30606,8 +30605,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;;;; vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers ;;;;;; vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff ;;;;;; vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook -;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20172 -;;;;;; 54913)) +;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20204 +;;;;;; 31303)) ;;; Generated autoloads from vc/vc.el (defvar vc-checkout-hook nil "\ @@ -30630,34 +30629,27 @@ See `run-hooks'.") (autoload 'vc-next-action "vc" "\ Do the next logical version control operation on the current fileset. -This requires that all files in the fileset be in the same state. - -For locking systems: - If every file is not already registered, this registers each for version -control. - If every file is registered and not locked by anyone, this checks out -a writable and locked file of each ready for editing. - If every file is checked out and locked by the calling user, this -first checks to see if each file has changed since checkout. If not, -it performs a revert on that file. - If every file has been changed, this pops up a buffer for entry -of a log message; when the message has been entered, it checks in the -resulting changes along with the log message as change commentary. If -the variable `vc-keep-workfiles' is non-nil (which is its default), a -read-only copy of each changed file is left in place afterwards. - If the affected file is registered and locked by someone else, you are -given the option to steal the lock(s). - -For merging systems: - If every file is not already registered, this registers each one for version -control. This does an add, but not a commit. - If every file is added but not committed, each one is committed. - If every working file is changed, but the corresponding repository file is -unchanged, this pops up a buffer for entry of a log message; when the -message has been entered, it checks in the resulting changes along -with the logmessage as change commentary. A writable file is retained. - If the repository file is changed, you are asked if you want to -merge in the changes into your working copy. +This requires that all files in the current VC fileset be in the +same state. If not, signal an error. + +For merging-based version control systems: + If every file in the VC fileset is not registered for version + control, register the fileset (but don't commit). + If every work file in the VC fileset is added or changed, pop + up a *vc-log* buffer to commit the fileset. + For a centralized version control system, if any work file in + the VC fileset is out of date, offer to update the fileset. + +For old-style locking-based version control systems, like RCS: + If every file is not registered, register the file(s). + If every file is registered and unlocked, check out (lock) + the file(s) for editing. + If every file is locked by you and has changes, pop up a + *vc-log* buffer to check in the changes. If the variable + `vc-keep-workfiles' is non-nil (the default), leave a + read-only copy of each changed file after checking in. + If every file is locked by you and unchanged, unlock them. + If every file is locked by someone else, offer to steal the lock. \(fn VERBOSE)" t nil) @@ -30937,7 +30929,7 @@ mode-specific menu. `vc-annotate-color-map' and ;;;*** -;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20174 10230)) +;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20209 49217)) ;;; Generated autoloads from vc/vc-bzr.el (defconst vc-bzr-admin-dirname ".bzr" "\ @@ -30953,7 +30945,7 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20174 10230)) +;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20221 40442)) ;;; Generated autoloads from vc/vc-cvs.el (defun vc-cvs-registered (f) "Return non-nil if file F is registered with CVS." @@ -30964,7 +30956,7 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20168 57844)) +;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20207 7484)) ;;; Generated autoloads from vc/vc-dir.el (autoload 'vc-dir "vc-dir" "\ @@ -31023,7 +31015,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (19845 45374)) +;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20207 7484)) ;;; Generated autoloads from vc/vc-hg.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." @@ -31034,7 +31026,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20174 10230)) +;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20221 40442)) ;;; Generated autoloads from vc/vc-mtn.el (defconst vc-mtn-admin-dir "_MTN" "\ @@ -31096,7 +31088,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** ;;;### (autoloads (vera-mode) "vera-mode" "progmodes/vera-mode.el" -;;;;;; (20131 59880)) +;;;;;; (20203 10426)) ;;; Generated autoloads from progmodes/vera-mode.el (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode)) @@ -31154,7 +31146,7 @@ Key bindings: ;;;*** ;;;### (autoloads (verilog-mode) "verilog-mode" "progmodes/verilog-mode.el" -;;;;;; (20183 25152)) +;;;;;; (20222 61246)) ;;; Generated autoloads from progmodes/verilog-mode.el (autoload 'verilog-mode "verilog-mode" "\ @@ -31293,7 +31285,7 @@ Key bindings specific to `verilog-mode-map' are: ;;;*** ;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el" -;;;;;; (20168 57844)) +;;;;;; (20197 58064)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload 'vhdl-mode "vhdl-mode" "\ @@ -31444,7 +31436,7 @@ Usage: CODE BEAUTIFICATION: `C-c M-b' and `C-c C-b' beautify the code of a region or of the entire - buffer respectively. This inludes indentation, alignment, and case + buffer respectively. This includes indentation, alignment, and case fixing. Code beautification can also be run non-interactively using the command: @@ -31889,7 +31881,7 @@ Syntax table and abbrevs while in vi mode remain as they were in Emacs. ;;;### (autoloads (viqr-pre-write-conversion viqr-post-read-conversion ;;;;;; viet-encode-viqr-buffer viet-encode-viqr-region viet-decode-viqr-buffer ;;;;;; viet-decode-viqr-region viet-encode-viscii-char) "viet-util" -;;;;;; "language/viet-util.el" (19845 45374)) +;;;;;; "language/viet-util.el" (20187 22214)) ;;; Generated autoloads from language/viet-util.el (autoload 'viet-encode-viscii-char "viet-util" "\ @@ -31937,7 +31929,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics. ;;;;;; view-mode view-buffer-other-frame view-buffer-other-window ;;;;;; view-buffer view-file-other-frame view-file-other-window ;;;;;; view-file kill-buffer-if-not-modified view-remove-frame-by-deleting) -;;;;;; "view" "view.el" (20174 10230)) +;;;;;; "view" "view.el" (20188 43079)) ;;; Generated autoloads from view.el (defvar view-remove-frame-by-deleting t "\ @@ -32147,7 +32139,7 @@ Entry to view-mode runs the normal hook `view-mode-hook'. Update `view-return-to-alist' of buffer BUFFER. Remove from `view-return-to-alist' all entries referencing dead windows. Optional argument ITEM non-nil means add ITEM to -`view-return-to-alist' after purging. For a decsription of items +`view-return-to-alist' after purging. For a description of items that can be added see the RETURN-TO-ALIST argument of the function `view-mode-exit'. If `view-return-to-alist' contains an entry for the selected window, purge that entry from @@ -32179,8 +32171,8 @@ Exit View mode and make the current buffer editable. ;;;*** -;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20141 -;;;;;; 9296)) +;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20187 +;;;;;; 22214)) ;;; Generated autoloads from emulation/vip.el (autoload 'vip-setup "vip" "\ @@ -32196,7 +32188,7 @@ Turn on VIP emulation of VI. ;;;*** ;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el" -;;;;;; (20167 36967)) +;;;;;; (20187 22214)) ;;; Generated autoloads from emulation/viper.el (autoload 'toggle-viper-mode "viper" "\ @@ -32794,8 +32786,8 @@ Minor mode for traversing widgets. ;;;*** ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create -;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (20162 -;;;;;; 19074)) +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (20222 +;;;;;; 61246)) ;;; Generated autoloads from wid-edit.el (autoload 'widgetp "wid-edit" "\ @@ -33072,7 +33064,7 @@ The key bindings are: ;;;*** -;;;### (autoloads (xesam-search) "xesam" "net/xesam.el" (20175 31160)) +;;;### (autoloads (xesam-search) "xesam" "net/xesam.el" (20197 58064)) ;;; Generated autoloads from net/xesam.el (autoload 'xesam-search "xesam" "\ @@ -33225,47 +33217,46 @@ Zone out, completely. ;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" ;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" ;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" -;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" -;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" -;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" -;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" -;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" -;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" -;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" -;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" -;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" -;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" -;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" -;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" -;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" -;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el" -;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" -;;;;;; "cedet/cedet-idutils.el" "cedet/cedet.el" "cedet/ede/auto.el" -;;;;;; "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" "cedet/ede/cpp-root.el" -;;;;;; "cedet/ede/custom.el" "cedet/ede/dired.el" "cedet/ede/emacs.el" -;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el" -;;;;;; "cedet/ede/loaddefs.el" "cedet/ede/locate.el" "cedet/ede/make.el" -;;;;;; "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" "cedet/ede/pmake.el" -;;;;;; "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" -;;;;;; "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" -;;;;;; "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" -;;;;;; "cedet/ede/proj-shared.el" "cedet/ede/proj.el" "cedet/ede/project-am.el" -;;;;;; "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el" -;;;;;; "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el" -;;;;;; "cedet/ede/util.el" "cedet/inversion.el" "cedet/mode-local.el" -;;;;;; "cedet/pulse.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" -;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el" -;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" -;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el" -;;;;;; "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el" -;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el" -;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el" -;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el" -;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el" -;;;;;; "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el" -;;;;;; "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el" -;;;;;; "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el" -;;;;;; "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el" +;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el" +;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el" +;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el" +;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" +;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" +;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el" +;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el" +;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el" +;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el" +;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el" +;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el" +;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el" +;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el" +;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el" +;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el" +;;;;;; "cedet/cedet.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" +;;;;;; "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" +;;;;;; "cedet/ede/dired.el" "cedet/ede/emacs.el" "cedet/ede/files.el" +;;;;;; "cedet/ede/generic.el" "cedet/ede/linux.el" "cedet/ede/locate.el" +;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" +;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" +;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" +;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" +;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el" +;;;;;; "cedet/ede/project-am.el" "cedet/ede/shell.el" "cedet/ede/simple.el" +;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el" +;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/inversion.el" +;;;;;; "cedet/mode-local.el" "cedet/pulse.el" "cedet/semantic/analyze.el" +;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el" +;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el" +;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el" +;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" +;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el" +;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el" +;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el" +;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" +;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el" +;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" +;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el" +;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el" ;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el" ;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el" ;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el" @@ -33273,13 +33264,13 @@ Zone out, completely. ;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" ;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" ;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" -;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el" -;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el" -;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" -;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el" -;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" -;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" -;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" +;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el" +;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el" +;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" +;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el" +;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" +;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" +;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" @@ -33291,33 +33282,32 @@ Zone out, completely. ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" -;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" -;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" -;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el" -;;;;;; "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" -;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" -;;;;;; "emacs-lisp/authors.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" -;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el" -;;;;;; "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" -;;;;;; "emacs-lisp/cl-specs.el" "emacs-lisp/cust-print.el" "emacs-lisp/eieio-base.el" -;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el" -;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el" -;;;;;; "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" -;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/regi.el" -;;;;;; "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" -;;;;;; "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el" -;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el" -;;;;;; "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el" -;;;;;; "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el" -;;;;;; "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el" -;;;;;; "erc/erc-goodies.el" "erc/erc-ibuffer.el" "erc/erc-lang.el" -;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" -;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" -;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" -;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" -;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" -;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" +;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el" +;;;;;; "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" +;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" +;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el" +;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" "emacs-lisp/authors.el" +;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" +;;;;;; "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" +;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" +;;;;;; "emacs-lisp/cust-print.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-custom.el" +;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el" +;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" +;;;;;; "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" +;;;;;; "emacs-lisp/regi.el" "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" +;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" +;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" +;;;;;; "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" +;;;;;; "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el" +;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" +;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" +;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" +;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" +;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" +;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-io.el" ;;;;;; "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el" ;;;;;; "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "foldout.el" ;;;;;; "format-spec.el" "forms-d2.el" "forms-pass.el" "fringe.el" @@ -33420,8 +33410,8 @@ Zone out, completely. ;;;;;; "vc/ediff-init.el" "vc/ediff-merg.el" "vc/ediff-ptch.el" ;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" ;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el" -;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (20183 -;;;;;; 25444 347950)) +;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (20224 +;;;;;; 16870 730403)) ;;;*** -- cgit v1.2.1 From 651e947eb84b9201faa63ff6dc855a8c99ac8018 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 1 Jan 2012 18:26:51 +0200 Subject: Allow Emacs on w32 to build against and work with GnuTLS 3.x. src/gnutls.c (init_gnutls_functions): Load gnutls_check_version. Load gnutls_transport_set_lowat only if GnuTLS version is below 2.11.1. (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for GnuTLS versions below 2.11.1. lisp/term/w32-win.el (dynamic-library-alist) : Load libgnutls-28.dll, from GnuTLS version 3.x, in preference to libgnutls-26.dll. --- lisp/ChangeLog | 6 ++++++ lisp/term/w32-win.el | 2 +- src/ChangeLog | 8 ++++++++ src/gnutls.c | 14 ++++++++++++-- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7696651c67..5c9274fdda5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-01-01 Eli Zaretskii + + * term/w32-win.el (dynamic-library-alist) : Load + libgnutls-28.dll, from GnuTLS version 3.x, in preference to + libgnutls-26.dll. + 2011-12-31 Andreas Schwab * emacs-lisp/bytecomp.el (byte-compile-file): Fix indentation. diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index b7f2a69e77b..c7189d15241 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -210,7 +210,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") '(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll") '(glib "libglib-2.0-0.dll") '(gobject "libgobject-2.0-0.dll") - '(gnutls "libgnutls-26.dll"))) + '(gnutls "libgnutls-28.dll" "libgnutls-26.dll"))) ;;; multi-tty support (defvar w32-initialized nil diff --git a/src/ChangeLog b/src/ChangeLog index 937b96107bc..829895d1b72 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2012-01-01 Eli Zaretskii + + * gnutls.c (init_gnutls_functions): Load gnutls_check_version. + Load gnutls_transport_set_lowat only if GnuTLS version is below + 2.11.1. + (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for + GnuTLS versions below 2.11.1. + 2011-12-31 Antoine Levitt * xdisp.c (syms_of_xdisp) : Add warning diff --git a/src/gnutls.c b/src/gnutls.c index 500f09432b1..bcec07b36e6 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -125,6 +125,7 @@ DEF_GNUTLS_FN (ssize_t, gnutls_record_send, (gnutls_session_t, const void *, size_t)); DEF_GNUTLS_FN (const char *, gnutls_strerror, (int)); DEF_GNUTLS_FN (void, gnutls_transport_set_errno, (gnutls_session_t, int)); +DEF_GNUTLS_FN (const char *, gnutls_check_version, (const char *)); DEF_GNUTLS_FN (void, gnutls_transport_set_lowat, (gnutls_session_t, int)); DEF_GNUTLS_FN (void, gnutls_transport_set_ptr2, (gnutls_session_t, gnutls_transport_ptr_t, @@ -184,7 +185,11 @@ init_gnutls_functions (Lisp_Object libraries) LOAD_GNUTLS_FN (library, gnutls_record_send); LOAD_GNUTLS_FN (library, gnutls_strerror); LOAD_GNUTLS_FN (library, gnutls_transport_set_errno); - LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat); + LOAD_GNUTLS_FN (library, gnutls_check_version); + /* We don't need to call gnutls_transport_set_lowat in GnuTLS 2.11.1 + and later, and the function was removed entirely in 3.0.0. */ + if (!fn_gnutls_check_version ("2.11.1")) + LOAD_GNUTLS_FN (library, gnutls_transport_set_lowat); LOAD_GNUTLS_FN (library, gnutls_transport_set_ptr2); LOAD_GNUTLS_FN (library, gnutls_transport_set_pull_function); LOAD_GNUTLS_FN (library, gnutls_transport_set_push_function); @@ -282,7 +287,12 @@ emacs_gnutls_handshake (struct Lisp_Process *proc) (Note: this is probably not strictly necessary as the lowat value is only used when no custom pull/push functions are set.) */ - fn_gnutls_transport_set_lowat (state, 0); + /* According to GnuTLS NEWS file, lowat level has been set to + zero by default in version 2.11.1, and the function + gnutls_transport_set_lowat was removed from the library in + version 2.99.0. */ + if (!fn_gnutls_check_version ("2.11.1")) + fn_gnutls_transport_set_lowat (state, 0); #else /* This is how GnuTLS takes sockets: as file descriptors passed in. For an Emacs process socket, infd and outfd are the -- cgit v1.2.1 From f75bfc33d63f5087993e9954a71663287ff6ea5c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 2 Jan 2012 17:27:32 +0800 Subject: Move shell-dir-cookie-re feature into Dirtrack mode. * lisp/dirtrack.el (dirtrack-list): Eliminate unused third element. (dirtrack): Merge code for handling relative filenames in prompt from shell-dir-cookie-watcher. (dirtrack-debug-message): New arg to avoid excess format calls. * lisp/shell.el (shell-dir-cookie-re): Variable deleted. (shell-dir-cookie-watcher): Function deleted. (shell-mode): Don't use shell-dir-cookie-re, since it is redundant with dirtrack-mode. --- etc/NEWS | 4 -- lisp/ChangeLog | 12 ++++++ lisp/dirtrack.el | 126 ++++++++++++++++++++++++++++--------------------------- lisp/shell.el | 30 ------------- 4 files changed, 77 insertions(+), 95 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c0058800919..fc390df7743 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -749,10 +749,6 @@ Try using `rmail-show-message-hook' instead. directory is a remote file name and neither the environment variable $ESHELL nor the variable `explicit-shell-file-name' is set. -*** New variable `shell-dir-cookie-re'. -If set to an appropriate regexp, Shell mode can track your cwd by -reading it from your prompt. - --- ** SQL Mode enhancements. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c9274fdda5..d5c10373546 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2012-01-02 Chong Yidong + + * dirtrack.el (dirtrack-list): Eliminate unused third element. + (dirtrack): Merge code for handling relative filenames in prompt + from shell-dir-cookie-watcher. + (dirtrack-debug-message): New arg to avoid excess format calls. + + * shell.el (shell-dir-cookie-re): Variable deleted. + (shell-dir-cookie-watcher): Function deleted. + (shell-mode): Don't use shell-dir-cookie-re, since it is redundant + with dirtrack-mode. + 2012-01-01 Eli Zaretskii * term/w32-win.el (dynamic-library-alist) : Load diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el index eef8c111da5..d67c8bdb519 100644 --- a/lisp/dirtrack.el +++ b/lisp/dirtrack.el @@ -122,13 +122,11 @@ (defcustom dirtrack-list (list "^emacs \\([a-zA-Z]:.*\\)>" 1) "List for directory tracking. First item is a regexp that describes where to find the path in a prompt. -Second is a number, the regexp group to match. Optional third item is -whether the prompt is multi-line. If nil or omitted, prompt is assumed to -be on a single line." +Second is a number, the regexp group to match." :group 'dirtrack :type '(sexp (regexp :tag "Prompt Expression") - (integer :tag "Regexp Group") - (boolean :tag "Multiline Prompt"))) + (integer :tag "Regexp Group")) + :version "24.1") (make-variable-buffer-local 'dirtrack-list) @@ -188,11 +186,13 @@ With a prefix argument ARG, enable Dirtrack mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. -This method requires that your shell prompt contain the full -current working directory at all times, and that `dirtrack-list' -is set to match the prompt. This is an alternative to -`shell-dirtrack-mode', which works differently, by tracking `cd' -and similar commands which change the shell working directory." +This method requires that your shell prompt contain the current +working directory at all times, and that you set the variable +`dirtrack-list' to match the prompt. + +This is an alternative to `shell-dirtrack-mode', which works by +tracking `cd' and similar commands which change the shell working +directory." nil nil nil (if dirtrack-mode (add-hook 'comint-preoutput-filter-functions 'dirtrack nil t) @@ -213,63 +213,67 @@ and similar commands which change the shell working directory." (define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1") -(defun dirtrack-debug-message (string) - "Insert string at the end of `dirtrack-debug-buffer'." +(defun dirtrack-debug-message (msg1 msg2) + "Insert strings at the end of `dirtrack-debug-buffer'." (when dirtrack-debug-mode (with-current-buffer (get-buffer-create dirtrack-debug-buffer) (goto-char (point-max)) - (insert (concat string "\n"))))) + (insert msg1 msg2 "\n")))) ;;;###autoload (defun dirtrack (input) - "Determine the current directory by scanning the process output for a prompt. -The prompt to look for is the first item in `dirtrack-list'. - -You can toggle directory tracking by using the function `dirtrack-mode'. - -If directory tracking does not seem to be working, you can use the -function `dirtrack-debug-mode' to turn on debugging output." - (unless (or (null dirtrack-mode) - (eq (point) (point-min))) ; no output? - (let (prompt-path orig-prompt-path - (current-dir default-directory) - (dirtrack-regexp (nth 0 dirtrack-list)) - (match-num (nth 1 dirtrack-list))) - ;; Currently unimplemented, it seems. --Stef - ;; (multi-line (nth 2 dirtrack-list))) - (save-excursion - ;; No match - (if (not (string-match dirtrack-regexp input)) - (dirtrack-debug-message - (format "Input `%s' failed to match `dirtrack-list'" input)) - (setq prompt-path (match-string match-num input)) - ;; Empty string - (if (not (> (length prompt-path) 0)) - (dirtrack-debug-message "Match is empty string") - ;; Transform prompts into canonical forms - (setq orig-prompt-path (funcall dirtrack-directory-function - prompt-path) - prompt-path (shell-prefixed-directory-name orig-prompt-path) - current-dir (funcall dirtrack-canonicalize-function - current-dir)) - (dirtrack-debug-message - (format "Prompt is %s\nCurrent directory is %s" - prompt-path current-dir)) - ;; Compare them - (if (or (string= current-dir prompt-path) - (string= current-dir (abbreviate-file-name prompt-path))) - (dirtrack-debug-message (format "Not changing directory")) - ;; It's possible that Emacs will think the directory - ;; won't exist (eg, rlogin buffers) - (if (file-accessible-directory-p prompt-path) - ;; Change directory. shell-process-cd adds the prefix, so we - ;; need to give it the original (un-prefixed) path. - (and (shell-process-cd orig-prompt-path) - (run-hooks 'dirtrack-directory-change-hook) - (dirtrack-debug-message - (format "Changing directory to %s" prompt-path))) - (warn "Directory %s does not exist" prompt-path))) - ))))) + "Determine the current directory from the process output for a prompt. +This filter function is used by `dirtrack-mode'. It looks for +the prompt specified by `dirtrack-list', and calls +`shell-process-cd' if the directory seems to have changed away +from `default-directory'." + (when (and dirtrack-mode + (not (eq (point) (point-min)))) ; there must be output + (save-excursion ; What's this for? -- cyd + (if (not (string-match (nth 0 dirtrack-list) input)) + ;; No match + (dirtrack-debug-message + "Input failed to match `dirtrack-list': " input) + (let ((prompt-path (match-string (nth 1 dirtrack-list) input)) + temp) + (cond + ;; Don't do anything for empty string + ((string-equal prompt-path "") + (dirtrack-debug-message "Prompt match gives empty string: " input)) + ;; If the prompt contains an absolute file name, call + ;; `shell-process-cd' if the directory has changed. + ((file-name-absolute-p prompt-path) + ;; Transform prompts into canonical forms + (let ((orig-prompt-path (funcall dirtrack-directory-function + prompt-path)) + (current-dir (funcall dirtrack-canonicalize-function + default-directory))) + (setq prompt-path (shell-prefixed-directory-name orig-prompt-path)) + ;; Compare them + (if (or (string-equal current-dir prompt-path) + (string-equal (expand-file-name current-dir) + (expand-file-name prompt-path))) + (dirtrack-debug-message "Not changing directory: " current-dir) + ;; It's possible that Emacs thinks the directory + ;; doesn't exist (e.g. rlogin buffers) + (if (file-accessible-directory-p prompt-path) + ;; `shell-process-cd' adds the prefix, so we need + ;; to give it the original (un-prefixed) path. + (progn + (shell-process-cd orig-prompt-path) + (run-hooks 'dirtrack-directory-change-hook) + (dirtrack-debug-message "Changing directory to " + prompt-path)) + (dirtrack-debug-message "Not changing to non-existent directory: " + prompt-path))))) + ;; If the file name is non-absolute, try and see if it + ;; seems to be up or down from where we were. + ((string-match "\\`\\(.*\\)\\(?:/.*\\)?\n\\(.*/\\)\\1\\(?:/.*\\)?\\'" + (setq temp + (concat prompt-path "\n" default-directory))) + (shell-process-cd (concat (match-string 2 temp) + prompt-path)) + (run-hooks 'dirtrack-directory-change-hook))))))) input) (provide 'dirtrack) diff --git a/lisp/shell.el b/lisp/shell.el index fdfc8b3cf19..7da1add8e9a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -372,18 +372,6 @@ Thus, this does not include the shell's current directory.") ;;; Basic Procedures -(defcustom shell-dir-cookie-re nil - "Regexp matching your prompt, including some part of the current directory. -If your prompt includes the current directory or the last few elements of it, -set this to a pattern that matches your prompt and whose subgroup 1 matches -the directory part of it. -This is used by `shell-dir-cookie-watcher' to try and use this info -to track your current directory. It can be used instead of or in addition -to `dirtrack-mode'." - :group 'shell - :type '(choice (const nil) regexp) - :version "24.1") - (defun shell-parse-pcomplete-arguments () "Parse whitespace separated arguments in the current region." (let ((begin (save-excursion (shell-backward-command 1) (point))) @@ -546,10 +534,6 @@ buffer." (when (string-equal shell "bash") (add-hook 'comint-preoutput-filter-functions 'shell-filter-ctrl-a-ctrl-b nil t))) - (when shell-dir-cookie-re - ;; Watch for magic cookies in the output to track the current dir. - (add-hook 'comint-output-filter-functions - 'shell-dir-cookie-watcher nil t)) (comint-read-input-ring t))) (defun shell-filter-ctrl-a-ctrl-b (string) @@ -710,20 +694,6 @@ Otherwise, one argument `-i' is passed to the shell. ;; replace it with a process filter that watches for and strips out ;; these messages. -(defun shell-dir-cookie-watcher (text) - ;; This is fragile: the TEXT could be split into several chunks and we'd - ;; miss it. Oh well. It's a best effort anyway. I'd expect that it's - ;; rather unusual to have the prompt split into several packets, but - ;; I'm sure Murphy will prove me wrong. - (when (and shell-dir-cookie-re (string-match shell-dir-cookie-re text)) - (let ((dir (match-string 1 text))) - (cond - ((file-name-absolute-p dir) (shell-cd dir)) - ;; Let's try and see if it seems to be up or down from where we were. - ((string-match "\\`\\(.*\\)\\(?:/.*\\)?\n\\(.*/\\)\\1\\(?:/.*\\)?\\'" - (setq text (concat dir "\n" default-directory))) - (shell-cd (concat (match-string 2 text) dir))))))) - (defun shell-directory-tracker (str) "Tracks cd, pushd and popd commands issued to the shell. This function is called on each input passed to the shell. -- cgit v1.2.1 From 30710442b4725af9f45e9a9b6013f4a3f4e4706b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 2 Jan 2012 18:18:48 -0500 Subject: Handle battery capacity on Lemote Yeeloong. --- lisp/ChangeLog | 8 +++++ lisp/battery.el | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 99 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5c10373546..459eea2a3ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-01-02 Richard Stallman + + * battery.el (battery-status-function): + Detect when to use battery-yeeloong-sysfs. + (battery-echo-area-format): Add string for Yeeloong. + (battery-linux-proc-apm, battery-linux-proc-acpi): Doc fixes. + (battery-yeeloong-sysfs): New function. + 2012-01-02 Chong Yidong * dirtrack.el (dirtrack-list): Eliminate unused third element. diff --git a/lisp/battery.el b/lisp/battery.el index bb899f2beae..396423d9dea 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -50,6 +50,10 @@ (file-directory-p "/sys/class/power_supply/") (directory-files "/sys/class/power_supply/" nil "BAT[0-9]$")) 'battery-linux-sysfs) + ((and (eq system-type 'gnu/linux) + (file-directory-p "/sys/class/power_supply/yeeloong-bat/") + (directory-files "/sys/class/power_supply/yeeloong-bat/" nil "charge_")) + 'battery-yeeloong-sysfs) ((and (eq system-type 'darwin) (condition-case nil (with-temp-buffer @@ -77,6 +81,8 @@ introduced by a `%' character in a control string." "Power %L, battery %B (%p%% load)") ((eq battery-status-function 'battery-pmset) "%L power, battery %B (%p%% load, remaining time %t)") + ((eq battery-status-function 'battery-yeeloong-sysfs) + "%L power, battery %B (%p%% load, remaining time %t)") (battery-status-function "Power %L, battery %B (%p%% load, remaining time %t)")) "Control string formatting the string to display in the echo area. @@ -226,7 +232,7 @@ seconds." "Regular expression matching contents of `/proc/apm'.") (defun battery-linux-proc-apm () - "Get APM status information from Linux kernel. + "Get APM status information from Linux (the kernel). This function works only with the new `/proc/apm' format introduced in Linux version 1.3.58. @@ -297,7 +303,7 @@ The following %-sequences are provided: ;;; `/proc/acpi/' interface for Linux. (defun battery-linux-proc-acpi () - "Get ACPI status information from Linux kernel. + "Get ACPI status information from Linux (the kernel). This function works only with the `/proc/acpi/' format introduced in Linux version 2.4.20 and 2.6.0. @@ -518,7 +524,90 @@ The following %-sequences are provided: "BAT") "N/A"))))) +(defun battery-yeeloong-sysfs () + "Get ACPI status information from Linux (the kernel). +This function works only on the Lemote Yeeloong. + +The following %-sequences are provided: +%c Current capacity (mAh) +%r Current rate +%B Battery status (verbose) +%b Battery status, empty means high, `-' means low, + `!' means critical, and `+' means charging +%L AC line status (verbose) +%p Battery load percentage +%m Remaining time (to charge or discharge) in minutes +%h Remaining time (to charge or discharge) in hours +%t Remaining time (to charge or discharge) in the form `h:min'" + + (let (capacity + capacity-level + status + ac-online + hours + current-now + charge-full + charge-now) + (with-temp-buffer + (ignore-errors + (insert-file-contents "/sys/class/power_supply/yeeloong-bat/uevent") + (goto-char 1) + (search-forward "POWER_SUPPLY_CHARGE_NOW=") + (setq charge-now (read (current-buffer))) + (goto-char 1) + (search-forward "POWER_SUPPLY_CHARGE_FULL=") + (setq charge-full (read (current-buffer))) + (goto-char 1) + (search-forward "POWER_SUPPLY_CURRENT_NOW=") + (setq current-now (read (current-buffer))) + (goto-char 1) + (search-forward "POWER_SUPPLY_CAPACITY_LEVEL=") + (setq capacity-level (buffer-substring (point) (line-end-position))) + (goto-char 1) + (search-forward "POWER_SUPPLY_STATUS=") + (setq status (buffer-substring (point) (line-end-position)))) + + (erase-buffer) + (ignore-errors + (insert-file-contents + "/sys/class/power_supply/yeeloong-ac/online") + (goto-char 1) + (setq ac-online (read (current-buffer))) + (erase-buffer))) + + + (setq capacity (round (/ (* charge-now 100.0) charge-full))) + (when (and current-now (not (= current-now 0))) + (if (< current-now 0) + ;; Charging + (setq hours (/ (- charge-now charge-full) (+ 0.0 current-now))) + ;; Discharging + (setq hours (/ charge-now (+ 0.0 current-now))))) + + (list (cons ?c (if charge-now + (number-to-string charge-now) + "N/A")) + (cons ?r current-now) + (cons ?B (cond ((equal capacity-level "Full") "full") + ((equal status "Charging") "charging") + ((equal capacity-level "Low") "low") + ((equal capacity-level "Critical") "critical") + (t "high"))) + (cons ?b (cond ((equal capacity-level "Full") " ") + ((equal status "Charging") "+") + ((equal capacity-level "Low") "-") + ((equal capacity-level "Critical") "!") + (t " "))) + (cons ?h (if hours (number-to-string hours) "N/A")) + (cons ?m (if hours (number-to-string (* 60 hours)) "N/A")) + (cons ?t (if hours + (format "%d:%d" + (/ (round (* 60 hours)) 60) + (% (round (* 60 hours)) 60)) + "N/A")) + (cons ?p (if capacity (number-to-string capacity) "N/A")) + (cons ?L (if (eq ac-online 1) "AC" "BAT"))))) ;;; `pmset' interface for Darwin (OS X). -- cgit v1.2.1 From b81d40f0fe43db0c6a4d71e1aaea6b2c65b27395 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 3 Jan 2012 03:14:40 +0100 Subject: Fix typos. --- lisp/ChangeLog | 32 ++++++++++++++++---------------- src/ChangeLog | 12 ++++++------ src/lread.c | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 459eea2a3ec..055d929fc51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -65,8 +65,8 @@ (gdb-var-delete-children, gdb-edit-value, gdb-var-update) (gdb-stopped, def-gdb-auto-update-trigger) (gdb-place-breakpoints, gdb-select-thread, gdb-select-frame) - (gdb-get-changed-registers, gdb-get-main-selected-frame): Callers - changed. + (gdb-get-changed-registers, gdb-get-main-selected-frame): + Callers changed. (gud-gdbmi-completions): New function. (gdb): Use it for generating the completion table. @@ -76,22 +76,22 @@ locking. Use this to protect declarations from losing their contexts. - * progmodes/cc-langs.el (c-before-font-lock-functions): replace + * progmodes/cc-langs.el (c-before-font-lock-functions): Replace c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming). - (c-before-context-fontification-functions): new defvar, a list of + (c-before-context-fontification-functions): New defvar, a list of functions to be run just before context (etc.) font locking. * progmodes/cc-mode.el (c-extend-font-lock-region-for-macros): - new, functionality extracted from + New, functionality extracted from c-neutralize-syntax-in-and-mark-CPP. - (c-in-after-change-fontification): new variable. + (c-in-after-change-fontification): New variable. (c-after-change): Set c-in-after-change-fontification. (c-set-fl-decl-start): Rejig its interface, so it can be called from both after-change and context fontifying. - (c-change-set-fl-decl-start, c-context-set-fl-decl-start): new - functions. - (c-standard-font-lock-fontify-region-function): new variable. - (c-font-lock-fontify-region): new function. + (c-change-set-fl-decl-start, c-context-set-fl-decl-start): + New functions. + (c-standard-font-lock-fontify-region-function): New variable. + (c-font-lock-fontify-region): New function. 2011-12-24 Juri Linkov @@ -107,17 +107,17 @@ Fix unstable fontification inside templates. - * progmodes/cc-langs.el (c-before-font-lock-functions): newly - created from the singular version. The (c c++ objc) entry now + * progmodes/cc-langs.el (c-before-font-lock-functions): + Newly created from the singular version. The (c c++ objc) entry now additionally has c-set-fl-decl-start. The other languages (apart from AWK) have that as a single entry. - * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): The - functionality for "local" declarations has been extracted to + * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): + The functionality for "local" declarations has been extracted to c-set-fl-decl-start. - * progmodes/cc-mode.el: (c-common-init, c-after-change): Changes - due to pluralisation of c-before-font-lock-functions. + * progmodes/cc-mode.el (c-common-init, c-after-change): + Changes due to pluralisation of c-before-font-lock-functions. (c-set-fl-decl-start): New function, extracted from c-font-lock-enclosing-decls and enhanced. diff --git a/src/ChangeLog b/src/ChangeLog index 829895d1b72..31d6ecaca43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -41,8 +41,8 @@ 2011-12-21 Jan Djärv - * nsterm.m (x_free_frame_resources): Release - f->output_data.ns->miniimage + * nsterm.m (x_free_frame_resources): + Release f->output_data.ns->miniimage. (ns_index_color): Fix indentation. Do not retain color_table->colors[i]. @@ -94,10 +94,10 @@ Fns_store_cut_buffer_internal. (ns_get_foreign_selection, Fx_own_selection_internal) (Fx_disown_selection_internal, Fx_selection_exists_p) - (Fns_get_selection_internal, Fns_store_selection_internal): Use - ns_symbol_to_pb and check if return value is nil. - (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove - defsubr Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal + (Fns_get_selection_internal, Fns_store_selection_internal): + Use ns_symbol_to_pb and check if return value is nil. + (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr + Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal renamed to Sns_store_selection_internal. (ns_handle_selection_request): Move code to Fx_own_selection_internal diff --git a/src/lread.c b/src/lread.c index 7c0b0475786..8e6b6f65e25 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3113,7 +3113,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) if (uninterned_symbol && ! NILP (Vpurify_flag)) name = make_pure_string (read_buffer, nchars, nbytes, multibyte); else - name = make_specified_string (read_buffer, nchars, nbytes,multibyte); + name = make_specified_string (read_buffer, nchars, nbytes, multibyte); result = (uninterned_symbol ? Fmake_symbol (name) : Fintern (name, Qnil)); -- cgit v1.2.1 From 787cdb34ea494f0a800cd6c3f8af2fbfd69b7c29 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 3 Jan 2012 14:31:08 +0800 Subject: Fix shell completion regression. * lisp/shell.el (shell-dynamic-complete-functions): Put pcomplete-completions-at-point, so as to try comint-filename-completion first (Bug#10417). --- lisp/ChangeLog | 6 ++++++ lisp/shell.el | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 055d929fc51..8679b2c4f59 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-01-03 Chong Yidong + + * shell.el (shell-dynamic-complete-functions): Put + pcomplete-completions-at-point, so as to try + comint-filename-completion first (Bug#10417). + 2012-01-02 Richard Stallman * battery.el (battery-status-function): diff --git a/lisp/shell.el b/lisp/shell.el index 7da1add8e9a..4e570c6326a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -187,10 +187,11 @@ This is a fine thing to set in your `.emacs' file.") shell-environment-variable-completion shell-command-completion shell-c-a-p-replace-by-expanded-directory - pcomplete-completions-at-point shell-filename-completion - ;; Not sure when this one would still be useful. --Stef - comint-filename-completion) + comint-filename-completion + ;; This goes last, so that `comint-filename-completion' can handle + ;; `shell-completion-execonly' (Bug#10417). + pcomplete-completions-at-point) "List of functions called to perform completion. This variable is used to initialize `comint-dynamic-complete-functions' in the shell buffer. -- cgit v1.2.1 From 88c5c7c8313162b94173fd4333e6062aa07c4d2e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 3 Jan 2012 16:55:00 +0800 Subject: More updates to misc.texi. * doc/emacs/misc.texi (Single Shell): Don't document Lisp usage of shell-command. Tidy up discussion of synchronicity. Add index entries for async-shell-command. (Interactive Shell): Note that M-x shell uses shell-file-name. Note change in behavior in Emacs 24. (Shell Mode): Shell mode now uses completion-at-point. (Shell Prompts): Emphasize that comint-use-prompt-regexp isn't the default method for recognizing prompts nowadays. (Shell Ring): Add xref to Minibuffer History. (Directory Tracking): Explain Dirtrack mode in more detail. (Term Mode): Fix index entries. (Paging in Term): Merge into Term Mode. (Serial Terminal, Emacs Server, emacsclient Options): Copyedits. (Printing): Fix xref. State default of lpr-switches. (PostScript): Remove obsolete sentence. Omit description of non-interactive behaviors. (Hyperlinking): Improve description. (Browse-URL): Using compose-mail for mailto URLs is the default. Document browse-url-mailto-function. (Goto Address mode): Add index entries. Add xref to Browse-URL. (FFAP): FFAP is not a minor mode. (Amusements): M-x lm was renamed to M-x landmark. Document nato-region. --- admin/FOR-RELEASE | 2 +- doc/emacs/ChangeLog | 26 ++ doc/emacs/emacs.texi | 1 - doc/emacs/misc.texi | 840 +++++++++++++++++++++++---------------------------- etc/NEWS | 9 +- 5 files changed, 404 insertions(+), 474 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 114ace6065a..91576dd4c8a 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -156,7 +156,7 @@ macos.texi maintaining.texi cyd mark.texi cyd mini.texi -misc.texi +misc.texi cyd modes.texi cyd msdog.texi msdog-xtra.texi diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 30ba8779e72..c99c64eea68 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,29 @@ +2012-01-03 Chong Yidong + + * misc.texi (Single Shell): Don't document Lisp usage of + shell-command. Tidy up discussion of synchronicity. Add index + entries for async-shell-command. + (Interactive Shell): Note that M-x shell uses shell-file-name. + Note change in behavior in Emacs 24. + (Shell Mode): Shell mode now uses completion-at-point. + (Shell Prompts): Emphasize that comint-use-prompt-regexp isn't the + default method for recognizing prompts nowadays. + (Shell Ring): Add xref to Minibuffer History. + (Directory Tracking): Explain Dirtrack mode in more detail. + (Term Mode): Fix index entries. + (Paging in Term): Merge into Term Mode. + (Serial Terminal, Emacs Server, emacsclient Options): Copyedits. + (Printing): Fix xref. State default of lpr-switches. + (PostScript): Remove obsolete sentence. Omit description of + non-interactive behaviors. + (Hyperlinking): Improve description. + (Browse-URL): Using compose-mail for mailto URLs is the default. + Document browse-url-mailto-function. + (Goto Address mode): Add index entries. Add xref to Browse-URL. + (FFAP): FFAP is not a minor mode. + (Amusements): M-x lm was renamed to M-x landmark. Document + nato-region. + 2012-01-01 Chong Yidong * misc.texi (Gnus, Buffers of Gnus): Copyedits. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 9db0bd4616e..7a1e71b0fd2 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -988,7 +988,6 @@ Running Shell Commands from Emacs * Shell Options:: Options for customizing Shell mode. * Terminal emulator:: An Emacs window as a terminal emulator. * Term Mode:: Special Emacs commands used in Term mode. -* Paging in Term:: Paging in the terminal emulator. * Remote Host:: Connecting to another computer. * Serial Terminal:: Connecting to a serial port. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 3d86241a497..9e7c1dbfc94 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -447,27 +447,32 @@ emulator window. @table @kbd @item M-! @var{cmd} @key{RET} -Run the shell command line @var{cmd} and display the output +Run the shell command @var{cmd} and display the output (@code{shell-command}). @item M-| @var{cmd} @key{RET} -Run the shell command line @var{cmd} with region contents as input; +Run the shell command @var{cmd} with region contents as input; optionally replace the region with the output (@code{shell-command-on-region}). @item M-& @var{cmd} @key{RET} -Run the shell command line @var{cmd} asynchronously, and display the -output (@code{async-shell-command}). +Run the shell command @var{cmd} asynchronously, and display the output +(@code{async-shell-command}). @item M-x shell -Run a subshell with input and output through an Emacs buffer. -You can then give commands interactively. +Run a subshell with input and output through an Emacs buffer. You can +then give commands interactively. @item M-x term -Run a subshell with input and output through an Emacs buffer. -You can then give commands interactively. -Full terminal emulation is available. +Run a subshell with input and output through an Emacs buffer. You can +then give commands interactively. Full terminal emulation is +available. @end table @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It -is documented in a separate manual. @xref{Top,Eshell,Eshell, eshell, -Eshell: The Emacs Shell}. +is documented in its own manual. +@ifnottex +@xref{Top,Eshell,Eshell, eshell, Eshell: The Emacs Shell}. +@end ifnottex +@iftex +See the Eshell Info manual, which is distributed with Emacs. +@end iftex @menu * Single Shell:: How to run one shell command and return. @@ -479,7 +484,6 @@ Eshell: The Emacs Shell}. * Options: Shell Options. Options for customizing Shell mode. * Terminal emulator:: An Emacs window as a terminal emulator. * Term Mode:: Special Emacs commands used in Term mode. -* Paging in Term:: Paging in the terminal emulator. * Remote Host:: Connecting to another computer. * Serial Terminal:: Connecting to a serial port. @end menu @@ -490,53 +494,62 @@ Eshell: The Emacs Shell}. @kindex M-! @findex shell-command @kbd{M-!} (@code{shell-command}) reads a line of text using the -minibuffer and executes it as a shell command in a subshell made just +minibuffer and executes it as a shell command, in a subshell made just for that command. Standard input for the command comes from the null device. If the shell command produces any output, the output appears either in the echo area (if it is short), or in an Emacs buffer named -@samp{*Shell Command Output*}, which is displayed in another window -but not selected (if the output is long). - - For instance, one way to decompress a file @file{foo.gz} from Emacs -is to type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command -normally creates the file @file{foo} and produces no terminal output. - - A numeric argument, as in @kbd{M-1 M-!}, says to insert terminal -output into the current buffer instead of a separate buffer. It puts -point before the output, and sets the mark after the output. For -instance, @kbd{M-1 M-! gunzip < foo.gz @key{RET}} would insert the -uncompressed equivalent of @file{foo.gz} into the current buffer. - - If the shell command line ends in @samp{&}, it runs asynchronously. -For a synchronous shell command, @code{shell-command} returns the -command's exit status (0 means success), when it is called from a Lisp -program. You do not get any status information for an asynchronous -command, since it hasn't finished yet when @code{shell-command} returns. - - You can also type @kbd{M-&} (@code{async-shell-command}) to execute -a shell command asynchronously. This behaves exactly like calling -@code{shell-command} with @samp{&}, except that you do not need to add -the @samp{&} to the shell command line. +@samp{*Shell Command Output*}, displayed in another window (if the +output is long). + + For instance, one way to decompress a file named @file{foo.gz} is to +type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally +creates the file @file{foo} and produces no terminal output. + + A numeric argument to @code{shell-command}, e.g.@: @kbd{M-1 M-!}, +causes it to insert terminal output into the current buffer instead of +a separate buffer. It puts point before the output, and sets the mark +after the output. For instance, @kbd{M-1 M-! gunzip < foo.gz +@key{RET}} would insert the uncompressed form of the file +@file{foo.gz} into the current buffer. + + Provided the specified shell command does not end with @samp{&}, it +runs @dfn{synchronously}, and you must wait for it to exit before +continuing to use Emacs. To stop waiting, type @kbd{C-g} to quit; +this sends a @code{SIGINT} signal to terminate the shell command (this +is the same signal that @kbd{C-c} normally generates in the shell). +Emacs then waits until the command actually terminates. If the shell +command doesn't stop (because it ignores the @code{SIGINT} signal), +type @kbd{C-g} again; this sends the command a @code{SIGKILL} signal, +which is impossible to ignore. + +@kindex M-& +@findex async-shell-command + A shell command that ends in @samp{&} is executed +@dfn{asynchronously}, and you can continue to use Emacs as it runs. +You can also type @kbd{M-&} (@code{async-shell-command}) to execute a +shell command asynchronously; this is exactly like calling @kbd{M-!} +with a trailing @samp{&}, except that you do not need the @samp{&}. +The output buffer for asynchronous shell commands is named +@samp{*Async Shell Command*}. Emacs inserts the output into this +buffer as it comes in, whether or not the buffer is visible in a +window. @kindex M-| @findex shell-command-on-region - @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but + @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but passes the contents of the region as the standard input to the shell -command, instead of no input. With a numeric argument, meaning insert -the output in the current buffer, it deletes the old region and the -output replaces it as the contents of the region. It returns the -command's exit status, like @kbd{M-!}. - - One use for @kbd{M-|} is to run @code{gpg} to see what keys are in -the buffer. For instance, if the buffer contains a GPG key, type -@kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents to -the @code{gpg} program. That program will ignore everything except -the encoded keys, and will output a list of the keys the buffer -contains. +command, instead of no input. With a numeric argument, it deletes the +old region and replaces it with the output from the shell command. + + For example, you can use @kbd{M-|} with the @command{gpg} program to +see what keys are in the buffer. If the buffer contains a GnuPG key, +type @kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents +to @command{gpg}. This will output the list of keys to the +@samp{*Shell Command Output*} buffer. @vindex shell-file-name - Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify -the shell to use. This variable is initialized based on your + The above commands use the shell specified by the variable +@code{shell-file-name}. Its default value is determined by the @env{SHELL} environment variable when Emacs is started. If the file name is relative, Emacs searches the directories in the list @code{exec-path}; this list is initialized based on the environment @@ -544,81 +557,65 @@ variable @env{PATH} when Emacs is started. Your init file can override either or both of these default initializations (@pxref{Init File}). - Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, -unless you end the command with @samp{&} to make it asynchronous. To -stop waiting, type @kbd{C-g} to quit; that terminates the shell -command with the signal @code{SIGINT}---the same signal that @kbd{C-c} -normally generates in the shell. Emacs then waits until the command -actually terminates. If the shell command doesn't stop (because it -ignores the @code{SIGINT} signal), type @kbd{C-g} again; this sends -the command a @code{SIGKILL} signal which is impossible to ignore. - - Asynchronous commands ending in @samp{&} feed their output into -the buffer @samp{*Async Shell Command*}. Output arrives in that -buffer regardless of whether it is visible in a window. - To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command @kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}. @vindex shell-command-default-error-buffer - Error output from these commands is normally intermixed with the -regular output. But if the variable -@code{shell-command-default-error-buffer} has a string as value, and -it's the name of a buffer, @kbd{M-!} and @kbd{M-|} insert error output -before point in that buffer. + By default, error output is intermixed with the regular output in +the output buffer. But if you change the value of the variable +@code{shell-command-default-error-buffer} to a string, error output is +inserted into a buffer of that name. @node Interactive Shell -@subsection Interactive Inferior Shell +@subsection Interactive Subshell @findex shell - To run a subshell interactively, use @kbd{M-x shell}. This creates -(or reuses) a buffer named @samp{*shell*} and runs a subshell with -input coming from and output going to that buffer. That is to say, -any ``terminal output'' from the subshell goes into the buffer, -advancing point, and any ``terminal input'' for the subshell comes -from text in the buffer. To give input to the subshell, go to the end -of the buffer and type the input, terminated by @key{RET}. - - Emacs does not wait for the subshell to do anything. You can switch -windows or buffers and edit them while the shell is waiting, or while it is -running a command. Output from the subshell waits until Emacs has time to -process it; this happens whenever Emacs is waiting for keyboard input or -for time to elapse. + To run a subshell interactively, type @kbd{M-x shell}. This creates +(or reuses) a buffer named @samp{*shell*}, and runs a shell subprocess +with input coming from and output going to that buffer. That is to +say, any terminal output from the subshell goes into the buffer, +advancing point, and any terminal input for the subshell comes from +text in the buffer. To give input to the subshell, go to the end of +the buffer and type the input, terminated by @key{RET}. + + While the subshell is waiting or running a command, you can switch +windows or buffers and perform other editing in Emacs. Emacs inserts +the output from the subshell into the Shell buffer whenever it has +time to process it (e.g.@: while waiting for keyboard input). @cindex @code{comint-highlight-input} face @cindex @code{comint-highlight-prompt} face - Input lines, once you submit them, are displayed using the face -@code{comint-highlight-input}, and prompts are displayed using the -face @code{comint-highlight-prompt}. This makes it easier to see -previous input lines in the buffer. @xref{Faces}. - - To make multiple subshells, you can invoke @kbd{M-x shell} with a -prefix argument (e.g. @kbd{C-u M-x shell}), which will read a buffer -name and create (or reuse) a subshell in that buffer. You can also -rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, then -create a new @samp{*shell*} buffer using plain @kbd{M-x shell}. + In the Shell buffer, prompts are displayed with the face +@code{comint-highlight-prompt}, and submitted input lines are +displayed with the face @code{comint-highlight-input}. This makes it +easier to distinguish input lines from the shell output. +@xref{Faces}. + + To make multiple subshells, invoke @kbd{M-x shell} with a prefix +argument (e.g. @kbd{C-u M-x shell}). Then the command will read a +buffer name, and create (or reuse) a subshell in that buffer. You can +also rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, +then create a new @samp{*shell*} buffer using plain @kbd{M-x shell}. Subshells in different buffers run independently and in parallel. @vindex explicit-shell-file-name @cindex environment variables for subshells @cindex @env{ESHELL} environment variable @cindex @env{SHELL} environment variable - The file name used to load the subshell is the value of the variable -@code{explicit-shell-file-name}, if that is non-@code{nil}. -Otherwise, the environment variable @env{ESHELL} is used, or the -environment variable @env{SHELL} if there is no @env{ESHELL}. If the -file name specified is relative, the directories in the list -@code{exec-path} are searched; this list is initialized based on the -environment variable @env{PATH} when Emacs is started. Your init file -can override either or both of these default initializations. -(@pxref{Init File}). + To specify the shell file name used by @kbd{M-x shell}, customize +the variable @code{explicit-shell-file-name}. If this is @code{nil} +(the default), Emacs uses the environment variable @env{ESHELL} if it +exists. Otherwise, it usually uses the variable +@code{shell-file-name} (@pxref{Single Shell}); but if the default +directory is remote (@pxref{Remote Files}), it prompts you for the +shell file name. Emacs sends the new shell the contents of the file @file{~/.emacs_@var{shellname}} as input, if it exists, where @var{shellname} is the name of the file that the shell was loaded from. For example, if you use bash, the file sent to it is -@file{~/.emacs_bash}. If this file is not found, Emacs tries to fallback -on @file{~/.emacs.d/init_@var{shellname}.sh}. +@file{~/.emacs_bash}. If this file is not found, Emacs tries with +@file{~/.emacs.d/init_@var{shellname}.sh}. To specify a coding system for the shell, you can use the command @kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can @@ -627,44 +624,46 @@ also change the coding system for a running subshell by typing Coding}. @cindex @env{INSIDE_EMACS} environment variable - Emacs sets the environment variable @env{INSIDE_EMACS} in the -subshell to a comma-separated list including the Emacs version. -Programs can check this variable to determine whether they are running -inside an Emacs subshell. - @cindex @env{EMACS} environment variable - Emacs also sets the @env{EMACS} environment variable (to @code{t}) if -it is not already defined. @strong{Warning:} This environment -variable is deprecated. Programs that check this variable should be -changed to check @env{INSIDE_EMACS} instead. + Emacs sets the environment variable @env{INSIDE_EMACS} in the +subshell to @samp{@var{version},comint}, where @var{version} is the +Emacs version (e.g.@: @samp{24.1}). Programs can check this variable +to determine whether they are running inside an Emacs subshell. (It +also sets the @env{EMACS} environment variable to @code{t}, if that +environment variable is not already defined. However, this +environment variable is deprecated; programs that use it should switch +to using @env{INSIDE_EMACS} instead.) @node Shell Mode @subsection Shell Mode @cindex Shell mode @cindex mode, Shell - Shell buffers use Shell mode, which defines several special keys -attached to the @kbd{C-c} prefix. They are chosen to resemble the usual -editing and job control characters present in shells that are not under -Emacs, except that you must type @kbd{C-c} first. Here is a complete list -of the special key bindings of Shell mode: + The major mode for Shell buffers is Shell mode. Many of its special +commands are bound to the @kbd{C-c} prefix, and resemble the usual +editing and job control characters present in ordinary shells, except +that you must type @kbd{C-c} first. Here is a list of Shell mode +commands: @table @kbd @item @key{RET} @kindex RET @r{(Shell mode)} @findex comint-send-input -At end of buffer send line as input; otherwise, copy current line to -end of buffer and send it (@code{comint-send-input}). Copying a line -in this way omits any prompt at the beginning of the line (text output -by programs preceding your input). @xref{Shell Prompts}, for how -Shell mode recognizes prompts. +Send the current line as input to the subshell +(@code{comint-send-input}). Any shell prompt at the beginning of the +line is omitted (@pxref{Shell Prompts}). If point is at the end of +buffer, this is like submitting the command line in an ordinary +interactive shell. However, you can also invoke @key{RET} elsewhere +in the shell buffer to submit the current line as input. @item @key{TAB} @kindex TAB @r{(Shell mode)} -@findex comint-dynamic-complete -Complete the command name or file name before point in the shell buffer -(@code{comint-dynamic-complete}). @key{TAB} also completes history -references (@pxref{History References}) and environment variable names. +@findex completion-at-point +Complete the command name or file name before point in the shell +buffer (@code{completion-at-point}). This uses the usual Emacs +completion rules (@pxref{Completion}), with the completion +alternatives being file names, environment variable names, the shell +command history, and history references (@pxref{History References}). @vindex shell-completion-fignore @vindex comint-completion-fignore @@ -678,17 +677,16 @@ instead. @item M-? @kindex M-? @r{(Shell mode)} @findex comint-dynamic-list-filename@dots{} -Display temporarily a list of the possible completions of the file name -before point in the shell buffer -(@code{comint-dynamic-list-filename-completions}). +Display temporarily a list of the possible completions of the file +name before point (@code{comint-dynamic-list-filename-completions}). @item C-d @kindex C-d @r{(Shell mode)} @findex comint-delchar-or-maybe-eof Either delete a character or send @acronym{EOF} (@code{comint-delchar-or-maybe-eof}). Typed at the end of the shell -buffer, @kbd{C-d} sends @acronym{EOF} to the subshell. Typed at any other -position in the buffer, @kbd{C-d} deletes a character as usual. +buffer, this sends @acronym{EOF} to the subshell. Typed at any other +position in the buffer, this deletes a character as usual. @item C-c C-a @kindex C-c C-a @r{(Shell mode)} @@ -784,8 +782,8 @@ Move backward across one shell command, but not beyond the current line (@code{shell-backward-command}). @item M-x dirs -Ask the shell what its current directory is, so that Emacs can agree -with the shell. +Ask the shell for its working directory, and update the Shell buffer's +default directory. @xref{Directory Tracking}. @item M-x send-invisible @key{RET} @var{text} @key{RET} @findex send-invisible @@ -854,41 +852,38 @@ specializations of Shell mode. @node Shell Prompts @subsection Shell Prompts -@vindex shell-prompt-pattern -@vindex comint-prompt-regexp -@vindex comint-use-prompt-regexp @cindex prompt, shell A prompt is text output by a program to show that it is ready to accept new user input. Normally, Comint mode (and thus Shell mode) -considers the prompt to be any text output by a program at the -beginning of an input line. However, if the variable -@code{comint-use-prompt-regexp} is non-@code{nil}, then Comint mode -uses a regular expression to recognize prompts. In Shell mode, -@code{shell-prompt-pattern} specifies the regular expression. - - The value of @code{comint-use-prompt-regexp} also affects many -motion and paragraph commands. If the value is non-@code{nil}, the -general Emacs motion commands behave as they normally do in buffers -without special text properties. However, if the value is @code{nil}, -the default, then Comint mode divides the buffer into two types of -``fields'' (ranges of consecutive characters having the same -@code{field} text property): input and output. Prompts are part of -the output. Most Emacs motion commands do not cross field boundaries, -unless they move over multiple lines. For instance, when point is in -input on the same line as a prompt, @kbd{C-a} puts point at the -beginning of the input if @code{comint-use-prompt-regexp} is -@code{nil} and at the beginning of the line otherwise. - - In Shell mode, only shell prompts start new paragraphs. Thus, a -paragraph consists of a prompt and the input and output that follow -it. However, if @code{comint-use-prompt-regexp} is @code{nil}, the -default, most paragraph commands do not cross field boundaries. This -means that prompts, ranges of input, and ranges of non-prompt output -behave mostly like separate paragraphs; with this setting, numeric -arguments to most paragraph commands yield essentially undefined -behavior. For the purpose of finding paragraph boundaries, Shell mode -uses @code{shell-prompt-pattern}, regardless of -@code{comint-use-prompt-regexp}. +automatically figures out part of the buffer is a prompt, based on the +output of the subprocess. (Specifically, it assumes that any received +output line which doesn't end with a newline is a prompt.) + + Comint mode divides the buffer into two types of @dfn{fields}: input +fields (where user input is typed) and output fields (everywhere +else). Prompts are part of the output fields. Most Emacs motion +commands do not cross field boundaries, unless they move over multiple +lines. For instance, when point is in the input field on a shell +command line, @kbd{C-a} puts point at the beginning of the input +field, after the prompt. Internally, the fields are implemented using +the @code{field} text property (@pxref{Text Properties,,, elisp, the +Emacs Lisp Reference Manual}). + +@vindex comint-use-prompt-regexp +@vindex shell-prompt-pattern + If you change the variable @code{comint-use-prompt-regexp} to a +non-@code{nil} value, then Comint mode recognize prompts using a +regular expression (@pxref{Regexps}). In Shell mode, the regular +expression is specified by the variable @code{shell-prompt-pattern}. +The default value of @code{comint-use-prompt-regexp} is @code{nil}, +because this method for recognizing prompts is unreliable, but you may +want to set it to a non-@code{nil} value in unusual circumstances. In +that case, Emacs does not divide the Comint buffer into fields, so the +general motion commands behave as they normally do in buffers without +special text properties. However, you can use the paragraph motion +commands to conveniently navigate the buffer (@pxref{Paragraphs}); in +Shell mode, Emacs uses @code{shell-prompt-pattern} as paragraph +boundaries. @node Shell History @subsection Shell Command History @@ -945,11 +940,12 @@ Display the buffer's history of shell commands in another window (@code{comint-dynamic-list-input-ring}). @end table - Shell buffers provide a history of previously entered shell commands. To -reuse shell commands from the history, use the editing commands @kbd{M-p}, -@kbd{M-n}, @kbd{M-r} and @kbd{M-s}. These work just like the minibuffer -history commands except that they operate on the text at the end of the -shell buffer, where you would normally insert text to send to the shell. + Shell buffers provide a history of previously entered shell +commands. To reuse shell commands from the history, use the editing +commands @kbd{M-p}, @kbd{M-n}, @kbd{M-r} and @kbd{M-s}. These work +just like the minibuffer history commands (@pxref{Minibuffer +History}), except that they operate within the Shell buffer rather +than the minibuffer. @kbd{M-p} fetches an earlier shell command to the end of the shell buffer. Successive use of @kbd{M-p} fetches successively earlier @@ -1076,39 +1072,40 @@ command @code{comint-magic-space}. @vindex shell-popd-regexp @vindex shell-cd-regexp Shell mode keeps track of @samp{cd}, @samp{pushd} and @samp{popd} -commands given to the inferior shell, so it can keep the -@samp{*shell*} buffer's default directory the same as the shell's -working directory. It recognizes these commands syntactically, by -examining lines of input that are sent. +commands given to the subshell, in order to keep the Shell buffer's +default directory (@pxref{File Names}) the same as the shell's working +directory. It recognizes these commands by examining lines of input +that you send. If you use aliases for these commands, you can tell Emacs to -recognize them also. For example, if the value of the variable -@code{shell-pushd-regexp} matches the beginning of a shell command -line, that line is regarded as a @code{pushd} command. Change this -variable when you add aliases for @samp{pushd}. Likewise, -@code{shell-popd-regexp} and @code{shell-cd-regexp} are used to -recognize commands with the meaning of @samp{popd} and @samp{cd}. -These commands are recognized only at the beginning of a shell command -line. - -@ignore @c This seems to have been deleted long ago. -@vindex shell-set-directory-error-hook - If Emacs gets an error while trying to handle what it believes is a -@samp{cd}, @samp{pushd} or @samp{popd} command, it runs the hook -@code{shell-set-directory-error-hook} (@pxref{Hooks}). -@end ignore +recognize them also, by setting the variables +@code{shell-pushd-regexp}, @code{shell-popd-regexp}, and +@code{shell-cd-regexp} to the appropriate regular expressions +(@pxref{Regexps}). For example, if @code{shell-pushd-regexp} matches +the beginning of a shell command line, that line is regarded as a +@code{pushd} command. These commands are recognized only at the +beginning of a shell command line. @findex dirs - If Emacs gets confused about changes in the current directory of the -subshell, use the command @kbd{M-x dirs} to ask the shell what its -current directory is. This command works for shells that support the -most common command syntax; it may not work for unusual shells. + If Emacs gets confused about changes in the working directory of the +subshell, type @kbd{M-x dirs}. This command asks the shell for its +working directory and updates the default directory accordingly. It +works for shells that support the most common command syntax, but may +not work for unusual shells. @findex dirtrack-mode - You can also use @kbd{M-x dirtrack-mode} to enable (or disable) an -alternative method of tracking changes in the current directory. This -method relies on your shell prompt containing the full current working -directory at all times. +@cindex Dirtrack mode +@cindex mode, Dirtrack +@vindex dirtrack-list + You can also use Dirtrack mode, a buffer-local minor mode that +implements an alternative method of tracking the shell's working +directory. To use this method, your shell prompt must contain the +working directory at all times, and you must supply a regular +expression for recognizing which part of the prompt contains the +working directory; see the documentation of the variable +@code{dirtrack-list} for details. To use Dirtrack mode, type @kbd{M-x +dirtrack-mode} in the Shell buffer, or add @code{dirtrack-mode} to +@code{shell-mode-hook} (@pxref{Hooks}). @node Shell Options @subsection Shell Mode Options @@ -1185,10 +1182,10 @@ subshell with input coming from your keyboard, and output going to that buffer. The terminal emulator uses Term mode, which has two input modes. In -line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. +line mode, Term basically acts like Shell mode (@pxref{Shell Mode}). - In char mode, each character is sent directly to the inferior -subshell, as ``terminal input.'' Any ``echoing'' of your input is the + In char mode, each character is sent directly to the subshell, as +``terminal input.'' Any ``echoing'' of your input is the responsibility of the subshell. The sole exception is the terminal escape character, which by default is @kbd{C-c} (@pxref{Term Mode}). Any ``terminal output'' from the subshell goes into the buffer, @@ -1204,8 +1201,8 @@ handles each one appropriately, changing the buffer so that the appearance of the window matches what it would be on a real terminal. You can actually run Emacs inside an Emacs Term window. - You can use Term mode to communicate with a device connected to a -serial port of your computer. @xref{Serial Terminal}. + You can also Term mode to communicate with a device connected to a +serial port. @xref{Serial Terminal}. The file name used to load the subshell is determined the same way as for Shell mode. To make multiple terminal emulators, rename the @@ -1223,22 +1220,24 @@ and later. @cindex mode, Term The terminal emulator uses Term mode, which has two input modes. In -line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. -In char mode, each character is sent directly to the inferior -subshell, except for the Term escape character, normally @kbd{C-c}. +line mode, Term basically acts like Shell mode (@pxref{Shell Mode}). +In char mode, each character is sent directly to the subshell, except +for the Term escape character, normally @kbd{C-c}. To switch between line and char mode, use these commands: @table @kbd @kindex C-c C-j @r{(Term mode)} -@findex term-char-mode +@findex term-line-mode @item C-c C-j -Switch to line mode. Do nothing if already in line mode. +Switch to line mode (@code{term-line-mode}). Do nothing if already in +line mode. @kindex C-c C-k @r{(Term mode)} -@findex term-line-mode +@findex term-char-mode @item C-c C-k -Switch to char mode. Do nothing if already in char mode. +Switch to char mode (@code{term-char-mode}). Do nothing if already in +char mode. @end table The following commands are only available in char mode: @@ -1253,28 +1252,23 @@ example, @kbd{C-c o} invokes the global binding of @kbd{C-x o}, which is normally @samp{other-window}. @end table -@node Paging in Term -@subsection Page-At-A-Time Output -@cindex page-at-a-time - - Term mode has a page-at-a-time feature. When enabled it makes -output pause at the end of each screenful. +@cindex paging in Term mode + Term mode has a page-at-a-time feature. When enabled, it makes +output pause at the end of each screenful: @table @kbd @kindex C-c C-q @r{(Term mode)} @findex term-pager-toggle @item C-c C-q Toggle the page-at-a-time feature. This command works in both line -and char modes. When page-at-a-time is enabled, the mode-line -displays the word @samp{page}. +and char modes. When the feature is enabled, the mode-line displays +the word @samp{page}, and each time Term receives more than a +screenful of output, it pauses and displays @samp{**MORE**} in the +mode-line. Type @key{SPC} to display the next screenful of output, or +@kbd{?} to see your other options. The interface is similar to the +@code{more} program. @end table - With page-at-a-time enabled, whenever Term receives more than a -screenful of output since your last input, it pauses, displaying -@samp{**MORE**} in the mode-line. Type @key{SPC} to display the next -screenful of output. Type @kbd{?} to see your other options. The -interface is similar to the @code{more} program. - @node Remote Host @subsection Remote Host Shell @cindex remote host @@ -1297,71 +1291,8 @@ happens automatically; there is no special password processing.) of terminal you're using, by setting the @env{TERM} environment variable in the environment for the remote login command. (If you use bash, you do that by writing the variable assignment before the remote -login command, without separating comma.) Terminal types @samp{ansi} -or @samp{vt100} will work on most systems. - -@c If you are talking to a Bourne-compatible -@c shell, and your system understands the @env{TERMCAP} variable, -@c you can use the command @kbd{M-x shell-send-termcap}, which -@c sends a string specifying the terminal type and size. -@c (This command is also useful after the window has changed size.) - -@c You can of course run @samp{gdb} on that remote computer. One useful -@c trick: If you invoke gdb with the @code{--fullname} option, -@c it will send special commands to Emacs that will cause Emacs to -@c pop up the source files you're debugging. This will work -@c whether or not gdb is running on a different computer than Emacs, -@c as long as Emacs can access the source files specified by gdb. - -@ignore - You cannot log in to a remote computer using the Shell mode. -@c (This will change when Shell is re-written to use Term.) -Instead, Emacs provides two commands for logging in to another computer -and communicating with it through an Emacs buffer using Comint mode: - -@table @kbd -@item M-x telnet @key{RET} @var{hostname} @key{RET} -Set up a Telnet connection to the computer named @var{hostname}. -@item M-x rlogin @key{RET} @var{hostname} @key{RET} -Set up an Rlogin connection to the computer named @var{hostname}. -@end table - -@findex telnet - Use @kbd{M-x telnet} to set up a Telnet connection to another -computer. (Telnet is the standard Internet protocol for remote login.) -It reads the host name of the other computer as an argument with the -minibuffer. Once the connection is established, talking to the other -computer works like talking to a subshell: you can edit input with the -usual Emacs commands, and send it a line at a time by typing @key{RET}. -The output is inserted in the Telnet buffer interspersed with the input. - -@findex rlogin -@vindex rlogin-explicit-args - Use @kbd{M-x rlogin} to set up an Rlogin connection. Rlogin is -another remote login communication protocol, essentially much like the -Telnet protocol but incompatible with it, and supported only by certain -systems. Rlogin's advantages are that you can arrange not to have to -give your user name and password when communicating between two machines -you frequently use, and that you can make an 8-bit-clean connection. -(To do that in Emacs, set @code{rlogin-explicit-args} to @code{("-8")} -before you run Rlogin.) - - @kbd{M-x rlogin} sets up the default file directory of the Emacs -buffer to access the remote host via FTP (@pxref{File Names}), and it -tracks the shell commands that change the current directory, just like -Shell mode. - -@findex rlogin-directory-tracking-mode - There are two ways of doing directory tracking in an Rlogin -buffer---either with remote directory names -@file{/@var{host}:@var{dir}/} or with local names (that works if the -``remote'' machine shares file systems with your machine of origin). -You can use the command @code{rlogin-directory-tracking-mode} to switch -modes. No argument means use remote directory names, a positive -argument means use local names, and a negative argument means turn -off directory tracking. - -@end ignore +login command, without a separating comma.) Terminal types +@samp{ansi} or @samp{vt100} will work on most systems. @node Serial Terminal @subsection Serial Terminal @@ -1369,9 +1300,10 @@ off directory tracking. @findex serial-term If you have a device connected to a serial port of your computer, -you can use Emacs to communicate with it. @kbd{M-x serial-term} will -ask you for a serial port name and speed and will then open a new -window in @ref{Term Mode}. +you can communicate with it by typing @kbd{M-x serial-term}. This +command asks for a serial port name and speed, and switches to a new +Term mode buffer. Emacs communicates with the serial device through +this buffer just like it does with a terminal in ordinary Term mode. The speed of the serial port is measured in bits per second. The most common speed is 9600 bits per second. You can change the speed @@ -1382,10 +1314,6 @@ the mode line. By default, a serial port is configured as ``8N1'', which means that each byte consists of 8 data bits, No parity check bit, and 1 stopbit. - When you have opened the serial port connection, you will see output -from the device in the window. Also, what you type in the window is -sent to the device. - If the speed or the configuration is wrong, you cannot communicate with your device and will probably only see garbage output in the window. @@ -1397,12 +1325,14 @@ window. @cindex server, using Emacs as @cindex @env{EDITOR} environment variable - Various programs such as @command{mail} can invoke your choice of -editor to edit a particular piece of text, such as a message that you -are sending. By convention, most of these programs use the -environment variable @env{EDITOR} to specify which editor to run. If -you set @env{EDITOR} to @samp{emacs}, they invoke Emacs---but in an -inconvenient way, by starting a new Emacs process. This is + Various programs can invoke your choice of editor to edit a +particular piece of text. For instance, version control programs +invoke an editor to enter version control logs (@pxref{Version +Control}), and the Unix @command{mail} utility invokes an editor to +enter a message to send. By convention, your choice of editor is +specified by the environment variable @env{EDITOR}. If you set +@env{EDITOR} to @samp{emacs}, Emacs would be invoked, but in an +inconvenient way---by starting a new Emacs process. This is inconvenient because the new Emacs process doesn't share buffers, a command history, or other kinds of information with any existing Emacs process. @@ -1411,30 +1341,33 @@ process. server}, so that it ``listens'' for external edit requests and acts accordingly. There are two ways to start an Emacs server: +@itemize @findex server-start - The first is to run the command @code{server-start} in an existing -Emacs process: either type @kbd{M-x server-start}, or put the -expression @code{(server-start)} in your initialization file -(@pxref{Init File}). The existing Emacs process is the server; when -you exit Emacs, the server dies with the Emacs process. +@item +Run the command @code{server-start} in an existing Emacs process: +either type @kbd{M-x server-start}, or put the expression +@code{(server-start)} in your init file (@pxref{Init File}). The +existing Emacs process is the server; when you exit Emacs, the server +dies with the Emacs process. @cindex daemon, Emacs - The second way to start an Emacs server is to run Emacs as a -@dfn{daemon}, using the @samp{--daemon} command-line option. -@xref{Initial Options}. When Emacs is started this way, it calls -@code{server-start} after initialization, and returns control to the -calling terminal instead of opening an initial frame; it then waits in -the background, listening for edit requests. +@item +Run Emacs as a @dfn{daemon}, using the @samp{--daemon} command-line +option. @xref{Initial Options}. When Emacs is started this way, it +calls @code{server-start} after initialization, and returns control to +the calling terminal instead of opening an initial frame; it then +waits in the background, listening for edit requests. +@end itemize @cindex @env{TEXEDIT} environment variable - Once an Emacs server is set up, you can use a shell command called -@command{emacsclient} to connect to the existing Emacs process and -tell it to visit a file. If you set the @env{EDITOR} environment -variable to @samp{emacsclient}, programs such as @command{mail} will -use the existing Emacs process for editing.@footnote{Some programs use -a different environment variable; for example, to make @TeX{} use -@samp{emacsclient}, set the @env{TEXEDIT} environment variable to -@samp{emacsclient +%d %s}.} + Either way, once an Emacs server is started, you can use a shell +command called @command{emacsclient} to connect to the Emacs process +and tell it to visit a file. You can then set the @env{EDITOR} +environment variable to @samp{emacsclient}, so that external programs +will use the existing Emacs process for editing.@footnote{Some +programs use a different environment variable; for example, to make +@TeX{} use @samp{emacsclient}, set the @env{TEXEDIT} environment +variable to @samp{emacsclient +%d %s}.} @vindex server-name You can run multiple Emacs servers on the same machine by giving @@ -1445,13 +1378,13 @@ server-name @key{RET} foo @key{RET}} sets the server name to name, using the @samp{-s} option (@pxref{emacsclient Options}). @findex server-eval-at - If you have defined a server by a unique server name, you can -connect to this server from other Emacs instances and evaluate forms -on it by using the @code{server-eval-at} function. - -@code{(server-eval-at "foo" '(+ 1 2))} gives the result @code{3}, if -there's a server with that name that is listening. If not, an error -will be signaled. + If you have defined a server by a unique server name, it is possible +to connect to the server from another Emacs instance and evaluate Lisp +expressions on the server, using the @code{server-eval-at} function. +For instance, @code{(server-eval-at "foo" '(+ 1 2))} evaluates the +expression @code{(+ 1 2)} on the @samp{foo} server, and returns +@code{3}. (If there is no server with that name, an error is +signaled.) Currently, this feature is mainly useful for developers. @menu * Invoking emacsclient:: Connecting to the Emacs server. @@ -1565,14 +1498,14 @@ precedence. @item -c Create a new graphical frame, instead of using an existing Emacs -frame. Emacs 23 can create a graphical frame even if it was started -in a text-only terminal, provided it is able to connect to a graphical +frame. Emacs can create a graphical frame even if it was started in a +text-only terminal, provided it is able to connect to a graphical display. If no graphical display is available, Emacs creates a new text-only terminal frame (@pxref{Frames}). If you omit a filename argument while supplying the @samp{-c} option, the new frame displays the @samp{*scratch*} buffer (@pxref{Buffers}). -@item -F +@item -F @var{alist} @itemx --frame-parameters=@var{alist} Set the parameters for a newly-created graphical frame (@pxref{Frame Parameters}). @@ -1653,7 +1586,7 @@ server it finds. (This option is not supported on MS-Windows.) @itemx --tty @itemx -nw Create a new Emacs frame on the current text-only terminal, instead of -using an existing Emacs frame. Emacs 23 can open a text-only terminal +using an existing Emacs frame. Emacs can open a text-only terminal even if it was started in another text-only terminal, or on a graphical display. If you omit a filename argument while supplying this option, the new frame displays the @samp{*scratch*} buffer. @@ -1677,23 +1610,23 @@ process, type @kbd{M-x kill-emacs}. @cindex hardcopy @cindex printing - Emacs provides commands for printing hard copies of either an entire -buffer or just part of one, with or without page headers. You can -invoke the printing commands directly, as detailed in the following -section, or using the @samp{File} menu on the menu bar. + Emacs provides commands for printing hardcopies of either an entire +buffer or part of one. You can invoke the printing commands directly, +as detailed below, or using the @samp{File} menu on the menu bar. @findex htmlfontify-buffer Aside from the commands described in this section, you can also -``print'' an Emacs buffer to HTML with @kbd{M-x htmlfontify-buffer}. -This command converts the current buffer to a HTML file, replacing -Emacs faces with CSS-based markup. In addition, see the hardcopy -commands of Dired (@pxref{Misc File Ops}) and the diary -(@pxref{Displaying the Diary}). +print hardcopies from Dired (@pxref{Operating on Files}) and the diary +(@pxref{Displaying the Diary}). You can also ``print'' an Emacs +buffer to HTML with the command @kbd{M-x htmlfontify-buffer}, which +converts the current buffer to a HTML file, replacing Emacs faces with +CSS-based markup. Furthermore, Org mode allows you to ``print'' Org +files to a variety of formats, such as PDF (@pxref{Org Mode}). @table @kbd @item M-x print-buffer -Print hardcopy of current buffer with page headings containing the file -name and page number. +Print hardcopy of current buffer with page headings containing the +file name and page number. @item M-x lpr-buffer Print hardcopy of current buffer without page headings. @item M-x print-region @@ -1707,33 +1640,32 @@ Like @code{lpr-buffer} but print only the current region. @findex lpr-buffer @findex lpr-region @vindex lpr-switches - The hardcopy commands (aside from the PostScript commands) pass extra -switches to the @code{lpr} program based on the value of the variable -@code{lpr-switches}. Its value should be a list of strings, each string -an option starting with @samp{-}. For example, to specify a line width -of 80 columns for all the printing you do in Emacs, set -@code{lpr-switches} like this: - -@example -(setq lpr-switches '("-w80")) -@end example +@vindex lpr-commands + On most operating system, the above hardcopy commands submit files +for printing by calling the @command{lpr} program. To change the +printer program, customize the variable @code{lpr-command}. To +specify extra switches to give the printer program, customize the list +variable @code{lpr-switches}. Its value should be a list of option +strings, each of which should start with @samp{-} (e.g.@: the option +string @code{"-w80"} specifies a line width of 80 columns). The +default is the empty list, @code{nil}. @vindex printer-name - You can specify the printer to use by setting the variable -@code{printer-name}. +@vindex lpr-printer-switch + To specify the printer to use, set the variable @code{printer-name}. +The default, @code{nil}, specifies the default printer. If you set it +to a printer name (a string), that name is passed to @command{lpr} +with the @samp{-P} switch; if you are not using @command{lpr}, you +should specify the switch with @code{lpr-printer-switch}. @vindex lpr-headers-switches -@vindex lpr-commands @vindex lpr-add-switches - The variable @code{lpr-command} specifies the name of the printer -program to run; the default value depends on your operating system type. -On most systems, the default is @code{"lpr"}. The variable -@code{lpr-headers-switches} similarly specifies the extra switches to -use to make page headers. The variable @code{lpr-add-switches} controls -whether to supply @samp{-T} and @samp{-J} options (suitable for -@code{lpr}) to the printer program: @code{nil} means don't add them. -@code{lpr-add-switches} should be @code{nil} if your printer program is -not compatible with @code{lpr}. + The variable @code{lpr-headers-switches} similarly specifies the +extra switches to use to make page headers. The variable +@code{lpr-add-switches} controls whether to supply @samp{-T} and +@samp{-J} options (suitable for @command{lpr}) to the printer program: +@code{nil} means don't add them (this should be the value if your +printer program is not compatible with @command{lpr}). @menu * PostScript:: Printing buffers or regions as PostScript. @@ -1776,28 +1708,17 @@ Generate/print PostScript for the current buffer as if handwritten. @findex ps-print-buffer @findex ps-print-region-with-faces @findex ps-print-buffer-with-faces - The PostScript commands, @code{ps-print-buffer} and -@code{ps-print-region}, print buffer contents in PostScript form. One -command prints the entire buffer; the other, just the region. The -corresponding @samp{-with-faces} commands, -@code{ps-print-buffer-with-faces} and @code{ps-print-region-with-faces}, -use PostScript features to show the faces (fonts and colors) in the text -properties of the text being printed. The @samp{-with-faces} commands only -work if they are used in a window system, so it has a way to determine color -values. + The @code{ps-print-buffer} and @code{ps-print-region} commands print +buffer contents in PostScript form. One command prints the entire +buffer; the other, just the region. The commands +@code{ps-print-buffer-with-faces} and +@code{ps-print-region-with-faces} behave similarly, but use PostScript +features to show the faces (fonts and colors) of the buffer text. Interactively, when you use a prefix argument (@kbd{C-u}), the command prompts the user for a file name, and saves the PostScript image in that file instead of sending it to the printer. - Noninteractively, the argument @var{filename} is treated as follows: if it is -@code{nil}, send the image to the printer. If @var{filename} is a string, save -the PostScript image in a file with that name. - - If you are using a color display, you can print a buffer of program -code with color highlighting by turning on Font-Lock mode in that -buffer, and using @code{ps-print-buffer-with-faces}. - @findex ps-spool-region @findex ps-spool-buffer @findex ps-spool-region-with-faces @@ -1806,31 +1727,21 @@ buffer, and using @code{ps-print-buffer-with-faces}. generate the PostScript output in an Emacs buffer instead of sending it to the printer. - Use the command @code{ps-despool} to send the spooled images to the printer. - @findex ps-despool - This command sends the PostScript generated by @samp{-spool-} commands (see -commands above) to the printer. - - Interactively, when you use a prefix argument (@kbd{C-u}), the command -prompts the user for a file name, and saves the spooled PostScript image in -that file instead of sending it to the printer. - - Noninteractively, the argument @var{filename} is treated as follows: if it is -@code{nil}, send the image to the printer. If @var{filename} is a string, save -the PostScript image in a file with that name. + Use the command @code{ps-despool} to send the spooled images to the +printer. This command sends the PostScript generated by +@samp{-spool-} commands (see commands above) to the printer. With a +prefix argument (@kbd{C-u}), it prompts for a file name, and saves the +spooled PostScript image in that file instead of sending it to the +printer. @findex handwrite @cindex handwriting -@kbd{M-x handwrite} is more frivolous. It generates a PostScript + @kbd{M-x handwrite} is more frivolous. It generates a PostScript rendition of the current buffer as a cursive handwritten document. It can be customized in group @code{handwrite}. This function only supports ISO 8859-1 characters. -@ifnottex - The following section describes variables for customizing these commands. -@end ifnottex - @node PostScript Variables, Printing Package, PostScript, Printing @subsection Variables for PostScript Hardcopy @@ -2379,26 +2290,8 @@ key bindings. @node Hyperlinking, Amusements, Emulation, Top @section Hyperlinking and Navigation Features -@cindex hyperlinking -@cindex navigation - Various modes documented elsewhere have hypertext features so that -you can follow links, usually by clicking @kbd{Mouse-2} on the link or -typing @key{RET} while point is on the link. Clicking @kbd{Mouse-1} -quickly on the link also follows it. (Hold @kbd{Mouse-1} for longer -if you want to set point instead.) - - Info mode, Help mode and the Dired-like modes are examples of modes -that have links in the buffer. The Tags facility links between uses -and definitions in source files, see @ref{Tags}. Imenu provides -navigation amongst items indexed in the current buffer, see -@ref{Imenu}. Info-lookup provides mode-specific lookup of definitions -in Info indexes, see @ref{Documentation}. Speedbar maintains a frame -in which links to files, and locations in files are displayed, see -@ref{Speedbar}. - - Other non-mode-specific facilities described in this section enable -following links from the current buffer in a context-sensitive -fashion. + The following subsections describe convenience features for handling +URLs and other types of links occurring in Emacs buffer text. @menu * Browse-URL:: Following URLs. @@ -2421,31 +2314,31 @@ fashion. Load a URL into a Web browser. @end table -The Browse-URL package provides facilities for following URLs specifying -links on the World Wide Web. Usually this works by invoking a web -browser, but you can, for instance, arrange to invoke @code{compose-mail} -from @samp{mailto:} URLs. + The Browse-URL package allows you to easily follow URLs from within +Emacs. Most URLs are followed by invoking a web browser; +@samp{mailto:} URLs are followed by invoking the @code{compose-mail} +Emacs command to send mail to the specified address (@pxref{Sending +Mail}). - The general way to use this feature is to type @kbd{M-x browse-url}, -which displays a specified URL. If point is located near a plausible -URL, that URL is used as the default. Other commands are available -which you might like to bind to keys, such as -@code{browse-url-at-point} and @code{browse-url-at-mouse}. + The command @kbd{M-x browse-url} prompts for a URL, and follows it. +If point is located near a plausible URL, that URL is offered as the +default. The Browse-URL package also provides other commands which +you might like to bind to keys, such as @code{browse-url-at-point} and +@code{browse-url-at-mouse}. +@vindex browse-url-mailto-function @vindex browse-url-browser-function You can customize Browse-URL's behavior via various options in the -@code{browse-url} Customize group, particularly -@code{browse-url-browser-function}. You can invoke actions dependent -on the type of URL by defining @code{browse-url-browser-function} as -an association list. The package's commentary available via @kbd{C-h -p} under the @samp{hypermedia} keyword provides more information. -Packages with facilities for following URLs should always go through -Browse-URL, so that the customization options for Browse-URL will -affect all browsing in Emacs. +@code{browse-url} Customize group. In particular, the option +@code{browse-url-mailto-function} lets you define how to follow +@samp{mailto:} URLs, while @code{browse-url-browser-function} lets you +define how to follow other types of URLs. For more information, view +the package commentary by typing @kbd{C-h P browse-url @key{RET}}. @node Goto Address mode @subsection Activating URLs @findex goto-address-mode +@cindex mode, Goto Address @cindex Goto Address mode @cindex URLs, activating @@ -2454,20 +2347,23 @@ affect all browsing in Emacs. Activate URLs and e-mail addresses in the current buffer. @end table - You can make URLs in the current buffer active with @kbd{M-x -goto-address-mode}. This minor mode finds all the URLs in the buffer, -highlights them, and turns them into @dfn{buttons}: if you click on a -URL with @kbd{Mouse-1} or @kbd{Mouse-2} (@pxref{Mouse References}), or -move to the URL and type @kbd{C-c @key{RET}}, that displays the web -page that the URL specifies. For a @samp{mailto} URL, it sends mail -instead, using your selected mail-composition method (@pxref{Mail -Methods}). +@kindex C-c RET @r{(Goto Address mode)} +@findex goto-address-at-point + You can make Emacs mark out URLs specially in the current buffer, by +typing @kbd{M-x goto-address-mode}. When this buffer-local minor mode +is enabled, it finds all the URLs in the buffer, highlights them, and +turns them into clickable buttons. You can follow the URL by typing +@kbd{C-c @key{RET}} (@code{goto-address-at-point}) while point is on +its text; or by clicking with @kbd{Mouse-2}, or by clicking +@kbd{Mouse-1} quickly (@pxref{Mouse References}). Following a URL is +done by calling @code{browse-url} as a subroutine +(@pxref{Browse-URL}). It can be useful to add @code{goto-address-mode} to mode hooks and -the hooks used to display an incoming message (e.g., -@code{rmail-show-message-hook} for Rmail, and @code{mh-show-mode-hook} -for MH-E). This is not needed for Gnus, which has a similar feature -of its own. +hooks for displaying an incoming message +(e.g.@: @code{rmail-show-message-hook} for Rmail, and +@code{mh-show-mode-hook} for MH-E). This is not needed for Gnus, +which has a similar feature of its own. @node FFAP @subsection Finding Files and URLs at Point @@ -2478,24 +2374,24 @@ of its own. @findex ffap-menu @cindex finding file at point - FFAP mode replaces certain key bindings for finding files, including -@kbd{C-x C-f}, with commands that provide more sensitive defaults. -These commands behave like the ordinary ones when given a prefix -argument. Otherwise, they get the default file name or URL from the -text around point. If what is found in the buffer has the form of a -URL rather than a file name, the commands use @code{browse-url} to -view it. + The FFAP package replaces certain key bindings for finding files, +such as @kbd{C-x C-f}, with commands that provide more sensitive +defaults. These commands behave like the ordinary ones when given a +prefix argument. Otherwise, they get the default file name or URL +from the text around point. If what is found in the buffer has the +form of a URL rather than a file name, the commands use +@code{browse-url} to view it (@pxref{Browse-URL}). This feature is useful for following references in mail or news -buffers, @file{README} files, @file{MANIFEST} files, and so on. The -@samp{ffap} package's commentary available via @kbd{C-h p} under the -@samp{files} keyword and the @code{ffap} Custom group provide details. +buffers, @file{README} files, @file{MANIFEST} files, and so on. For +more information, view the package commentary by typing @kbd{C-h P +ffap @key{RET}}. @cindex FFAP minor mode @findex ffap-mode - You can turn on FFAP minor mode by calling @code{ffap-bindings} to -make the following key bindings and to install hooks for using -@code{ffap} in Rmail, Gnus and VM article buffers. + To enable FFAP, type @kbd{M-x ffap-bindings}. This makes the +following key bindings, and also installs hooks for additional FFAP +functionality in Rmail, Gnus and VM article buffers. @table @kbd @item C-x C-f @var{filename} @key{RET} @@ -2604,18 +2500,22 @@ bored, try an argument of 9. Sit back and watch. @cindex Life @kbd{M-x life} runs Conway's ``Life'' cellular automaton. -@findex lm +@findex landmark @cindex landmark game - @kbd{M-x lm} runs a relatively non-participatory game in which a -robot attempts to maneuver towards a tree at the center of the window -based on unique olfactory cues from each of the four directions. + @kbd{M-x landmark} runs a relatively non-participatory game in which +a robot attempts to maneuver towards a tree at the center of the +window based on unique olfactory cues from each of the four +directions. @findex morse-region @findex unmorse-region +@findex nato-region @cindex Morse code @cindex --/---/.-./.../. - @kbd{M-x morse-region} converts text in a region to Morse code and -@kbd{M-x unmorse-region} converts it back. No cause for remorse. + @kbd{M-x morse-region} converts the text in the region to Morse +code; @kbd{M-x unmorse-region} converts it back. @kbd{M-x +nato-region} converts the text in the region to NATO phonetic +alphabet; @kbd{M-x denato-region} converts it back. @findex pong @cindex Pong game @@ -2635,9 +2535,11 @@ across other pegs. The command @kbd{M-x zone} plays games with the display when Emacs is idle. - Finally, if you find yourself frustrated, try the famous Eliza -program. Just do @kbd{M-x doctor}. End each input by typing -@key{RET} twice. +@findex doctor +@cindex Eliza + Finally, if you find yourself frustrated, try describing your +problems to the famous psychotherapist Eliza. Just do @kbd{M-x +doctor}. End each input by typing @key{RET} twice. @ifnottex @lowersections diff --git a/etc/NEWS b/etc/NEWS index fc390df7743..a767aed2735 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -566,6 +566,7 @@ region (or with the left margin if there is no previous line). +++ ** Archive Mode has basic support for browsing and updating 7z archives. ++++ ** browse-url has a new variable `browse-url-mailto-function' specifies how mailto: URLs are handled. The default is `browse-url-mail'. @@ -692,7 +693,7 @@ utf-8, and do the normal `undecided' decoding for the rest. exists, that is used instead. ** gdb-mi - ++++ *** GDB User Interface migrated to GDB Machine Interface and now supports multithread non-stop debugging and debugging of several threads simultaneously. @@ -718,6 +719,7 @@ handy if you have many manuals in many Info buffers, and don't remember the name of the buffer visiting the manual you want to consult. ++++ ** The Landmark game is now invoked with `landmark', not `lm'. ** MH-E has been upgraded to MH-E version 8.3.1. @@ -742,9 +744,9 @@ This change was made in Emacs 23.1 but was not advertised at the time. Try using `rmail-show-message-hook' instead. ** Shell mode - ++++ *** Shell mode uses pcomplete rules, with the standard completion UI. - ++++ *** The `shell' command prompts for the shell path name if the default directory is a remote file name and neither the environment variable $ESHELL nor the variable `explicit-shell-file-name' is set. @@ -898,6 +900,7 @@ They are superseded by shift-select-mode enabled by default in 23.1. --- *** `copyright-fix-years' can optionally convert consecutive years to ranges. ++++ *** New command `nato-region' converts text to NATO phonetic alphabet. -- cgit v1.2.1 From e66ba1dfc4cf2e12100191d2c24436c42d097268 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 3 Jan 2012 18:27:21 +0100 Subject: Merge Org 7.8.03 --- doc/misc/ChangeLog | 154 +++ doc/misc/org.texi | 2309 ++++++++++++++++++++++---------- etc/ChangeLog | 14 + etc/org/COPYRIGHT-AND-LICENSE | 36 + etc/org/OrgOdtContentTemplate.xml | 208 +++ etc/org/OrgOdtStyles.xml | 731 +++++++++++ etc/refcards/orgcard.pdf | Bin 60101 -> 81199 bytes etc/refcards/orgcard.tex | 10 +- lisp/org/ChangeLog | 2409 ++++++++++++++++++++++++++++++++++ lisp/org/ob-C.el | 3 +- lisp/org/ob-R.el | 37 +- lisp/org/ob-asymptote.el | 83 +- lisp/org/ob-awk.el | 3 +- lisp/org/ob-calc.el | 10 +- lisp/org/ob-clojure.el | 1 - lisp/org/ob-comint.el | 3 +- lisp/org/ob-css.el | 1 - lisp/org/ob-ditaa.el | 1 - lisp/org/ob-dot.el | 1 - lisp/org/ob-emacs-lisp.el | 1 - lisp/org/ob-eval.el | 1 - lisp/org/ob-exp.el | 57 +- lisp/org/ob-fortran.el | 162 +++ lisp/org/ob-gnuplot.el | 6 +- lisp/org/ob-haskell.el | 5 +- lisp/org/ob-java.el | 9 +- lisp/org/ob-js.el | 1 - lisp/org/ob-keys.el | 3 +- lisp/org/ob-latex.el | 29 +- lisp/org/ob-ledger.el | 3 +- lisp/org/ob-lilypond.el | 1 - lisp/org/ob-lisp.el | 5 +- lisp/org/ob-lob.el | 22 +- lisp/org/ob-matlab.el | 1 - lisp/org/ob-maxima.el | 98 +- lisp/org/ob-mscgen.el | 1 - lisp/org/ob-ocaml.el | 5 +- lisp/org/ob-octave.el | 37 +- lisp/org/ob-org.el | 1 - lisp/org/ob-perl.el | 1 - lisp/org/ob-picolisp.el | 192 +++ lisp/org/ob-plantuml.el | 1 - lisp/org/ob-python.el | 1 - lisp/org/ob-ref.el | 59 +- lisp/org/ob-ruby.el | 3 +- lisp/org/ob-sass.el | 1 - lisp/org/ob-scheme.el | 1 - lisp/org/ob-screen.el | 1 - lisp/org/ob-sh.el | 1 - lisp/org/ob-shen.el | 79 ++ lisp/org/ob-sql.el | 63 +- lisp/org/ob-sqlite.el | 1 - lisp/org/ob-table.el | 97 +- lisp/org/ob-tangle.el | 45 +- lisp/org/ob.el | 662 ++++++---- lisp/org/org-agenda.el | 785 ++++++----- lisp/org/org-archive.el | 467 ++++--- lisp/org/org-ascii.el | 10 +- lisp/org/org-attach.el | 2 - lisp/org/org-bbdb.el | 78 +- lisp/org/org-beamer.el | 9 +- lisp/org/org-bibtex.el | 65 +- lisp/org/org-capture.el | 46 +- lisp/org/org-clock.el | 44 +- lisp/org/org-colview.el | 68 +- lisp/org/org-compat.el | 25 +- lisp/org/org-crypt.el | 57 +- lisp/org/org-ctags.el | 20 +- lisp/org/org-datetree.el | 3 - lisp/org/org-docbook.el | 17 +- lisp/org/org-docview.el | 3 - lisp/org/org-entities.el | 3 - lisp/org/org-eshell.el | 64 + lisp/org/org-exp-blocks.el | 18 +- lisp/org/org-exp.el | 217 ++- lisp/org/org-faces.el | 29 +- lisp/org/org-feed.el | 4 +- lisp/org/org-footnote.el | 400 +++--- lisp/org/org-freemind.el | 2 +- lisp/org/org-gnus.el | 4 +- lisp/org/org-habit.el | 17 +- lisp/org/org-html.el | 210 +-- lisp/org/org-icalendar.el | 8 +- lisp/org/org-id.el | 9 +- lisp/org/org-indent.el | 443 ++++--- lisp/org/org-info.el | 5 +- lisp/org/org-inlinetask.el | 118 +- lisp/org/org-irc.el | 11 +- lisp/org/org-jsinfo.el | 5 +- lisp/org/org-latex.el | 57 +- lisp/org/org-list.el | 269 ++-- lisp/org/org-lparse.el | 2339 +++++++++++++++++++++++++++++++++ lisp/org/org-mac-message.el | 3 - lisp/org/org-macs.el | 171 ++- lisp/org/org-mew.el | 3 - lisp/org/org-mhe.el | 5 +- lisp/org/org-mks.el | 3 - lisp/org/org-mobile.el | 8 +- lisp/org/org-mouse.el | 47 +- lisp/org/org-odt.el | 2626 +++++++++++++++++++++++++++++++++++++ lisp/org/org-pcomplete.el | 3 - lisp/org/org-plot.el | 4 +- lisp/org/org-protocol.el | 11 +- lisp/org/org-publish.el | 41 +- lisp/org/org-remember.el | 20 +- lisp/org/org-rmail.el | 5 +- lisp/org/org-special-blocks.el | 20 +- lisp/org/org-src.el | 29 +- lisp/org/org-table.el | 127 +- lisp/org/org-taskjuggler.el | 15 +- lisp/org/org-timer.el | 5 +- lisp/org/org-vm.el | 5 +- lisp/org/org-w3m.el | 3 - lisp/org/org-wl.el | 5 +- lisp/org/org-xoxo.el | 4 +- lisp/org/org.el | 2209 ++++++++++++++++++++----------- 116 files changed, 15224 insertions(+), 3749 deletions(-) create mode 100644 etc/org/COPYRIGHT-AND-LICENSE create mode 100644 etc/org/OrgOdtContentTemplate.xml create mode 100644 etc/org/OrgOdtStyles.xml create mode 100644 lisp/org/ob-fortran.el create mode 100644 lisp/org/ob-picolisp.el create mode 100644 lisp/org/ob-shen.el create mode 100644 lisp/org/org-eshell.el create mode 100644 lisp/org/org-lparse.el create mode 100644 lisp/org/org-odt.el diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 3b0e5251d5e..30c4b01d3fa 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,157 @@ +2012-01-03 Eric Schulte + + * org.texi (Noweb reference syntax): Adding documentation of + the `*org-babel-use-quick-and-dirty-noweb-expansion*' + variable. + +2012-01-03 Bastien Guerry + + * org.texi (Plain lists): Split the table to fix the display + of items. + +2012-01-03 Bastien Guerry + + * org.texi (Plain lists): Fix misplaced explanation. + +2012-01-03 Bastien Guerry + + * org.texi (Plain lists, Agenda files): Add index entries. + +2012-01-03 Julian Gehring + + * org.texi: Use "Org mode" instead of alternatives like + "Org-mode" or "org-mode". + +2012-01-03 Bernt Hansen + + * org.texi (Agenda commands): Document + `org-clock-report-include-clocking-task'. + +2012-01-03 Bastien Guerry + + * org.texi (Checkboxes): Document the new behavior of `C-u C-c + C-c' on checkboxes. + +2012-01-03 Julian Gehring + + * org.texi: End sentences with two spaces. + +2012-01-03 Michael Brand + + * org.texi (External links): Document the link types file+sys + and file+emacs, slightly narrow used page width. + +2012-01-03 Eric Schulte + + * org.texi (colnames): Note that colnames behavior may differ + across languages. + +2012-01-03 Bastien Guerry + + * org.texi (Weekly/daily agenda, Agenda commands): Fix typos. + +2012-01-03 Thomas Dye + + * org.texi: Augmented discussion of babel property + inheritance. Put footnote outside sentence ending period. + +2012-01-03 Eric Schulte + + * org.texi (eval): Documenting the full range of :eval header + argument values. + +2012-01-03 Eric Schulte + + * org.texi (eval): Documentation of the new :eval option. + +2012-01-03 Thomas Dye + + * org.texi: Add accumulated properties. + +2012-01-03 Thomas Dye + + * org.texi: Documented no spaces in name=assign, another + correction to :var table. + +2012-01-03 Thomas Dye + + * org.texi: Changed DATA to NAME in Working With Source Code + section. + +2012-01-03 Tom Dye + + * org.texi: Minor change to :var table. + +2012-01-03 Tom Dye + + * org.texi: More changes to :var table (some examples were wrong). + +2012-01-03 Tom Dye + + * org.texi: Cleaned up :var table. + +2012-01-03 Bastien Guerry + + * org.texi (Timestamps, Weekly/daily agenda) + (Weekly/daily agenda): Add @cindex for "appointment". + +2012-01-03 Eric Schulte + + * org.texi (Literal examples): A new link to the template for + inserting empty code blocks. + (Structure of code blocks): A new link to the template for + inserting empty code blocks. + +2012-01-03 Rafael Laboissiere (tiny change) + + * org.texi (External links): Add footnote on how the behavior + of the text search in Org files are controled by the variable + `org-link-search-must-match-exact-headline'. + +2012-01-03 Eric Schulte + + * org.texi (Buffer-wide header arguments): Update + documentation to reflect removal of #+PROPERTIES. + +2012-01-03 Carsten Dominik + + * org.texi (The clock table): Mention that ACHIVED trees + contribute to the clock table. + +2012-01-03 Carsten Dominik (tiny change) + + * org.texi (Conflicts): Better yasnippet config info. + +2012-01-03 Bastien Guerry (tiny change) + + * org.texi (Selective export): Explicitely mention the default + values for `org-export-select-tags', + `org-export-exclude-tags'. + +2012-01-03 Tom Dye + + * org.texi: Added a line to specify that header arguments are + lowercase. + +2012-01-03 Tom Dye + + * org.texi: :var requires default value when declared. + +2012-01-03 Bastien Guerry + + * org.texi (Handling links): Add a note about the + `org-link-frame-setup' option. + +2012-01-03 David Maus + + * org.texi (Exporting Agenda Views, Extracting agenda + information): Fix command line syntax, quote symbol parameter + values. + +2012-01-03 David Maus + + * org.texi (Exporting Agenda Views): Fix command line syntax. + 2011-12-28 Paul Eggert * gnus.texi (Mail Source Customization, Mail Back End Variables): diff --git a/doc/misc/org.texi b/doc/misc/org.texi index adc9cf0b139..6d9a6566d9f 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -4,8 +4,8 @@ @setfilename ../../info/org @settitle The Org Manual -@set VERSION 7.7 -@set DATE July 2011 +@set VERSION 7.8.03 +@set DATE January 2012 @c Use proper quote and backtick for code sections in PDF output @c Cf. Texinfo manual 14.2 @@ -36,7 +36,7 @@ @c orgkey{key} A key item @c orgcmd{key,cmd} Key with command name -@c xorgcmd{key,command} Key with command name as @itemx +@c xorgcmd{key,cmmand} Key with command name as @itemx @c orgcmdnki{key,cmd} Like orgcmd, but do not index the key @c orgcmdtkc{text,key,cmd} Like orgcmd,special text instead of key @c orgcmdkkc{key1,key2,cmd} Two keys with one command name, use "or" @@ -296,7 +296,7 @@ license to the document, as described in section 6 of the license. @subtitle Release @value{VERSION} @author by Carsten Dominik -with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, and Thomas Dye +with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, Thomas Dye and Jambunathan K. @c The following two commands start the copyright page. @page @@ -382,7 +382,7 @@ The spreadsheet * Column formulas:: Formulas valid for an entire column * Editing and debugging formulas:: Fixing formulas * Updating the table:: Recomputing all dependent fields -* Advanced features:: Field names, parameters and automatic recalc +* Advanced features:: Field and column names, parameters and automatic recalc Hyperlinks @@ -433,7 +433,7 @@ Tags Properties and columns * Property syntax:: How properties are spelled out -* Special properties:: Access to other Org-mode features +* Special properties:: Access to other Org mode features * Property searches:: Matching property values * Property inheritance:: Passing values down the tree * Column view:: Tabular viewing and editing @@ -462,7 +462,7 @@ Dates and times Creating timestamps -* The date/time prompt:: How Org-mode helps you entering date and time +* The date/time prompt:: How Org mode helps you entering date and time * Custom time format:: Making dates look different Deadlines and scheduling @@ -541,7 +541,7 @@ Markup for rich export * Include files:: Include additional files into a document * Index entries:: Making an index * Macro replacement:: Use macros to create complex output -* Embedded LaTeX:: LaTeX can be freely used inside Org documents +* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents Structural markup elements @@ -560,8 +560,8 @@ Embedded @LaTeX{} * Special symbols:: Greek letters and other symbols * Subscripts and superscripts:: Simple syntax for raising/lowering text -* LaTeX fragments:: Complex formulas made easy -* Previewing LaTeX fragments:: What will this snippet look like? +* @LaTeX{} fragments:: Complex formulas made easy +* Previewing @LaTeX{} fragments:: What will this snippet look like? * CDLaTeX mode:: Speed up entering of formulas Exporting @@ -571,9 +571,9 @@ Exporting * The export dispatcher:: How to access exporter commands * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding * HTML export:: Exporting to HTML -* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF +* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF * DocBook export:: Exporting to DocBook -* OpenDocumentText export:: Exporting to OpenDocumentText +* OpenDocument Text export:: Exporting to OpenDocument Text * TaskJuggler export:: Exporting to TaskJuggler * Freemind export:: Exporting to Freemind mind maps * XOXO export:: Exporting to XOXO @@ -583,7 +583,7 @@ HTML export * HTML Export commands:: How to invoke HTML export * HTML preamble and postamble:: How to insert a preamble and a postamble -* Quoting HTML tags:: Using direct HTML in Org-mode +* Quoting HTML tags:: Using direct HTML in Org mode * Links in HTML export:: How links will be interpreted and formatted * Tables in HTML export:: How to modify the formatting of tables * Images in HTML export:: How to insert figures into HTML output @@ -594,11 +594,11 @@ HTML export @LaTeX{} and PDF export -* LaTeX/PDF export commands:: Which key invokes which commands +* @LaTeX{}/PDF export commands:: * Header and sectioning:: Setting up the export file structure -* Quoting LaTeX code:: Incorporating literal @LaTeX{} code -* Tables in LaTeX export:: Options for exporting tables to @LaTeX{} -* Images in LaTeX export:: How to insert figures into @LaTeX{} output +* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code +* Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{} +* Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output * Beamer class export:: Turning the file into a presentation DocBook export @@ -610,15 +610,30 @@ DocBook export * Images in DocBook export:: How to insert figures into DocBook output * Special characters:: How to handle special characters -OpenDocument export +OpenDocument Text export -* OpenDocumentText export commands:: How to invoke OpenDocumentText export -* Applying Custom Styles:: How to apply custom styles to the output -* Converting to Other formats:: How to convert to formats like doc, docx etc -* Links in OpenDocumentText export:: How links will be interpreted and formatted -* Tables in OpenDocumentText export:: How Tables are handled -* Images in OpenDocumentText export:: How to insert figures -* Additional Documentation:: How to handle special characters +* Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on +* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export +* Applying custom styles:: How to apply custom styles to the output +* Links in @acronym{ODT} export:: How links will be interpreted and formatted +* Tables in @acronym{ODT} export:: How Tables are exported +* Images in @acronym{ODT} export:: How to insert images +* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted +* Literal examples in @acronym{ODT} export:: How source and example blocks are formatted +* Advanced topics in @acronym{ODT} export:: Read this if you are a power user + +Math formatting in @acronym{ODT} export + +* Working with @LaTeX{} math snippets:: How to embed @LaTeX{} math fragments +* Working with MathML or OpenDocument formula files:: How to embed equations in native format + +Advanced topics in @acronym{ODT} export + +* Exporting and converting to other formats:: How to produce @samp{pdf} and other formats +* Working with OpenDocument style files:: Explore the internals +* Creating one-off styles:: How to produce custom highlighting etc +* Customizing tables in @acronym{ODT} export:: How to define and use Table templates +* Validating OpenDocument XML:: How to debug corrupt OpenDocument files Publishing @@ -649,12 +664,12 @@ Working with source code * Editing source code:: Language major-mode editing * Exporting code blocks:: Export contents and/or results * Extracting source code:: Create pure source code files -* Evaluating code blocks:: Place results of evaluation in the Org-mode buffer +* Evaluating code blocks:: Place results of evaluation in the Org mode buffer * Library of Babel:: Use and contribute to a library of useful code blocks * Languages:: List of supported code block languages * Header arguments:: Configure code block functionality * Results of evaluation:: How evaluation results are handled -* Noweb reference syntax:: Literate programming in Org-mode +* Noweb reference syntax:: Literate programming in Org mode * Key bindings and useful functions:: Work quickly with code blocks * Batch execution:: Call functions from the command line @@ -668,7 +683,7 @@ Using header arguments * System-wide header arguments:: Set global default values * Language-specific header arguments:: Set default values by language * Buffer-wide header arguments:: Set default values for a specific buffer -* Header arguments in Org-mode properties:: Set default values for a buffer or heading +* Header arguments in Org mode properties:: Set default values for a buffer or heading * Code block specific header arguments:: The most common way to set values * Header arguments in function calls:: The most specific level @@ -736,7 +751,7 @@ Hacking Tables and lists in arbitrary syntax * Radio tables:: Sending and receiving radio tables -* A LaTeX example:: Step by step, almost a tutorial +* A @LaTeX{} example:: Step by step, almost a tutorial * Translator functions:: Copy and modify * Radio lists:: Doing the same for lists @@ -898,7 +913,7 @@ make install-info Then add the following line to @file{.emacs}. It is needed so that Emacs can autoload functions that are located in files not immediately loaded -when Org-mode starts. +when Org mode starts. @lisp (require 'org-install) @end lisp @@ -934,9 +949,9 @@ liking. (global-set-key "\C-cb" 'org-iswitchb) @end lisp -@cindex Org-mode, turning on +@cindex Org mode, turning on With this setup, all files with extension @samp{.org} will be put -into Org-mode. As an alternative, make the first line of a file look +into Org mode. As an alternative, make the first line of a file look like this: @example @@ -944,7 +959,7 @@ MY PROJECTS -*- mode: org; -*- @end example @vindex org-insert-mode-line-in-empty-file -@noindent which will select Org-mode for this buffer no matter what +@noindent which will select Org mode for this buffer no matter what the file's name is. See also the variable @code{org-insert-mode-line-in-empty-file}. @@ -987,6 +1002,36 @@ version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org that you only need to add your description. If you re not sending the Email from within Emacs, please copy and paste the content into your Email program. +Sometimes you might face a problem due to an error in your Emacs or Org mode +setup. Before reporting a bug, it is very helpful to start Emacs with minimal +customisations and reproduce the problem. Doing so often helps you determine +if the problem is with your customisation or with Org mode itself. You can +start a typical minimal session with a command like the example below. + +@example +$ emacs -Q -l /path/to/minimal-org.el +@end example + +However if you are using Org mode as distributed with Emacs, a minimal setup +is not necessary. In that case it is sufficient to start Emacs as @code{emacs +-Q}. The @code{minimal-org.el} setup file can have contents as shown below. + +@example +;;; Minimal setup to load latest `org-mode' + +;; activate debugging +(setq debug-on-error t + debug-on-signal nil + debug-on-quit nil) + +;; add latest org-mode to load path +(add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) +(add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp")) + +;; activate org +(require 'org-install) +@end example + If an error occurs, a backtrace can be very useful (see below on how to create one). Often a small example file helps, along with clear information about: @@ -1009,7 +1054,7 @@ error occurred. Here is how to produce a useful backtrace: @enumerate @item -Reload uncompiled versions of all Org-mode Lisp files. The backtrace +Reload uncompiled versions of all Org mode Lisp files. The backtrace contains much more information if it is produced with uncompiled code. To do this, use @example @@ -1196,8 +1241,8 @@ Reveal context around point, showing the current entry, the following heading and the hierarchy above. Useful for working near a location that has been exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda command (@pxref{Agenda commands}). With a prefix argument show, on each -level, all sibling headings. With double prefix arg, also show the entire -subtree of the parent. +level, all sibling headings. With a double prefix argument, also show the +entire subtree of the parent. @orgcmd{C-c C-k,show-branches} Expose all the headings of the subtree, CONTENT view for just one subtree. @orgcmd{C-c C-x b,org-tree-to-indirect-buffer} @@ -1430,7 +1475,7 @@ functionality. @vindex org-show-following-heading @vindex org-show-siblings @vindex org-show-entry-below -An important feature of Org-mode is the ability to construct @emph{sparse +An important feature of Org mode is the ability to construct @emph{sparse trees} for selected information in an outline tree, so that the entire document is folded as much as possible, but the selected information is made visible along with the headline structure above it@footnote{See also the @@ -1439,7 +1484,7 @@ variables @code{org-show-hierarchy-above}, @code{org-show-following-heading}, control on how much context is shown around each match.}. Just try it out and you will see immediately how it works. -Org-mode contains several commands creating such trees, all these +Org mode contains several commands creating such trees, all these commands can be accessed through a dispatcher: @table @asis @@ -1597,14 +1642,18 @@ to disable them individually. @table @asis @orgcmd{@key{TAB},org-cycle} +@cindex cycling, in plain lists @vindex org-cycle-include-plain-lists Items can be folded just like headline levels. Normally this works only if the cursor is on a plain list item. For more details, see the variable @code{org-cycle-include-plain-lists}. If this variable is set to @code{integrate}, plain list items will be treated like low-level -headlines. The level of an item is then given by the -indentation of the bullet/number. Items are always subordinate to real -headlines, however; the hierarchies remain completely separated. +headlines. The level of an item is then given by the indentation of the +bullet/number. Items are always subordinate to real headlines, however; the +hierarchies remain completely separated. In a new item with no text yet, the +first @key{TAB} demotes the item to become a child of the previous +one. Subsequent @key{TAB}s move the item to meaningful levels in the list +and eventually get it back to its initial position. @orgcmd{M-@key{RET},org-insert-heading} @vindex org-M-RET-may-split-line @vindex org-list-automatic-rules @@ -1615,17 +1664,15 @@ new item@footnote{If you do not want the item to be split, customize the variable @code{org-M-RET-may-split-line}.}. If this command is executed @emph{before item's body}, the new item is created @emph{before} the current one. +@end table + +@table @kbd @kindex M-S-@key{RET} -@item M-S-@key{RET} +@item M-S-RET Insert a new item with a checkbox (@pxref{Checkboxes}). -@orgcmd{@key{TAB},org-cycle} -In a new item with no text yet, the first @key{TAB} demotes the item to -become a child of the previous one. Subsequent @key{TAB}s move the item to -meaningful levels in the list and eventually get it back to its initial -position. @kindex S-@key{down} -@item S-@key{up} -@itemx S-@key{down} +@item S-up +@itemx S-down @cindex shift-selection-mode @vindex org-support-shift-select @vindex org-list-use-circular-motion @@ -1637,21 +1684,21 @@ jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite similar effect. @kindex M-@key{up} @kindex M-@key{down} -@item M-@key{up} -@itemx M-@key{down} +@item M-up +@itemx M-down Move the item including subitems up/down@footnote{See @code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with previous/next item of same indentation). If the list is ordered, renumbering is automatic. @kindex M-@key{left} @kindex M-@key{right} -@item M-@key{left} -@itemx M-@key{right} +@item M-left +@itemx M-right Decrease/increase the indentation of an item, leaving children alone. @kindex M-S-@key{left} @kindex M-S-@key{right} -@item M-S-@key{left} -@itemx M-S-@key{right} +@item M-S-left +@itemx M-S-right Decrease/increase the indentation of the item, including subitems. Initially, the item tree is selected based on current indentation. When these commands are executed several times in direct succession, the initially @@ -1694,7 +1741,7 @@ Turn the whole plain list into a subtree of the current heading. Checkboxes (resp. checked). @kindex S-@key{left} @kindex S-@key{right} -@item S-@key{left}/@key{right} +@item S-left/right @vindex org-support-shift-select This command also cycles bullet styles when the cursor in on the bullet or anywhere in an item line, details depending on @@ -1713,7 +1760,7 @@ numerically, alphabetically, by time, or by custom function. @vindex org-drawers Sometimes you want to keep information associated with an entry, but you -normally don't want to see it. For this, Org-mode has @emph{drawers}. +normally don't want to see it. For this, Org mode has @emph{drawers}. Drawers need to be configured with the variable @code{org-drawers}@footnote{You can define drawers on a per-file basis with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers @@ -1731,7 +1778,7 @@ look like this: Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and show the entry, but keep the drawer collapsed to a single line. In order to look inside the drawer, you need to move the cursor to the drawer line and -press @key{TAB} there. Org-mode uses the @code{PROPERTIES} drawer for +press @key{TAB} there. Org mode uses the @code{PROPERTIES} drawer for storing properties (@pxref{Properties and Columns}), and you can also arrange for state change notes (@pxref{Tracking TODO state changes}) and clock times (@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}. If you @@ -1748,7 +1795,7 @@ Add a time-stamped note to the LOGBOOK drawer. @vindex org-hide-block-startup @cindex blocks, folding -Org-mode uses begin...end blocks for various purposes from including source +Org mode uses begin...end blocks for various purposes from including source code examples (@pxref{Literal examples}) to capturing time logging information (@pxref{Clocking work time}). These blocks can be folded and unfolded by pressing TAB in the begin line. You can also get all blocks @@ -1766,8 +1813,8 @@ or on a per-file basis by using @section Footnotes @cindex footnotes -Org-mode supports the creation of footnotes. In contrast to the -@file{footnote.el} package, Org-mode's footnotes are designed for work on a +Org mode supports the creation of footnotes. In contrast to the +@file{footnote.el} package, Org mode's footnotes are designed for work on a larger document, not only for one-off documents like emails. The basic syntax is similar to the one used by @file{footnote.el}, i.e.@: a footnote is defined in a paragraph that is started by a footnote marker in square @@ -1781,11 +1828,11 @@ The Org homepage[fn:1] now looks a lot better than it used to. [fn:1] The link is: http://orgmode.org @end example -Org-mode extends the number-based syntax to @emph{named} footnotes and +Org mode extends the number-based syntax to @emph{named} footnotes and optional inline definition. Using plain numbers as markers (as @file{footnote.el} does) is supported for backward compatibility, but not encouraged because of possible conflicts with @LaTeX{} snippets (@pxref{Embedded -LaTeX}). Here are the valid references: +@LaTeX{}}). Here are the valid references: @table @code @item [1] @@ -1875,7 +1922,7 @@ you can use the usual commands to follow these links. @cindex Orgstruct mode @cindex minor mode for structure editing -If you like the intuitive way the Org-mode structure editing and list +If you like the intuitive way the Org mode structure editing and list formatting works, you might want to use these commands in other modes like Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or @@ -2276,7 +2323,7 @@ formula, moving these references by arrow keys * Column formulas:: Formulas valid for an entire column * Editing and debugging formulas:: Fixing formulas * Updating the table:: Recomputing all dependent fields -* Advanced features:: Field names, parameters and automatic recalc +* Advanced features:: Field and column names, parameters and automatic recalc @end menu @node References, Formula syntax for Calc, The spreadsheet, The spreadsheet @@ -2833,9 +2880,11 @@ dependencies. @node Advanced features, , Updating the table, The spreadsheet @subsection Advanced features -If you want the recalculation of fields to happen automatically, or if -you want to be able to assign @i{names} to fields and columns, you need -to reserve the first column of the table for special marking characters. +If you want the recalculation of fields to happen automatically, or if you +want to be able to assign @i{names}@footnote{Such names must start by an +alphabetic character and use only alphanumeric/underscore characters.} to +fields and columns, you need to reserve the first column of the table for +special marking characters. @table @kbd @orgcmd{C-#,org-table-rotate-recalc-marks} @@ -3005,7 +3054,7 @@ When plotting @code{3d} or @code{grid} types, set this to @code{t} to graph a flat mapping rather than a @code{3d} slope. @item timefmt -Specify format of Org-mode timestamps as they will be parsed by Gnuplot. +Specify format of Org mode timestamps as they will be parsed by Gnuplot. Defaults to @samp{%Y-%m-%d-%H:%M:%S}. @item script @@ -3168,11 +3217,19 @@ file:papers/last.pdf @r{file, relative path} ./papers/last.pdf @r{same as above} file:/myself@@some.where:papers/last.pdf @r{file, path on remote machine} /myself@@some.where:papers/last.pdf @r{same as above} -file:sometextfile::NNN @r{file with line number to jump to} +file:sometextfile::NNN @r{file, jump to line number} file:projects.org @r{another Org file} -file:projects.org::some words @r{text search in Org file} +file:projects.org::some words @r{text search in Org file}@footnote{ +The actual behavior of the search will depend on the value of +the variable @code{org-link-search-must-match-exact-headline}. If its value +is nil, then a fuzzy text search will be done. If it is t, then only the +exact headline will be matched. If the value is @code{'query-to-create}, +then an exact headline will be searched; if it is not found, then the user +will be queried to create it.} file:projects.org::*task title @r{heading search in Org file} -docview:papers/last.pdf::NNN @r{open file in doc-view mode at page NNN} +file+sys:/path/to/file @r{open via OS, like double-click} +file+emacs:/path/to/file @r{force opening by Emacs} +docview:papers/last.pdf::NNN @r{open in doc-view mode at page} id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID} news:comp.emacs @r{Usenet link} mailto:adent@@galaxy.net @r{Mail link} @@ -3189,7 +3246,7 @@ gnus:group @r{Gnus group link} gnus:group#id @r{Gnus article link} bbdb:R.*Stallman @r{BBDB link (with regexp)} irc:/irc.com/#emacs/bob @r{IRC link} -info:org#External%20links @r{Info node link (with encoded space)} +info:org#External links @r{Info node link} shell:ls *.org @r{A shell command} elisp:org-agenda @r{Interactive Elisp command} elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} @@ -3235,7 +3292,7 @@ create a link. The link will be stored for later insertion into an Org buffer (see below). What kind of link will be created depends on the current buffer: -@b{Org-mode buffers}@* +@b{Org mode buffers}@* For Org files, if there is a @samp{<>} at the cursor, the link points to the target. Otherwise it points to the current headline, which will also be the description@footnote{If the headline contains a timestamp, it will be @@ -3338,6 +3395,7 @@ link and description parts of the link. @cindex following links @orgcmd{C-c C-o,org-open-at-point} @vindex org-file-apps +@vindex org-link-frame-setup Open link at point. This will launch a web browser for URLs (using @command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for the corresponding links, and execute the command in a shell link. When the @@ -3351,7 +3409,9 @@ Classification of files is based on file extension only. See option visit the file with Emacs, use a @kbd{C-u} prefix. If you want to avoid opening in Emacs, use a @kbd{C-u C-u} prefix.@* If the cursor is on a headline, but not on a link, offer all links in the -headline and entry text. +headline and entry text. If you want to setup the frame configuration for +following links, customize @code{org-link-frame-setup}. + @orgkey @key{RET} @vindex org-return-follows-link When @code{org-return-follows-link} is set, @kbd{@key{RET}} will also follow @@ -3525,7 +3585,7 @@ Link to a heading with a @code{CUSTOM_ID} property @item /regexp/ Do a regular expression search for @code{regexp}. This uses the Emacs command @code{occur} to list all matches in a separate window. If the -target file is in Org-mode, @code{org-occur} is used to create a +target file is in Org mode, @code{org-occur} is used to create a sparse tree with the matches. @c If the target file is a directory, @c @code{grep} will be used to search all files in the directory. @@ -3564,7 +3624,7 @@ an implementation example. See the file @file{org-bibtex.el}. @chapter TODO items @cindex TODO items -Org-mode does not maintain TODO lists as separate documents@footnote{Of +Org mode does not maintain TODO lists as separate documents@footnote{Of course, you can make a document that contains only long lists of TODO items, but this is not required.}. Instead, TODO items are an integral part of the notes file, because TODO items usually come up while taking notes! With Org @@ -3573,7 +3633,7 @@ information is not duplicated, and the entire context from which the TODO item emerged is always present. Of course, this technique for managing TODO items scatters them -throughout your notes file. Org-mode compensates for this by providing +throughout your notes file. Org mode compensates for this by providing methods to give you an overview of all the things that you have to do. @menu @@ -3659,7 +3719,7 @@ option @code{org-todo-state-tags-triggers} for details. @vindex org-todo-keywords By default, marked TODO entries have one of only two states: TODO and -DONE. Org-mode allows you to classify TODO items in more complex ways +DONE. Org mode allows you to classify TODO items in more complex ways with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With special setup, the TODO keyword system can work differently in different files. @@ -3684,7 +3744,7 @@ TODO items in particular (@pxref{Tags}). You can use TODO keywords to indicate different @emph{sequential} states in the process of working on an item, for example@footnote{Changing -this variable only becomes effective after restarting Org-mode in a +this variable only becomes effective after restarting Org mode in a buffer.}: @lisp @@ -3727,7 +3787,7 @@ be set up like this: In this case, different keywords do not indicate a sequence, but rather different types. So the normal work flow would be to assign a task to a -person, and later to mark it DONE. Org-mode supports this style by adapting +person, and later to mark it DONE. Org mode supports this style by adapting the workings of the command @kbd{C-c C-t}@footnote{This is also true for the @kbd{t} command in the timeline and agenda buffers.}. When used several times in succession, it will still cycle through all names, in order to first @@ -3758,7 +3818,7 @@ like this: (sequence "|" "CANCELED"))) @end lisp -The keywords should all be different, this helps Org-mode to keep track +The keywords should all be different, this helps Org mode to keep track of which subsequence should be used for a given entry. In this setup, @kbd{C-c C-t} only operates within a subsequence, so it switches from @code{DONE} to (nothing) to @code{TODO}, and from @code{FIXED} to @@ -3855,9 +3915,9 @@ Remember that the keywords after the vertical bar (or the last keyword if no bar is there) must always mean that the item is DONE (although you may use a different word). After changing one of these lines, use @kbd{C-c C-c} with the cursor still in the line to make the changes -known to Org-mode@footnote{Org-mode parses these lines only when -Org-mode is activated after visiting a file. @kbd{C-c C-c} with the -cursor in a line starting with @samp{#+} is simply restarting Org-mode +known to Org mode@footnote{Org mode parses these lines only when +Org mode is activated after visiting a file. @kbd{C-c C-c} with the +cursor in a line starting with @samp{#+} is simply restarting Org mode for the current buffer.}. @node Faces for TODO keywords, TODO dependencies, Per-file keywords, TODO extensions @@ -3867,7 +3927,7 @@ for the current buffer.}. @vindex org-todo @r{(face)} @vindex org-done @r{(face)} @vindex org-todo-keyword-faces -Org-mode highlights TODO keywords with special faces: @code{org-todo} +Org mode highlights TODO keywords with special faces: @code{org-todo} for keywords indicating that an item still has to be acted upon, and @code{org-done} for keywords indicating that an item is finished. If you are using more than 2 different states, you might want to use @@ -3883,7 +3943,7 @@ special faces for some of them. This can be done using the variable @end lisp While using a list with face properties as shown for CANCELED @emph{should} -work, this does not always seem to be the case. If necessary, define a +work, this does not aways seem to be the case. If necessary, define a special face and use that. A string is interpreted as a color. The variable @code{org-faces-easy-properties} determines if that color is interpreted as a foreground or a background color. @@ -3955,7 +4015,7 @@ module @file{org-depend.el}. @cindex progress logging @cindex logging, of progress -Org-mode can automatically record a timestamp and possibly a note when +Org mode can automatically record a timestamp and possibly a note when you mark a TODO item as DONE, or even each time you change the state of a TODO item. This system is highly configurable, settings can be on a per-keyword basis and can be localized to a file or even a subtree. For @@ -4019,21 +4079,25 @@ behavior---the recommended drawer for this is called @code{LOGBOOK}. You can also overrule the setting of this variable for a subtree by setting a @code{LOG_INTO_DRAWER} property. -Since it is normally too much to record a note for every state, Org-mode +Since it is normally too much to record a note for every state, Org mode expects configuration on a per-keyword basis for this. This is achieved by -adding special markers @samp{!} (for a timestamp) and @samp{@@} (for a note) -in parentheses after each keyword. For example, with the setting +adding special markers @samp{!} (for a timestamp) or @samp{@@} (for a note +with timestamp) in parentheses after each keyword. For example, with the +setting @lisp (setq org-todo-keywords '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)"))) @end lisp +To record a timestamp without a note for TODO keywords configured with +@samp{@@}, just type @kbd{C-c C-c} to enter a blank note when prompted. + @noindent @vindex org-log-done you not only define global TODO keywords and fast access keys, but also request that a time is recorded when the entry is set to -DONE@footnote{It is possible that Org-mode will record two timestamps +DONE@footnote{It is possible that Org mode will record two timestamps when you are using both @code{org-log-done} and state change logging. However, it will never prompt for two notes---if you have configured both, the state change recording note will take precedence and cancel @@ -4182,7 +4246,7 @@ which should only be done in certain contexts, for example. @section Priorities @cindex priorities -If you use Org-mode extensively, you may end up with enough TODO items that +If you use Org mode extensively, you may end up with enough TODO items that it starts to make sense to prioritize them. Prioritizing can be done by placing a @emph{priority cookie} into the headline of a TODO item, like this @@ -4192,11 +4256,11 @@ placing a @emph{priority cookie} into the headline of a TODO item, like this @noindent @vindex org-priority-faces -By default, Org-mode supports three priorities: @samp{A}, @samp{B}, and +By default, Org mode supports three priorities: @samp{A}, @samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry without a cookie is treated just like priority @samp{B}. Priorities make a difference only for sorting in the agenda (@pxref{Weekly/daily agenda}); outside the agenda, they -have no inherent meaning to Org-mode. The cookies can be highlighted with +have no inherent meaning to Org mode. The cookies can be highlighted with special faces by customizing the variable @code{org-priority-faces}. Priorities can be attached to any outline node; they do not need to be TODO @@ -4363,9 +4427,11 @@ off a box while there are unchecked boxes above it. @table @kbd @orgcmd{C-c C-c,org-toggle-checkbox} -Toggle checkbox status or (with prefix arg) checkbox presence at point. With -double prefix argument, set it to @samp{[-]}, which is considered to be an -intermediate state. +Toggle checkbox status or (with prefix arg) checkbox presence at point. +With a single prefix argument, add an empty checkbox or remove the current +one@footnote{`C-u C-c C-c' on the @emph{first} item of a list with no checkbox +will add checkboxes to the rest of the list.}. With a double prefix argument, set it to @samp{[-]}, which is +considered to be an intermediate state. @orgcmd{C-c C-x C-b,org-toggle-checkbox} Toggle checkbox status or (with prefix arg) checkbox presence at point. With double prefix argument, set it to @samp{[-]}, which is considered to be an @@ -4410,7 +4476,7 @@ hand, use this command to get things back into sync. @cindex sparse tree, tag based An excellent way to implement labels and contexts for cross-correlating -information is to assign @i{tags} to headlines. Org-mode has extensive +information is to assign @i{tags} to headlines. Org mode has extensive support for tags. @vindex org-tag-faces @@ -4489,7 +4555,7 @@ also a special command for inserting tags: @orgcmd{C-c C-q,org-set-tags-command} @cindex completion, of tags @vindex org-tags-column -Enter new tags for the current headline. Org-mode will either offer +Enter new tags for the current headline. Org mode will either offer completion or a special single-key interface for setting tags, see below. After pressing @key{RET}, the tags will be inserted and aligned to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all @@ -4532,7 +4598,7 @@ by adding a STARTUP option line to that file: #+STARTUP: noptag @end example -By default Org-mode uses the standard minibuffer completion facilities for +By default Org mode uses the standard minibuffer completion facilities for entering tags. However, it also implements another, quicker, tag selection method called @emph{fast tag selection}. This allows you to select and deselect tags with just a single key press. For this to work well you should @@ -4691,25 +4757,26 @@ and properties. For a complete description with many examples, see @chapter Properties and columns @cindex properties -Properties are a set of key-value pairs associated with an entry. There -are two main applications for properties in Org-mode. First, properties -are like tags, but with a value. Second, you can use properties to -implement (very basic) database capabilities in an Org buffer. For -an example of the first application, imagine maintaining a file where +A property is a key-value pair associated with an entry. Properties can be +set so they are associated with a single entry, with every entry in a tree, +or with every entry in an Org mode file. + +There are two main applications for properties in Org mode. First, +properties are like tags, but with a value. Imagine maintaining a file where you document bugs and plan releases for a piece of software. Instead of -using tags like @code{:release_1:}, @code{:release_2:}, one can use a +using tags like @code{:release_1:}, @code{:release_2:}, you can use a property, say @code{:Release:}, that in different subtrees has different -values, such as @code{1.0} or @code{2.0}. For an example of the second -application of properties, imagine keeping track of your music CDs, -where properties could be things such as the album, artist, date of -release, number of tracks, and so on. +values, such as @code{1.0} or @code{2.0}. Second, you can use properties to +implement (very basic) database capabilities in an Org buffer. Imagine +keeping track of your music CDs, where properties could be things such as the +album, artist, date of release, number of tracks, and so on. Properties can be conveniently edited and viewed in column view (@pxref{Column view}). @menu * Property syntax:: How properties are spelled out -* Special properties:: Access to other Org-mode features +* Special properties:: Access to other Org mode features * Property searches:: Matching property values * Property inheritance:: Passing values down the tree * Column view:: Tabular viewing and editing @@ -4721,7 +4788,8 @@ Properties can be conveniently edited and viewed in column view @cindex property syntax @cindex drawer, for properties -Properties are key-value pairs. They need to be inserted into a special +Properties are key-value pairs. When they are associated with a single entry +or with a tree they need to be inserted into a special drawer (@pxref{Drawers}) with the name @code{PROPERTIES}. Each property is specified on a single line, with the key (surrounded by colons) first, and the value after it. Here is an example: @@ -4739,6 +4807,10 @@ first, and the value after it. Here is an example: :END: @end example +Depending on the value of @code{org-use-property-inheritance}, a property set +this way will either be associated with a single entry, or the sub-tree +defined by the entry, see @ref{Property inheritance}. + You may define the allowed values for a particular property @samp{:Xyz:} by setting a property @samp{:Xyz_ALL:}. This special property is @emph{inherited}, so if you set it in a level 1 entry, it will apply to @@ -4763,6 +4835,37 @@ file, use a line like #+PROPERTY: NDisks_ALL 1 2 3 4 @end example +If you want to add to the value of an existing property, append a @code{+} to +the property name. The following results in the property @code{var} having +the value ``foo=1 bar=2''. +@cindex property, + +@example +#+PROPERTY: var foo=1 +#+PROPERTY: var+ bar=2 +@end example + +It is also possible to add to the values of inherited properties. The +following results in the @code{genres} property having the value ``Classic +Baroque'' under the @code{Goldberg Variations} subtree. +@cindex property, + +@example +* CD collection +** Classic + :PROPERTIES: + :GENRES: Classic + :END: +*** Goldberg Variations + :PROPERTIES: + :Title: Goldberg Variations + :Composer: J.S. Bach + :Artist: Glen Gould + :Publisher: Deutsche Grammophon + :NDisks: 1 + :GENRES+: Baroque + :END: +@end example +Note that a property can only have one entry per Drawer. + @vindex org-global-properties Property values set with the global variable @code{org-global-properties} can be inherited by all entries in all @@ -4803,7 +4906,7 @@ nearest column format definition. @section Special properties @cindex properties, special -Special properties provide an alternative access method to Org-mode features, +Special properties provide an alternative access method to Org mode features, like the TODO state or the priority of an entry, discussed in the previous chapters. This interface exists so that you can include these states in a column view (@pxref{Column view}), or to use them in queries. The following @@ -4885,9 +4988,9 @@ a regular expression and matched against the property values. @cindex inheritance, of properties @vindex org-use-property-inheritance -The outline structure of Org-mode documents lends itself to an +The outline structure of Org mode documents lends itself to an inheritance model of properties: if the parent in a tree has a certain -property, the children can inherit this property. Org-mode does not +property, the children can inherit this property. Org mode does not turn this on by default, because it can slow down property searches significantly and is often not needed. However, if you find inheritance useful, you can turn it on by setting the variable @@ -4898,7 +5001,7 @@ inherited properties. If a property has the value @samp{nil}, this is interpreted as an explicit undefine of the property, so that inheritance search will stop at this value and return @code{nil}. -Org-mode has a few properties for which inheritance is hard-coded, at +Org mode has a few properties for which inheritance is hard-coded, at least for the special applications for which they are used: @cindex property, COLUMNS @@ -4929,7 +5032,7 @@ subtree (@pxref{Tracking TODO state changes}). A great way to view and edit properties in an outline tree is @emph{column view}. In column view, each outline node is turned into a table row. Columns in this table provide access to properties of the -entries. Org-mode implements columns by overlaying a tabular structure +entries. Org mode implements columns by overlaying a tabular structure over the headline of each item. While the headlines have been turned into a table row, you can still change the visibility of the outline tree. For example, you get a compact table by switching to CONTENTS @@ -5231,9 +5334,9 @@ property API}. To assist project planning, TODO items can be labeled with a date and/or a time. The specially formatted string carrying the date and time -information is called a @emph{timestamp} in Org-mode. This may be a +information is called a @emph{timestamp} in Org mode. This may be a little confusing because timestamp is often used as indicating when -something was created or last changed. However, in Org-mode this term +something was created or last changed. However, in Org mode this term is used in a much wider sense. @menu @@ -5256,17 +5359,20 @@ is used in a much wider sense. @cindex scheduling A timestamp is a specification of a date (possibly with a time or a range of -times) in a special format, either @samp{<2003-09-16 Tue>} or -@samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue -12:00-12:30>}@footnote{This is inspired by the standard ISO 8601 date/time -format. To use an alternative format, see @ref{Custom time format}.}. A -timestamp can appear anywhere in the headline or body of an Org tree entry. -Its presence causes entries to be shown on specific dates in the agenda -(@pxref{Weekly/daily agenda}). We distinguish: +times) in a special format, either @samp{<2003-09-16 Tue>}@footnote{In this +simplest form, the day name is optional when you type the date yourself. +However, any dates inserted or modified by Org will add that day name, for +reading convenience.} or @samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 +Tue 12:00-12:30>}@footnote{This is inspired by the standard ISO 8601 +date/time format. To use an alternative format, see @ref{Custom time +format}.}. A timestamp can appear anywhere in the headline or body of an Org +tree entry. Its presence causes entries to be shown on specific dates in the +agenda (@pxref{Weekly/daily agenda}). We distinguish: @table @var @item Plain timestamp; Event; Appointment @cindex timestamp +@cindex appointment A simple timestamp just assigns a date/time to an item. This is just like writing down an appointment or event in a paper agenda. In the timeline and agenda displays, the headline of an entry associated with a @@ -5289,7 +5395,7 @@ following will show up in the agenda every Wednesday: @end example @item Diary-style sexp entries -For more complex date specifications, Org-mode supports using the special +For more complex date specifications, Org mode supports using the special sexp diary entries implemented in the Emacs calendar/diary package@footnote{When working with the standard diary sexp functions, you need to be very careful with the order of the arguments. That order depend @@ -5297,7 +5403,7 @@ evilly on the variable @code{calendar-date-style} (or, for older Emacs versions, @code{european-calendar-style}). For example, to specify a date December 12, 2005, the call might look like @code{(diary-date 12 1 2005)} or @code{(diary-date 1 12 2005)} or @code{(diary-date 2005 12 1)}, depending on -the settings. This has been the source of much confusion. Org-mode users +the settings. This has been the source of much confusion. Org mode users can resort to special versions of these functions like @code{org-date} or @code{org-anniversary}. These work just like the corresponding @code{diary-} functions, but with stable ISO order of arguments (year, month, day) wherever @@ -5338,7 +5444,7 @@ angular ones. These timestamps are inactive in the sense that they do @cindex creating timestamps @cindex timestamps, creating -For Org-mode to recognize timestamps, they need to be in the specific +For Org mode to recognize timestamps, they need to be in the specific format. All commands listed below produce timestamps in the correct format. @@ -5362,6 +5468,9 @@ Like @kbd{C-c .} and @kbd{C-c !}, but use the alternative format which contains date and time. The default time can be rounded to multiples of 5 minutes, see the option @code{org-time-stamp-rounding-minutes}. @c +@orgkey{C-c C-c} +Normalize timestamp, insert/fix day name if missing or wrong. +@c @orgcmd{C-c <,org-date-from-calendar} Insert a timestamp corresponding to the cursor date in the Calendar. @c @@ -5397,7 +5506,7 @@ the following column). @menu -* The date/time prompt:: How Org-mode helps you entering date and time +* The date/time prompt:: How Org mode helps you entering date and time * Custom time format:: Making dates look different @end menu @@ -5407,17 +5516,17 @@ the following column). @cindex time, reading in minibuffer @vindex org-read-date-prefer-future -When Org-mode prompts for a date/time, the default is shown in default +When Org mode prompts for a date/time, the default is shown in default date/time format, and the prompt therefore seems to ask for a specific format. But it will in fact accept any string containing some date and/or time information, and it is really smart about interpreting your input. You can, for example, use @kbd{C-y} to paste a (possibly multi-line) string -copied from an email message. Org-mode will find whatever information is in +copied from an email message. Org mode will find whatever information is in there and derive anything you have not specified from the @emph{default date and time}. The default is usually the current date and time, but when modifying an existing timestamp, or when entering the second stamp of a range, it is taken from the stamp in the buffer. When filling in -information, Org-mode assumes that most of the time you will want to enter a +information, Org mode assumes that most of the time you will want to enter a date in the future: if you omit the month/year and the given day/month is @i{before} today, it will assume that you mean a future date@footnote{See the variable @code{org-read-date-prefer-future}. You may set that variable to @@ -5426,7 +5535,7 @@ tomorrow.}. If the date has been automatically shifted into the future, the time prompt will show this with @samp{(=>F).} For example, let's assume that today is @b{June 13, 2006}. Here is how -various inputs will be interpreted, the items filled in by Org-mode are +various inputs will be interpreted, the items filled in by Org mode are in @b{bold}. @example @@ -5536,7 +5645,7 @@ minibuffer@footnote{If you find this distracting, turn the display of with @vindex org-display-custom-times @vindex org-time-stamp-custom-formats -Org-mode uses the standard ISO notation for dates and times as it is +Org mode uses the standard ISO notation for dates and times as it is defined in ISO 8601. If you cannot get used to this and require another representation of date and time to keep you happy, you can get it by customizing the variables @code{org-display-custom-times} and @@ -5548,7 +5657,7 @@ Toggle the display of custom formats for dates and times. @end table @noindent -Org-mode needs the default format for scanning, so the custom date/time +Org mode needs the default format for scanning, so the custom date/time format does not @emph{replace} the default format---instead it is put @emph{over} the default format using text properties. This has the following consequences: @@ -5625,23 +5734,23 @@ the task will automatically be forwarded until completed. @end example @noindent -@b{Important:} Scheduling an item in Org-mode should @i{not} be +@b{Important:} Scheduling an item in Org mode should @i{not} be understood in the same way that we understand @i{scheduling a meeting}. Setting a date for a meeting is just a simple appointment, you should mark this entry with a simple plain timestamp, to get this item shown on the date where it applies. This is a frequent misunderstanding by -Org users. In Org-mode, @i{scheduling} means setting a date when you +Org users. In Org mode, @i{scheduling} means setting a date when you want to start working on an action item. @end table You may use timestamps with repeaters in scheduling and deadline -entries. Org-mode will issue early and late warnings based on the +entries. Org mode will issue early and late warnings based on the assumption that the timestamp represents the @i{nearest instance} of the repeater. However, the use of diary sexp entries like @c @code{<%%(org-float t 42)>} @c -in scheduling and deadline timestamps is limited. Org-mode does not +in scheduling and deadline timestamps is limited. Org mode does not know enough about the internals of each sexp function to issue early and late warnings. However, it will show the item on each day where the sexp entry matches. @@ -5714,7 +5823,7 @@ to the previous week before any current timestamp. @cindex tasks, repeated @cindex repeated tasks -Some tasks need to be repeated again and again. Org-mode helps to +Some tasks need to be repeated again and again. Org mode helps to organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED, or plain timestamp. In the following example @example @@ -5734,7 +5843,7 @@ over-due, so it is important to be able to mark such an entry as completed once you have done so. When you mark a DEADLINE or a SCHEDULE with the TODO keyword DONE, it will no longer produce entries in the agenda. The problem with this is, however, that then also the @emph{next} instance of the -repeated entry will not be active. Org-mode deals with this in the following +repeated entry will not be active. Org mode deals with this in the following way: When you try to mark such an entry DONE (using @kbd{C-c C-t}), it will shift the base date of the repeating timestamp by the repeater interval, and immediately set the entry state back to TODO@footnote{In fact, the target @@ -5767,7 +5876,7 @@ task, this may not be the best way to handle it. For example, if you forgot to call your father for 3 weeks, it does not make sense to call him 3 times in a single day to make up for it. Finally, there are tasks like changing batteries which should always repeat a certain time -@i{after} the last time you did it. For these tasks, Org-mode has +@i{after} the last time you did it. For these tasks, Org mode has special repeaters @samp{++} and @samp{.+}. For example: @example @@ -5796,7 +5905,7 @@ created for this purpose, it is described in @ref{Structure editing}. @cindex clocking time @cindex time clocking -Org-mode allows you to clock the time you spend on specific tasks in a +Org mode allows you to clock the time you spend on specific tasks in a project. When you start working on an item, you can start the clock. When you stop working on that task, or when you mark the task done, the clock is stopped and the corresponding time interval is recorded. It @@ -5915,10 +6024,11 @@ formatted as one or several Org tables. @table @kbd @orgcmd{C-c C-x C-r,org-clock-report} Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock -report as an Org-mode table into the current file. When the cursor is +report as an Org mode table into the current file. When the cursor is at an existing clock table, just update it. When called with a prefix argument, jump to the first clock report in the current document and -update it. +update it. The clock table always includes also trees with +@code{:ARCHIVE:} tag. @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} Update dynamic block at point. The cursor needs to be in the @code{#+BEGIN} line of the dynamic block. @@ -6215,8 +6325,8 @@ not started at exactly the right moment. @kindex C-c C-x ; @kindex ; -Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown -timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everywhere else. +Calling @code{org-timer-set-timer} from an Org mode buffer runs a countdown +timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everwhere else. @code{org-timer-set-timer} prompts the user for a duration and displays a countdown timer in the modeline. @code{org-timer-default-timer} sets the @@ -6249,7 +6359,7 @@ trees to an archive file keeps the system compact and fast. Org's method for capturing new items is heavily inspired by John Wiegley excellent remember package. Up to version 6.36 Org used a special setup -for @file{remember.el}. @file{org-remember.el} is still part of Org-mode for +for @file{remember.el}. @file{org-remember.el} is still part of Org mode for backward compatibility with existing setups. You can find the documentation for org-remember at @url{http://orgmode.org/org-remember.pdf}. @@ -6393,7 +6503,7 @@ like this: @node Template elements, Template expansion, Capture templates, Capture templates @subsubsection Template elements -Now let's look at the elements of a template definition. Each entry in +Now lets look at the elements of a template definition. Each entry in @code{org-capture-templates} is a list with the following items: @table @var @@ -6418,8 +6528,8 @@ selection. The type of entry, a symbol. Valid values are: @table @code @item entry -An Org-mode node, with a headline. Will be filed as the child of the target -entry or as a top-level entry. The target file should be an Org-mode file. +An Org mode node, with a headline. Will be filed as the child of the target +entry or as a top-level entry. The target file should be an Org mode file. @item item A plain list item, placed in the first plain list at the target location. Again the target file should be an Org file. @@ -6436,7 +6546,7 @@ Text to be inserted as it is. @item target @vindex org-default-notes-file -Specification of where the captured item should be placed. In Org-mode +Specification of where the captured item should be placed. In Org mode files, targets usually define a node. Entries will become children of this node. Other types will be added to the table or list in the body of this node. Most target specifications contain a file name. If that file name is @@ -6536,7 +6646,7 @@ buffer again after capture is completed. In the template itself, special @kbd{%}-escapes@footnote{If you need one of these sequences literally, escape the @kbd{%} with a backslash.} allow -dynamic insertion of content. The templates are expanded in the order given here: +dynamic insertion of content. The templates are expanded in the order given here: @smallexample %[@var{file}] @r{insert the contents of the file given by @var{file}.} @@ -7032,6 +7142,7 @@ the front. With a prefix argument, file is added/moved to the end. @orgcmd{C-c ],org-remove-file} Remove current file from the list of agenda files. @kindex C-, +@cindex cycling, of agenda files @orgcmd{C-',org-cycle-agenda-files} @itemx C-, Cycle through agenda file list, visiting one file after the other. @@ -7187,7 +7298,7 @@ anniversaries, lunar phases, sunrise/set, recurrent appointments Org. It can be very useful to combine output from Org with the diary. -In order to include entries from the Emacs diary into Org-mode's +In order to include entries from the Emacs diary into Org mode's agenda, you only need to customize the variable @lisp @@ -7196,7 +7307,7 @@ agenda, you only need to customize the variable @noindent After that, everything will happen automatically. All diary entries including holidays, anniversaries, etc., will be included in the -agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and +agenda buffer created by Org mode. @key{SPC}, @key{TAB}, and @key{RET} can be used from the agenda buffer to jump to the diary file in order to edit existing diary entries. The @kbd{i} command to insert new entries for the current date works in the agenda buffer, as @@ -7207,7 +7318,7 @@ between calendar and agenda. If you are using the diary only for sexp entries and holidays, it is faster to not use the above setting, but instead to copy or even move -the entries into an Org file. Org-mode evaluates diary-style sexp +the entries into an Org file. Org mode evaluates diary-style sexp entries, and does it faster because there is no overhead for first creating the diary display. Note that the sexp entries must start at the left margin, no whitespace is allowed before them. For example, @@ -7253,7 +7364,7 @@ followed by a space and the class of the anniversary (@samp{birthday} or 1973-06-22 06-22 1955-08-02 wedding -2008-04-14 %s released version 6.01 of org-mode, %d years ago +2008-04-14 %s released version 6.01 of org mode, %d years ago @end example After a change to BBDB, or for the first agenda display during an Emacs @@ -7265,6 +7376,8 @@ in an Org or Diary file. @subsubheading Appointment reminders @cindex @file{appt.el} @cindex appointment reminders +@cindex appointment +@cindex reminders Org can interact with Emacs appointments notification facility. To add all the appointments of your agenda files, use the command @@ -7466,7 +7579,7 @@ other properties will slow down the search. However, once you have paid the price by accessing one property, testing additional properties is cheap again. -You can configure Org-mode to use property inheritance during a search, but +You can configure Org mode to use property inheritance during a search, but beware that this can slow down searches considerably. See @ref{Property inheritance}, for details. @@ -7499,7 +7612,7 @@ Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or @cindex timeline, single file @cindex time-sorted view -The timeline summarizes all time-stamped items from a single Org-mode +The timeline summarizes all time-stamped items from a single Org mode file in a @emph{time-sorted view}. The main purpose of this command is to give an overview over events in a project. @@ -7520,7 +7633,7 @@ The commands available in the timeline buffer are listed in @cindex text search @cindex searching, for text -This agenda view is a general text search facility for Org-mode entries. +This agenda view is a general text search facility for Org mode entries. It is particularly useful to find notes. @table @kbd @@ -7552,7 +7665,7 @@ If you are following a system like David Allen's GTD to organize your work, one of the ``duties'' you have is a regular review to make sure that all projects move along. A @emph{stuck} project is a project that has no defined next actions, so it will never show up in the TODO lists -Org-mode produces. During the review, you need to identify such +Org mode produces. During the review, you need to identify such projects and define next actions for them. @table @kbd @@ -7570,7 +7683,7 @@ work for you. The built-in default assumes that all your projects are level-2 headlines, and that a project is not stuck if it has at least one entry marked with a TODO keyword TODO or NEXT or NEXTACTION. -Let's assume that you, in your own way of using Org-mode, identify +Let's assume that you, in your own way of using Org mode, identify projects with a tag PROJECT, and that you use a TODO keyword MAYBE to indicate a project that should not be considered yet. Let's further assume that the TODO keyword DONE marks finished projects, and that NEXT @@ -7598,7 +7711,7 @@ will still be searched for stuck projects. @vindex org-agenda-prefix-format @vindex org-agenda-tags-column -Before displaying items in an agenda view, Org-mode visually prepares the +Before displaying items in an agenda view, Org mode visually prepares the items and sorts them. Each item occupies a single line. The line starts with a @emph{prefix} that contains the @emph{category} (@pxref{Categories}) of the item and other important information. You can customize in which @@ -7651,7 +7764,7 @@ You can set up icons for category by customizing the @subsection Time-of-day specifications @cindex time-of-day specification -Org-mode checks each agenda item for a time-of-day specification. The +Org mode checks each agenda item for a time-of-day specification. The time can be part of the timestamp that triggered inclusion into the agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time ranges can be specified with two timestamps, like @@ -7663,7 +7776,7 @@ plain text (like @samp{12:45} or a @samp{8:30-1pm}). If the agenda integrates the Emacs diary (@pxref{Weekly/daily agenda}), time specifications in diary entries are recognized as well. -For agenda display, Org-mode extracts the time and displays it in a +For agenda display, Org mode extracts the time and displays it in a standard 24 hour format as part of the prefix. The example times in the previous paragraphs would end up in the agenda like this: @@ -7861,6 +7974,7 @@ press @kbd{v a} again. @c @orgcmdkskc{v R,R,org-agenda-clockreport-mode} @vindex org-agenda-start-with-clockreport-mode +@vindex org-clock-report-include-clocking-task Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will always show a table with the clocked times for the timespan and file scope covered by the current agenda view. The initial setting for this mode in new @@ -7868,7 +7982,8 @@ agenda buffers can be set with the variable @code{org-agenda-start-with-clockreport-mode}. By using a prefix argument when toggling this mode (i.e.@: @kbd{C-u R}), the clock table will not show contributions from entries that are hidden by agenda filtering@footnote{Only -tags filtering will be respected here, effort filtering is ignored.}. +tags filtering will be respected here, effort filtering is ignored.}. See +also the variable @code{org-clock-report-include-clocking-task}. @c @orgkey{v c} @vindex org-agenda-clock-consistency-checks @@ -7921,18 +8036,27 @@ Remove the restriction lock on the agenda, if it is currently restricted to a file or subtree (@pxref{Agenda files}). @tsubheading{Secondary filtering and query editing} -@cindex filtering, by tag and effort, in agenda +@cindex filtering, by tag category and effort, in agenda @cindex tag filtering, in agenda +@cindex category filtering, in agenda @cindex effort filtering, in agenda @cindex query editing, in agenda +@orgcmd{<,org-agenda-filter-by-category} +@vindex org-agenda-category-filter-preset + +Filter the current agenda view with respect to the category of the item at +point. Pressing @code{<} another time will remove this filter. You can add +a filter preset through the option @code{org-agenda-category-filter-preset} +(see below.) + @orgcmd{/,org-agenda-filter-by-tag} -@vindex org-agenda-filter-preset +@vindex org-agenda-tag-filter-preset Filter the current agenda view with respect to a tag and/or effort estimates. The difference between this and a custom agenda command is that filtering is very fast, so that you can switch quickly between different filters without having to recreate the agenda.@footnote{Custom commands can preset a filter by -binding the variable @code{org-agenda-filter-preset} as an option. This +binding the variable @code{org-agenda-tag-filter-preset} as an option. This filter will then be applied to the view and persist as a basic filter through refreshes and more secondary filtering. The filter is a global property of the entire agenda view---in a block agenda, you should only set this in the @@ -8076,7 +8200,7 @@ agenda, change a tag for all headings in the region. @kindex , @item , Set the priority for the current item (@command{org-agenda-priority}). -Org-mode prompts for the priority character. If you reply with @key{SPC}, +Org mode prompts for the priority character. If you reply with @key{SPC}, the priority cookie is removed from the entry. @c @orgcmd{P,org-agenda-show-priority} @@ -8122,13 +8246,15 @@ command. @c @orgcmd{S-@key{right},org-agenda-do-date-later} Change the timestamp associated with the current line by one day into the -future. With a numeric prefix argument, change it by that many days. For -example, @kbd{3 6 5 S-@key{right}} will change it by a year. With a -@kbd{C-u} prefix, change the time by one hour. If you immediately repeat the -command, it will continue to change hours even without the prefix arg. With -a double @kbd{C-u C-u} prefix, do the same for changing minutes. The stamp -is changed in the original Org file, but the change is not directly reflected -in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer. +future. If the date is in the past, the first call to this command will move +it to today.@* +With a numeric prefix argument, change it by that many days. For example, +@kbd{3 6 5 S-@key{right}} will change it by a year. With a @kbd{C-u} prefix, +change the time by one hour. If you immediately repeat the command, it will +continue to change hours even without the prefix arg. With a double @kbd{C-u +C-u} prefix, do the same for changing minutes.@* +The stamp is changed in the original Org file, but the change is not directly +reflected in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer. @c @orgcmd{S-@key{left},org-agenda-do-date-earlier} Change the timestamp associated with the current line by one day @@ -8213,7 +8339,7 @@ f @r{Apply a function to marked entries.} Open the Emacs calendar and move to the date at the agenda cursor. @c @orgcmd{c,org-calendar-goto-agenda} -When in the calendar, compute and show the Org-mode agenda for the +When in the calendar, compute and show the Org mode agenda for the date at the cursor. @c @cindex diary entries, creating from agenda @@ -8226,8 +8352,8 @@ file@footnote{This file is parsed for the agenda when command in the calendar. The diary file will pop up in another window, where you can add the entry. -If you configure @code{org-agenda-diary-file} to point to an Org-mode file, -Org will create entries (in org-mode syntax) in that file instead. Most +If you configure @code{org-agenda-diary-file} to point to an Org mode file, +Org will create entries (in Org mode syntax) in that file instead. Most entries will be stored in a date-based outline tree that will later make it easy to archive appointments from previous months/years. The tree will be built under an entry with a @code{DATE_TREE} property, or else with years as @@ -8262,7 +8388,7 @@ This is a globally available command, and also available in the agenda menu. @vindex org-agenda-exporter-settings Write the agenda view to a file. Depending on the extension of the selected file name, the view will be exported as HTML (extension @file{.html} or -@file{.htm}), PostScript (extension @file{.ps}), PDF (extension @file{.pdf}), +@file{.htm}), Postscript (extension @file{.ps}), PDF (extension @file{.pdf}), and plain text (any other extension). When called with a @kbd{C-u} prefix argument, immediately open the newly created file. Use the variable @code{org-agenda-exporter-settings} to set options for @file{ps-print} and @@ -8403,7 +8529,7 @@ command @kbd{C-c a o} provides a similar view for office tasks. @cindex options, for custom agenda views @vindex org-agenda-custom-commands -Org-mode contains a number of variables regulating agenda construction +Org mode contains a number of variables regulating agenda construction and display. The global variables define the behavior for all agenda commands, including the custom commands. However, if you want to change some settings just for a single custom view, you can do so. Setting @@ -8475,11 +8601,11 @@ yourself. @cindex agenda views, exporting If you are away from your computer, it can be very useful to have a printed -version of some agenda views to carry around. Org-mode can export custom +version of some agenda views to carry around. Org mode can export custom agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's -@file{htmlize.el}.}, PostScript, PDF@footnote{To create PDF output, the +@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the ghostscript @file{ps2pdf} utility must be installed on the system. Selecting -a PDF file will also create the PostScript file.}, and iCalendar files. If +a PDF file will also create the postscript file.}, and iCalendar files. If you want to do this only occasionally, use the command @table @kbd @@ -8489,7 +8615,7 @@ you want to do this only occasionally, use the command @vindex org-agenda-exporter-settings Write the agenda view to a file. Depending on the extension of the selected file name, the view will be exported as HTML (extension @file{.html} or -@file{.htm}), PostScript (extension @file{.ps}), iCalendar (extension +@file{.htm}), Postscript (extension @file{.ps}), iCalendar (extension @file{.ics}), or plain text (any other extension). Use the variable @code{org-agenda-exporter-settings} to set options for @file{ps-print} and for @file{htmlize} to be used during export, for example @@ -8539,10 +8665,10 @@ or absolute. @end lisp The extension of the file name determines the type of export. If it is -@file{.html}, Org-mode will use the @file{htmlize.el} package to convert +@file{.html}, Org mode will use the @file{htmlize.el} package to convert the buffer to HTML and save it to this file name. If the extension is @file{.ps}, @code{ps-print-buffer-with-faces} is used to produce -PostScript output. If the extension is @file{.ics}, iCalendar export is +Postscript output. If the extension is @file{.ics}, iCalendar export is run export over all files that were used to construct the agenda, and limit the export to entries listed in the agenda. Any other extension produces a plain ASCII file. @@ -8573,7 +8699,7 @@ set options for the export commands. For example: @end lisp @noindent -This command sets two options for the PostScript exporter, to make it +This command sets two options for the Postscript exporter, to make it print in two columns in landscape format---the resulting page can be cut in two and then used in a paper agenda. The remaining settings modify the agenda prefix to omit category and scheduling information, and @@ -8586,14 +8712,14 @@ in @code{org-agenda-custom-commands} take precedence. @noindent From the command line you may also use @example -emacs -f org-batch-store-agenda-views -kill +emacs -eval (org-batch-store-agenda-views) -kill @end example @noindent or, if you need to modify some parameters@footnote{Quoting depends on the system you use, please check the FAQ for examples.} @example emacs -eval '(org-batch-store-agenda-views \ - org-agenda-span month \ + org-agenda-span (quote month) \ org-agenda-start-day "2007-11-01" \ org-agenda-include-diary nil \ org-agenda-files (quote ("~/org/project.org")))' \ @@ -8668,11 +8794,11 @@ the agenda). @node Markup, Exporting, Agenda Views, Top @chapter Markup for rich export -When exporting Org-mode documents, the exporter tries to reflect the +When exporting Org mode documents, the exporter tries to reflect the structure of the document as accurately as possible in the backend. Since export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting, -Org-mode has rules on how to prepare text for rich export. This section -summarizes the markup rules used in an Org-mode buffer. +Org mode has rules on how to prepare text for rich export. This section +summarizes the markup rules used in an Org mode buffer. @menu * Structural markup elements:: The basic structure as seen by the exporter @@ -8681,7 +8807,7 @@ summarizes the markup rules used in an Org-mode buffer. * Include files:: Include additional files into a document * Index entries:: Making an index * Macro replacement:: Use macros to create complex output -* Embedded LaTeX:: LaTeX can be freely used inside Org documents +* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents @end menu @node Structural markup elements, Images and tables, Markup, Markup @@ -8764,7 +8890,7 @@ the table of contents entirely, by configuring the variable @cindex text before first headline, markup rules @cindex #+TEXT -Org-mode normally exports the text before the first headline, and even uses +Org mode normally exports the text before the first headline, and even uses the first line as the document title. The text will be fully marked up. If you need to include literal HTML, @LaTeX{}, or DocBook code, use the special constructs described below in the sections for the individual exporters. @@ -8818,7 +8944,7 @@ can use this construct, which can also be used to format poetry. When quoting a passage from another document, it is customary to format this as a paragraph that is indented on both the left and the right margin. You -can include quotations in Org-mode documents like this: +can include quotations in Org mode documents like this: @cindex #+BEGIN_QUOTE @example @@ -8858,7 +8984,7 @@ multiple footnotes side by side. @cindex strike-through text, markup rules You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text -in the code and verbatim string is not processed for Org-mode specific +in the code and verbatim string is not processed for Org mode specific syntax; it is exported verbatim. @node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements @@ -8892,8 +9018,8 @@ Toggle the COMMENT keyword at the beginning of an entry. @cindex tables, markup rules @cindex #+CAPTION @cindex #+LABEL -Both the native Org-mode tables (@pxref{Tables}) and tables formatted with -the @file{table.el} package will be exported properly. For Org-mode tables, +Both the native Org mode tables (@pxref{Tables}) and tables formatted with +the @file{table.el} package will be exported properly. For Org mode tables, the lines before the first horizontal separator line will become table header lines. You can use the following lines somewhere before the table to assign a caption and a label for cross references, and in the text you can refer to @@ -8963,16 +9089,16 @@ If the example is source code from a programming language, or any other text that can be marked up by font-lock in Emacs, you can ask for the example to look like the fontified Emacs buffer@footnote{This works automatically for the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, -which is distributed with Org). Fontified code chunks in LaTeX can be +which is distributed with Org). Fontified code chunks in @LaTeX{} can be achieved using either the listings or the @url{http://code.google.com/p/minted, minted,} package. To use listings, turn on the variable @code{org-export-latex-listings} and ensure that the listings -package is included by the LaTeX header (e.g.@: by configuring +package is included by the @LaTeX{} header (e.g.@: by configuring @code{org-export-latex-packages-alist}). See the listings documentation for configuration options, including obtaining colored output. For minted it is necessary to install the program @url{http://pygments.org, pygments}, in addition to setting @code{org-export-latex-minted}, ensuring that the minted -package is included by the LaTeX header, and ensuring that the +package is included by the @LaTeX{} header, and ensuring that the @code{-shell-escape} option is passed to @file{pdflatex} (see @code{org-latex-to-pdf-process}). See the documentation of the variables @code{org-export-latex-listings} and @code{org-export-latex-minted} for @@ -8980,7 +9106,8 @@ further details.}. This is done with the @samp{src} block, where you also need to specify the name of the major mode that should be used to fontify the example@footnote{Code in @samp{src} blocks may also be evaluated either interactively or on export. See @pxref{Working With Source Code} for more -information on evaluating code blocks.}: +information on evaluating code blocks.}, see @ref{Easy Templates} for +shortcuts to easily insert code blocks. @cindex #+BEGIN_SRC @example @@ -9004,7 +9131,7 @@ cool. You can also add a @code{-r} switch which @i{removes} the labels from the source code@footnote{Adding @code{-k} to @code{-n -r} will @i{keep} the labels in the source code while using line numbers for the links, which might -be useful to explain those in an org-mode example code.}. With the @code{-n} +be useful to explain those in an Org mode example code.}. With the @code{-n} switch, links to these references will be labeled by the line numbers from the code listing, otherwise links will use the labels with no parentheses. Here is an example: @@ -9070,11 +9197,11 @@ include your @file{.emacs} file, you could use: The optional second and third parameter are the markup (e.g.@: @samp{quote}, @samp{example}, or @samp{src}), and, if the markup is @samp{src}, the language for formatting the contents. The markup is optional; if it is not -given, the text will be assumed to be in Org-mode format and will be +given, the text will be assumed to be in Org mode format and will be processed normally. The include line will also allow additional keyword parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the first line and for each following line, @code{:minlevel} in order to get -org-mode content demoted to a specified level, as well as any options +Org mode content demoted to a specified level, as well as any options accepted by the selected markup. For example, to include a file as an item, use @@ -9117,7 +9244,7 @@ an index} for more information. -@node Macro replacement, Embedded LaTeX, Index entries, Markup +@node Macro replacement, Embedded @LaTeX{}, Index entries, Markup @section Macro replacement @cindex macro replacement, during export @cindex #+MACRO @@ -9142,7 +9269,7 @@ Macro expansion takes place during export, and some people use it to construct complex HTML code. -@node Embedded LaTeX, , Macro replacement, Markup +@node Embedded @LaTeX{}, , Macro replacement, Markup @section Embedded @LaTeX{} @cindex @TeX{} interpretation @cindex @LaTeX{} interpretation @@ -9152,7 +9279,7 @@ include scientific notes, which often require mathematical symbols and the occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on Donald E. Knuth's @TeX{} system. Many of the features described here as ``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this -distinction.} is widely used to typeset scientific documents. Org-mode +distinction.} is widely used to typeset scientific documents. Org mode supports embedding @LaTeX{} code into its files, because many academics are used to writing and reading @LaTeX{} source code, and because it can be readily processed to produce pretty output for a number of export backends. @@ -9160,12 +9287,12 @@ readily processed to produce pretty output for a number of export backends. @menu * Special symbols:: Greek letters and other symbols * Subscripts and superscripts:: Simple syntax for raising/lowering text -* LaTeX fragments:: Complex formulas made easy -* Previewing LaTeX fragments:: What will this snippet look like? +* @LaTeX{} fragments:: Complex formulas made easy +* Previewing @LaTeX{} fragments:: What will this snippet look like? * CDLaTeX mode:: Speed up entering of formulas @end menu -@node Special symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX +@node Special symbols, Subscripts and superscripts, Embedded @LaTeX{}, Embedded @LaTeX{} @subsection Special symbols @cindex math symbols @cindex special symbols @@ -9178,7 +9305,7 @@ You can use @LaTeX{} macros to insert special symbols like @samp{\alpha} to indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion for these macros is available, just type @samp{\} and maybe a few letters, and press @kbd{M-@key{TAB}} to see possible completions. Unlike @LaTeX{} -code, Org-mode allows these macros to be present without surrounding math +code, Org mode allows these macros to be present without surrounding math delimiters, for example: @example @@ -9212,7 +9339,7 @@ buffer content which remains plain ASCII, but it overlays the UTF-8 character for display purposes only. @end table -@node Subscripts and superscripts, LaTeX fragments, Special symbols, Embedded LaTeX +@node Subscripts and superscripts, @LaTeX{} fragments, Special symbols, Embedded @LaTeX{} @subsection Subscripts and superscripts @cindex subscript @cindex superscript @@ -9250,13 +9377,13 @@ In addition to showing entities as UTF-8 characters, this command will also format sub- and superscripts in a WYSIWYM way. @end table -@node LaTeX fragments, Previewing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX +@node @LaTeX{} fragments, Previewing @LaTeX{} fragments, Subscripts and superscripts, Embedded @LaTeX{} @subsection @LaTeX{} fragments @cindex @LaTeX{} fragments @vindex org-format-latex-header Going beyond symbols and sub- and superscripts, a full formula language is -needed. Org-mode can contain @LaTeX{} math fragments, and it supports ways +needed. Org mode can contain @LaTeX{} math fragments, and it supports ways to process these for several export backends. When exporting to @LaTeX{}, the code is obviously left as it is. When exporting to HTML, Org invokes the @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in @@ -9309,10 +9436,10 @@ can configure the option @code{org-format-latex-options} to deselect the ones you do not wish to have interpreted by the @LaTeX{} converter. @vindex org-export-with-LaTeX-fragments -LaTeX processing can be configured with the variable +@LaTeX{} processing can be configured with the variable @code{org-export-with-LaTeX-fragments}. The default setting is @code{t} which means @file{MathJax} for HTML, and no processing for DocBook, ASCII and -LaTeX backends. You can also set this variable on a per-file basis using one +@LaTeX{} backends. You can also set this variable on a per-file basis using one of these lines: @example @@ -9322,9 +9449,9 @@ of these lines: #+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so} @end example -@node Previewing LaTeX fragments, CDLaTeX mode, LaTeX fragments, Embedded LaTeX -@subsection Previewing LaTeX fragments -@cindex LaTeX fragments, preview +@node Previewing @LaTeX{} fragments, CDLaTeX mode, @LaTeX{} fragments, Embedded @LaTeX{} +@subsection Previewing @LaTeX{} fragments +@cindex @LaTeX{} fragments, preview If you have @file{dvipng} installed, @LaTeX{} fragments can be processed to produce preview images of the typeset expressions: @@ -9349,18 +9476,18 @@ some aspects of the preview. In particular, the @code{:scale} (and for HTML export, @code{:html-scale}) property can be used to adjust the size of the preview images. -@node CDLaTeX mode, , Previewing LaTeX fragments, Embedded LaTeX -@subsection Using CDLa@TeX{} to enter math -@cindex CDLa@TeX{} +@node CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{} +@subsection Using CD@LaTeX{} to enter math +@cindex CD@LaTeX{} -CDLa@TeX{} mode is a minor mode that is normally used in combination with a +CD@LaTeX{} mode is a minor mode that is normally used in combination with a major @LaTeX{} mode like AUC@TeX{} in order to speed-up insertion of -environments and math templates. Inside Org-mode, you can make use of -some of the features of CDLa@TeX{} mode. You need to install +environments and math templates. Inside Org mode, you can make use of +some of the features of CD@LaTeX{} mode. You need to install @file{cdlatex.el} and @file{texmathp.el} (the latter comes also with AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}. -Don't use CDLa@TeX{} mode itself under Org-mode, but use the light -version @code{org-cdlatex-mode} that comes as part of Org-mode. Turn it +Don't use CD@LaTeX{} mode itself under Org mode, but use the light +version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it on for the current buffer with @code{M-x org-cdlatex-mode}, or for all Org files with @@ -9369,7 +9496,7 @@ Org files with @end lisp When this mode is enabled, the following features are present (for more -details see the documentation of CDLa@TeX{} mode): +details see the documentation of CD@LaTeX{} mode): @itemize @bullet @kindex C-c @{ @item @@ -9377,7 +9504,7 @@ Environment templates can be inserted with @kbd{C-c @{}. @item @kindex @key{TAB} The @key{TAB} key will do template expansion if the cursor is inside a -@LaTeX{} fragment@footnote{Org-mode has a method to test if the cursor is +@LaTeX{} fragment@footnote{Org mode has a method to test if the cursor is inside such a fragment, see the documentation of the function @code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor @@ -9414,20 +9541,20 @@ is normal. @chapter Exporting @cindex exporting -Org-mode documents can be exported into a variety of other formats. For +Org mode documents can be exported into a variety of other formats. For printing and sharing of notes, ASCII export produces a readable and simple version of an Org file. HTML export allows you to publish a notes file on the web, while the XOXO format provides a solid base for exchange with a -broad range of other applications. @LaTeX{} export lets you use Org-mode and +broad range of other applications. @LaTeX{} export lets you use Org mode and its structured editing functions to easily create @LaTeX{} files. DocBook export makes it possible to convert Org files to many other formats using -DocBook tools. OpenDocumentText export allows seamless collaboration across -organizational boundaries. For project management you can create gantt and -resource charts by using TaskJuggler export. To incorporate entries with -associated times like deadlines or appointments into a desktop calendar -program like iCal, Org-mode can also produce extracts in the iCalendar -format. Currently Org-mode only supports export, not import of these -different formats. +DocBook tools. OpenDocument Text(@acronym{ODT}) export allows seamless +colloboration across organizational boundaries. For project management you +can create gantt and resource charts by using TaskJuggler export. To +incorporate entries with associated times like deadlines or appointments into +a desktop calendar program like iCal, Org mode can also produce extracts in +the iCalendar format. Currently Org mode only supports export, not import of +these different formats. Org supports export of selected regions when @code{transient-mark-mode} is enabled (default in Emacs 23). @@ -9438,9 +9565,9 @@ enabled (default in Emacs 23). * The export dispatcher:: How to access exporter commands * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding * HTML export:: Exporting to HTML -* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF +* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF * DocBook export:: Exporting to DocBook -* OpenDocumentText export:: Exporting to OpenDocumentText +* OpenDocument Text export:: Exporting to OpenDocument Text * TaskJuggler export:: Exporting to TaskJuggler * Freemind export:: Exporting to Freemind mind maps * XOXO export:: Exporting to XOXO @@ -9456,7 +9583,8 @@ enabled (default in Emacs 23). @cindex org-export-with-tasks You may use tags to select the parts of a document that should be exported, or to exclude parts from export. This behavior is governed by two variables: -@code{org-export-select-tags} and @code{org-export-exclude-tags}. +@code{org-export-select-tags} and @code{org-export-exclude-tags}, +respectively defaulting to @code{'(:export:)} and @code{'(:noexport:)}. @enumerate @item @@ -9517,10 +9645,11 @@ Insert template with export options, see example below. @vindex user-full-name @vindex user-mail-address @vindex org-export-default-language +@vindex org-export-date-timestamp-format @example #+TITLE: the title to be shown (default is the buffer name) #+AUTHOR: the author (default taken from @code{user-full-name}) -#+DATE: a date, fixed, or a format string for @code{format-time-string} +#+DATE: a date, an Org timestamp@footnote{@code{org-export-date-timestamp-format} defines how this timestamp will be exported.}, or a format string for @code{format-time-string} #+EMAIL: his/her email address (default from @code{user-mail-address}) #+DESCRIPTION: the page description, e.g.@: for the XHTML meta tag #+KEYWORDS: the page keywords, e.g.@: for the XHTML meta tag @@ -9528,19 +9657,19 @@ Insert template with export options, see example below. #+TEXT: Some descriptive text to be inserted at the beginning. #+TEXT: Several lines may be given. #+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ... -#+BIND: lisp-var lisp-val, e.g.@:: org-export-latex-low-levels itemize +#+BIND: lisp-var lisp-val, e.g.@:: @code{org-export-latex-low-levels itemize} @r{You need to confirm using these, or configure @code{org-export-allow-BIND}} #+LINK_UP: the ``up'' link of an exported page #+LINK_HOME: the ``home'' link of an exported page -#+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage@{xyz@} +#+LATEX_HEADER: extra line(s) for the @LaTeX{} header, like \usepackage@{xyz@} #+EXPORT_SELECT_TAGS: Tags that select a tree for export #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export #+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file @end example @noindent -The OPTIONS line is a compact@footnote{If you want to configure many options -this way, you can use several OPTIONS lines.} form to specify export +The @code{#+OPTIONS} line is a compact@footnote{If you want to configure many options +this way, you can use several @code{#+OPTIONS} lines.} form to specify export settings. Here you can: @cindex headline levels @cindex section-numbers @@ -9642,7 +9771,7 @@ not set, or force processing in the current Emacs process if set. @cindex Latin-1 export @cindex UTF-8 export -ASCII export produces a simple and very readable version of an Org-mode +ASCII export produces a simple and very readable version of an Org mode file, containing only plain ASCII. Latin-1 and UTF-8 export augment the file with special characters and symbols available in these encodings. @@ -9697,18 +9826,18 @@ Links will be exported in a footnote-like style, with the descriptive part in the text and the link in a note before the next heading. See the variable @code{org-export-ascii-links-to-notes} for details and other options. -@node HTML export, LaTeX and PDF export, ASCII/Latin-1/UTF-8 export, Exporting +@node HTML export, @LaTeX{} and PDF export, ASCII/Latin-1/UTF-8 export, Exporting @section HTML export @cindex HTML export -Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive +Org mode contains an HTML (XHTML 1.0 strict) exporter with extensive HTML formatting, in ways similar to John Gruber's @emph{markdown} language, but with additional support for tables. @menu * HTML Export commands:: How to invoke HTML export * HTML preamble and postamble:: How to insert a preamble and a postamble -* Quoting HTML tags:: Using direct HTML in Org-mode +* Quoting HTML tags:: Using direct HTML in Org mode * Links in HTML export:: How links will be interpreted and formatted * Tables in HTML export:: How to modify the formatting of tables * Images in HTML export:: How to insert figures into HTML output @@ -9746,11 +9875,11 @@ the region. This is good for cut-and-paste operations. @item C-c C-e v h/b/H/R Export only the visible part of the document. @item M-x org-export-region-as-html -Convert the region to HTML under the assumption that it was Org-mode +Convert the region to HTML under the assumption that it was Org mode syntax before. This is a global command that can be invoked in any buffer. @item M-x org-replace-region-by-HTML -Replace the active region (assumed to be in Org-mode syntax) by HTML +Replace the active region (assumed to be in Org mode syntax) by HTML code. @end table @@ -9852,7 +9981,7 @@ and @code{style} attributes for a link: @cindex #+ATTR_HTML @example -#+ATTR_HTML: title="The Org-mode homepage" style="color:red;" +#+ATTR_HTML: title="The Org mode homepage" style="color:red;" [[http://orgmode.org]] @end example @@ -9861,7 +9990,7 @@ and @code{style} attributes for a link: @cindex tables, in HTML @vindex org-export-html-table-tag -Org-mode tables are exported to HTML using the table tag defined in +Org mode tables are exported to HTML using the table tag defined in @code{org-export-html-table-tag}. The default setting makes tables without cell borders and frame. If you would like to change this for individual tables, place something like the following before the table: @@ -9870,7 +9999,7 @@ tables, place something like the following before the table: @cindex #+ATTR_HTML @example #+CAPTION: This is a table with lines around and between cells -#+ATTR_HTML: border="2" rules="all" frame="all" +#+ATTR_HTML: border="2" rules="all" frame="border" @end example @node Images in HTML export, Math formatting in HTML export, Tables in HTML export, HTML export @@ -9915,11 +10044,11 @@ You could use @code{http} addresses just as well. @cindex MathJax @cindex dvipng -@LaTeX{} math snippets (@pxref{LaTeX fragments}) can be displayed in two +@LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be displayed in two different ways on HTML pages. The default is to use the @uref{http://www.mathjax.org, MathJax system} which should work out of the box with Org mode installation because @code{http://orgmode.org} serves -@file{MathJax} for Org-mode users for small applications and for testing +@file{MathJax} for Org mode users for small applications and for testing purposes. @b{If you plan to use this regularly or on pages with significant page views, you should install@footnote{Installation instructions can be found on the MathJax website, see @@ -9985,7 +10114,7 @@ addition to any of the standard classes like for headlines, tables, etc. @example p.author @r{author information, including email} p.date @r{publishing date} -p.creator @r{creator info, about org-mode version} +p.creator @r{creator info, about org mode version} .title @r{document title} .todo @r{TODO keywords, all not-done states} .done @r{the DONE keywords, all states that count as done} @@ -10111,16 +10240,16 @@ 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 and PDF export, DocBook export, HTML export, Exporting +@node @LaTeX{} and PDF export, DocBook export, HTML export, Exporting @section @LaTeX{} and PDF export @cindex @LaTeX{} export @cindex PDF export @cindex Guerry, Bastien -Org-mode contains a @LaTeX{} exporter written by Bastien Guerry. With -further processing@footnote{The default LaTeX output is designed for -processing with pdftex or latex. It includes packages that are not -compatible with xetex and possibly luatex. See the variables +Org mode contains a @LaTeX{} exporter written by Bastien Guerry. With +further processing@footnote{The default @LaTeX{} output is designed for +processing with @code{pdftex} or @LaTeX{}. It includes packages that are not +compatible with @code{xetex} and possibly @code{luatex}. See the variables @code{org-export-latex-default-packages-alist} and @code{org-export-latex-packages-alist}.}, this backend is also used to produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to @@ -10130,15 +10259,15 @@ structured in order to be correctly exported: respect the hierarchy of sections. @menu -* LaTeX/PDF export commands:: Which key invokes which commands +* @LaTeX{}/PDF export commands:: * Header and sectioning:: Setting up the export file structure -* Quoting LaTeX code:: Incorporating literal @LaTeX{} code -* Tables in LaTeX export:: Options for exporting tables to @LaTeX{} -* Images in LaTeX export:: How to insert figures into @LaTeX{} output +* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code +* Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{} +* Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output * Beamer class export:: Turning the file into a presentation @end menu -@node LaTeX/PDF export commands, Header and sectioning, LaTeX and PDF export, LaTeX and PDF export +@node @LaTeX{}/PDF export commands, Header and sectioning, @LaTeX{} and PDF export, @LaTeX{} and PDF export @subsection @LaTeX{} export commands @cindex region, active @@ -10160,11 +10289,11 @@ Export to a temporary buffer. Do not create a file. @item C-c C-e v l/L Export only the visible part of the document. @item M-x org-export-region-as-latex -Convert the region to @LaTeX{} under the assumption that it was Org-mode +Convert the region to @LaTeX{} under the assumption that it was Org mode syntax before. This is a global command that can be invoked in any buffer. @item M-x org-replace-region-by-latex -Replace the active region (assumed to be in Org-mode syntax) by @LaTeX{} +Replace the active region (assumed to be in Org mode syntax) by @LaTeX{} code. @orgcmd{C-c C-e p,org-export-as-pdf} Export as @LaTeX{} and then process to PDF. @@ -10190,13 +10319,13 @@ with a numeric prefix argument. For example, @noindent creates two levels of headings and does the rest as items. -@node Header and sectioning, Quoting LaTeX code, LaTeX/PDF export commands, LaTeX and PDF export +@node Header and sectioning, Quoting @LaTeX{} code, @LaTeX{}/PDF export commands, @LaTeX{} and PDF export @subsection Header and sectioning structure @cindex @LaTeX{} class @cindex @LaTeX{} sectioning structure @cindex @LaTeX{} header -@cindex header, for LaTeX files -@cindex sectioning structure, for LaTeX export +@cindex header, for @LaTeX{} files +@cindex sectioning structure, for @LaTeX{} export By default, the @LaTeX{} output uses the class @code{article}. @@ -10224,10 +10353,10 @@ can also use @code{#+LATEX_HEADER: \usepackage@{xyz@}} to add lines to the header. See the docstring of @code{org-export-latex-classes} for more information. -@node Quoting LaTeX code, Tables in LaTeX export, Header and sectioning, LaTeX and PDF export +@node Quoting @LaTeX{} code, Tables in @LaTeX{} export, Header and sectioning, @LaTeX{} and PDF export @subsection Quoting @LaTeX{} code -Embedded @LaTeX{} as described in @ref{Embedded LaTeX}, will be correctly +Embedded @LaTeX{} as described in @ref{Embedded @LaTeX{}}, will be correctly inserted into the @LaTeX{} file. This includes simple macros like @samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore, you can add special code that should only be present in @LaTeX{} export with @@ -10236,7 +10365,7 @@ the following constructs: @cindex #+LaTeX @cindex #+BEGIN_LaTeX @example -#+LaTeX: Literal LaTeX code for export +#+LaTeX: Literal @LaTeX{} code for export @end example @noindent or @@ -10249,7 +10378,7 @@ All lines between these markers are exported literally @end example -@node Tables in LaTeX export, Images in LaTeX export, Quoting LaTeX code, LaTeX and PDF export +@node Tables in @LaTeX{} export, Images in @LaTeX{} export, Quoting @LaTeX{} code, @LaTeX{} and PDF export @subsection Tables in @LaTeX{} export @cindex tables, in @LaTeX{} export @@ -10286,7 +10415,7 @@ or to specify a multicolumn table with @code{tabulary} | ..... | ..... | @end example -@node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export +@node Images in @LaTeX{} export, Beamer class export, Tables in @LaTeX{} export, @LaTeX{} and PDF export @subsection Images in @LaTeX{} export @cindex images, inline in @LaTeX{} @cindex inlining images in @LaTeX{} @@ -10337,14 +10466,14 @@ will export the image wrapped in a @code{figure*} environment. If you need references to a label created in this way, write @samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. -@node Beamer class export, , Images in LaTeX export, LaTeX and PDF export +@node Beamer class export, , Images in @LaTeX{} export, @LaTeX{} and PDF export @subsection Beamer class export -The LaTeX class @file{beamer} allows production of high quality presentations -using LaTeX and pdf processing. Org-mode has special support for turning an -Org-mode file or tree into a @file{beamer} presentation. +The @LaTeX{} class @file{beamer} allows production of high quality presentations +using @LaTeX{} and pdf processing. Org mode has special support for turning an +Org mode file or tree into a @file{beamer} presentation. -When the LaTeX class for the current buffer (as set with @code{#+LaTeX_CLASS: +When the @LaTeX{} class for the current buffer (as set with @code{#+LaTeX_CLASS: beamer}) or subtree (set with a @code{LaTeX_CLASS} property) is @code{beamer}, a special export mode will turn the file or tree into a beamer presentation. Any tree with not-too-deep level nesting should in principle be @@ -10464,7 +10593,7 @@ Here is a simple example Org document that is intended for beamer export. For more information, see the documentation on Worg. -@node DocBook export, OpenDocumentText export, LaTeX and PDF export, Exporting +@node DocBook export, OpenDocument Text export, @LaTeX{} and PDF export, Exporting @section DocBook export @cindex DocBook export @cindex PDF export @@ -10620,7 +10749,7 @@ set: @cindex #+LABEL @cindex #+ATTR_DOCBOOK @example -#+CAPTION: The logo of Org-mode +#+CAPTION: The logo of Org mode #+LABEL: unicorn-svg #+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%" [[./img/org-mode-unicorn.svg]] @@ -10663,39 +10792,46 @@ special characters included in XHTML entities: @c begin opendocument -@node OpenDocumentText export, TaskJuggler export, DocBook export, Exporting -@section OpenDocumentText export -@cindex OpenDocumentText export +@node OpenDocument Text export, TaskJuggler export, DocBook export, Exporting +@section OpenDocument Text export @cindex K, Jambunathan - -Org-mode 7.6 supports export to OpenDocumentText format using -@file{org-odt.el} module contributed by Jambunathan K. This module can be -enabled in one of the following ways based on your mode of installation. - -@enumerate -@item -If you have downloaded the Org from the Web, either as a distribution -@file{.zip} or @file{.tar} file, or as a Git archive, enable the @code{odt} -option in variable @code{org-modules}. -@item -If you are using Org that comes bundled with Emacs, then you can install the -OpenDocumentText exporter using the package manager. To do this, customize -the variable @code{package-archives} to include -@uref{http://orgmode.org/pkg/releases/} as one of the package archives. -@end enumerate +@cindex ODT +@cindex OpenDocument +@cindex export, OpenDocument +@cindex LibreOffice +@cindex org-odt.el +@cindex org-modules + +Orgmode@footnote{Versions 7.8 or later} supports export to OpenDocument Text +(@acronym{ODT}) format using the @file{org-odt.el} module. Documents created +by this exporter use the @cite{OpenDocument-v1.2 +specification}@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html, +Open Document Format for Office Applications (OpenDocument) Version 1.2}} and +are compatible with LibreOffice 3.4. @menu -* OpenDocumentText export commands::How to invoke OpenDocumentText export -* Applying Custom Styles:: How to apply custom styles to the output -* Converting to Other formats:: How to convert to formats like doc, docx etc -* Links in OpenDocumentText export:: How links will be interpreted and formatted -* Tables in OpenDocumentText export:: Tables are exported as HTML tables -* Images in OpenDocumentText export:: How to insert figures into DocBook output -* Additional Documentation:: Where to find more information +* Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on +* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export +* Applying custom styles:: How to apply custom styles to the output +* Links in @acronym{ODT} export:: How links will be interpreted and formatted +* Tables in @acronym{ODT} export:: How Tables are exported +* Images in @acronym{ODT} export:: How to insert images +* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted +* Literal examples in @acronym{ODT} export:: How source and example blocks are formatted +* Advanced topics in @acronym{ODT} export:: Read this if you are a power user @end menu -@node OpenDocumentText export commands, Applying Custom Styles, OpenDocumentText export, OpenDocumentText export -@subsection OpenDocumentText export commands +@node Pre-requisites for @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export, OpenDocument Text export +@subsection Pre-requisites for @acronym{ODT} export +@cindex zip +The @acronym{ODT} exporter relies on the @file{zip} program to create the final +output. Check the availability of this program before proceeding further. + +@node @acronym{ODT} export commands, Applying custom styles, Pre-requisites for @acronym{ODT} export, OpenDocument Text export +@subsection @acronym{ODT} export commands + +@subsubheading Exporting to @acronym{ODT} +@anchor{x-export-to-odt} @cindex region, active @cindex active region @@ -10703,113 +10839,791 @@ the variable @code{package-archives} to include @table @kbd @orgcmd{C-c C-e o,org-export-as-odt} @cindex property EXPORT_FILE_NAME -Export as OpenDocumentText file. For an Org file, @file{myfile.org}, the -OpenDocumentText file will be @file{myfile.odt}. The file will be -overwritten without warning. If there is an active region@footnote{This -requires @code{transient-mark-mode} to be turned on}, only the region will be -exported. If the selected region is a single tree@footnote{To select the -current subtree, use @kbd{C-c @@}.}, the tree head will become the document -title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} -property, that name will be used for the export. + +Export as OpenDocument Text file. +@vindex org-export-odt-preferred-output-format +If @code{org-export-odt-preferred-output-format} is specified, automatically +convert the exported file to that format. +@xref{x-export-to-other-formats,,Automatically exporting to other formats}. + +For an Org file @file{myfile.org}, the @acronym{ODT} file will be +@file{myfile.odt}. The file will be overwritten without warning. If there +is an active region,@footnote{This requires @code{transient-mark-mode} to be +turned on} only the region will be exported. If the selected region is a +single tree,@footnote{To select the current subtree, use @kbd{C-c @@}} the +tree head will become the document title. If the tree head entry has, or +inherits, an @code{EXPORT_FILE_NAME} property, that name will be used for the +export. + @orgcmd{C-c C-e O,org-export-as-odt-and-open} -Export as OpenDocumentText file and open the resulting file. +Export as OpenDocument Text file and open the resulting file. +@vindex org-export-odt-preferred-output-format +If @code{org-export-odt-preferred-output-format} is specified, open the +converted file instead. +@xref{x-export-to-other-formats,,Automatically exporting to other formats}. @end table -@node Applying Custom Styles, Converting to Other formats, OpenDocumentText export commands, OpenDocumentText export -@subsection Applying Custom Styles +@subsubheading Automatically exporting to other formats +@anchor{x-export-to-other-formats} +@vindex org-export-odt-preferred-output-format +Very often, you will find yourself exporting to @acronym{ODT} format, only to +immediately save the exported document to a different format like @samp{pdf}. +In such cases, you will find it convenient to configure a converter +(@pxref{Exporting and converting to other formats}) and specify your +preferred output format by customizing the variable +@code{org-export-odt-preferred-output-format}. This way, the export commands +(@pxref{x-export-to-odt,,Exporting to ODT}) can be extended to also export to +the preferred format. + +@node Applying custom styles, Links in @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export +@subsection Applying custom styles @cindex styles, custom @cindex template, custom -@vindex org-export-odt-styles-file +The @acronym{ODT} exporter ships with a set of OpenDocument styles +(@pxref{Working with OpenDocument style files}) that ensure a well-formatted +output. These factory styles, however, may not cater to your specific +tastes. To customize the output, you can either modify the above styles +files directly, or generate the required styles using an application like +LibreOffice. The latter method is suitable for expert and non-expert +users alike, and is described here. -OpenDocumentExporter ships with a custom @file{styles.xml} for formatting of -the exported file. To customize the output to suit your needs you can use -one of the following methods: +@subsubsection Applying custom styles - the easy way @enumerate @item -Customize the variable @code{org-export-odt-styles-file} to point to either a -@file{styles.xml} file, a OpenDocument Text Template file @code{.ott} or a -combination of Text or Template Document together with a set of member files. -Use the first two options if the styles.xml has no references to additional -set of files and use the last option if the @file{styles.xml} references -additional files like header and footer images. +Create a sample @file{example.org} file with the below settings and export it +to @acronym{ODT} format. + +@example +#+OPTIONS: H:10 num:t +@end example + +@item +Open the above @file{example.odt} using LibreOffice. Use the @file{Stylist} +to locate the target styles - these typically have the @samp{Org} prefix - +and modify those to your taste. Save the modified file either as an +OpenDocument Text (@file{.odt}) or OpenDocument Template (@file{.ott}) file. + @item -Use an external tool like unoconv to apply custom templates. +@cindex #+ODT_STYLES_FILE +@vindex org-export-odt-styles-file +Customize the variable @code{org-export-odt-styles-file} and point it to the +newly created file. For additional configuration options +@pxref{x-overriding-factory-styles,,Overriding factory styles}. + +If you would like to choose a style on a per-file basis, you can use the +@code{#+ODT_STYLES_FILE} option. A typical setting will look like + +@example +#+ODT_STYLES_FILE: "/path/to/example.ott" +@end example + +or + +@example +#+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png")) +@end example + @end enumerate -For best results, it is necessary that the style names used by -OpenDocumentText exporter match that used in the @file{styles.xml}. +@subsubsection Using third-party styles and templates + +You can use third-party styles and templates for customizing your output. +This will produce the desired output only if the template provides all +style names that the @samp{ODT} exporter relies on. Unless this condition is +met, the output is going to be less than satisfactory. So it is highly +recommended that you only work with templates that are directly derived from +the factory settings. + +@node Links in @acronym{ODT} export, Tables in @acronym{ODT} export, Applying custom styles, OpenDocument Text export +@subsection Links in @acronym{ODT} export +@cindex tables, in DocBook export + +The @acronym{ODT} exporter creates cross-references (aka bookmarks) for +internal links. It creates Internet-style links for all other links. + +@node Tables in @acronym{ODT} export, Images in @acronym{ODT} export, Links in @acronym{ODT} export, OpenDocument Text export +@subsection Tables in @acronym{ODT} export +@cindex tables, in DocBook export -@node Converting to Other formats, Links in OpenDocumentText export, Applying Custom Styles, OpenDocumentText export -@subsection Converting to Other formats +Export of native Org mode tables (@pxref{Tables}) and simple @file{table.el} +tables is supported. However, export of complex @file{table.el} tables - +tables that have column or row spans - is not supported. Such tables are +stripped from the exported document. +By default, a table is exported with top and bottom frames and with +rules separating row and column groups (@pxref{Column groups}). If the table +specifies alignment and relative width for its columns (@pxref{Column width +and alignment}) then these are honored on export.@footnote{The column widths +are interpreted as weighted ratios with the default weight being 1} + +@cindex #+ATTR_ODT +If you are not satisfied with the default formatting of tables, you can +create custom table styles and associate them with a table using +the @code{#+ATTR_ODT} line. @xref{Customizing tables in @acronym{ODT} export}. + +@node Images in @acronym{ODT} export, Math formatting in @acronym{ODT} export, Tables in @acronym{ODT} export, OpenDocument Text export +@subsection Images in @acronym{ODT} export +@cindex images, embedding in @acronym{ODT} +@cindex embedding images in @acronym{ODT} + +@subsubheading Embedding images +You can embed images within the exported document by providing a link to the +desired image file with no link description. For example, to embed +@samp{img.png} do either of the following: + +@example +[[file:img.png]] +@end example + +@example +[[./img.png]] +@end example + +@subsubheading Embedding clickable images +You can create clickable images by providing a link whose description is a +link to an image file. For example, to embed a image +@file{org-mode-unicorn.png} which when clicked jumps to +@uref{http://Orgmode.org} website, do the following + +@example +[[http://orgmode.org][./org-mode-unicorn.png]] +@end example + +@subsubheading Sizing and scaling of embedded images + +You can control the size and scale of the embedded images using the +@code{#+ATTR_ODT} attribute. + +@vindex org-export-odt-pixels-per-inch +Note that the exporter specifies the desired size of the image in the final +document in units of centimetres. In order to scale the embedded images, the +exporter needs to compute the size of the image. This is done by retrieving +the image size in pixels and converting the pixel units to centimetres using +@code{org-export-odt-pixels-per-inch}. The default value of this variable is +set to @code{display-pixels-per-inch}. You can tweak this variable to +achieve the best results. + +The examples below illustrate the various possibilities. + +@table @asis + +@item Explicitly size the image +To embed @file{img.png} as a 10 cm x 10 cm image, do the following: + +@example +#+ATTR_ODT: :width 10 :height 10 +[[./img.png]] +@end example + +@item Scale the image +To embed @file{img.png} at half its size, do the following: + +@example +#+ATTR_ODT: :scale 0.5 +[[./img.png]] +@end example + +@item Scale the image to a specific width +To embed @file{img.png} with a width of 10 cm while retaining the original +height:width ratio, do the following: + +@example +#+ATTR_ODT: :width 10 +[[./img.png]] +@end example + +@item Scale the image to a specific height +To embed @file{img.png} with a height of 10 cm while retaining the original +height:width ratio, do the following + +@example +#+ATTR_ODT: :height 10 +[[./img.png]] +@end example +@end table + +@node Math formatting in @acronym{ODT} export, Literal examples in @acronym{ODT} export, Images in @acronym{ODT} export, OpenDocument Text export +@subsection Math formatting in @acronym{ODT} export + +The @acronym{ODT} exporter has special support for handling math. + +@menu +* Working with @LaTeX{} math snippets:: How to embed @LaTeX{} math fragments +* Working with MathML or OpenDocument formula files:: How to embed equations in native format +@end menu + +@node Working with @LaTeX{} math snippets, Working with MathML or OpenDocument formula files, Math formatting in @acronym{ODT} export, Math formatting in @acronym{ODT} export +@subsubsection Working with @LaTeX{} math snippets + +@LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be embedded in the ODT +document in one of the following ways: + +@cindex MathML +@enumerate +@item MathML + +This option is activated on a per-file basis with + +@example +#+OPTIONS: LaTeX:t +@end example + +With this option, @LaTeX{} fragments are first converted into MathML +fragments using an external @LaTeX{}-to-MathML converter program. The +resulting MathML fragments are then embedded as an OpenDocument Formula in +the exported document. + +@vindex org-latex-to-mathml-convert-command +@vindex org-latex-to-mathml-jar-file + +You can specify the @LaTeX{}-to-MathML converter by customizing the variables +@code{org-latex-to-mathml-convert-command} and +@code{org-latex-to-mathml-jar-file}. + +If you prefer to use @file{MathToWeb}@footnote{See +@uref{http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl, MathToWeb}} as your +converter, you can configure the above variables as shown below. + +@lisp +(setq org-latex-to-mathml-convert-command + "java -jar %j -unicode -force -df %o %I" + org-latex-to-mathml-jar-file + "/path/to/mathtoweb.jar") +@end lisp + +You can use the following commands to quickly verify the reliability of +the @LaTeX{}-to-MathML converter. + +@table @kbd + +@item M-x org-export-as-odf +Convert a @LaTeX{} math snippet to OpenDocument formula (@file{.odf}) file. + +@item M-x org-export-as-odf-and-open +Convert a @LaTeX{} math snippet to OpenDocument formula (@file{.odf}) file and +open the formula file with the system-registered application. +@end table + +@cindex dvipng +@item PNG images + +This option is activated on a per-file basis with + +@example +#+OPTIONS: LaTeX:dvipng +@end example + +With this option, @LaTeX{} fragments are processed into PNG images and the +resulting images are embedded in the exported document. This method requires +that the @file{dvipng} program be available on your system. +@end enumerate + +@node Working with MathML or OpenDocument formula files, , Working with @LaTeX{} math snippets, Math formatting in @acronym{ODT} export +@subsubsection Working with MathML or OpenDocument formula files + +For various reasons, you may find embedding @LaTeX{} math snippets in an +@acronym{ODT} document less than reliable. In that case, you can embed a +math equation by linking to its MathML(@file{.mml}) source or its +OpenDocument formula (@file{.odf}) file as shown below: + +@example +[[./equation.mml]] +@end example + +or + +@example +[[./equation.odf]] +@end example + +@node Literal examples in @acronym{ODT} export, Advanced topics in @acronym{ODT} export, Math formatting in @acronym{ODT} export, OpenDocument Text export +@subsection Literal examples in @acronym{ODT} export + +Export of literal examples (@pxref{Literal examples}) with full fontification +is supported. This feature is enabled by default and is activated +automatically if an enhanced version of @file{htmlfontify.el} is available in +the @code{load-path}.@footnote{The @file{htmlfontify.el} that ships with +standard Emacs <= 24.1 has no support for @acronym{ODT} fontification. A +copy of the proposed version is available as an attachment to +@url{http://debbugs.gnu.org/cgi/bugreport.cgi?msg=5;filename=htmlfontify.el;att=9;bug=9914, +Emacs Bug #9914}.} + +@vindex org-export-odt-fontify-srcblocks + +The character styles used for fontification of the literal blocks are +auto-generated by the exporter in conjunction with @file{htmlfontify.el} +library and need not be included in the default @file{styles.xml} file. +These auto-generated styles have the @samp{OrgSrc} prefix and inherit their color +based on the face used by Emacs @code{font-lock} library. + +@vindex org-export-odt-create-custom-styles-for-srcblocks +If you prefer to use your own custom styles for fontification and disable +their auto-generation altogether, you can do so by customizing the variable +@code{org-export-odt-create-custom-styles-for-srcblocks}. + +You can turn off fontification support for literal examples by customizing +the variable @code{org-export-odt-fontify-srcblocks}. + + +@node Advanced topics in @acronym{ODT} export, , Literal examples in @acronym{ODT} export, OpenDocument Text export +@subsection Advanced topics in @acronym{ODT} export + +If you rely heavily on @acronym{ODT} export, you may want to exploit the full +set of features that the exporter offers. This section describes features +that would be of interest to power users. + +@menu +* Exporting and converting to other formats:: How to produce @samp{pdf} and other formats +* Working with OpenDocument style files:: Explore the internals +* Creating one-off styles:: How to produce custom highlighting etc +* Customizing tables in @acronym{ODT} export:: How to define and use Table templates +* Validating OpenDocument XML:: How to debug corrupt OpenDocument files +@end menu + +@node Exporting and converting to other formats, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export, Advanced topics in @acronym{ODT} export +@subsubsection Exporting and converting to other formats @cindex convert @cindex doc, docx -@vindex org-export-odt-styles-file - -Often times there is a need to convert OpenDocumentText files to other -formats like doc, docx or pdf. You can accomplish this by one of the -following methods: +The @acronym{ODT} exporter adds support for exporting Org outlines to formats +that are not supported natively by Org. It also adds support to convert +document from one format to another. To use these features, you need to +configure a command-line converter. Once a command-line converter is +configured you can use it to extend the list of formats to which Org can +export. @xref{x-export-to-other-formats,,Automatically exporting to other +formats}. You can also use it to perform one-off document conversion as +detailed below. +@vindex org-export-odt-convert @table @kbd -@item M-x org-lparse -Export the outline first to one of the native formats (like OpenDocumentText) -and immediately post-process it to other formats using an external converter. -@item M-x org-lparse-convert -Export an existing document to other formats using an external converter. +@item M-x org-export-odt-convert +Convert an existing document from one format to another as determined by the +variable @code{org-export-odt-convert-capabilities} +(@pxref{x-odt-converter-capabilities,,Configure converter +capabilities}). @strong{Please note} that you can use this command to even +convert documents that are produced outside of Org and in other formats than +@acronym{ODT} format. @end table -You can choose the converter used for conversion by customizing the variable -@code{org-lparse-convert-process}. +@subsubheading Pre-configured converters -@node Links in OpenDocumentText export, Tables in OpenDocumentText export, Converting to Other formats, OpenDocumentText export -@subsection Links in OpenDocumentText export -@cindex tables, in DocBook export +@cindex converter +The @acronym{ODT} exporter supports two converters out of the box: -OpenDocumentExporter creates cross-references (aka bookmarks) for links that -are destined locally. It creates internet style links for all other links. +@enumerate -@node Tables in OpenDocumentText export, Images in OpenDocumentText export, Links in OpenDocumentText export, OpenDocumentText export -@subsection Tables in OpenDocumentText export -@cindex tables, in DocBook export +@cindex @file{unoconv} +@item @file{unoconv} -Export of @file{table.el} tables with row or column spanning is not -supported. Such tables are stripped from the exported document. +This converter is available as an installable package in your favorite +distribution. -@node Images in OpenDocumentText export, Additional Documentation, Tables in OpenDocumentText export, OpenDocumentText export -@subsection Images in OpenDocumentText export -@cindex images, embedding in OpenDocumentText -@cindex embedding images in OpenDocumentText +@cindex @file{BasicODConverter} +@item @file{BasicODConverter} -OpenDocumentText exporter can embed images within the exported document. To -embed images, provide a link to the desired image file with no link -description. For example, the following links @samp{[[file:img.jpg]]} or -@samp{[[./img.jpg]]}, will result in embedding of @samp{img.jpg} in the -exported file. +@vindex org-odt-data-dir +This converter is distributed as a LibreOffice extension and can be found in +your Org distribution. See the subdirectory pointed to by the variable +@code{org-odt-data-dir}. -The exporter can also embed scaled and explicitly sized images within the -exported document. The markup of the scale and size specifications has not -been standardized yet and is hence conveniently skipped in this document. +@end enumerate + +@subsubheading Installing a new converter +If you prefer to use a converter other than the two mentioned above, then you +may have to do additional configuration. You can proceed as follows: + +@enumerate +@item Register the converter + +@vindex org-export-odt-convert-processes +Name your converter and add it to the list of known converters by customizing +the variable @code{org-export-odt-convert-processes}. Also specify how the +converter can be invoked via command-line to effect the conversion. + +@item Configure its capabilities +@vindex org-export-odt-convert-capabilities -The exporter can also make an image the clickable part of a link. To create -clickable images, provide a link whose description is a link to an image -file. For example, the following link -@samp{[[http://orgmode.org][./img.jpg]]}, will result in a clickable image -that links to @uref{http://Orgmode.org} website. +@anchor{x-odt-converter-capabilities} -@node Additional Documentation, , Images in OpenDocumentText export, OpenDocumentText export -@subsection Additional documentation +Specify the set of formats the converter can handle by customizing the +variable @code{org-export-odt-convert-capabilities}. Use the default value +for this variable as a guide for configuring your converter. As suggested by +the default setting, you can specify the full set of formats supported by the +converter and not limit yourself to specifying formats that are related to +just the OpenDocument Text format. + +@item Choose the converter + +@vindex org-export-odt-convert-process +Select the newly added converter as the preferred one by customizing the +variable @code{org-export-odt-convert-process}. +@end enumerate + +@node Working with OpenDocument style files, Creating one-off styles, Exporting and converting to other formats, Advanced topics in @acronym{ODT} export +@subsubsection Working with OpenDocument style files +@cindex styles, custom +@cindex template, custom -The OpenDocumentText exporter is still in development. For up to date -information, please follow Org mailing list @email{emacs-orgmode@@gnu.org} -closely. +This section explores the internals of the @acronym{ODT} exporter and the +means by which it produces styled documents. Read this section if you are +interested in exploring the automatic and custom OpenDocument styles used by +the exporter. + +@anchor{x-factory-styles} +@subsubheading Factory styles + +The @acronym{ODT} exporter relies on two files for generating its output. +These files are bundled with the distribution under the directory pointed to +by the variable @code{org-odt-styles-dir}. The two files are: + +@itemize +@anchor{x-orgodtstyles-xml} +@item +@file{OrgOdtStyles.xml} + +This file contributes to the @file{styles.xml} file of the final @samp{ODT} +document. This file gets modified for the following purposes: +@enumerate + +@item +To control outline numbering based on user settings. + +@item +To add styles generated by @file{htmlfontify.el} for fontification of code +blocks. +@end enumerate + +@anchor{x-orgodtcontenttemplate-xml} +@item +@file{OrgOdtContentTemplate.xml} + +This file contributes to the @file{content.xml} file of the final @samp{ODT} +document. The contents of the Org outline are inserted between the +@samp{}@dots{}@samp{} elements of this file. + +Apart from serving as a template file for the final @file{content.xml}, the +file serves the following purposes: +@enumerate + +@item +It contains automatic styles for formatting of tables which are referenced by +the exporter. + +@item +It contains @samp{}@dots{}@samp{} +elements that control how various entities - tables, images, equations etc - +are numbered. +@end enumerate +@end itemize + +@anchor{x-overriding-factory-styles} +@subsubheading Overriding factory styles +The following two variables control the location from which the @acronym{ODT} +exporter picks up the custom styles and content template files. You can +customize these variables to override the factory styles used by the +exporter. + +@itemize +@anchor{x-org-export-odt-styles-file} +@item +@code{org-export-odt-styles-file} + +Use this variable to specify the @file{styles.xml} that will be used in the +final output. You can specify one of the following values: + +@enumerate +@item A @file{styles.xml} file + +Use this file instead of the default @file{styles.xml} + +@item A @file{.odt} or @file{.ott} file + +Use the @file{styles.xml} contained in the specified OpenDocument Text or +Template file + +@item A @file{.odt} or @file{.ott} file and a subset of files contained within them + +Use the @file{styles.xml} contained in the specified OpenDocument Text or +Template file. Additionally extract the specified member files and embed +those within the final @samp{ODT} document. + +Use this option if the @file{styles.xml} file references additional files +like header and footer images. + +@item @code{nil} + +Use the default @file{styles.xml} +@end enumerate + +@anchor{x-org-export-odt-content-template-file} +@item +@code{org-export-odt-content-template-file} + +Use this variable to specify the blank @file{content.xml} that will be used +in the final output. +@end itemize + +@node Creating one-off styles, Customizing tables in @acronym{ODT} export, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export +@subsubsection Creating one-off styles + +There are times when you would want one-off formatting in the exported +document. You can achieve this by embedding raw OpenDocument XML in the Org +file. The use of this feature is better illustrated with couple of examples. + +@enumerate +@item Embedding ODT tags as part of regular text + +You can include simple OpenDocument tags by prefixing them with +@samp{@@}. For example, to highlight a region of text do the following: + +@example +@@This is a +highlighted text@@. But this is a +regular text. +@end example + +@strong{Hint:} To see the above example in action, edit your +@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a +custom @samp{Highlight} style as shown below. + +@example + + + +@end example + +@item Embedding a one-line OpenDocument XML + +You can add a simple OpenDocument one-liner using the @code{#+ODT:} +directive. For example, to force a page break do the following: + +@example +#+ODT: +@end example + +@strong{Hint:} To see the above example in action, edit your +@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a +custom @samp{PageBreak} style as shown below. + +@example + + + +@end example + +@item Embedding a block of OpenDocument XML + +You can add a large block of OpenDocument XML using the +@code{#+BEGIN_ODT}@dots{}@code{#+END_ODT} construct. + +For example, to create a one-off paragraph that uses bold text, do the +following: + +@example +#+BEGIN_ODT + +This paragraph is specially formatted and uses bold text. + +#+END_ODT +@end example + +@end enumerate + +@node Customizing tables in @acronym{ODT} export, Validating OpenDocument XML, Creating one-off styles, Advanced topics in @acronym{ODT} export +@subsubsection Customizing tables in @acronym{ODT} export +@cindex tables, in ODT export + +@cindex #+ATTR_ODT +You can override the default formatting of the table by specifying a custom +table style with the @code{#+ATTR_ODT} line. For a discussion on default +formatting of tables @pxref{Tables in @acronym{ODT} export}. + +This feature closely mimics the way table templates are defined in the +OpenDocument-v1.2 +specification.@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html, +OpenDocument-v1.2 Specification}} + + + +@subsubheading Custom table styles - an illustration + +To have a quick preview of this feature, install the below setting and export +the table that follows. + +@lisp +(setq org-export-odt-table-styles + (append org-export-odt-table-styles + '(("TableWithHeaderRowAndColumn" "Custom" + ((use-first-row-styles . t) + (use-first-column-styles . t))) + ("TableWithFirstRowandLastRow" "Custom" + ((use-first-row-styles . t) + (use-last-row-styles . t)))))) +@end lisp + +@example +#+ATTR_ODT: TableWithHeaderRowAndColumn +| Name | Phone | Age | +| Peter | 1234 | 17 | +| Anna | 4321 | 25 | +@end example + +In the above example, you used a template named @samp{Custom} and installed +two table styles with the names @samp{TableWithHeaderRowAndColumn} and +@samp{TableWithFirstRowandLastRow}. (@strong{Important:} The OpenDocument +styles needed for producing the above template have been pre-defined for you. +These styles are available under the section marked @samp{Custom Table +Template} in @file{OrgOdtContentTemplate.xml} +(@pxref{x-orgodtcontenttemplate-xml,,Factory styles}). If you need +additional templates you have to define these styles yourselves. + +@subsubheading Custom table styles - the nitty-gritty +To use this feature proceed as follows: + +@enumerate +@item +Create a table template@footnote{See the @code{} +element of the OpenDocument-v1.2 specification} + +A table template is nothing but a set of @samp{table-cell} and +@samp{paragraph} styles for each of the following table cell categories: + +@itemize @minus +@item Body +@item First column +@item Last column +@item First row +@item Last row +@item Even row +@item Odd row +@item Even column +@item Odd Column +@end itemize + +The names for the above styles must be chosen based on the name of the table +template using a well-defined convention. + +The naming convention is better illustrated with an example. For a table +template with the name @samp{Custom}, the needed style names are listed in +the following table. + +@multitable {Table cell type} {CustomEvenColumnTableCell} {CustomEvenColumnTableParagraph} +@headitem Table cell type +@tab @code{table-cell} style +@tab @code{paragraph} style +@item +@tab +@tab +@item Body +@tab @samp{CustomTableCell} +@tab @samp{CustomTableParagraph} +@item First column +@tab @samp{CustomFirstColumnTableCell} +@tab @samp{CustomFirstColumnTableParagraph} +@item Last column +@tab @samp{CustomLastColumnTableCell} +@tab @samp{CustomLastColumnTableParagraph} +@item First row +@tab @samp{CustomFirstRowTableCell} +@tab @samp{CustomFirstRowTableParagraph} +@item Last row +@tab @samp{CustomLastRowTableCell} +@tab @samp{CustomLastRowTableParagraph} +@item Even row +@tab @samp{CustomEvenRowTableCell} +@tab @samp{CustomEvenRowTableParagraph} +@item Odd row +@tab @samp{CustomOddRowTableCell} +@tab @samp{CustomOddRowTableParagraph} +@item Even column +@tab @samp{CustomEvenColumnTableCell} +@tab @samp{CustomEvenColumnTableParagraph} +@item Odd column +@tab @samp{CustomOddColumnTableCell} +@tab @samp{CustomOddColumnTableParagraph} +@end multitable + +To create a table template with the name @samp{Custom}, define the above +styles in the +@code{}...@code{} element +of the content template file (@pxref{x-orgodtcontenttemplate-xml,,Factory +styles}). + +@item +Define a table style@footnote{See the attributes @code{table:template-name}, +@code{table:use-first-row-styles}, @code{table:use-last-row-styles}, +@code{table:use-first-column-styles}, @code{table:use-last-column-styles}, +@code{table:use-banding-rows-styles}, and +@code{table:use-banding-column-styles} of the @code{} element in +the OpenDocument-v1.2 specification} + +@vindex org-export-odt-table-styles +To define a table style, create an entry for the style in the variable +@code{org-export-odt-table-styles} and specify the following: + +@itemize @minus +@item the name of the table template created in step (1) +@item the set of cell styles in that template that are to be activated +@end itemize + +For example, the entry below defines two different table styles +@samp{TableWithHeaderRowsAndColumns} and @samp{TableWithHeaderColumns} based +on the same template @samp{Custom}. The styles achieve their intended effect +by selectively activating the individual cell styles in that template. + +@lisp +(setq org-export-odt-table-styles + (append org-export-odt-table-styles + '(("TableWithHeaderRowAndColumn" "Custom" + ((use-first-row-styles . t) + (use-first-column-styles . t))) + ("TableWithFirstRowandLastRow" "Custom" + ((use-first-row-styles . t) + (use-last-row-styles . t)))))) +@end lisp + +@item +Associate a table with the table style + +To do this, specify the table style created in step (2) as part of +the @code{ATTR_ODT} line as shown below. + +@example +#+ATTR_ODT: TableWithHeaderRowAndColumn +| Name | Phone | Age | +| Peter | 1234 | 17 | +| Anna | 4321 | 25 | +@end example +@end enumerate + +@node Validating OpenDocument XML, , Customizing tables in @acronym{ODT} export, Advanced topics in @acronym{ODT} export +@subsubsection Validating OpenDocument XML + +Occasionally, you will discover that the document created by the +@acronym{ODT} exporter cannot be opened by your favorite application. One of +the common reasons for this is that the @file{.odt} file is corrupt. In such +cases, you may want to validate the document against the OpenDocument RELAX +NG Compact Syntax (RNC) schema. + +For de-compressing the @file{.odt} file@footnote{@file{.odt} files are +nothing but @samp{zip} archives}: @inforef{File Archives,,emacs}. For +general help with validation (and schema-sensitive editing) of XML files: +@inforef{Introduction,,nxml-mode}. + +@vindex org-export-odt-schema-dir +If you have ready access to OpenDocument @file{.rnc} files and the needed +schema-locating rules in a single folder, you can customize the variable +@code{org-export-odt-schema-dir} to point to that directory. The +@acronym{ODT} exporter will take care of updating the +@code{rng-schema-locating-files} for you. @c end opendocument -@node TaskJuggler export, Freemind export, OpenDocumentText export, Exporting +@node TaskJuggler export, Freemind export, OpenDocument Text export, Exporting @section TaskJuggler export @cindex TaskJuggler export @cindex Project management @@ -10820,7 +11634,7 @@ resource assignments based on the project outline and the constraints that you have provided. The TaskJuggler exporter is a bit different from other exporters, such as the -HTML and LaTeX exporters for example, in that it does not export all the +@code{HTML} and @LaTeX{} exporters for example, in that it does not export all the nodes of a document or strictly follow the order of the nodes in the document. @@ -10842,7 +11656,7 @@ Export as TaskJuggler file and then open the file with TaskJugglerUI. @subsection Tasks @vindex org-export-taskjuggler-project-tag -Create your tasks as you usually do with Org-mode. Assign efforts to each +Create your tasks as you usually do with Org mode. Assign efforts to each task using properties (it is easiest to do this in the column view). You should end up with something similar to the example by Peter Jones in @url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}. @@ -10954,9 +11768,9 @@ file will be @file{myfile.mm}. @section XOXO export @cindex XOXO export -Org-mode contains an exporter that produces XOXO-style output. +Org mode contains an exporter that produces XOXO-style output. Currently, this exporter only handles the general outline structure and -does not interpret any additional Org-mode features. +does not interpret any additional Org mode features. @table @kbd @orgcmd{C-c C-e x,org-export-as-xoxo} @@ -10975,10 +11789,10 @@ Export only the visible part of the document. @vindex org-icalendar-use-scheduled @vindex org-icalendar-categories @vindex org-icalendar-alarm-time -Some people use Org-mode for keeping track of projects, but still prefer a +Some people use Org mode for keeping track of projects, but still prefer a standard calendar application for anniversaries and appointments. In this case it can be useful to show deadlines and other time-stamped items in Org -files in the calendar application. Org-mode can export calendar information +files in the calendar application. Org mode can export calendar information in the standard iCalendar format. If you also want to have TODO entries included in the export, configure the variable @code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT, @@ -11422,7 +12236,7 @@ Defaults to @code{nil}. @subsection Generating an index @cindex index, in a publishing project -Org-mode can generate an index across the files of a publishing project. +Org mode can generate an index across the files of a publishing project. @multitable @columnfractions 0.25 0.75 @item @code{:makeindex} @@ -11442,7 +12256,7 @@ a title, style information, etc. For those people already utilizing third party sync tools such as @command{rsync} or @command{unison}, it might be preferable not to use the built in -@i{remote} publishing facilities of Org-mode which rely heavily on +@i{remote} publishing facilities of Org mode which rely heavily on Tramp. Tramp, while very useful and powerful, tends not to be so efficient for multiple file transfer and has been known to cause problems under heavy usage. @@ -11581,7 +12395,7 @@ This may be necessary in particular if files include other files via @cindex Davison, Dan @cindex source code, working with -Source code can be included in Org-mode documents using a @samp{src} block, +Source code can be included in Org mode documents using a @samp{src} block, e.g.@: @example @@ -11592,26 +12406,26 @@ e.g.@: #+END_SRC @end example -Org-mode provides a number of features for working with live source code, +Org mode provides a number of features for working with live source code, including editing of code blocks in their native major-mode, evaluation of code blocks, converting code blocks into source files (known as @dfn{tangling} in literate programming), and exporting code blocks and their results in several formats. This functionality was contributed by Eric Schulte and Dan Davison, and was originally named Org-babel. -The following sections describe Org-mode's code block handling facilities. +The following sections describe Org mode's code block handling facilities. @menu * Structure of code blocks:: Code block syntax described * Editing source code:: Language major-mode editing * Exporting code blocks:: Export contents and/or results * Extracting source code:: Create pure source code files -* Evaluating code blocks:: Place results of evaluation in the Org-mode buffer +* Evaluating code blocks:: Place results of evaluation in the Org mode buffer * Library of Babel:: Use and contribute to a library of useful code blocks * Languages:: List of supported code block languages * Header arguments:: Configure code block functionality * Results of evaluation:: How evaluation results are handled -* Noweb reference syntax:: Literate programming in Org-mode +* Noweb reference syntax:: Literate programming in Org mode * Key bindings and useful functions:: Work quickly with code blocks * Batch execution:: Call functions from the command line @end menu @@ -11623,18 +12437,26 @@ The following sections describe Org-mode's code block handling facilities. @section Structure of code blocks @cindex code block, structure @cindex source code, block structure +@cindex #+NAME +@cindex #+BEGIN_SRC -The structure of code blocks is as follows: +Live code blocks can be specified with a @samp{src} block or +inline.@footnote{Note that @samp{src} blocks may be inserted using Org mode's +@ref{Easy Templates} system} The structure of a @samp{src} block is @example -#+srcname: -#+begin_src
+#+NAME: +#+BEGIN_SRC
-#+end_src +#+END_SRC @end example -Switches and header arguments are optional. Code can also be embedded in text -inline using +The @code{#+NAME:} line is optional, and can be used to name the code +block. Live code blocks require that a language be specified on the +@code{#+BEGIN_SRC} line. Switches and header arguments are optional. +@cindex source code, inline + +Live code blocks can also be specified inline using @example src_@{@} @@ -11647,26 +12469,30 @@ src_[
]@{@} @end example @table @code -@item -This name is associated with the code block. This is similar to the -@samp{#+tblname} lines that can be used to name tables in Org-mode files. -Referencing the name of a code block makes it possible to evaluate the -block from other places in the file, other files, or from Org-mode table -formulas (see @ref{The spreadsheet}). Names are assumed to be unique by -evaluation functions and the behavior of multiple blocks of the same name is +@item <#+NAME: name> +This line associates a name with the code block. This is similar to the +@code{#+TBLNAME: NAME} lines that can be used to name tables in Org mode +files. Referencing the name of a code block makes it possible to evaluate +the block from other places in the file, from other files, or from Org mode +table formulas (see @ref{The spreadsheet}). Names are assumed to be unique +and the behavior of Org mode when two or more blocks share the same name is undefined. +@cindex #+NAME @item -The language of the code in the block. +The language of the code in the block (see @ref{Languages}). +@cindex source code, language @item -Optional switches controlling exportation of the code block (see switches discussion in +Optional switches control code block export (see the discussion of switches in @ref{Literal examples}) +@cindex source code, switches @item
Optional header arguments control many aspects of evaluation, export and -tangling of code blocks. See the @ref{Header arguments}. +tangling of code blocks (see @ref{Header arguments}). Header arguments can also be set on a per-buffer or per-subtree basis using properties. +@item source code, header arguments @item -The source code. +Source code in the specified language. @end table @comment node-name, next, previous, up @@ -11715,12 +12541,12 @@ variable @code{org-src-fontify-natively}. @cindex code block, exporting @cindex source code, exporting -It is possible to export the @emph{contents} of code blocks, the -@emph{results} of code block evaluation, @emph{neither}, or @emph{both}. For -most languages, the default exports the contents of code blocks. However, for -some languages (e.g.@: @code{ditaa}) the default exports the results of code -block evaluation. For information on exporting code block bodies, see -@ref{Literal examples}. +It is possible to export the @emph{code} of code blocks, the @emph{results} +of code block evaluation, @emph{both} the code and the results of code block +evaluation, or @emph{none}. For most languages, the default exports code. +However, for some languages (e.g.@: @code{ditaa}) the default exports the +results of code block evaluation. For information on exporting code block +bodies, see @ref{Literal examples}. The @code{:exports} header argument can be used to specify export behavior: @@ -11732,7 +12558,7 @@ The default in most languages. The body of the code block is exported, as described in @ref{Literal examples}. @item :exports results The code block will be evaluated and the results will be placed in the -Org-mode buffer for export, either updating previous results of the code +Org mode buffer for export, either updating previous results of the code block located anywhere in the buffer or, if no previous results exist, placing the results immediately after the code block. The body of the code block will not be exported. @@ -11745,8 +12571,8 @@ Neither the code block nor its results will be exported. It is possible to inhibit the evaluation of code blocks during export. Setting the @code{org-export-babel-evaluate} variable to @code{nil} will ensure that no code blocks are evaluated as part of the export process. This -can be useful in situations where potentially untrusted Org-mode files are -exported in an automated fashion, for example when Org-mode is used as the +can be useful in situations where potentially untrusted Org mode files are +exported in an automated fashion, for example when Org mode is used as the markup language for a wiki. @comment node-name, next, previous, up @@ -11798,14 +12624,15 @@ of tangled code files. @cindex source code, evaluating Code blocks can be evaluated@footnote{Whenever code is evaluated there is a -potential for that code to do harm. Org-mode provides a number of safeguards -to ensure that it only evaluates code with explicit confirmation from the -user. For information on these safeguards (and on how to disable them) see -@ref{Code evaluation security}.} and the results placed in the Org-mode -buffer. By default, evaluation is only turned on for @code{emacs-lisp} code -blocks, however support exists for evaluating blocks in many languages. See -@ref{Languages} for a list of supported languages. See @ref{Structure of -code blocks} for information on the syntax used to define a code block. +potential for that code to do harm. Org mode provides safeguards to ensure +that code is only evaluated after explicit confirmation from the user. For +information on these safeguards (and on how to disable them) see @ref{Code +evaluation security}.} and the results of evaluation optionally placed in the +Org mode buffer. By default, the evaluation facility is only enabled for +Lisp code blocks specified as @code{emacs-lisp}. However, souce code blocks +in many languages can be evaluated within Org mode (see @ref{Languages} for a +list of supported languages and @ref{Structure of code blocks} for +information on the syntax used to define a code block). @kindex C-c C-c There are a number of ways to evaluate code blocks. The simplest is to press @@ -11813,64 +12640,52 @@ There are a number of ways to evaluate code blocks. The simplest is to press @code{org-babel-no-eval-on-ctrl-c-ctrl-c} variable can be used to remove code evaluation from the @kbd{C-c C-c} key binding.}. This will call the @code{org-babel-execute-src-block} function to evaluate the block and insert -its results into the Org-mode buffer. +its results into the Org mode buffer. +@cindex #+CALL It is also possible to evaluate named code blocks from anywhere in an -Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously -@code{#+function} or @code{#+lob}) lines can be used to remotely execute code -blocks located in the current Org-mode buffer or in the ``Library of Babel'' -(see @ref{Library of Babel}). These lines use the following syntax to place -a call on a line by itself. +Org mode buffer or an Org mode table. Live code blocks located in the current +Org mode buffer or in the ``Library of Babel'' (see @ref{Library of Babel}) +can be executed. Named code blocks can be executed with a separate +@code{#+CALL:} line or inline within a block of text. + +The syntax of the @code{#+CALL:} line is @example -#+call: () -#+call: [
]()
+#+CALL: () +#+CALL: []() @end example -The following syntax can be used to place these calls within a block of -prose. +The syntax for inline evaluation of named code blocks is @example -...prose... call_() ...prose... -...prose... call_[
]()[
] ...prose... +... call_() ... +... call_[]()[] ... @end example @table @code @item -The name of the code block to be evaluated. +The name of the code block to be evaluated (see @ref{Structure of code blocks}). @item Arguments specified in this section will be passed to the code block. These -arguments should relate to @code{:var} header arguments in the called code -block expressed using standard function call syntax. For example if the -original code block named @code{double} has the header argument @code{:var -n=2}, then the call line passing the number four to that block would be -written as @code{#+call: double(n=2)}. -@item
-Header arguments can be placed either inside the call to the code block or at -the end of the line as shown below. - -@example -#+call: code_bloc_name[XXXX](arguments) YYYY -@end example - -Header arguments located in these two locations are treated differently. - -@table @code -@item XXXX -Those placed in the @code{XXXX} location are passed through and applied to -the code block being called. These header arguments affect how the code -block is evaluated, for example @code{[:results output]} will collect the -results from @code{STDOUT} of the called code block. -@item YYYY -Those placed in the @code{YYYY} location are applied to the call line and do -not affect the code block being called. These header arguments affect how -the results are incorporated into the Org-mode buffer when the call line is -evaluated, and how the call line is exported. For example @code{:results -org} at the end of the call line will insert the results of the call line -inside of an Org-mode block. -@end table - -For more examples of passing header arguments to @code{#+call:} lines see +arguments use standard function call syntax, rather than +header argument syntax. For example, a @code{#+CALL:} line that passes the +number four to a code block named @code{double}, which declares the header +argument @code{:var n=2}, would be written as @code{#+CALL: double(n=4)}. +@item +Inside header arguments are passed through and applied to the named code +block. These arguments use header argument syntax rather than standard +function call syntax. Inside header arguments affect how the code block is +evaluated. For example, @code{[:results output]} will collect the results of +everything printed to @code{STDOUT} during execution of the code block. +@item +End header arguments are applied to the calling instance and do not affect +evaluation of the named code block. They affect how the results are +incorporated into the Org mode buffer and how the call line is exported. For +example, @code{:results html} will insert the results of the call line +evaluation in the Org buffer, wrapped in a @code{BEGIN_HTML:} block. + +For more examples of passing header arguments to @code{#+CALL:} lines see @ref{Header arguments in function calls}. @end table @@ -11880,18 +12695,22 @@ For more examples of passing header arguments to @code{#+call:} lines see @cindex source code, library @cindex code block, library -The ``Library of Babel'' is a library of code blocks -that can be called from any Org-mode file. The library is housed in an -Org-mode file located in the @samp{contrib} directory of Org-mode. -Org-mode users can deposit functions they believe to be generally -useful in the library. +The ``Library of Babel'' consists of code blocks that can be called from any +Org mode file. Code blocks defined in the ``Library of Babel'' can be called +remotely as if they were in the current Org mode buffer (see @ref{Evaluating +code blocks} for information on the syntax of remote code block evaluation). + + +The central repository of code blocks in the ``Library of Babel'' is housed +in an Org mode file located in the @samp{contrib} directory of Org mode. + +Users can add code blocks they believe to be generally useful to their +``Library of Babel.'' The code blocks can be stored in any Org mode file and +then loaded into the library with @code{org-babel-lob-ingest}. -Code blocks defined in the ``Library of Babel'' can be called remotely as if -they were in the current Org-mode buffer (see @ref{Evaluating code blocks} -for information on the syntax of remote code block evaluation). @kindex C-c C-v i -Code blocks located in any Org-mode file can be loaded into the ``Library of +Code blocks located in any Org mode file can be loaded into the ``Library of Babel'' with the @code{org-babel-lob-ingest} function, bound to @kbd{C-c C-v i}. @@ -11916,7 +12735,7 @@ Code blocks in the following languages are supported. @item Ledger @tab ledger @tab Lisp @tab lisp @item Lilypond @tab lilypond @tab MATLAB @tab matlab @item Mscgen @tab mscgen @tab Objective Caml @tab ocaml -@item Octave @tab octave @tab Org-mode @tab org +@item Octave @tab octave @tab Org mode @tab org @item Oz @tab oz @tab Perl @tab perl @item Plantuml @tab plantuml @tab Python @tab python @item R @tab R @tab Ruby @tab ruby @@ -11980,7 +12799,7 @@ specific (and having higher priority) than the last. * System-wide header arguments:: Set global default values * Language-specific header arguments:: Set default values by language * Buffer-wide header arguments:: Set default values for a specific buffer -* Header arguments in Org-mode properties:: Set default values for a buffer or heading +* Header arguments in Org mode properties:: Set default values for a buffer or heading * Code block specific header arguments:: The most common way to set values * Header arguments in function calls:: The most specific level @end menu @@ -12031,12 +12850,11 @@ Each language can define its own set of default header arguments. See the language-specific documentation available online at @uref{http://orgmode.org/worg/org-contrib/babel}. -@node Buffer-wide header arguments, Header arguments in Org-mode properties, Language-specific header arguments, Using header arguments +@node Buffer-wide header arguments, Header arguments in Org mode properties, Language-specific header arguments, Using header arguments @subsubheading Buffer-wide header arguments -Buffer-wide header arguments may be specified through the use of a special -line placed anywhere in an Org-mode file. The line consists of the -@code{#+BABEL:} keyword followed by a series of header arguments which may be -specified using the standard header argument syntax. +Buffer-wide header arguments may be specified as properties through the use +of @code{#+PROPERTY:} lines placed anywhere in an Org mode file (see +@ref{Property syntax}). For example the following would set @code{session} to @code{*R*}, and @code{results} to @code{silent} for every code block in the buffer, ensuring @@ -12044,24 +12862,27 @@ that all execution took place in the same session, and no results would be inserted into the buffer. @example -#+BABEL: :session *R* :results silent +#+PROPERTY: session *R* +#+PROPERTY: results silent @end example -@node Header arguments in Org-mode properties, Code block specific header arguments, Buffer-wide header arguments, Using header arguments -@subsubheading Header arguments in Org-mode properties +@node Header arguments in Org mode properties, Code block specific header arguments, Buffer-wide header arguments, Using header arguments +@subsubheading Header arguments in Org mode properties -Header arguments are also read from Org-mode properties (see @ref{Property +Header arguments are also read from Org mode properties (see @ref{Property syntax}), which can be set on a buffer-wide or per-heading basis. An example of setting a header argument for all code blocks in a buffer is @example -#+property: tangle yes +#+PROPERTY: tangle yes @end example +@vindex org-use-property-inheritance When properties are used to set default header arguments, they are looked up -with inheritance, so the value of the @code{:cache} header argument will default -to @code{yes} in all code blocks in the subtree rooted at the following -heading: +with inheritance, regardless of the value of +@code{org-use-property-inheritance}. In the following example the value of +the @code{:cache} header argument will default to @code{yes} in all code +blocks in the subtree rooted at the following heading: @example * outline header @@ -12075,45 +12896,47 @@ heading: Properties defined in this way override the properties set in @code{org-babel-default-header-args}. It is convenient to use the @code{org-set-property} function bound to @kbd{C-c C-x p} to set properties -in Org-mode documents. +in Org mode documents. -@node Code block specific header arguments, Header arguments in function calls, Header arguments in Org-mode properties, Using header arguments +@node Code block specific header arguments, Header arguments in function calls, Header arguments in Org mode properties, Using header arguments @subsubheading Code block specific header arguments The most common way to assign values to header arguments is at the code block level. This can be done by listing a sequence of header -arguments and their values as part of the @code{#+begin_src} line. +arguments and their values as part of the @code{#+BEGIN_SRC} line. Properties set in this way override both the values of @code{org-babel-default-header-args} and header arguments specified as properties. In the following example, the @code{:results} header argument is set to @code{silent}, meaning the results of execution will not be inserted in the buffer, and the @code{:exports} header argument is set to @code{code}, meaning only the body of the code block will be -preserved on export to HTML or LaTeX. +preserved on export to HTML or @LaTeX{}. @example -#+source: factorial -#+begin_src haskell :results silent :exports code :var n=0 +#+NAME: factorial +#+BEGIN_SRC haskell :results silent :exports code :var n=0 fac 0 = 1 fac n = n * fac (n-1) -#+end_src +#+END_SRC @end example -Similarly, it is possible to set header arguments for inline code blocks: +Similarly, it is possible to set header arguments for inline code blocks @example src_haskell[:exports both]@{fac 5@} @end example -Code block header arguments can span multiple lines using =#+header:= or -=#+headers:= lines preceding a code block or nested in between the name and -body of a named code block. +Code block header arguments can span multiple lines using @code{#+HEADER:} or +@code{#+HEADERS:} lines preceding a code block or nested between the +@code{#+NAME:} line and the @code{#+BEGIN_SRC} line of a named code block. +@cindex #+HEADER: +@cindex #+HEADERS: Multi-line header arguments on an un-named code block: @example - #+headers: :var data1=1 - #+begin_src emacs-lisp :var data2=2 + #+HEADERS: :var data1=1 + #+BEGIN_SRC emacs-lisp :var data2=2 (message "data1:%S, data2:%S" data1 data2) - #+end_src + #+END_SRC #+results: : data1:1, data2:2 @@ -12121,11 +12944,11 @@ Multi-line header arguments on an un-named code block: Multi-line header arguments on a named code block: @example - #+source: named-block - #+header: :var data=2 - #+begin_src emacs-lisp + #+NAME: named-block + #+HEADER: :var data=2 + #+BEGIN_SRC emacs-lisp (message "data:%S" data) - #+end_src + #+END_SRC #+results: named-block : data:2 @@ -12136,25 +12959,26 @@ Multi-line header arguments on a named code block: @subsubheading Header arguments in function calls At the most specific level, header arguments for ``Library of Babel'' or -function call lines can be set as shown in the two examples below. For more -information on the structure of @code{#+call:} lines see @ref{Evaluating code +@code{#+CALL:} lines can be set as shown in the two examples below. For more +information on the structure of @code{#+CALL:} lines see @ref{Evaluating code blocks}. The following will apply the @code{:exports results} header argument to the -evaluation of the @code{#+call:} line. +evaluation of the @code{#+CALL:} line. @example -#+call: factorial(n=5) :exports results +#+CALL: factorial(n=5) :exports results @end example The following will apply the @code{:session special} header argument to the evaluation of the @code{factorial} code block. @example -#+call: factorial[:session special](n=5) +#+CALL: factorial[:session special](n=5) @end example @node Specific header arguments, , Using header arguments, Header arguments @subsection Specific header arguments -The following header arguments are defined: +Header arguments consist of an initial colon followed by the name of the +argument in lowercase letters. The following header arguments are defined: @menu * var:: Pass arguments to code blocks @@ -12193,13 +13017,18 @@ Additional header arguments are defined on a language-specific basis, see The @code{:var} header argument is used to pass arguments to code blocks. The specifics of how arguments are included in a code block vary by language; these are addressed in the language-specific documentation. However, the -syntax used to specify arguments is the same across all languages. The -values passed to arguments can be literal values, values from org-mode tables -and literal example blocks, the results of other code blocks, or Emacs Lisp -code---see the ``Emacs Lisp evaluation of variables'' heading below. +syntax used to specify arguments is the same across all languages. In every +case, variables require a default value when they are declared. + +The values passed to arguments can either be literal values, references, or +Emacs Lisp code (see @ref{var, Emacs Lisp evaluation of variables}). References +include anything in the Org mode file that takes a @code{#+NAME:}, +@code{#+TBLNAME:}, or @code{#+RESULTS:} line. This includes tables, lists, +@code{#+BEGIN_EXAMPLE} blocks, other code blocks, and the results of other +code blocks. -These values can be indexed in a manner similar to arrays---see the -``indexable variable values'' heading below. +Argument values can be indexed in a manner similar to arrays (see @ref{var, +Indexable variable values}). The following syntax is used to pass arguments to code blocks using the @code{:var} header argument. @@ -12208,76 +13037,122 @@ The following syntax is used to pass arguments to code blocks using the :var name=assign @end example -where @code{assign} can take one of the following forms +The argument, @code{assign}, can either be a literal value, such as a string +@samp{"string"} or a number @samp{9}, or a reference to a table, a list, a +literal example, another code block (with or without arguments), or the +results of evaluating another code block. -@itemize @bullet -@item literal value -either a string @code{"string"} or a number @code{9}. -@item reference -a table name: +Here are examples of passing values by reference: + +@table @dfn +@item table +an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line @example -#+tblname: example-table +#+TBLNAME: example-table | 1 | | 2 | | 3 | | 4 | -#+source: table-length -#+begin_src emacs-lisp :var table=example-table +#+NAME: table-length +#+BEGIN_SRC emacs-lisp :var table=example-table (length table) -#+end_src +#+END_SRC #+results: table-length : 4 @end example -a code block name, as assigned by @code{#+srcname:}, followed by -parentheses: +@item list +a simple list named with a @code{#+NAME:} line (note that nesting is not +carried through to the source code block) @example -#+begin_src emacs-lisp :var length=table-length() +#+NAME: example-list + - simple + - not + - nested + - list + +#+BEGIN_SRC emacs-lisp :var x=example-list + (print x) +#+END_SRC + +#+results: +| simple | list | +@end example + +@item code block without arguments +a code block name (from the example above), as assigned by @code{#+NAME:}, +optionally followed by parentheses + +@example +#+BEGIN_SRC emacs-lisp :var length=table-length() (* 2 length) -#+end_src +#+END_SRC #+results: : 8 @end example -In addition, an argument can be passed to the code block referenced -by @code{:var}. The argument is passed within the parentheses following the -code block name: +@item code block with arguments +a code block name, as assigned by @code{#+NAME:}, followed by parentheses and +optional arguments passed within the parentheses following the +code block name using standard function call syntax @example -#+source: double -#+begin_src emacs-lisp :var input=8 +#+NAME: double +#+BEGIN_SRC emacs-lisp :var input=8 (* 2 input) -#+end_src +#+END_SRC #+results: double : 16 -#+source: squared -#+begin_src emacs-lisp :var input=double(input=1) +#+NAME: squared +#+BEGIN_SRC emacs-lisp :var input=double(input=1) (* input input) -#+end_src +#+END_SRC #+results: squared : 4 @end example -@end itemize + +@item literal example +a literal example block named with a @code{#+NAME:} line + +@example +#+NAME: literal-example +#+BEGIN_EXAMPLE +A literal example +on two lines +#+END_EXAMPLE + +#+NAME: read-literal-example +#+BEGIN_SRC emacs-lisp :var x=literal-example + (concatenate 'string x " for you.") +#+END_SRC + +#+results: read-literal-example +: A literal example +: on two lines for you. + +@end example + +@end table @subsubheading Alternate argument syntax It is also possible to specify arguments in a potentially more natural way -using the @code{#+source:} line of a code block. As in the following -example arguments can be packed inside of parenthesis, separated by commas, +using the @code{#+NAME:} line of a code block. As in the following +example, arguments can be packed inside of parentheses, separated by commas, following the source name. @example -#+source: double(input=0, x=2) -#+begin_src emacs-lisp +#+NAME: double(input=0, x=2) +#+BEGIN_SRC emacs-lisp (* 2 (+ input x)) -#+end_src +#+END_SRC @end example @subsubheading Indexable variable values @@ -12291,15 +13166,15 @@ following example assigns the last cell of the first row the table @code{example-table} to the variable @code{data}: @example -#+results: example-table +#+NAME: example-table | 1 | a | | 2 | b | | 3 | c | | 4 | d | -#+begin_src emacs-lisp :var data=example-table[0,-1] +#+BEGIN_SRC emacs-lisp :var data=example-table[0,-1] data -#+end_src +#+END_SRC #+results: : a @@ -12311,16 +13186,16 @@ example the following assigns the middle three rows of @code{example-table} to @code{data}. @example -#+results: example-table +#+NAME: example-table | 1 | a | | 2 | b | | 3 | c | | 4 | d | | 5 | 3 | -#+begin_src emacs-lisp :var data=example-table[1:3] +#+BEGIN_SRC emacs-lisp :var data=example-table[1:3] data -#+end_src +#+END_SRC #+results: | 2 | b | @@ -12334,15 +13209,15 @@ interpreted to mean the entire range and as such are equivalent to column is referenced. @example -#+results: example-table +#+NAME: example-table | 1 | a | | 2 | b | | 3 | c | | 4 | d | -#+begin_src emacs-lisp :var data=example-table[,0] +#+BEGIN_SRC emacs-lisp :var data=example-table[,0] data -#+end_src +#+END_SRC #+results: | 1 | 2 | 3 | 4 | @@ -12353,16 +13228,16 @@ Any number of dimensions can be indexed. Dimensions are separated from one another by commas, as shown in the following example. @example -#+source: 3D -#+begin_src emacs-lisp +#+NAME: 3D +#+BEGIN_SRC emacs-lisp '(((1 2 3) (4 5 6) (7 8 9)) ((10 11 12) (13 14 15) (16 17 18)) ((19 20 21) (22 23 24) (25 26 27))) -#+end_src +#+END_SRC -#+begin_src emacs-lisp :var data=3D[1,,1] +#+BEGIN_SRC emacs-lisp :var data=3D[1,,1] data -#+end_src +#+END_SRC #+results: | 11 | 14 | 17 | @@ -12371,31 +13246,31 @@ another by commas, as shown in the following example. @subsubheading Emacs Lisp evaluation of variables Emacs lisp code can be used to initialize variable values. When a variable -value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be evaluated as -Emacs Lisp and the result of the evaluation will be assigned as the variable -value. The following example demonstrates use of this evaluation to reliably -pass the file-name of the org-mode buffer to a code block---note that -evaluation of header arguments is guaranteed to take place in the original -org-mode file, while there is no such guarantee for evaluation of the code -block body. +value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be +evaluated as Emacs Lisp and the result of the evaluation will be assigned as +the variable value. The following example demonstrates use of this +evaluation to reliably pass the file-name of the Org mode buffer to a code +block---note that evaluation of header arguments is guaranteed to take place +in the original Org mode file, while there is no such guarantee for +evaluation of the code block body. @example -#+begin_src sh :var filename=(buffer-file-name) :exports both +#+BEGIN_SRC sh :var filename=(buffer-file-name) :exports both wc -w $filename -#+end_src +#+END_SRC @end example Note that values read from tables and lists will not be evaluated as Emacs Lisp, as shown in the following example. @example -#+results: table +#+NAME: table | (a b c) | -#+headers: :var data=table[0,0] -#+begin_src perl +#+HEADERS: :var data=table[0,0] +#+BEGIN_SRC perl $data -#+end_src +#+END_SRC #+results: : (a b c) @@ -12414,7 +13289,7 @@ from the code block @item @b{type} header arguments specify what type of result the code block will return---which has implications for how they will be inserted into the -Org-mode buffer +Org mode buffer @item @b{handling} header arguments specify how the results of evaluating the code block should be handled. @@ -12445,28 +13320,28 @@ table or scalar depending on their value. @itemize @bullet @item @code{table}, @code{vector} -The results should be interpreted as an Org-mode table. If a single value is +The results should be interpreted as an Org mode table. If a single value is returned, it will be converted into a table with one row and one column. E.g., @code{:results value table}. @item @code{list} -The results should be interpreted as an Org-mode list. If a single scalar +The results should be interpreted as an Org mode list. If a single scalar value is returned it will be converted into a list with only one element. @item @code{scalar}, @code{verbatim} The results should be interpreted literally---they will not be -converted into a table. The results will be inserted into the Org-mode +converted into a table. The results will be inserted into the Org mode buffer as quoted text. E.g., @code{:results value verbatim}. @item @code{file} The results will be interpreted as the path to a file, and will be inserted -into the Org-mode buffer as a file link. E.g., @code{:results value file}. +into the Org mode buffer as a file link. E.g., @code{:results value file}. @item @code{raw}, @code{org} -The results are interpreted as raw Org-mode code and are inserted directly +The results are interpreted as raw Org mode code and are inserted directly into the buffer. If the results look like a table they will be aligned as -such by Org-mode. E.g., @code{:results value raw}. +such by Org mode. E.g., @code{:results value raw}. @item @code{html} Results are assumed to be HTML and will be enclosed in a @code{begin_html} block. E.g., @code{:results value html}. @item @code{latex} -Results assumed to be LaTeX and are enclosed in a @code{begin_latex} block. +Results assumed to be @LaTeX{} and are enclosed in a @code{begin_latex} block. E.g., @code{:results value latex}. @item @code{code} Result are assumed to be parsable code and are enclosed in a code block. @@ -12488,10 +13363,10 @@ results once they are collected. @itemize @bullet @item @code{silent} The results will be echoed in the minibuffer but will not be inserted into -the Org-mode buffer. E.g., @code{:results output silent}. +the Org mode buffer. E.g., @code{:results output silent}. @item @code{replace} The default value. Any existing results will be removed, and the new results -will be inserted into the Org-mode buffer in their place. E.g., +will be inserted into the Org mode buffer in their place. E.g., @code{:results output replace}. @item @code{append} If there are pre-existing results of the code block then the new results will @@ -12507,9 +13382,9 @@ inserted as with @code{replace}. @subsubsection @code{:file} The header argument @code{:file} is used to specify an external file in which -to save code block results. After code block evaluation an Org-mode style +to save code block results. After code block evaluation an Org mode style @code{[[file:]]} link (see @ref{Link format}) to the file will be inserted -into the Org-mode buffer. Some languages including R, gnuplot, dot, and +into the Org mode buffer. Some languages including R, gnuplot, dot, and ditaa provide special handling of the @code{:file} header argument automatically wrapping the code block body in the boilerplate code required to save output to the specified file. This is often useful for saving @@ -12538,9 +13413,9 @@ In other words, if you want your plot to go into a folder called @file{Work} in your home directory, you could use @example -#+begin_src R :file myplot.png :dir ~/Work +#+BEGIN_SRC R :file myplot.png :dir ~/Work matplot(matrix(rnorm(100), 10), type="l") -#+end_src +#+END_SRC @end example @subsubheading Remote execution @@ -12548,14 +13423,14 @@ A directory on a remote machine can be specified using tramp file syntax, in which case the code will be evaluated on the remote machine. An example is @example -#+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu: +#+BEGIN_SRC R :file plot.png :dir /dand@@yakuba.princeton.edu: plot(1:10, main=system("hostname", intern=TRUE)) -#+end_src +#+END_SRC @end example -Text results will be returned to the local Org-mode buffer as usual, and file +Text results will be returned to the local Org mode buffer as usual, and file output will be created on the remote machine with relative paths interpreted -relative to the remote directory. An Org-mode link to the remote file will be +relative to the remote directory. An Org mode link to the remote file will be created. So, in the above example a plot will be created on the remote machine, @@ -12581,7 +13456,7 @@ currently made to alter the directory associated with an existing session. @code{:dir} should typically not be used to create files during export with @code{:exports results} or @code{:exports both}. The reason is that, in order to retain portability of exported material between machines, during export -links inserted into the buffer will *not* be expanded against @code{default +links inserted into the buffer will @emph{not} be expanded against @code{default directory}. Therefore, if @code{default-directory} is altered using @code{:dir}, it is probable that the file will be created in a location to which the link does not point. @@ -12591,7 +13466,7 @@ which the link does not point. @subsubsection @code{:exports} The @code{:exports} header argument specifies what should be included in HTML -or LaTeX exports of the Org-mode file. +or @LaTeX{} exports of the Org mode file. @itemize @bullet @item @code{code} @@ -12616,14 +13491,14 @@ block should be included in tangled extraction of source code files. @itemize @bullet @item @code{tangle} The code block is exported to a source code file named after the full path -(including the directory) and file name (w/o extension) of the Org-mode file. +(including the directory) and file name (w/o extension) of the Org mode file. E.g., @code{:tangle yes}. @item @code{no} The default. The code block is not exported to a source code file. E.g., @code{:tangle no}. @item other Any other string passed to the @code{:tangle} header argument is interpreted -as a path (directory and file name relative to the directory of the Org-mode +as a path (directory and file name relative to the directory of the Org mode file) to which the block will be exported. E.g., @code{:tangle path}. @end itemize @@ -12650,7 +13525,7 @@ original Org file from which the code was tangled. @item @code{yes} A synonym for ``link'' to maintain backwards compatibility. @item @code{org} -Include text from the org-mode file as a comment. +Include text from the Org mode file as a comment. 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. @@ -12751,37 +13626,39 @@ concatenated together to form the replacement text. By setting this header argument at the sub-tree or file level, simple code block concatenation may be achieved. For example, when tangling the -following Org-mode file, the bodies of code blocks will be concatenated into -the resulting pure code file. +following Org mode file, the bodies of code blocks will be concatenated into +the resulting pure code file@footnote{(The example needs property inheritance +to be turned on for the @code{noweb-ref} property, see @ref{Property +inheritance}).}. @example - #+begin_src sh :tangle yes :noweb yes :shebang #!/bin/sh + #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh <> - #+end_src + #+END_SRC * the mount point of the fullest disk :PROPERTIES: :noweb-ref: fullest-disk :END: ** query all mounted disks - #+begin_src sh + #+BEGIN_SRC sh df \ - #+end_src + #+END_SRC ** strip the header row - #+begin_src sh + #+BEGIN_SRC sh |sed '1d' \ - #+end_src + #+END_SRC ** sort by the percent full - #+begin_src sh + #+BEGIN_SRC sh |awk '@{print $5 " " $6@}'|sort -n |tail -1 \ - #+end_src + #+END_SRC ** extract the mount point - #+begin_src sh + #+BEGIN_SRC sh |awk '@{print $2@}' - #+end_src + #+END_SRC @end example @node cache, sep, noweb-ref, Specific header arguments @@ -12811,18 +13688,18 @@ invalidated and the code block is re-run. In the following example, changed since it was last run. @example - #+srcname: random - #+begin_src R :cache yes + #+NAME: random + #+BEGIN_SRC R :cache yes runif(1) - #+end_src + #+END_SRC #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random 0.4659510825295 - #+srcname: caller - #+begin_src emacs-lisp :var x=random :cache yes + #+NAME: caller + #+BEGIN_SRC emacs-lisp :var x=random :cache yes x - #+end_src + #+END_SRC #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller 0.254227238707244 @@ -12832,7 +13709,7 @@ changed since it was last run. @subsubsection @code{:sep} The @code{:sep} header argument can be used to control the delimiter used -when writing tabular results out to files external to Org-mode. This is used +when writing tabular results out to files external to Org mode. This is used either when opening tabular results of a code block by calling the @code{org-open-at-point} function bound to @kbd{C-c C-o} on the code block, or when writing code block results to an external file (see @ref{file}) @@ -12856,17 +13733,17 @@ variable and raises an error. Setting @code{:hlines no} or relying on the default value yields the following results. @example -#+tblname: many-cols +#+TBLNAME: many-cols | a | b | c | |---+---+---| | d | e | f | |---+---+---| | g | h | i | -#+source: echo-table -#+begin_src python :var tab=many-cols +#+NAME: echo-table +#+BEGIN_SRC python :var tab=many-cols return tab -#+end_src +#+END_SRC #+results: echo-table | a | b | c | @@ -12878,17 +13755,17 @@ default value yields the following results. Leaves hlines in the table. Setting @code{:hlines yes} has this effect. @example -#+tblname: many-cols +#+TBLNAME: many-cols | a | b | c | |---+---+---| | d | e | f | |---+---+---| | g | h | i | -#+source: echo-table -#+begin_src python :var tab=many-cols :hlines yes +#+NAME: echo-table +#+BEGIN_SRC python :var tab=many-cols :hlines yes return tab -#+end_src +#+END_SRC #+results: echo-table | a | b | c | @@ -12904,6 +13781,10 @@ Leaves hlines in the table. Setting @code{:hlines yes} has this effect. The @code{:colnames} header argument accepts the values @code{yes}, @code{no}, or @code{nil} for unassigned. The default value is @code{nil}. +Note that the behavior of the @code{:colnames} header argument may differ +across languages. For example Emacs Lisp code blocks ignore the +@code{:colnames} header argument entirely given the ease with which tables +with column names may be handled directly in Emacs Lisp. @itemize @bullet @item @code{nil} @@ -12913,16 +13794,16 @@ names will be removed from the table before processing, then reapplied to the results. @example -#+tblname: less-cols +#+TBLNAME: less-cols | a | |---| | b | | c | -#+srcname: echo-table-again -#+begin_src python :var tab=less-cols +#+NAME: echo-table-again +#+BEGIN_SRC python :var tab=less-cols return [[val + '*' for val in row] for row in tab] -#+end_src +#+END_SRC #+results: echo-table-again | a | @@ -12958,14 +13839,14 @@ The first column of the table is removed from the table before processing, and is then reapplied to the results. @example -#+tblname: with-rownames +#+TBLNAME: with-rownames | one | 1 | 2 | 3 | 4 | 5 | | two | 6 | 7 | 8 | 9 | 10 | -#+srcname: echo-table-once-again -#+begin_src python :var tab=with-rownames :rownames yes +#+NAME: echo-table-once-again +#+BEGIN_SRC python :var tab=with-rownames :rownames yes return [[val + 10 for val in row] for row in tab] -#+end_src +#+END_SRC #+results: echo-table-once-again | one | 11 | 12 | 13 | 14 | 15 | @@ -12988,12 +13869,23 @@ permissions of the tangled file are set to make it executable. @node eval, , shebang, Specific header arguments @subsubsection @code{:eval} The @code{:eval} header argument can be used to limit the evaluation of -specific code blocks. @code{:eval} accepts two arguments ``never'' and -``query''. @code{:eval never} will ensure that a code block is never -evaluated, this can be useful for protecting against the evaluation of -dangerous code blocks. @code{:eval query} will require a query for every -execution of a code block regardless of the value of the -@code{org-confirm-babel-evaluate} variable. +specific code blocks. The @code{:eval} header argument can be useful for +protecting against the evaluation of dangerous code blocks or to ensure that +evaluation will require a query regardless of the value of the +@code{org-confirm-babel-evaluate} variable. The possible values of +@code{:eval} and their effects are shown below. + +@table @code +@item never or no +The code block will not be evaluated under any circumstances. +@item query +Evaluation of the code block will require a query. +@item never-export or no-export +The code block will not be evaluated during export but may still be called +interactively. +@item query-export +Evaluation of the code block during export will require a query. +@end table If this header argument is not set then evaluation is determined by the value of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation @@ -13016,7 +13908,7 @@ of the possible results header arguments see @ref{results}. @end multitable Note: With @code{:results value}, the result in both @code{:session} and -non-session is returned to Org-mode as a table (a one- or two-dimensional +non-session is returned to Org mode as a table (a one- or two-dimensional vector of strings or numbers) when appropriate. @subsection Non-session @@ -13062,26 +13954,26 @@ were passed to a non-interactive interpreter running as an external process. For example, compare the following two blocks: @example -#+begin_src python :results output +#+BEGIN_SRC python :results output print "hello" 2 print "bye" -#+end_src +#+END_SRC -#+resname: +#+results: : hello : bye @end example In non-session mode, the `2' is not printed and does not appear. @example -#+begin_src python :results output :session +#+BEGIN_SRC python :results output :session print "hello" 2 print "bye" -#+end_src +#+END_SRC -#+resname: +#+results: : hello : 2 : bye @@ -13109,7 +14001,8 @@ When a code block is tangled or evaluated, whether or not ``noweb'' references are expanded depends upon the value of the @code{:noweb} header argument. If @code{:noweb yes}, then a Noweb reference is expanded before evaluation. If @code{:noweb no}, the default, then the reference is not -expanded before evaluation. +expanded before evaluation. See the @ref{noweb-ref} header argument for +a more flexible way to resolve noweb references. Note: the default value, @code{:noweb no}, was chosen to ensure that correct code is not broken in a language, such as Ruby, where @@ -13117,11 +14010,17 @@ correct code is not broken in a language, such as Ruby, where syntactically valid in languages that you use, then please consider setting the default value. +Note: if noweb tangling is slow in large Org-mode files consider setting the +@code{*org-babel-use-quick-and-dirty-noweb-expansion*} variable to true. +This will result in faster noweb reference resolution at the expense of not +correctly resolving inherited values of the @code{:noweb-ref} header +argument. + @node Key bindings and useful functions, Batch execution, Noweb reference syntax, Working With Source Code @section Key bindings and useful functions @cindex code block, key bindings -Many common Org-mode key sequences are re-bound depending on +Many common Org mode key sequences are re-bound depending on the context. Within a code block, the following key bindings @@ -13138,7 +14037,7 @@ are active: @item @kbd{M-@key{down}} @tab @code{org-babel-pop-to-session} @end multitable -In an Org-mode buffer, the following key bindings are active: +In an Org mode buffer, the following key bindings are active: @multitable @columnfractions 0.45 0.55 @kindex C-c C-v a @@ -13255,7 +14154,7 @@ emacs -Q --batch -l $ORGINSTALL \ @cindex tag completion @cindex link abbreviations, completion of -Emacs would not be Emacs without completion, and Org-mode uses it whenever it +Emacs would not be Emacs without completion, and Org mode uses it whenever it makes sense. If you prefer an @i{iswitchb}- or @i{ido}-like interface for some of the completion prompts, you can specify your preference by setting at most one of the variables @code{org-completion-use-iswitchb} @@ -13290,7 +14189,7 @@ buffer. After @samp{[}, complete link abbreviations (@pxref{Link abbreviations}). @item After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or -@samp{OPTIONS} which set file-specific options for Org-mode. When the +@samp{OPTIONS} which set file-specific options for Org mode. When the option keyword is already complete, pressing @kbd{M-@key{TAB}} again will insert example settings for this keyword. @item @@ -13306,7 +14205,7 @@ Elsewhere, complete dictionary words using Ispell. @cindex template insertion @cindex insertion, of templates -Org-mode supports insertion of empty structural elements (like +Org mode supports insertion of empty structural elements (like @code{#+BEGIN_SRC} and @code{#+END_SRC} pairs) with just a few key strokes. This is achieved through a native template expansion mechanism. Note that Emacs has several other template mechanisms which could be used in @@ -13438,7 +14337,7 @@ lines into the buffer (@pxref{In-buffer settings}). @cindex in-buffer settings @cindex special keywords -Org-mode uses special lines in the buffer to define settings on a +Org mode uses special lines in the buffer to define settings on a per-file basis. These lines start with a @samp{#+} followed by a keyword, a colon, and then individual words defining a setting. Several setting words can be in the same line, but you can also have multiple @@ -13497,14 +14396,14 @@ buffer, most useful for specifying the allowed values of a property. @item #+SETUPFILE: file This line defines a file that holds more in-buffer setup. Normally this is entirely ignored. Only when the buffer is parsed for option-setting lines -(i.e.@: when starting Org-mode for a file, when pressing @kbd{C-c C-c} in a +(i.e.@: when starting Org mode for a file, when pressing @kbd{C-c C-c} in a settings line, or when exporting), then the contents of this file are parsed as if they had been included in the buffer. In particular, the file can be -any other Org-mode file with internal setup. You can visit the file the +any other Org mode file with internal setup. You can visit the file the cursor is in the line with @kbd{C-c '}. @item #+STARTUP: @cindex #+STARTUP: -This line sets options to be used at startup of Org-mode, when an +This line sets options to be used at startup of Org mode, when an Org file is being visited. The first set of options deals with the initial visibility of the outline @@ -13527,7 +14426,7 @@ showeverything @r{show even drawer contents} @cindex @code{indent}, STARTUP keyword @cindex @code{noindent}, STARTUP keyword Dynamic virtual indentation is controlled by the variable -@code{org-startup-indented}@footnote{Emacs 23 and Org-mode 6.29 are required} +@code{org-startup-indented}@footnote{Emacs 23 and Org mode 6.29 are required} @example indent @r{start with @code{org-indent-mode} turned on} noindent @r{start with @code{org-indent-mode} turned off} @@ -13748,6 +14647,8 @@ ordered list. @item If the cursor is on the @code{#+BEGIN} line of a dynamic block, the block is updated. +@item +If the cursor is at a timestamp, fix the day name in the timestamp. @end itemize @node Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous @@ -13956,11 +14857,11 @@ setup. See the installation instructions in the file @item @file{cdlatex.el} by Carsten Dominik @cindex @file{cdlatex.el} @cindex Dominik, Carsten -Org-mode can make use of the CDLa@TeX{} package to efficiently enter +Org mode can make use of the CD@LaTeX{} package to efficiently enter @LaTeX{} fragments into Org files. See @ref{CDLaTeX mode}. @item @file{imenu.el} by Ake Stenhoff and Lars Lindberg @cindex @file{imenu.el} -Imenu allows menu access to an index of items in a file. Org-mode +Imenu allows menu access to an index of items in a file. Org mode supports Imenu---all you need to do to get the index is the following: @lisp (add-hook 'org-mode-hook @@ -13977,7 +14878,7 @@ Org used to use this package for capture, but no longer does. @cindex @file{speedbar.el} @cindex Ludlam, Eric M. Speedbar is a package that creates a special frame displaying files and -index items in files. Org-mode supports Speedbar and allows you to +index items in files. Org mode supports Speedbar and allows you to drill into Org files directly from the Speedbar. It also allows you to restrict the scope of agenda commands to a file or a subtree by using the command @kbd{<} in the Speedbar frame. @@ -13991,8 +14892,8 @@ the command @kbd{<} in the Speedbar frame. Complex ASCII tables with automatic line wrapping, column- and row-spanning, and alignment can be created using the Emacs table package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}, and also part of Emacs 22). -Org-mode will recognize these tables and export them properly. Because of -interference with other Org-mode functionality, you unfortunately cannot edit +Org mode will recognize these tables and export them properly. Because of +interference with other Org mode functionality, you unfortunately cannot edit these tables directly in the buffer. Instead, you need to use the command @kbd{C-c '} to edit them, similar to source code snippets. @@ -14002,7 +14903,7 @@ Edit a @file{table.el} table. Works when the cursor is in a table.el table. @c @orgcmd{C-c ~,org-table-create-with-table.el} Insert a @file{table.el} table. If there is already a table at point, this -command converts it between the @file{table.el} format and the Org-mode +command converts it between the @file{table.el} format and the Org mode format. See the documentation string of the command @code{org-convert-table} for the restrictions under which this is possible. @@ -14011,13 +14912,13 @@ possible. @item @file{footnote.el} by Steven L. Baur @cindex @file{footnote.el} @cindex Baur, Steven L. -Org-mode recognizes numerical footnotes as provided by this package. -However, Org-mode also has its own footnote support (@pxref{Footnotes}), +Org mode recognizes numerical footnotes as provided by this package. +However, Org mode also has its own footnote support (@pxref{Footnotes}), which makes using @file{footnote.el} unnecessary. @end table @node Conflicts, , Cooperation, Interaction -@subsection Packages that lead to conflicts with Org-mode +@subsection Packages that lead to conflicts with Org mode @table @asis @@ -14029,7 +14930,7 @@ This conflicts with the use of @kbd{S-@key{cursor}} commands in Org to change timestamps, TODO keywords, priorities, and item bullet types if the cursor is at such a location. By default, @kbd{S-@key{cursor}} commands outside special contexts don't do anything, but you can customize the variable -@code{org-support-shift-select}. Org-mode then tries to accommodate shift +@code{org-support-shift-select}. Org mode then tries to accommodate shift selection by (i) using it outside of the special contexts where special commands apply, and by (ii) extending an existing active region even if the cursor moves across a special context. @@ -14044,7 +14945,7 @@ region. In fact, Emacs 23 has this built-in in the form of @code{shift-selection-mode}, see previous paragraph. If you are using Emacs 23, you probably don't want to use another package for this purpose. However, if you prefer to leave these keys to a different package while working in -Org-mode, configure the variable @code{org-replace-disputed-keys}. When set, +Org mode, configure the variable @code{org-replace-disputed-keys}. When set, Org will move the following key bindings in Org files, and in the agenda buffer (but not during date selection). @@ -14069,7 +14970,7 @@ fixed this problem: (add-hook 'org-mode-hook (lambda () (org-set-local 'yas/trigger-key [tab]) - (define-key yas/keymap [tab] 'yas/next-field-group))) + (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand))) @end lisp The latest version of yasnippet doesn't play well with Org mode. If the @@ -14096,7 +14997,7 @@ Then, tell Org mode what to do with the new function: @cindex @file{windmove.el} This package also uses the @kbd{S-} keys, so everything written in the paragraph above about CUA mode also applies here. If you want make -the windmove function active in locations where Org-mode does not have +the windmove function active in locations where Org mode does not have special functionality on @kbd{S-@key{cursor}}, add this to your configuration: @@ -14112,7 +15013,7 @@ configuration: @cindex @file{viper.el} @kindex C-c / Viper uses @kbd{C-c /} and therefore makes this key not access the -corresponding Org-mode command @code{org-sparse-tree}. You need to find +corresponding Org mode command @code{org-sparse-tree}. You need to find another key for this command, or override the key in @code{viper-vi-global-user-map} with @@ -14197,7 +15098,7 @@ maintained by the Worg project and can be found at A large number of add-on packages have been written by various authors. These packages are not part of Emacs, but they are distributed as contributed -packages with the separate release available at the Org-mode home page at +packages with the separate release available at the Org mode home page at @uref{http://orgmode.org}. The list of contributed packages, along with documentation about each package, is maintained by the Worg project at @uref{http://orgmode.org/worg/org-contrib/}. @@ -14321,7 +15222,7 @@ Add-ons can tap into this functionality by providing a function that detects special context for that add-on and executes functionality appropriate for the context. Here is an example from Dan Davison's @file{org-R.el} which allows you to evaluate commands based on the @file{R} programming language -@footnote{@file{org-R.el} has been replaced by the org-mode functionality +@footnote{@file{org-R.el} has been replaced by the Org mode functionality described in @ref{Working With Source Code} and is now obsolete.}. For this package, special contexts are lines that start with @code{#+R:} or @code{#+RR:}. @@ -14374,12 +15275,12 @@ can use Org's facilities to edit and structure lists by turning @menu * Radio tables:: Sending and receiving radio tables -* A LaTeX example:: Step by step, almost a tutorial +* A @LaTeX{} example:: Step by step, almost a tutorial * Translator functions:: Copy and modify * Radio lists:: Doing the same for lists @end menu -@node Radio tables, A LaTeX example, Tables in arbitrary syntax, Tables in arbitrary syntax +@node Radio tables, A @LaTeX{} example, Tables in arbitrary syntax, Tables in arbitrary syntax @subsection Radio tables @cindex radio tables @@ -14447,7 +15348,7 @@ makes this comment-toggling very easy, in particular if you bind it to a key. @end itemize -@node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax +@node A @LaTeX{} example, Translator functions, Radio tables, Tables in arbitrary syntax @subsection A @LaTeX{} example of radio tables @cindex @LaTeX{}, and Orgtbl mode @@ -14557,7 +15458,7 @@ applied. Similar to @code{fmt}, functions of two arguments can be supplied instead of strings. @end table -@node Translator functions, Radio lists, A LaTeX example, Tables in arbitrary syntax +@node Translator functions, Radio lists, A @LaTeX{} example, Tables in arbitrary syntax @subsection Translator functions @cindex HTML, and Orgtbl mode @cindex translator function @@ -14877,7 +15778,7 @@ You may also modify parameters on the fly like this: @example emacs -batch -l ~/.emacs \ -eval '(org-batch-agenda "a" \ - org-agenda-span month \ + org-agenda-span (quote month) \ org-agenda-include-diary nil \ org-agenda-files (quote ("~/org/project.org")))' \ | lpr @@ -15139,7 +16040,7 @@ The following example counts the number of entries with TODO keyword @uref{http://mobileorg.ncogni.to/, MobileOrg} is an application for the @i{iPhone/iPod Touch} series of devices, developed by Richard Moreland. -@i{MobileOrg} offers offline viewing and capture support for an Org-mode +@i{MobileOrg} offers offline viewing and capture support for an Org mode system rooted on a ``real'' computer. It does also allow you to record changes to existing entries. Android users should check out @uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android} @@ -15168,7 +16069,7 @@ in-buffer settings, but it will understand the logistics of TODO state MobileOrg needs to interact with Emacs through a directory on a server. If you are using a public server, you should consider to encrypt the files that are -uploaded to the server. This can be done with Org-mode 7.02 and with +uploaded to the server. This can be done with Org mode 7.02 and with @i{MobileOrg 1.5} (iPhone version), and you need an @file{openssl} installation on your system. To turn on encryption, set a password in @i{MobileOrg} and, on the Emacs side, configure the variable @@ -15191,7 +16092,7 @@ Emacs about it: (setq org-mobile-directory "~/Dropbox/MobileOrg") @end lisp -Org-mode has commands to put files for @i{MobileOrg} into that directory, +Org mode has commands to put files for @i{MobileOrg} into that directory, and to read captured notes from there. @node Pushing to MobileOrg, Pulling from MobileOrg, Setting up the staging area, MobileOrg @@ -15204,7 +16105,7 @@ can be included by customizing @code{org-mobile-files}. File names will be staged with paths relative to @code{org-directory}, so all files should be inside this directory. The push operation also creates a special Org file @file{agendas.org} with all custom agenda view defined by the -user@footnote{While creating the agendas, Org-mode will force ID properties +user@footnote{While creating the agendas, Org mode will force ID properties on all referenced entries, so that these entries can be uniquely identified if @i{MobileOrg} flags them for further action. If you do not want to get these properties in so many entries, you can set the variable @@ -15305,7 +16206,7 @@ Before I get to this list, a few special mentions are in order: @table @i @item Bastien Guerry Bastien has written a large number of extensions to Org (most of them -integrated into the core by now), including the LaTeX exporter and the plain +integrated into the core by now), including the @LaTeX{} exporter and the plain list parser. His support during the early days, when he basically acted as co-maintainer, was central to the success of this project. Bastien also invented Worg, helped establishing the Web presence of Org, and sponsors @@ -15340,13 +16241,13 @@ know what I am missing here! @i{Thomas Baumann} wrote @file{org-bbdb.el} and @file{org-mhe.el}. @item @i{Christophe Bataillon} created the great unicorn logo that we use on the -Org-mode website. +Org mode website. @item @i{Alex Bochannek} provided a patch for rounding timestamps. @item @i{Jan Böcker} wrote @file{org-docview.el}. @item -@i{Brad Bozarth} showed how to pull RSS feed data into Org-mode files. +@i{Brad Bozarth} showed how to pull RSS feed data into Org mode files. @item @i{Tom Breton} wrote @file{org-choose.el}. @item @@ -15522,7 +16423,7 @@ tweaks and features. extension system, added support for mairix, and proposed the mapping API. @item @i{Ulf Stegemann} created the table to translate special symbols to HTML, -LaTeX, UTF-8, Latin-1 and ASCII. +@LaTeX{}, UTF-8, Latin-1 and ASCII. @item @i{Andy Stewart} contributed code to @file{org-w3m.el}, to copy HTML content with links transformation to Org syntax. @@ -15530,10 +16431,10 @@ with links transformation to Org syntax. @i{David O'Toole} wrote @file{org-publish.el} and drafted the manual chapter about publishing. @item -@i{Jambunathan K} contributed the OpenDocumentText exporter. +@i{Jambunathan K} contributed the @acronym{ODT} exporter. @item -@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and -enabled source code highlighting in Gnus. +@i{Sebastien Vauban} reported many issues with @LaTeX{} and BEAMER export and +enabled source code highlighling in Gnus. @item @i{Stefan Vollmar} organized a video-recorded talk at the Max-Planck-Institute for Neurology. He also inspired the creation of a diff --git a/etc/ChangeLog b/etc/ChangeLog index 758025c6c3e..f7c37b24654 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,17 @@ +2012-01-03 Bastien Guerry + + * org/COPYRIGHT-AND-LICENSE: New file. + + * org/OrgOdtContentTemplate.xml: New file. + + * org/OrgOdtStyles.xml: New file. + + * org/: New directory. + +2012-01-03 Julian Gehring + + * refcards/orgcard.tex: Correct one markup in the "Timestamps" section. + 2011-12-10 Lars Magne Ingebrigtsen * NEWS: Mention auth-source twice in connection with smtpmail to diff --git a/etc/org/COPYRIGHT-AND-LICENSE b/etc/org/COPYRIGHT-AND-LICENSE new file mode 100644 index 00000000000..e4438bb84a9 --- /dev/null +++ b/etc/org/COPYRIGHT-AND-LICENSE @@ -0,0 +1,36 @@ +OrgOdtContentTemplate.xml --- Aux XML file (Org-mode's OpenDocument export) +OrgOdtStyles.xml --- Aux XML file (Org-mode's OpenDocument export) + +Copyright (C) 2010-2011 Free Software Foundation, Inc. + +Author: Jambunathan K +Keywords: outlines, hypermedia, calendar, wp +Homepage: http://orgmode.org + +These file are not (yet) part of GNU Emacs. +However, it is distributed under the same license. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . + +Commentary: + +Above files are part of Org-mode's OpenDocument export module. + +OrgOdtContentTemplate.xml provides a template within which the content +of an exported document is enclosed. This file contributes to +"content.xml" file within an exported document and acts as a +repository of automatic styles. + +OrgOdtStyles.xml contributes to "styles.xml" file within an exported +document and acts as a repository of custom styles. diff --git a/etc/org/OrgOdtContentTemplate.xml b/etc/org/OrgOdtContentTemplate.xml new file mode 100644 index 00000000000..f4982f6203b --- /dev/null +++ b/etc/org/OrgOdtContentTemplate.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/org/OrgOdtStyles.xml b/etc/org/OrgOdtStyles.xml new file mode 100644 index 00000000000..762d56abc6d --- /dev/null +++ b/etc/org/OrgOdtStyles.xml @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf index 71f216156f3..92df030d4d2 100644 Binary files a/etc/refcards/orgcard.pdf and b/etc/refcards/orgcard.pdf differ diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 1579a31b8d5..d49cd1e6252 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{7.7} +\def\orgversionnumber{7.8.02} \def\versionyear{2011} % latest update \def\year{2011} % latest copyright year @@ -445,6 +445,7 @@ formula, \kbd{:=} a field formula. \key{execute code block at point}{C-c C-c} \key{open results of code block at point}{C-c C-o} \key{check code block at point for errors}{C-c C-v c} +\key{insert a header argument with completion}{C-c C-v j} \key{view expanded body of code block at point}{C-c C-v v} \key{view information about code block at point}{C-c C-v I} \key{go to named code block}{C-c C-v g} @@ -460,7 +461,7 @@ formula, \kbd{:=} a field formula. \key{tangle code blocks in supplied file}{C-c C-v f} \key{ingest all code blocks in supplied file into the Library of Babel}{C-c C-v i} \key{switch to the session of the current code block}{C-c C-v z} -\key{load expanded body of the current code block into a session}{C-c C-v l} +\key{load the current code block into a session}{C-c C-v l} \key{view sha1 hash of the current code block}{C-c C-v a} \section{Completion} @@ -525,7 +526,7 @@ after ``{\tt :}'', and dictionary words elsewhere. \section{Timestamps} \key{prompt for date and insert timestamp}{C-c .} -\key{like \kbd{C-c} . but insert date and time format}{C-u C-c .} +\key{like \kbd{C-c .} but insert date and time format}{C-u C-c .} \key{like \kbd{C-c .} but make stamp inactive}{C-c !} % FIXME \key{insert DEADLINE timestamp}{C-c C-d} \key{insert SCHEDULED timestamp}{C-c C-s} @@ -673,7 +674,7 @@ never exported. \section{Notes} [1] This is only a suggestion for a binding of this command. Choose -your own key as shown under INSTALLATION. +your own key as shown under ACTIVATION. [2] Keybinding affected by {\tt org-support-shift-select} and also {\tt org-replace-disputed-keys}. @@ -686,4 +687,3 @@ your own key as shown under INSTALLATION. % compile-command: "tex refcard" % End: - diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index ac328d10910..6f0d0bedd9f 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,2412 @@ +2012-01-03 Bastien Guerry + + * org.el (org-ctrl-c-ctrl-c): Preserve symmetry when adding + and removing checkboxes with `C-u C-c C-c' on the first item + of a list. Also, don't reinitialize checkboxes that are + already ticked. + +2012-01-03 Bastien Guerry + + * org.el (org-ts-regexp0, org-ts-regexp1): Also match a time + value with only one digit for the hours. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-batch-agenda, org-batch-agenda-csv): + Remove deleted function `org-encode-for-stdout'. + +2012-01-03 Bastien Guerry + + * org.el (org-show-context): Complete docstring. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-filter-by-tag): Use + `read-char-exclusive' instead of `read-char'. + +2012-01-03 Carsten Dominik (tiny change) + + * org-clock.el (org-clock-in, org-clock-find-position): Remove + erraneous space in regexp. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-expand-noweb-references): Rather than using + a pure regexp solution to resolve noweb references, actually + check the information of every code block in the buffer. This + will cause a slowdown in noweb reference expansion, but is + necessary for correct behavior. + +2012-01-03 Bastien Guerry + + * org.el (org-map-continue-from): Fix typo in docstring. + +2012-01-03 Bastien Guerry + + * org.el (org-property-re): Also match cumulating properties + like ":prop+:". + +2012-01-03 Bastien Guerry + + * org-exp-blocks.el (org-export-blocks-preprocess): Fix regexp for + matching the end of a block. + +2012-01-03 David Maus + + * org.el (org-open-at-point): Escape link path for http:, + https:, ftp:, news:, and doi: links only if the path contains + space or non-ascii character. + +2012-01-03 David Maus + + * org.el (org-refile-get-targets): Ignore headlines without a + true headline. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-map-call-lines): Moved this file from + ob-lob.el into ob.el to ease dependency pains. + +2012-01-03 Bastien Guerry + + * org-publish.el (org-publish-index-generate-theindex): Use + theindex.inc for storing index entries, and theindex.org for + including theindex.inc. + +2012-01-03 Bastien Guerry + + * org-publish.el (org-publish-index-generate-theindex): Create + proper file target for index entries in subdirectories. + +2012-01-03 Bastien Guerry + + * org-protocol.el (org-protocol-check-filename-for-protocol): + Fix spelling mistake. + +2012-01-03 Jambunathan K + + * org-odt.el (org-export-odt-default-org-styles-alist): Add styles + for title and subtitle. + (org-odt-format-toc): New. + (org-odt-format-preamble): New. Users can redefine this to + customize what goes before the document body. Currently it + outputs title, author and email, date and toc. + (org-odt-begin-document-body): Use `org-odt-format-preamble'. + (org-odt-format-date): Renamed from + `org-odt-iso-date-from-org-timestamp'. Also added an + additional param for format string. + (org-odt-begin-annotation, org-odt-update-meta-file): Use + `org-odt-format-date'. + +2012-01-03 Bastien Guerry + + * org.el (org-at-drawer-p): New function. + (org-end-of-line): Use it. + +2012-01-03 Eric Schulte + + * ob.el (*org-babel-use-quick-and-dirty-noweb-expansion*): + Controls the method in which noweb references are expanded. + (org-babel-expand-noweb-references): Bring back the option for + regexp-based noweb expansion. + +2012-01-03 Bastien Guerry + + * org.el (org-ts-regexp0, org-ts-regexp1): Also match a time value + with only one digit for the hours. + +2012-01-03 Bastien Guerry + + * org.el (org-ctrl-c-ctrl-c): Don't make `C-c C-c' special + when ticking the checkbox of the first item. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-list-write-struct): Add an optional + argument for structure changes happening outside the function. + + * org.el (org-ctrl-c-ctrl-c): Now, `C-u C-c C-c' on the first + item of a sub-list should toggle check-box presence of every + item in the same sub-list. Also fix check-box insertion on a + single item. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-filter-preset): New alias. + (org-agenda-filter-by-category): New command. + (org-agenda-mode-map): Add the new command. + (org-agenda-custom-commands-local-options): Add category + filter preset. + (org-agenda-mark-filtered-text): Mark both tag and filter + overlays. + (org-agenda-category-filter-preset): New variable. + (org-finalize-agenda, org-agenda-redo) + (org-agenda-filter-make-matcher, org-agenda-filter-apply): Handle + both category and tag filters. + (org-agenda-filter-show-all-tag): Rename from + `org-agenda-filter-by-tag-show-all'. + (org-agenda-filter-show-all-cat): New function. + (org-agenda-set-mode-name): Show the category filter in the + modeline. + +2012-01-03 Carsten Dominik + + * org-bbdb.el (org-bbdb-old): New variable. + (org-bbdb-store-link, org-bbdb-open): Check for + `org-bbdb-old'. + (org-bbdb-open-old, org-bbdb-open-new): New functions. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-batch-agenda, org-batch-agenda-csv): + Remove deleted function `org-encode-for-stdout'. + +2012-01-03 Bastien Guerry + + * org.el (org-check-dates-range): New command. + (org-sparse-tree): Use it. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-write): Rename from + `org-write-agenda'. + (org-agenda-mode-map, org-agenda-menu) + (org-batch-store-agenda-views): Use new name + `org-agenda-write'. + +2012-01-03 Bastien Guerry + + * org.el (org-loop-over-headlines-in-active-region): Fix + docstring. + (org-todo, org-deadline, org-schedule): Honor the 'start-level + value of `org-loop-over-headlines-in-active-region'. + +2012-01-03 Bastien Guerry + + * org-archive.el (org-archive-subtree) + (org-archive-to-archive-sibling, org-toggle-archive-tag): + Bugfix: use 'region-start-level. + +2012-01-03 Bastien Guerry + + * org.el (org-show-context): Complete docstring. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-filter-by-tag): Use + `read-char-exclusive' instead of `read-char'. + +2012-01-03 Carsten Dominik + + * org.el (org-scan-tags): Make sure `org-map-continue-from' is + nil at each match. + +2012-01-03 Carsten Dominik (tiny change) + + * org-clock.el (org-clock-in, org-clock-find-position): Remove + erraneous space in regexp. + +2012-01-03 Jambunathan K + + * org-odt.el (org-odt-lib-dir): Add docstring. + (org-odt-data-dir): New variable. Use this variable to + control the locations from which the ODT exporter picks the + OpenDocument styles and schema files from. Set this variable + explicitly only if the in-built heuristics for locating the + above files fails. + (org-odt-styles-dir-list, org-odt-schema-dir-list): New + variables. Pay specific attention to (eval-when-compile ...) + form through which Makefile's $(datadir) - contained in + `org-odt-data-dir' - gets compiled in as a "hard coded" + constant. + (org-odt-styles-dir, org-export-odt-schema-dir): Add messages to + aid debugging. + +2012-01-03 Bastien Guerry + + * org-archive.el (org-archive-subtree) + (org-archive-to-archive-sibling, org-toggle-archive-tag) + (org-archive-set-tag): Handle the 'start-level value for + `org-loop-over-headlines-in-active-region'. + +2012-01-03 Bastien Guerry + + * org.el (org-scan-tags): New parameter `start-level' to scan only + through headlines of that level. + (org-map-entries): New allowed value `region-start-level' for + the `scope' parameter, to allow scanning through headlines of + the same level than the first headline in the region. + (org-loop-over-headlines-in-active-region): New allowed value + 'start-level. + +2012-01-03 Bastien Guerry + + * org-archive.el (org-archive-subtree) + (org-archive-to-archive-sibling, org-archive-set-tag) + (org-toggle-archive-tag): Allow to loop over the active region by + using `org-loop-over-headlines-in-active-region'. + +2012-01-03 Bastien Guerry + + * org.el (org-todo): Allow to loop over the active region by + using `org-loop-over-headlines-in-active-region'. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-expand-noweb-references): Rather than using + a pure regexp solution to resolve noweb references, actually + check the information of every code block in the buffer. This + will cause a slowdown in noweb reference expansion, but is + necessary for correct behavior. + +2012-01-03 Bastien Guerry + + * org.el (org-map-continue-from): Fix typo in docstring. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-write-buffer-name): New variable. + (org-write-agenda): Use it. + +2012-01-03 Bastien Guerry + + * org-exp.el (org-export-date-timestamp-format): New option to + define the way a timestamp in #+DATE will be exported. + (org-infile-export-plist): Use the new option. + +2012-01-03 Bastien Guerry + + * org-drill.el (org-drill-leech-method, org-drill-scope) + (org-drill-spaced-repetition-algorithm): Fix wrong :type spec. + +2012-01-03 Bastien Guerry + + * org.el (org-property-re): Also match cumulating properties + like ":prop+:". + +2012-01-03 Jambunathan K + + * org-odt.el (org-odt-styles-dir): Assume that the styles + files are located under `data-directory' of Emacs distribution + as etc/org/OrgOdtStyles.xml and + etc/org/OrgOdtContentTemplate.xml. Also update docstring. + (org-export-odt-schema-dir): Update docstring. + +2012-01-03 Jambunathan K + + * org-odt.el (org-odt-format-preamble): Honor following user + options: author, timestamp and email. + +2012-01-03 Bastien Guerry + + * org-exp-blocks.el (org-export-blocks-preprocess): Fix regexp + for matching the end of a block. + +2012-01-03 Bastien Guerry + + * org-eshell.el: New file. + +2012-01-03 David Maus + + * org.el (org-open-at-point): Escape link path for http:, + https:, ftp:, news:, and doi: links only if the path contains + space or non-ascii character. + +2012-01-03 Bastien Guerry + + * org-beamer.el (org-beamer-fragile-re): Also recognize + \lstinline and \verb as commands that make a frame fragile. + +2012-01-03 David Maus + + * org.el (org-refile-get-targets): Ignore headlines without a + true headline. + +2012-01-03 Litvinov Sergey + + * ob-octave.el: add graphical output to png file + +2012-01-03 Eric Schulte + + * ob.el (org-babel-map-call-lines): Moved this file from + ob-lob.el into ob.el to ease dependency pains. + +2012-01-03 Bastien Guerry + + * org-publish.el (org-publish-index-generate-theindex): Use + theindex.inc for storing index entries, and theindex.org for + including theindex.inc. + +2012-01-03 Bastien Guerry + + * org-publish.el (org-publish-index-generate-theindex): Create + proper file target for index entries in subdirectories. + +2012-01-03 Bastien Guerry + + * org-protocol.el (org-protocol-check-filename-for-protocol): + Fix spelling mistake. + +2012-01-03 Jambunathan K + + * org-odt.el (org-export-odt-default-org-styles-alist): Add + styles for title and subtitle. + (org-odt-format-toc): New. + (org-odt-format-preamble): New. Users can redefine this to + customize what goes before the document body. Currently it + outputs title, author and email, date and toc. + (org-odt-begin-document-body): Use `org-odt-format-preamble'. + (org-odt-format-date): Renamed from + `org-odt-iso-date-from-org-timestamp'. Also added an + additional param for format string. + (org-odt-begin-annotation, org-odt-update-meta-file): Use + `org-odt-format-date'. + +2012-01-03 Eric Schulte + + * ob-ref.el (org-babel-ref-split-args): Now uses + `org-babel-balanced-split'. + +2012-01-03 Bastien Guerry + + * org-html.el (org-export-html-preamble) + (org-export-html-postamble): Fix docstrings. + (org-export-as-html): Insert the string used by a custom + function for `org-export-html-pre/postamble'. + +2012-01-03 Bastien Guerry + + * org.el (org-block-regexp) + (org-heading-keyword-regexp-format) + (org-heading-keyword-maybe-regexp-format): Move up to keep the + byte-compiler happy. + +2012-01-03 Dave Abrahams (tiny change) + + * org-agenda.el (org-agenda-do-tree-to-indirect-buffer): New + function. + (org-agenda-tree-to-indirect-buffer): Use the new function. + +2012-01-03 Bastien Guerry + + * org-html.el (org-export-as-html): Fix bug when inserting the + output of a custom function for the pre/postamble. + +2012-01-03 Jambunathan K + + * org-odt.el (org-odt-format-source-code-or-example): Try + loading htmlfontify safely. + +2012-01-03 Bastien Guerry + + * org-odt.el (require): Require htmlfontify.el only if + emacs-version is greater than 23.2. + +2012-01-03 Bastien Guerry + + * org-faces.el (org-agenda-calendar-event) + (org-agenda-calendar-sexp): Use the default face. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-expand-noweb-references): Fixed regexp. + +2012-01-03 Michael Brand + + * org.el Key bindings: remap the Outline functions from + `outline-mode-prefix-map' where possible. + +2012-01-03 Christian Moe (tiny change) + + * org-html.el (org-export-as-html): Apply + `org-export-html-get-todo-kwd-class-name' to the class + attribute of the todo-keyword span tag, not to its text + content. + +2012-01-03 Sebastien Vauban + + * org-agenda.el (org-agenda-get-timestamps) + (org-agenda-get-sexps): Use face for highlighting "calendar" + events. + +2012-01-03 Peter Münster (tiny change) + + * org.el (org-add-planning-info): Treat absolute time too. + +2012-01-03 Bastien Guerry + + * org-table.el (org-table-transpose-table-at-point): Don't use + ̀remove-if-not'. + +2012-01-03 Dave Abrahams (tiny change) + + * org-clock.el (org-clock-out-if-current): Check the clock + buffer is existing. + +2012-01-03 Bernt Hansen + + * org-clock.el (org-clock-out-if-current): Fix marker in no + buffer error for task state change in an indirect buffer. + +2012-01-03 Michael Brand + + * org.el (org-offer-links-in-entry): Make list when assigning + a single link. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-expand-noweb-references): Rather than + collect the info from *every* block in the current buffer, + simply regexp search for those blocks which appear to match + the continued source name. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-insert-result): Do not examplize wrapped + scalar results, simply wrap them. + (org-babel-result-end): Find the end of results wrapped in a + RESULTS drawer. + +2012-01-03 Bastien Guerry + + * org.el (org-todo-yesterday): When called from the agenda, + use `org-agenda-todo-yesterday' instead. + +2012-01-03 Bastien Guerry + + * org-table.el (org-table-transpose-table-at-point): New command. + +2012-01-03 Bastien Guerry + + * org-html.el (org-export-html-headline-anchor-format): New + option. + (org-html-level-start): Use the new option. + +2012-01-03 Rob Giardina (tiny change) + + * org-agenda.el (org-agenda-with-point-at-orig-entry): Small + bugfix. + +2012-01-03 Christian Moe (tiny change) + + * org-special-blocks.el + (org-special-blocks-convert-html-special-cookies): Close + paragraph before opening or closing the
, and open + paragraph after. Also changed newline placement to be the same + as for other blocks. + +2012-01-03 Roberto Huelga + + * org-clock.el (org-program-exists): Make the function + compatible with darwin systems. + +2012-01-03 David Maus + + * org-exp.el (org-export-normalize-links): Mark bracket links + before normalization to avoid erroneous normalization of + bracket link parts. + +2012-01-03 Jambunathan K + + * org-odt.el (org-odt-data-dir): Removed. + (org-odt-styles-dir, org-export-odt-schema-dir): New + variables. + + * org-odt.el: New file. + + * org-lparse: New file. + +2012-01-03 Carsten Dominik + + * org-capture.el (org-capture-set-target-location): Set the + capture default time also to the prompt time. + +2012-01-03 Nicolas Goaziou + + * org-exp.el (org-export-res/src-name-cleanup): Remove #+name + and #+results lines during preprocess. + +2012-01-03 Eric Schulte + + * ob-picolisp.el (ob-comint): Required. + (comint): Required. + (cl): Required. + (run-picolisp): Declared. + (org-babel-execute:picolisp): Capture free variable, and replace + function from cl-extra with core function. + +2012-01-03 Eric Schulte + + * ob-picolisp.el: New file. + + * org.el (org-babel-load-languages): Add Pico Lisp to the list + of supported code block languages. + +2012-01-03 Eric Schulte + + * org-bibtex.el (org-bibtex): Now catches bibtex errors and + directs the user to the location of the error. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo. + +2012-01-03 Bastien Guerry + + * ob.el (org-babel-execute-src-block): Fix typo. + +2012-01-03 Bastien Guerry + + * org-freemind.el (org-freemind-write-mm-buffer): Fix typo. + +2012-01-03 Bastien Guerry + + * org.el (org-link-unescape, org-link-unescape-compound): Fix + two typos in docstrings. + +2012-01-03 Thomas Dye + + * ob-R.el: Added tikzDevice support. + +2012-01-03 David Maus + + * org.el (org-clone-subtree-with-time-shift): Remove clocking + information and empty drawers when preparing a clone. + +2012-01-03 Eric Schulte + + * ob-exp.el: Don't add `org-exp-res/src-name-cleanup' to + `org-export-blocks-postblock-hook'. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-hide-result-toggle): Skip over header + argument lines when toggling named code block visibility. + +2012-01-03 Eric Schulte + + * org-exp.el (org-export-grab-title-from-buffer): Don't + license to kill text inside blocks when getting a title. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-confirm-evaluate): Adding support for new + range of :eval header arguments. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-confirm-evaluate): Inhibit evaluation + during export when eval is set to "non-export". + +2012-01-03 Eric Schulte + + * ob-ref.el (org-babel-update-intermediate): New custom + variable. + (org-babel-ref-resolve): Optionally update the in-buffer results + of code blocks which are evaluated to resolve references. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-join-splits-near-ch): Rejoins a list of a + split string when a character appears on either side of the + split. + (org-babel-parse-multiple-vars): Rejoin splits around "=" signs. + +2012-01-03 Eric Schulte + + * org.el (org-reduce): Added a less functional Org-mode copy of + the cl reduce function. + +2012-01-03 Nicolas Goaziou + + * org.el (org-fontify-meta-lines-and-blocks-1): Recognize + "name" as a valid keyword that can preceed a block. + +2012-01-03 Eric Schulte + + * ob-exp.el (org-babel-exp-lob-one-liners): Don't limit + in-verbatim check to inline code blocks, do lob code blocks as + well. + +2012-01-03 Carsten Dominik + + * org.el (org-todo): Interpret 0 prefix arg as note inhibitor. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-named-src-block-regexp-for-name): Ensure + that partial names are not matched. + (org-babel-named-data-regexp-for-name): Ensure that partial names + are not matched. + +2012-01-03 Eric Schulte + + * ob-ref.el (org-babel-ref-resolve): Search for named code + blocks before named data. + + * ob.el (org-babel-named-data-regexp-for-name): New function for + finding named data. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-insert-result): Gracefully handle results + which are neither lists nor strings. + +2012-01-03 Eric Schulte + + * ob-ref.el (org-babel-ref-resolve): Don't change location when + looking at the contents. + +2012-01-03 Milan Zamazal + + * org.el (org-set-outline-overlay-data): Use + outline-flag-region to make a region invisible. This ensures + all necessary actions, especially adding + isearch-open-invisible property, are applied. + +2012-01-03 Eric Schulte + + * ob-lob.el (org-babel-in-example-or-verbatim): Fix + compilation warning. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-find-named-result): Downcase "name" before + comparison. + +2012-01-03 Eric Schulte + + * ob-lisp.el (org-babel-execute:lisp): Fixed typo. + (org-babel-lisp-vector-to-list): Fixed typo. + +2012-01-03 Eric Schulte + + * ob-exp.el (org-babel-in-example-or-verbatim): Some valid + execution contexts (e.g., call lines) look like commented + lines. + + * ob.el (org-babel-get-src-block-info): Empty match string doesn't + count. + (org-babel-process-params): Always process parameters, even if + you don't to table splitting. + +2012-01-03 Eric Schulte + + * ob-exp.el (org-exp-res/src-name-cleanup): Updated Documentation. + + * ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated + regular expression. + (org-babel-inline-lob-one-liner-regexp): Updated regular + expression. + + * ob-ref.el (org-babel-ref-resolve): Notice when something that + looks like a data results may actually be a code block. + + * ob-table.el: Updated documentation. + + * ob.el (org-babel-src-name-regexp): Simplified regexp. + (org-babel-get-src-block-info): Updated match strings. + (org-babel-data-names): Simplified acceptable names. + (org-babel-find-named-block): Indentation. + (org-babel-find-named-result): Updated to not return a code block + as a result. + + * org.el (org-fontify-meta-lines-and-blocks-1): Removing + references to old syntactic elements. + (org-additional-option-like-keywords): Removing references to + old syntactic elements. + +2012-01-03 Carsten Dominik + + * org-agenda.el (org-agenda-get-todos): Swap calls to `org-trim' + and `buffer-substring'. + +2012-01-03 Nicolas Goaziou + + * org-agenda.el (org-agenda-get-todos): Prevent an error when + encountering tasks with only the TODO keyword. + +2012-01-03 Nicolas Goaziou + + * org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX + environment when at an item or an headline, but allow LaTeX + fragments. + (org-cycle): Try to call `cdlatex-tab' before cycling item's or + headline's visibility, in order to catch LaTeX fragments within. + +2012-01-03 Eric Schulte + + * org-exp-blocks.el (org-export-blocks-preprocess): Require a + newline and spaces before a code block. + +2012-01-03 Eric Schulte + + * ob-lob.el (org-babel-map-call-lines): Allow mapping of code + over all call lines in a buffer. + + * ob.el (org-babel-execute-buffer): Execute call lines when + executing an entire buffer. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-process-params): Don't disassemble tables + twice. + +2012-01-03 Carsten Dominik + + * org-clock.el (org-clock-in, org-clock-find-position): Make space + after date optional. + + * org.el (org-set-regexps-and-options) + (org-ts-regexp, org-ts-regexp-both, org-ts-regexp1) + (org-ctrl-c-ctrl-c): Make `C-c C-c' on date fix the time stamp. + +2012-01-03 Eric Schulte + + * ob-lob.el (org-babel-lob-execute-maybe): Don't execute a call + inside a verbatim block. + + * ob-exp.el (org-babel-in-example-or-verbatim): Check for example + blocks. + +2012-01-03 Litvinov Sergey + + * ob-maxima.el (org-babel-tangle-lang-exts): Maxima extension. + (org-babel-maxima-expand): Add input variables and graphic output. + (org-babel-execute:maxima): Add input variables and graphic output. + (org-babel-maxima-var-to-maxima): Add input variables and graphic + output. + (org-babel-maxima-graphical-output-file): Add input variables and + graphic output. + (org-babel-maxima-elisp-to-maxima): Add input variables and graphic + output. + +2012-01-03 Eric Schulte + + * ob-fortran.el: New file. Adding support for Fortran code blocks. + * org.el (org-babel-load-languages): Adding fortran to this list. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-new): Cannot insert an inline + footnote at beginning of line anymore. + (org-footnote-at-reference-p): Don't recognize inline footnotes at + beginning of line. + +2012-01-03 Nicolas Goaziou + + * org.el (org-set-font-lock-defaults): Fix small error in matching + group that prevented fontification of keywords like + org-comment-string and stars in headlines. + +2012-01-03 Carsten Dominik + + * org.el (org-catch-invisible-edits): New option. + (org-self-insert-command, org-delete-backward-char) + (org-delete-char): Call `org-check-before-invisible-edit'. + (org-check-before-invisible-edit): New function. + +2012-01-03 Suvayu Ali + + * org-exp.el (org-solidify-link-text): Respect + org-export-with-tags when forming the export title during subtree + export. + +2012-01-03 Nicolas Goaziou + + * org.el (org-heading-regexp, org-heading-keyword-regexp-format) + (org-heading-keyword-maybe-regexp-format): Globalize variables so + they are accessible even in buffers not in Org mode. + +2012-01-03 David Maus + + * org.el (org-insert-link): Don't use default-description if a + `org-make-link-description-function' is defined. + +2012-01-03 Eric Schulte + + * org.el (org-set-regexps-and-options): Use property blocks for + multi-line properties. + +2012-01-03 Bastien Guerry + + * org.el (org-self-insert-command): Don't throw an error when + editing takes place at the first point of the buffer. + +2012-01-03 Bastien Guerry + + * org.el (org-self-insert-command): Unfold invisible region at + point or right before point when editing. + +2012-01-03 Bastien Guerry + + * org-faces.el (org-agenda-filter-tags): Use the 'modeline face as + default. + +2012-01-03 Bastien Guerry + + * org-html.el (org-html-expand): Prevent a nil value for STRING to + return an error, just return nil. + +2012-01-03 Bastien Guerry + + * org-latex.el (org-export-latex-set-initial-vars): Allow "/" + character in the #+LaTeX_CLASS option. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-at-reference-p) + (org-footnote-at-definition-p): Don't store text-properties of + footnote definitions. + +2012-01-03 Bastien Guerry + + * org-html.el (org-export-as-html): Convert special characters in + meta tag "author", "date", "keyword" and "description". + +2012-01-03 Bastien Guerry + + * org-capture.el (org-capture-before-finalize-hook): Docstring + improvement: mention that the buffer is widened when this hook is + run. + +2012-01-03 Sebastien Vauban + + * org-html.el (org-export-as-html): Make sure the div for preamble + is not inserted when the preamble is empty. + +2012-01-03 Sebastien Vauban + + * org-agenda.el (org-agenda-set-mode-name): Highlight tags used + for filtering (shown in the mode-line). + +2012-01-03 Eric Schulte + + * ob.el (org-babel-parse-multiple-vars): Trimming excess white + space from split variables. + +2012-01-03 Nicolas Goaziou + + * org.el (org-link-search): Add an optional argument preventing + function from revealing context around match. + +2012-01-03 Bastien Guerry + + * org-agenda.el (calendar-check-holidays): Declare function. + +2012-01-03 Bastien Guerry + + * org.el (org-return): Fix bug when matching the face property + before following a link. + +2012-01-03 Matt Lundin + + * org-agenda.el: (org-class): Fix holidays symbol in + org-class. This was resulting in an "Bad sexp..." warning. + +2012-01-03 Carsten Dominik + + * org.el (org-scan-tags): Also remember + `org-complex-heading-regexp' in a property. + +2012-01-03 Carsten Dominik + + * org-latex.el (org-export-as-latex): Turn off auto-insert and set + TeX-master to t when creating new TeX buffers. + + * org-docbook.el (org-export-as-docbook): Turn off auto-insert + when creating new buffers. + + * org-html.el (org-export-as-html): Turn off auto-insert + when creating new buffers. + +2012-01-03 Carsten Dominik + + * org-table.el (org-table-formula-handle-first/last-rc): Do not + expand pointers to first/last row/column that are inside a call to + `remote'. + (org-table-get-remote-range): Expand pointers to first/last + row/column. + +2012-01-03 Michael Sperber (tiny change) + + * org-capture.el (org-capture-get-indirect-buffer): Fix XEmacs + compatibility issue when creating an indirect buffer. + +2012-01-03 Christophe Rhodes + + * org-exp.el (org-infile-export-plist): Handle LATEX_CLASS_OPTIONS + the same way than LATEX_CLASS. + +2012-01-03 Bastien Guerry + + * org.el (org-return): Check the presence of the 'org-link face + even in contexts where there is more than one face. + +2012-01-03 Eric Schulte + + * ob-sql.el (org-babel-header-arg-names:sql): Sql specific header + argument names which should be inherited. + +2012-01-03 Nicolas Goaziou + + * org.el (org-in-block-p): Return matched name of block, if + any. It can be useful when a list of block names is provided as + an argument. + +2012-01-03 Nicolas Goaziou + + * org-docbook.el (org-export-as-docbook): Fix regexp. + + * org-html.el (org-export-as-html): Fix regexp. + +2012-01-03 Carsten Dominik + + * org-agenda.el (org-class): Allow holidays to be skipped. + +2012-01-03 Eric Schulte + + * ob-shen.el (org-babel-execute:shen): Fix two compilation errors. + +2012-01-03 Peter Münster (tiny change) + + * org-agenda.el (org-agenda-to-appt): Make sure filter-items are + strings before calling `string-match'. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-at-reference-p) + (org-footnote-at-definition-p): Remove text-properties from label. + +2012-01-03 Bastien Guerry + + * org-html.el (org-export-as-html): Add a "title" meta tag. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-to-appt): Allow to refine the scope of + entries to pass to `org-agenda-get-day-entries' and allow to + filter out entries using a function. + +2012-01-03 Nicolas Goaziou + + * org-agenda.el: Fix small display bug. + +2012-01-03 Nicolas Goaziou + + * org.el (org-set-regexps-and-options): Fix small bug introduced + by commit dfcb6faef11a2439b56b18a6289803361d402130. + +2012-01-03 Nicolas Goaziou + + * org-agenda.el (org-search-view): Simplify regexp. + (org-agenda-get-todos): Use new format string. + + * org-archive.el (org-archive-all-done): Simplify regexp. + + * org-ascii.el (org-export-as-ascii): More accurate regexp. + + * org-colview.el (org-columns-capture-view): Use new format string + and new string. + + * org-docbook.el (org-export-as-docbook): More accurate + regexp. Also use new regexp to match generic headlines. + + * org-exp.el (org-export-protect-quoted-subtrees): More accurate + regexp. Also use new regexp to match generic headlines. + + * org-html.el (org-export-as-html): More accurate regexp. Also + use new regexp to match generic headlines. + + * org-mouse.el (org-mouse-match-todo-keyword): Removed unused + and now erroneous function. + + * org.el (org-heading-regexp, org-heading-keyword-regexp-format): + New variables. + (org-set-regexps-and-options): Create regexps according to the + following rule: use spaces only to separate elements from an headline, + while allowing mixed tabs and spaces for any indentation job. + (org-nl-done-regexp, org-looking-at-done-regexp): Removed variables. + (org-set-font-lock-defaults): Fontify again headlines with a keyword + and no other text. Use new format strings. + (org-get-heading, org-toggle-comment, org-prepare-agenda-buffers) + (org-toggle-fixed-width-section): Use new format string. + (org-todo): More accurate regexps. + (org-point-at-end-of-empty-headline): Simplify regexp. + (org-insert-heading): Headline can sometimes be nil. + +2012-01-03 David Maus + + * org-agenda.el (org-agenda-bulk-action): Bind + `org-loop-over-headlines-in-active-region' to nil to avoid conflict + with bulk command. + +2012-01-03 David Maus + + * org.el (org-deadline, org-schedule): Skip invisible headlines when + mapping over headlines in active region. + +2012-01-03 David Maus + + * org.el (org-loop-over-headlines-in-active-region): New + customization variable. Loop over headlines in active region. + (org-schedule, org-deadline): Apply to headlines in region depending + on new customization variable. + +2012-01-03 David Maus + + * org.el (org-map-entries): Immediately return if scope is 'region + but no region is active. + +2012-01-03 David Maus + + * org.el (org-map-entries): Extend scope 'region to include entire + body of last headline in active region. + +2012-01-03 Bastien Guerry + + * org-src.el (org-edit-src-code): Fix typo-bug. + +2012-01-03 Bastien Guerry + + * org.el (org-format-agenda-item, org-scan-tags): Rename + `org-format-agenda-item' to `org-agenda-format-item'. + +2012-01-03 Bastien Guerry + + * org-agenda.el: Replace `category-pos' by `org-category-pos' to + silent byte-compiler. + +2012-01-03 Bastien Guerry + + * org.el: Declare external function `cdlatex-compute-tables'. + +2012-01-03 Bastien Guerry + + * org-latex.el (org-export-latex-set-initial-vars): Fix problem + when matching #+LaTeX_CLASS. + +2012-01-03 Rafael Laboissiere (tiny change) + + * org.el (org-link-search-must-match-exact-headline): Fix typos. + +2012-01-03 Bastien Guerry + + * org-latex.el (org-export-latex-make-header): Add some hyperref + options. + +2012-01-03 Kai Tetzlaff (tiny change) + + * org-publish.el (org-publish-file): Added 'eval'ing the value of + the :publishing-directory property before using it as destination + of the publishing project. This allows to construct the publish + destination directory dynamically at run-time using the return + value of a function. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug. + +2012-01-03 Carsten Dominik + + * org-agenda.el (org-agenda-move-date-from-past-immediately-to-today): + New option. + (org-agenda-date-later): Improve the logical structure. + +2012-01-03 Carsten Dominik + + * ob-calc.el (featurep): Require calc-store. + + * org-agenda.el (org-agenda-list-stuck-projects): Fix regexp + special handling. + + * org-compat.el (fboundp): Support for XEmacs. + + * org-exp.el (org-export): Protect XEmacs from `(redisplay)' call. + + * org-footnote.el (org-footnote-re): Optimize macro processing. + + * org.el (org-set-autofill-regexps): Xemacs compatibility. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-balanced-split): Balance both [] and () + groupings. + (org-babel-parse-header-arguments): Be sure to replace removed ":" + characters. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-parse-header-arguments): Quick fix for a + tiny bug. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-params-from-properties): Now splits + multiple var arguments behind a single ":var". + (org-babel-balanced-split): Separated balanced splitting of + strings out into a new function. + (org-babel-parse-multiple-vars): Splits multiple var arguments + behind a single ":var". + +2012-01-03 Bastien Guerry + + * org.el: Remap `outline-promote' and `outline-demote' keys to + `org-promote-subtree' and `org-demote-subtree'. + +2012-01-03 Leo + + * org-agenda.el (org-agenda-do-context-action): Check if marker is + valid before use. + +2012-01-03 Carsten Dominik (tiny change) + + * org-agenda.el (org-agenda-date-later): Fix shifting of date + ranges. + +2012-01-03 Eric Schulte + + * ob.el: Removing `org-babel-params-from-buffer' and + #+PROPERTIES: entirely. + + * ob-exp.el (org-babel-exp-src-block): Removing + `org-babel-params-from-buffer' and #+PROPERTIES: entirely. + + * ob-lob.el (org-babel-lob-execute): Removing + `org-babel-params-from-buffer' and #+PROPERTIES: entirely. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-params-from-buffer): Removing #+BABEL: + lines in favor of general #+PROPERTIES: lines. + +2012-01-03 Eric Schulte + + * ob-sql.el (org-babel-execute:sql): Insert into a temporary + buffer. + +2012-01-03 Carsten Dominik + + * org.el (org-cdlatex-mode): Run `cdlatex-mode-hook' and + update the internal cdlatex tables. + +2012-01-03 Eric Schulte + + * ob-sql.el (org-babel-execute:sql): Respect literal-results + options. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-disassemble-tables): Fix multi-table bug in + code block colname and rowname handling. + +2012-01-03 Carsten Dominik + + * org-publish.el (org-publish-cache-file-needs-publishing): + Fix regexp to not inlcude newlines. + +2012-01-03 Carsten Dominik + + * org.el (org-ctrl-c-ctrl-c): Remove table overlays before + restart. + +2012-01-03 Carsten Dominik + + * org.el (org-fontify-entities): Match entities before + numbers, as in `\sim2'. + +2012-01-03 Carsten Dominik + + * org-agenda.el (org-agenda-date-later): Make pushing forward + a past date to jump immedialtely to today. + +2012-01-03 Carsten Dominik + + * org-exp.el (org-store-forced-table-alignment): Parse the + column cookie for both alignment and width + specification. Store the resulting value in `org-col-cookies' + property. Retire the previously used `org-forced-aligns' + property for consistency. Renamed local variable `aligns' to + `cookies'. + + * org-html.el (org-format-org-table-html): Use + `org-col-cookies'. Renamed local variable forced-aligns to + col-cookies. + +2012-01-03 Carsten Dominik + + * org.el (org-latex-to-mathml-jar-file) + (org-latex-to-mathml-convert-command): New user-customizable + variables. + (org-format-latex-mathml-available-p, org-create-math-formula) + (org-format-latex-as-mathml): New functions. + (org-format-latex): Add a new local variable block-type that notes + the nature of the equation - inline or display. Associate it's + value to `org-latex-src-embed-type' property of dvipng links. Add + mathml as new processing type. + +2012-01-03 Sébastien Vauban + + * org.el (org-refile): Add tree name to prompt. + +2012-01-03 Carsten Dominik + + * org-latex.el (org-export-latex-tables): Honor + `org-export-latex-table-caption-above' + (org-export-latex-table-caption-above): New option. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-insert-header-arg): Now including language + specific header arg values in insertion options. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-insert-header-arg): Fixed typo. + +2012-01-03 Jambunathan K + + * org-exp.el (org-export-number-lines): Modified. Add a new + parameter `preprocess' and use this for backend-agnostic + handling of literal examples. + +2012-01-03 Nicolas Goaziou + + * org.el (org-match-substring-regexp) + (org-match-substring-with-braces-regexp): Allow subscripts and + superscripts to start at beginning of line. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-common-header-args-w-values): New variable to + hold common header arguments and their default values. + (org-babel-header-arg-names): Redefined using the new common + header arg variable. + (org-babel-insert-header-arg): New function to help when inserting + header arguments. + +2012-01-03 David Maus + + * org-html.el (org-html-handle-links): Remove unnecessary + protection markers when publishing link in default format. + +2012-01-03 Pieter Praet (tiny change) + + * org-crypt.el (org-crypt-check-auto-save): New function, see + next change. + + * org-crypt.el (org-decrypt-entry): Break the auto-save-mode + check out into a separate function, and call it at a later + point, to assure it only runs when visiting an encrypted + entry. + +2012-01-03 John J Foerch (tiny change) + + * org.el (org-log-note-headings): Document new %d and %D + escapes. + (org-store-log-note): Implement new %d and %D escapes. + +2012-01-03 Dave Abrahams + + * org-agenda.el (org-agenda-follow-indirect): New option. + (org-agenda-follow-mode): Call `org-agenda-do-context-action' fro + follow mode. + (org-agenda-do-context-action): Also do indirect follow mode + action. + +2012-01-03 Eric Schulte + + * ob-table.el (sbe): Fix typo in new sbe specification. + +2012-01-03 Eric Schulte + + * ob-table.el (sbe): If first variable is a string and not a + cons cell, then interpret it as a string of header arguments + to be passed to the code block. + +2012-01-03 Eric Schulte + + * ob-shen.el (shen-eval-defun): Declare external function. + (org-babel-execute:shen): Move requirement of inf-shen into + the function in which it is used to fix build error. + + * ob-shen.el: New file. + +2012-01-03 Carsten Dominik (tiny change) + + * org.el (org-open-at-point): Make `org-open-at-point' only + ask once about creating a new headline. + +2012-01-03 Nick Dokos (tiny change) + + * org.el (org-refile-targets): Elaborated the documentation of + the variable as suggested by Dave Abrahams. + +2012-01-03 Carsten Dominik (tiny change) + + * org.el (org-align-tags-here): Allow tags to be placed right + after heading. + (org-tags-column): Document the meaning of tags column 0. + +2012-01-03 Niels Giesen + + * org-agenda.el (org-agenda-get-blocks): Show timestamp ranges + in agenda if start day is same as end day. + +2012-01-03 Carsten Dominik + + * org.el (org-refile-get-location): Ignore errors when + collection heading to be excluded. + +2012-01-03 Carsten Dominik + + * org-special-blocks.el + (org-special-blocks-convert-html-special-cookies): Avoid XHTML + strict problems by not enclosing special blocks in paragraph tags. + +2012-01-03 Bernt Hansen + + * org-html.el (org-export-as-html): Check string-match + argument. + (org-html-handle-time-stamps): Check string-match argument. + +2012-01-03 Carsten Dominik + + * org-agenda.el + (org-agenda-skip-additional-timestamps-same-entry): Change + default value. + +2012-01-03 Carsten Dominik + + * org.el (org-time-string-to-time): + (org-time-string-to-absolute): Add optional arguments BUFFER and + POS for error reporting. + + * org-agenda.el (org-get-all-dates): + (org-agenda-get-timestamps, org-agenda-get-deadlines) + (org-agenda-get-scheduled, org-agenda-get-blocks): Call time + stamp parsing functions with information on where the + timestamp was taken from. + +2012-01-03 Carsten Dominik + + * org.el (org-tree-to-indirect-buffer): Run `org-cycle-hook' + after `show-all' in indirect buffer. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-list-parents-alist): When no parent is found + for an item, set it as the closest less indented item above. If + none is found, make it a top level item. + (org-list-write-struct): Externalize code. + (org-list-struct-fix-item-end): New function. + (org-list-struct): Remove a now useless fix. + + * org.el (org-ctrl-c-ctrl-c): Use new function. + +2012-01-03 Nicolas Goaziou + + * org.el (org-end-of-line): When on an item, move point at the + end of the line, but before any hidden text. Thus, it's still + possible to use commands, like `C-c C-c', acting at + items. This is still disabled if `org-special-ctrl-a/e' + ignores `C-e'. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-renumber-fn:N): Small refactoring. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-renumber-fn:N): Fix an + infloop. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-at-definition-p): Remove + useless `org-re'. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-renumber-fn:N): Verify point + is at a real footnote reference or definition before + renumbering it. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-goto-definition): This patch + makes sure the function says when a definition has been + found. Thus, moving from the reference to the definition + doesn't offer to create the latter again. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-create-definition): + Explicitely move point after tag, if it has just been + inserted. + +2012-01-03 Eric Schulte + + * ob-gnuplot.el (org-babel-execute:gnuplot): Don't quote file + names on Windows systems. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-create-definition): When the + tag is missing, it is created before any existing footnote, or + at end of buffer. In the latter case, the marker pointing at + the position where the new footnote is going to be inserted + (at end of buffer) stays before the tag. This patch makes + sure that the marker will be kept after the tag. + +2012-01-03 Eli Zaretskii + + * org.el (org-mode): Force left-to-right paragraphs in Org + buffers. For a related discussions, see + https://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00349.html. + +2012-01-03 Nicolas Goaziou + + * ob-asymptote.el (org-babel-asymptote-define-type): Silence + byte-compiler. + +2012-01-03 Eric Schulte + + * ob-R.el (org-babel-R-evaluate): Fix bug in R session + evaluation. + +2012-01-03 Eric Schulte + + * org-bibtex.el (org-bibtex-type-property-name): Configurable + property name for bibtex entry types. + (org-bibtex-headline): Use new configurable property name. + (org-bibtex-check): Use new configurable property name. + (org-bibtex-create): Use new configurable property name. + (org-bibtex-write): Use new configurable property name. + +2012-01-03 Carsten Dominik + + * org.el (org-paste-subtree): Remove unnecessary `concat'. + +2012-01-03 Bastien Guerry + + * org.el (org-paste-subtree): Remove useless (concat ...). + +2012-01-03 Eric Schulte + + * ob-C.el (org-babel-C-var-to-C): Replacing usage of + characterp with integerp (which should work w/Emacs22). + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-at-definition-p): Context must + be valid at the beginning of line, not at point. + +2012-01-03 Eric Schulte + + * ob-tangle.el (org-babel-tangle-collect-blocks): Better + delimiting of Org-mode text preceding a code block. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-get-src-block-info): Fixing bug, + accidentally deleted variable values. + +2012-01-03 Eric Schulte + + * ob-tangle.el (org-babel-process-comment-text): Customizable + function to process comment text. + (org-babel-tangle-collect-blocks): Make use of new + customizable processing function. + (org-babel-spec-to-string): Call customizable function rather than + `org-babel-trim'. + +2012-01-03 Eric Schulte + + * ob-R.el (org-babel-execute:R): Collect and pass along the + result-params. + (org-babel-R-evaluate): Accept result-params and if "scalar" or + "verbatim" don't process output. + (org-babel-R-evaluate-session): Accept result-params and if + "scalar" or "verbatim" don't process output. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-merge-params): Differentiate between result + types and wrappers. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-get-src-block-info): Check that + functional-syntax variables are initialized. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-check-src-block): Adding a note for a + future enhancement. + +2012-01-03 Carsten Dominik + + * org-exp.el (org-export): Restore point when exporting a subtree. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-parse-src-block-match): More robust to code + blocks with empty bodies. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-parse-src-block-match): Don't error on empty + code block body. + +2012-01-03 David Maus + + * org.el (org-open-at-point): Unescape plain link. + +2012-01-03 David Maus + + * org-html.el (org-html-handle-links): Remove unnecessary link + unescape. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-merge-params): Better error message for + unassigned variables. + +2012-01-03 Christian Egli + + * org-taskjuggler.el (org-export-as-taskjuggler): Clone the + buffer local variables to the temporary buffer before + exporting. + +2012-01-03 Eric Schulte + + * org-exp.el (org-export-select-backend-specific-text): Only + remove commas on the front line of a code block. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-demarcate-block): Copy headers and indent to + column of point when a block is split. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-insert-result): Corrected file insertion + for inline results. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-in-valid-context-p): No + footnote in latex fragments. + +2012-01-03 Martin Rudalics + + * org-compat.el (org-pop-to-buffer-same-window): Remove LABEL + argument from `pop-to-buffer-same-window' call. + +2012-01-03 Eric Schulte + + * ob-R.el (org-babel-R-evaluate-session): Improve prompt + detection regexp. + +2012-01-03 Nicolas Goaziou + + * org-inlinetask.el (org-inlinetask-goto-end): Small + refactoring. + +2012-01-03 Nicolas Goaziou + + * ob-asymptote.el (org-babel-asymptote-var-to-asymptote): + refactor code. + (org-babel-asymptote-table-to-array): Removed function. + +2012-01-03 Nicolas Goaziou + + * ob-asymptote.el (org-babel-asymptote-var-to-asymptote): + recognize non-nested lists as uni-dimensional arrays. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-params-from-properties): Don't check for + header arguments in properties with leading ":"s. + +2012-01-03 Nicolas Goaziou + + * org-inlinetask.el (org-inlinetask-goto-end): Correctly + detect the end of an inlinetask when the next one starts + immediately after the current one. Also, return position of + point. + +2012-01-03 Nicolas Goaziou + + * ob.el (org-babel-inline-src-block-regexp): Allow regexp to + start at bol. + +2012-01-03 Nicolas Goaziou + + * ob-asymptote.el (org-babel-asymptote-define-type): Elisp + floats are asymptote reals. + +2012-01-03 Nicolas Goaziou + + * ob-asymptote.el (org-babel-asymptote-table-to-array): + Require a new argument TYPE specifying the detected type of + array. If it's a string array, make sure every element is + returned as a string. Also improve doc-string. + (org-babel-asymptote-var-to-asymptote): Fill new argument. Small + refactoring. + (org-babel-asymptote-define-type): Rewrite to avoid stopping + search at first float found, as strings have precedence over + floats. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-normalize): Be sure to separate + the last footnote definition from the rest of the buffer. + +2012-01-03 Eric Schulte + + * ob-awk.el (org-babel-expand-body:awk): Allow for symbolic + variable names. + +2012-01-03 Nicolas Goaziou + + * org.el (org-latex-regexps): Allow matching latex fragments + of type "$" and "$1" at beginning of line. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-search-view, org-agenda-get-todos) + (org-agenda-get-deadlines, org-agenda-get-scheduled): Add + `category-pos' in let construct. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-get-definition): The function has + to widen buffer if definition has not been found in the current + narrowed part. Be sure to restore that restriction once the + definition is found. + +2012-01-03 Michal Sojka (tiny change) + + * org-icalendar.el (org-print-icalendar-entries): Make alarm + duration RFC5545 compliant. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-get-timestamps) + (org-agenda-get-sexps, org-agenda-get-progress): Correctly set + the `org-category-pos' property. + +2012-01-03 Bastien Guerry + + * org-html.el (org-export-html-divs): Improve docstring. + +2012-01-03 Carsten Dominik + + * org-table.el (org-table-fix-formulas): Throw error when + changing formula leads to an invalid formula. + +2012-01-03 Bastien Guerry + + * org.el (org-archive-location): Minor docstring fix. + +2012-01-03 Nicolas Goaziou + + * org.el (org-block-todo-from-checkboxes): + `org-list-search-forward' should be used when looking for an + item, as it filters out contexts where match couldn't be in a + list. Also use a correct item regexp, taking into account + alphabetical ordered lists and counters. + +2012-01-03 Bastien Guerry + + * org-html.el (org-html-make-link): Minor fix to the + docstring. + +2012-01-03 Suvayu Ali (tiny change) + + * org-inlinetask.el (org-inlinetask): New customisable face + for inlinetasks + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-get-todos): Properly set + `category-pos'. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-list-struct-apply-struct): Don't use + (copy-marker (point)) instead of (point-marker). + +2012-01-03 Eric Schulte + + * ob.el (org-babel-where-is-src-block-result): Don't try to + resolve variables when simply checking if we're inside of a + code block. + +2012-01-03 Bastien Guerry + + * org.el (org-refresh-category-properties): New text property + 'org-category-position to point at the beginning of the + headline from which the category is set. + +2012-01-03 Matt Lundin + + * org.el (org-refile): Don't call `org-back-to-heading' with + goto argument. + +2012-01-03 Bastien Guerry + + * org.el (org-link-display-descriptive): Remove this option and + rely on the existing `org-descriptive-links' instead. + (org-toggle-link-display): Use `org-descriptive-links'. + +2012-01-03 Eric Schulte + + * ob-ref.el (org-babel-ref-resolve): Allow matching of results + with tags after the result name. + +2012-01-03 Bastien Guerry + + * org-table.el (org-table-get-specials): Allow the use of the + underscore character in column names. + (org-table-get-specials): Allow the use of the underscore + character in field names. + +2012-01-03 Eric Schulte + + * org-exp-blocks.el (org-export-blocks-preprocess): Explicitly + cleaning up markers. + +2012-01-03 Eric Schulte + + * ob-exp.el (org-babel-exp-inline-src-blocks): Save match data + around `org-babel-exp-do-export' which now searches in this case. + (org-babel-exp-results): Position the point in the inline source + block during export evaluation. + + * ob.el (org-babel-insert-result): More readable code. + +2012-01-03 Eric Schulte + + * org-exp-blocks.el (org-export-blocks-preprocess): Use the built + in function rather than the superfluous (and now removed) + org-specific function. + +2012-01-03 Eric Schulte + + * ob-exp.el (org-babel-exp-inline-src-blocks): Don't examplize + inline code blocks which are already escaped. + +2012-01-03 Eric Schulte + + * org-exp-blocks.el (org-marker-from-point): Helper function to + create markers at specific points in source buffers. + (org-export-blocks-preprocess): Use markers instead of points + to delimit code blocks. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-list-separating-blank-lines-number): The + behaviour of `org-back-over-empty-lines' depends on the + associated value of `headline' in + `org-blank-before-new-entry', which is out of context in a + list. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-initialize-agent): When the current + buffer isn't being watched, resume initialization of other watched + buffers. In that case, give hand to others idle timers or + processes more frequently. + (org-indent-agent-active-delay): Renamed from + `org-indent-agent-process-duration'. + (org-indent-agent-passive-delay): New variable. + (org-indent-agent-resume-delay): Change value. + (org-indent-initialize-buffer): Change argument name. + (org-indent-add-properties): Change argument name and type + expected. It must be a time value now. + +2012-01-03 Bastien Guerry + + * org.el (org-set-property): Bugfix. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-remove-result): Idempotent code block + evaluation and result removal. + +2012-01-03 Eric Schulte + + * ob-ruby.el (org-babel-ruby-initiate-session): No longer + require inf-ruby when no session evaluation takes place. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-agenda-prefix-format): Mention "%e" in + the docstring. + +2012-01-03 Carsten Dominik + + * org-agenda.el (org-agenda-custom-commands): Set a default + value for this command. + +2012-01-03 Carsten Dominik + + * org-agenda.el (org-agenda-include-all-todo): Declare this option + as no longer working. + (org-timeline): Rename the include-all argument to dotodo. + (org-arg-loc): Renamed from` org-include-all-loc'. + (org-agenda-list): Rename the INCLUDE-ALL argument to ARG, + because its function has changed. + +2012-01-03 Bastien Guerry + + * org.el (org-fixup-indentation): Fix various small bugs. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-agent-timer) + (org-indent-agentized-buffers, org-indent-agent-resume-timer) + (org-indent-agent-process-duration) + (org-indent-agent-resume-delay): New variables. + (org-indent-initial-marker): More accurate doc-string. + (org-indent-initial-timer, org-indent-initial-resume-timer) + (org-indent-initial-process-duration) + (org-indent-initial-resume-delay) + (org-indent-initial-lock): Removed variables. + (org-indent-mode): Set up an agent to watch current buffer, or + add it to the list of already watched buffers. + (org-indent-initialize-agent): New function. + (org-indent-initialize-buffer): Now requires a mandatory + buffer argument. + (org-indent-add-properties): Reflect changes to variables. The resume + timer is now global. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-normalize): Refactor, and fix + some blank lines deletion. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-mode): + `org-indent-initial-resume-timer ' needs to be local. + +2012-01-03 Bastien Guerry + + * org.el (org-fixup-indentation): Correctly indent meta lines. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-set-line-properties): Add text + properties down to the beginning of the next line. + (org-indent-add-properties): When last position to add + properties to is at the beginning of a line, all that line + will have properties. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-initial-resume-timer): New variable. + (org-indent-initialize-buffer): Also resume after a small break. + (org-indent-add-properties): When in asynchronous mode, + proceed for 2 seconds, then take a break. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-set-line-properties): New function. + (org-indent-add-properties): Externalize worker function. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-indent-buffer): Take into account + narrowing. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-modified-headline-flag): Renamed from + `org-indent-deleted-headline-flag' + (org-indent-notify-modified-headline): Renamed from + `org-indent-notify-deleted-headline'. Handle situations when + the stars of an headline are modified. + (org-indent-refresh-maybe): Remove case now handled by + previous function. + (org-indent-mode): Apply renames. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-inlinetask-first-star): New + variable. + (org-indent-add-properties): Set the first star of inline-tasks' + virtual indentation in `org-warning' face. + + * org-inlinetask.el (org-inlinetask-insert-task): Create a new + inline-task slightly differently, so virtual indentation can + be applied normally. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-initial-marker) + (org-indent-initial-timer, org-indent-initial-lock): New + variables. + (org-indent-mode): At initialization, start an idle timer to indent + the whole buffer. When the user is asking for control, interrupt the + process, and resume at the same point when idle again. + (org-indent-initialize-buffer): New function. + (org-indent-add-properties): Throw an interrupt when indentation of + buffer is stopped during initialization. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-indent-buffer): Send more + appropriate messages. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-notify-deleted-headline) + (org-indent-refresh-maybe): Replace `org-indent-outline-re' + with `org-outline-regexp-bol'. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-max-levels): Modify default value and + add comment. + (org-indent-add-properties): Pay attention to `org-indent-max' + and `org-indent-max-levels' values. + (org-indent-refresh-maybe): Refactor code to avoid an unnecessary + save excursion. + +2012-01-03 Nicolas Goaziou + + * org-table.el (org-table-align): Remove now useless hack. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-fix-section-after-idle-time): Remove + variable. + (org-indent-initialize): Remove timer. + (org-indent-add-properties): Refactor code. + (org-indent-refresh-subtree, org-indent-refresh-section) + (org-indent-refresh-buffer,org-indent-set-initial-properties): Remove + functions. + (org-indent-deleted-headline): New variable. + (org-indent-notify-deleted-headline,org-indent-refresh-maybe): New + functions. + (org-indent-mode): Insert new functions into a hook. + +2012-01-03 Nicolas Goaziou + + * org-indent.el (org-indent-mode): Completely refresh buffer + before starting org-indent-mode. Also set idle timer to refresh + only visible portion of buffer, and refresh the subtree instead of + section when promoting or demoting it. + (org-indent-add-properties): Rewrite function to proceed line by + line, as required by `wrap-prefix' specificity. + (org-indent-refresh-section,org-indent-refresh-subtree): Refactor. + (org-indent-refresh-view): New function. + (org-indent-refresh-to, org-indent-refresh-section): Removed + functions. + + * org.el (org-unfontify-region): Do not remove prefix + properties when unfontifying a region. + +2012-01-03 Bastien Guerry + + * org-colview.el (org-columns-cleanup-item): Correctly remove + leading stars in items displayed in the agenda column view. + +2012-01-03 Bastien Guerry + + * org-colview.el (org-columns-display-here): Clean up items in + `org-agenda-mode' too. + (org-columns-cleanup-item): Take a new argument CPHR to allow + passing a complex heading regexp. Rewrite to cleanup ITEM + correctly in `org-agenda-mode'. + +2012-01-03 Bastien Guerry + + * org-clock.el (org-duration-string-to-minutes) + (org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes): Move + from org.el. + +2012-01-03 Bastien Guerry + + * org.el (org-refile-active-region-within-subtree): New option to + allow refiling a region that is part of a subtree without + containing a subtree itself. This default to `nil'. + (org-refile): Use the new option. Put point at the beginning + of the region/subtree to be refiled, so that users understand + what will be refiled. Also improve the prompt to tell whether + the user is refiling a region or a headline. + +2012-01-03 Bastien Guerry + + * org.el (org-properties-postprocess-alist): New option to allow + postprocessing the values of properties set through + `org-set-property'. + (org-set-property): Use this option. + +2012-01-03 Bastien Guerry + + * org.el (org-outline-regexp, org-outline-regexp-bol): Add a + docstring. + +2012-01-03 Bastien Guerry + + * org-archive.el (org-archive-to-archive-sibling): Use + `org-outline-regexp' instead of `outline-regexp'. + +2012-01-03 Nicolas Goaziou + + * org.el (org-between-regexps-p): Searching up to pos may + match again beginning regexp. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-goto-definition): Don't send + erroneous message: suggested bindings might not be set outside + Org. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-normalize): Effectively remove + any footnote tag in non Org buffers, as detailled in the + docstring of `org-footnote-tag-for-non-org-mode-files'. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-tag-for-non-org-mode-files): + notify the opportunity to set the variable to the empty string. + (org-footnote-normalize, org-footnote-create-definition): + Carefully check for inserted newlines and presence of the + footnote tag. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-at-definition-p): Re-use + `org-footnote-definition-re'. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-definition-re): Remove an + useless group. + (org-footnote-at-definition-p): Reflect removal of the group. + +2012-01-03 Nicolas Goaziou + + * org.el (org-set-regexps-and-options): Enforce white space + after todo keyword, as word boundary isn't sufficient (i.e. in + matches * TODO/this). + +2012-01-03 Jambunathan K + + * org-inlinetask.el (org-inlinetask-export-templates): Fixed + template for html so that the exported file is valid + xhtml. Added template for odt. + (org-inlinetask-export-handler): Fix typo in the regexp that + trims content. Make sure that the content is flanked by + paragraph boundaries on either side. + +2012-01-03 Bastien Guerry + + * org.el (org-add-planning-info): Don't insert superfluous + space when updating timestamps. + +2012-01-03 Bastien Guerry + + * org-agenda.el (org-cmp-effort): Fix docstring. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-list-full-item-re): When an item has only a + bullet and no space after it, list structure would not be + recognized correctly. + +2012-01-03 Bastien Guerry + + * org.el (org-overview): Use `outline-regexp' instead of + `org-outline-regexp' so that global cycling using + `orgstruct-mode' works outside of Org buffers. + +2012-01-03 Bastien Guerry + + * org-table.el (org-table-eval-formula): Fix missing variable + in let construct. + (org-table-time-string-to-seconds): Fix missing variable in + let construct. + +2012-01-03 Michael Brand + + * org-agenda.el (org-agenda-get-deadlines): Fix dfrac for the + case of wdays being 0. Don't pass wdays to + org-agenda-deadline-face, like before the old fix. + (org-agenda-deadline-face): Revert to old state that was without + wdays. + +2012-01-03 Bastien Guerry + + * org-latex.el (org-export-latex-fixed-width): Only add one + line break after exporting verbatim environments. + +2012-01-03 Bastien Guerry + + * org-mw.el (org-mw-export-lists): Fix list export. + +2012-01-03 Bastien Guerry + + * org-list.el (org-list-item-trim-br): New function. + (org-list-to-generic): New parameter :nobr to use the new + function. + +2012-01-03 David Maus + + * org.el (org-paste-subtree): Fix wrong order of lines to move + before pasting. + +2012-01-03 David Maus + + * org.el (org-paste-subtree): Paste subtree above target + headline if point is at bol. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-toggle-checkbox): Don't clear lim-down + while used in the while loop. + +2012-01-03 Nicolas Goaziou + + * org-list.el (org-toggle-checkbox): Lim-down must be a + marker. + +2012-01-03 Nicolas Goaziou + + * org.el (org-activate-code): Correct regexp so ":.*" isn't + matched. + +2012-01-03 David Maus + + * org-macs.el (org-with-gensyms, org-called-interactively-p) + (with-silent-modifications, org-bound-and-true-p) + (org-unmodified, org-re, org-preserve-lc) + (org-without-partial-completion, org-with-point-at) + (org-no-warnings, org-if-unprotected, org-if-unprotected-1) + (org-if-unprotected-at, org-with-remote-undo) + (org-no-read-only, org-save-outline-visibility) + (org-with-wide-buffer, org-with-limited-levels) + (org-eval-in-environment): Provide edebug specifications. + + * org-src.el (org-src-do-at-code-block): Dto. + + * org-publish.el (org-publish-with-aux-preprocess-maybe): Dto. + + * org-compat.el (org-xemacs-without-invisibility): Dto. + + * org-clock.el (org-with-clock-position, org-with-clock): Dto. + + * org-agenda.el (org-agenda-with-point-at-orig-entry) + (org-batch-agenda, org-batch-agenda-csv) + (org-batch-store-agenda-views): Dto. + + * ob.el (org-babel-do-in-edit-buffer) + (org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto. + + * ob-tangle.el (org-babel-with-temp-filebuffer): Dto. + + * ob-table.el (sbe): Dto. + + * ob-exp.el (org-babel-exp-in-export-file): Dto. + + * ob-comint.el (org-babel-comint-in-buffer) + (org-babel-comint-with-output): Dto. + +2012-01-03 Nicolas Goaziou + + * org-inlinetask.el (org-inlinetask-export-templates): Fix + docstring. + +2012-01-03 Nicolas Goaziou + + * org-inlinetask.el (org-inlinetask-insert-task): Error when + trying to nest inline tasks. + +2012-01-03 Nicolas Goaziou + + * org.el (org-activate-code, org-toggle-fixed-width-section) + (org-indent-line-function): Allow "[ \t]*:$" as a special case of + fixed-width section. + +2012-01-03 David Maus + + * org.el (org-paste-subtree): Don't eat headline when called + with point at existing headline. + +2012-01-03 David Maus + + * org.el (org-paste-subtree): Fix typo in variable name. + +2012-01-03 Jambunathan K + + * org-inlinetask.el (org-inlinetask-export-handler): Don't + export inline tasks if the current backend has provided no + entries in `org-inlinetask-export-templates'. + +2012-01-03 Valentin Wüstholz (tiny change) + + * org.el (org-indent-line-function): Made the way in which + example blocks are indented more flexible. + +2012-01-03 David Maus + + * org-agenda.el (org-batch-agenda-csv): Fix argument to append + when creating final parameter alist. + +2012-01-03 David Maus + + * org-agenda.el (org-batch-store-agenda-views): Use macro + `org-eval-in-environment'. + +2012-01-03 David Maus + + * org-agenda.el (org-batch-agenda, org-batch-agenda-csv): Use + `org-eval-in-environment. + +2012-01-03 David Maus + + * org-macs.el (org-make-parameter-alist): New function. Turn + flat list of alternating symbol names and values into an alist + with symbol name in car and value in cdr. + +2012-01-03 David Maus + + * org-agenda.el (org-agenda-with-point-at-orig-entry): Use + macro `org-with-gensyms'. + +2012-01-03 David Maus + + * org-macs.el (org-substitute-posix-classes): New + function. Substitute posix classes in regular expression. + (org-re): Use new function. + +2012-01-03 David Maus + + * org-macs.el (org-eval-in-environment): New macro. Evaluate FORM + in ENVIRONMENT. + +2012-01-03 David Maus + + * org-macs.el (org-preserve-lc, org-with-point-at) + (org-with-remote-undo, org-save-outline-visibility): Use new + macro `org-with-gensyms'. + +2012-01-03 David Maus + + * org-macs.el (org-with-gensyms): New macro. Wrap let-binding + of SYMBOLS to new uninterned symbols around BODY. + +2012-01-03 Nicolas Goaziou + + * org-inlinetask.el (org-inlinetask-export-handler): Make sure + the task starts a paragraph or the HTML exporter will produce + an incorrect output. + +2012-01-03 Nicolas Goaziou + + * org.el (org-return): When filling happens, `newline' can + change match data, hence modifying the indent column. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-new): Only forbid non-inlined + footnotes at column 0, as only them can be confused with a + footnote definition. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-new): Use `ido' or `iswitchb' + when available when prompted for a label. Also rename a local + variable to avoid confusion with an existing function. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-label-history): Removed + variable + (org-footnote-new): Remove call to that variable. + +2012-01-03 Nicolas Goaziou + + * org.el (org-insert-heading): With `force-heading' non-nil, + inserting an heading before any headline, and just after a + list would return an error. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-sha1-hash): Removed use of `copy-seq'. + +2012-01-03 Eric Schulte + + * org-bibtex.el (org-bibtex-get): Make the "FILE" property + non-special when resolving bibtex values. + +2012-01-03 David Maus + + * org.el (org-back-over-empty-lines): Don't move line upward + if point is at eob. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-in-valid-context-p): Check + `org-protected' property before allowing to match a footnote. + (org-footnote-at-reference-p): Remove an obsolete test. It is now + done in the previous function. + +2012-01-03 Nicolas Goaziou + + * org.el (org-between-regexps-p): Previous name implied the + function was related to blocks, which isn't mandatory. + (org-narrow-to-block, org-in-block-p) + (org-indent-line-function): Applied the rename. + + * ob-exp.el (org-babel-in-example-or-verbatim): Applied + rename. Also removed a white space. + +2012-01-03 Nicolas Goaziou + + * org.el (org-in-regexps-block-p): Return an useful value when + point is between START-RE and END-RE. No incomplete block is + allowed anymore. Add another optional argument to bound the + bottom part of the search. + (org-narrow-to-block, org-in-block-p): Apply modifications. + +2012-01-03 Eric Schulte + + * ob.el (org-babel-src-block-regexp): If a code block has a + body, its last character must be a newline. + +2012-01-03 Nicolas Goaziou + + * org-footnote.el (org-footnote-next-reference-or-definition): + If no more footnote is found, be sure to go back to the + original position. Otherwise, point might be left on a + footnote-like element that has been dished out. + +2012-01-03 Eric Schulte + + * ob-exp.el (org-babel-inline-src-block-regexp): Declare this + variable. + + * ob.el (defvar): Wrap variable declaration in + `eval-when-compile'. + +2012-01-03 Eric Schulte + + * ob-keys.el (org-babel-key-bindings): Bound to `C-c C-v k'. + +2012-01-03 Eric Schulte + + * ob-java.el (org-babel-execute:java): Allow cmdline flags + during compilation and evaluation. + 2011-12-06 Juanma Barranquero * ob.el (org-babel-expand-body:generic, org-babel-number-p): diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index 4f8106cd66f..dccf6b2b0b3 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -180,7 +179,7 @@ of the same value." (format "int %S = %S;" var val)) ((floatp val) (format "double %S = %S;" var val)) - ((or (characterp val)) + ((or (integerp val)) (format "char %S = '%S';" var val)) ((stringp val) (format "char %S[%d] = \"%s\";" diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index 2b0e6d5e16a..d8c3d6bbf5e 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el @@ -6,7 +6,6 @@ ;; Dan Davison ;; Keywords: literate programming, reproducible research, R, statistics ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -80,7 +79,8 @@ "Execute a block of R code. This function is called by `org-babel-execute-src-block'." (save-excursion - (let* ((result-type (cdr (assoc :result-type params))) + (let* ((result-params (cdr (assoc :result-params params))) + (result-type (cdr (assoc :result-type params))) (session (org-babel-R-initiate-session (cdr (assoc :session params)) params)) (colnames-p (cdr (assoc :colnames params))) @@ -89,7 +89,7 @@ This function is called by `org-babel-execute-src-block'." (full-body (org-babel-expand-body:R body params graphics-file)) (result (org-babel-R-evaluate - session full-body result-type + session full-body result-type result-params (or (equal "yes" colnames-p) (org-babel-pick-name (cdr (assoc :colname-names params)) colnames-p)) @@ -197,6 +197,7 @@ current code buffer." '((:bmp . "bmp") (:jpg . "jpeg") (:jpeg . "jpeg") + (:tex . "tikz") (:tiff . "tiff") (:png . "png") (:svg . "svg") @@ -214,7 +215,7 @@ current code buffer." (setq device (or (and device (cdr (assq (intern (concat ":" device)) devices))) "png")) (setq filearg - (if (member device '("pdf" "postscript" "svg")) "file" "filename")) + (if (member device '("pdf" "postscript" "svg" "tikz")) "file" "filename")) (setq args (mapconcat (lambda (pair) (if (member (car pair) allowed-args) @@ -232,16 +233,16 @@ current code buffer." (defvar org-babel-R-write-object-command "{function(object,transfer.file){object;invisible(if(inherits(try({tfile<-tempfile();write.table(object,file=tfile,sep=\"\\t\",na=\"nil\",row.names=%s,col.names=%s,quote=FALSE);file.rename(tfile,transfer.file)},silent=TRUE),\"try-error\")){if(!file.exists(transfer.file))file.create(transfer.file)})}}(object=%s,transfer.file=\"%s\")") (defun org-babel-R-evaluate - (session body result-type column-names-p row-names-p) + (session body result-type result-params column-names-p row-names-p) "Evaluate R code in BODY." (if session (org-babel-R-evaluate-session - session body result-type column-names-p row-names-p) + session body result-type result-params column-names-p row-names-p) (org-babel-R-evaluate-external-process - body result-type column-names-p row-names-p))) + body result-type result-params column-names-p row-names-p))) (defun org-babel-R-evaluate-external-process - (body result-type column-names-p row-names-p) + (body result-type result-params column-names-p row-names-p) "Evaluate BODY in external R process. If RESULT-TYPE equals 'output then return standard output as a string. If RESULT-TYPE equals 'value then return the value of the @@ -258,11 +259,17 @@ last statement in BODY, as elisp." (format "{function ()\n{\n%s\n}}()" body) (org-babel-process-file-name tmp-file 'noquote))) (org-babel-R-process-value-result - (org-babel-import-elisp-from-file tmp-file '(16)) column-names-p))) + (if (or (member "scalar" result-params) + (member "verbatim" result-params)) + (with-temp-buffer + (insert-file-contents tmp-file) + (buffer-string)) + (org-babel-import-elisp-from-file tmp-file '(16))) + column-names-p))) (output (org-babel-eval org-babel-R-command body)))) (defun org-babel-R-evaluate-session - (session body result-type column-names-p row-names-p) + (session body result-type result-params column-names-p row-names-p) "Evaluate BODY in SESSION. If RESULT-TYPE equals 'output then return standard output as a string. If RESULT-TYPE equals 'value then return the value of the @@ -284,7 +291,13 @@ last statement in BODY, as elisp." "FALSE") ".Last.value" (org-babel-process-file-name tmp-file 'noquote))) (org-babel-R-process-value-result - (org-babel-import-elisp-from-file tmp-file '(16)) column-names-p))) + (if (or (member "scalar" result-params) + (member "verbatim" result-params)) + (with-temp-buffer + (insert-file-contents tmp-file) + (buffer-string)) + (org-babel-import-elisp-from-file tmp-file '(16))) + column-names-p))) (output (mapconcat #'org-babel-chomp @@ -295,7 +308,7 @@ last statement in BODY, as elisp." (mapcar (lambda (line) ;; cleanup extra prompts left in output (if (string-match - "^\\([ ]*[>+][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) + "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) (substring line (match-end 1)) line)) (org-babel-comint-with-output (session org-babel-R-eoe-output) diff --git a/lisp/org/ob-asymptote.el b/lisp/org/ob-asymptote.el index 6bae3581cf4..5bd33f5086c 100644 --- a/lisp/org/ob-asymptote.el +++ b/lisp/org/ob-asymptote.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -98,9 +97,8 @@ Asymptote does not support sessions" The elisp value PAIR is converted into Asymptote code specifying a variable of the same value." (let ((var (car pair)) - (val (if (symbolp (cdr pair)) - (symbol-name (cdr pair)) - (cdr pair)))) + (val (let ((v (cdr pair))) + (if (symbolp v) (symbol-name v) v)))) (cond ((integerp val) (format "int %S=%S;" var val)) @@ -108,55 +106,42 @@ a variable of the same value." (format "real %S=%S;" var val)) ((stringp val) (format "string %S=\"%s\";" var val)) + ((and (listp val) (not (listp (car val)))) + (let* ((type (org-babel-asymptote-define-type val)) + (fmt (if (eq 'string type) "\"%s\"" "%s")) + (vect (mapconcat (lambda (e) (format fmt e)) val ", "))) + (format "%s[] %S={%s};" type var vect))) ((listp val) - (let* ((dimension-2-p (not (null (cdr val)))) - (dim (if dimension-2-p "[][]" "[]")) - (type (org-babel-asymptote-define-type val)) - (array (org-babel-asymptote-table-to-array - val - (if dimension-2-p '(:lstart "{" :lend "}," :llend "}"))))) - (format "%S%s %S=%s;" type dim var array)))))) - -(defun org-babel-asymptote-table-to-array (table params) - "Convert values of an elisp table into a string of an asymptote array. -Empty cells are ignored." - (labels ((atom-to-string (table) - (cond - ((null table) '()) - ((not (listp (car table))) - (cons (if (and (stringp (car table)) - (not (string= (car table) ""))) - (format "\"%s\"" (car table)) - (format "%s" (car table))) - (atom-to-string (cdr table)))) - (t - (cons (atom-to-string (car table)) - (atom-to-string (cdr table)))))) - ;; Remove any empty row - (fix-empty-lines (table) - (delq nil (mapcar (lambda (l) (delq "" l)) table)))) - (orgtbl-to-generic - (fix-empty-lines (atom-to-string table)) - (org-combine-plists '(:hline nil :sep "," :tstart "{" :tend "}") params)))) + (let* ((type (org-babel-asymptote-define-type val)) + (fmt (if (eq 'string type) "\"%s\"" "%s")) + (array (mapconcat (lambda (row) + (concat "{" + (mapconcat (lambda (e) (format fmt e)) + row ", ") + "}")) + val ","))) + (format "%S[][] %S={%s};" type var array)))))) (defun org-babel-asymptote-define-type (data) "Determine type of DATA. -DATA is a list. Type symbol is returned as 'symbol. The type is -usually the type of the first atom encountered, except for arrays -of int, where every cell must be of int type." - (labels ((anything-but-int (el) - (cond - ((null el) nil) - ((not (listp (car el))) - (cond - ((floatp (car el)) 'real) - ((stringp (car el)) 'string) - (t - (anything-but-int (cdr el))))) - (t - (or (anything-but-int (car el)) - (anything-but-int (cdr el))))))) - (or (anything-but-int data) 'int))) + +DATA is a list. Return type as a symbol. + +The type is `string' if any element in DATA is +a string. Otherwise, it is either `real', if some elements are +floats, or `int'." + (let* ((type 'int) + find-type ; for byte-compiler + (find-type + (function + (lambda (row) + (catch 'exit + (mapc (lambda (el) + (cond ((listp el) (funcall find-type el)) + ((stringp el) (throw 'exit (setq type 'string))) + ((floatp el) (setq type 'real)))) + row)))))) + (funcall find-type data) type)) (provide 'ob-asymptote) diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index 66e07bf175c..1ba0a356924 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -49,7 +48,7 @@ "Expand BODY according to PARAMS, return the expanded body." (dolist (pair (mapcar #'cdr (org-babel-get-header params :var))) (setf body (replace-regexp-in-string - (regexp-quote (concat "$" (car pair))) (cdr pair) body))) + (regexp-quote (format "$%s" (car pair))) (cdr pair) body))) body) (defun org-babel-execute:awk (body params) diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index 68694786729..0b0cfd4b1ed 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -29,10 +28,15 @@ ;;; Code: (require 'ob) (require 'calc) -(require 'calc-store) -(unless (featurep 'xemacs) (require 'calc-trail)) +(unless (featurep 'xemacs) + (require 'calc-trail) + (require 'calc-store)) (eval-when-compile (require 'ob-comint)) +(declare-function calc-store-into "calc-store" (&optional var)) +(declare-function calc-recall "calc-store" (&optional var)) +(declare-function math-evaluate-expr "calc-ext" (x)) + (defvar org-babel-default-header-args:calc nil "Default arguments for evaluating an calc source block.") diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index 090b60662f8..9ed13d69f56 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el @@ -6,7 +6,6 @@ ;; Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el index efdac4d3818..24af735746a 100644 --- a/lisp/org/ob-comint.el +++ b/lisp/org/ob-comint.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -54,6 +53,7 @@ executed inside the protection of `save-excursion' and (error "buffer %s doesn't exist or has no process" ,buffer)) (set-buffer ,buffer) ,@body))) +(def-edebug-spec org-babel-comint-in-buffer (form body)) (defmacro org-babel-comint-with-output (meta &rest body) "Evaluate BODY in BUFFER and return process output. @@ -115,6 +115,7 @@ or user `keyboard-quit' during execution of body." string-buffer)) (setq raw (substring string-buffer (match-end 0)))) (split-string string-buffer comint-prompt-regexp))))) +(def-edebug-spec org-babel-comint-with-output (form body)) (defun org-babel-comint-input-command (buffer cmd) "Pass CMD to BUFFER. diff --git a/lisp/org/ob-css.el b/lisp/org/ob-css.el index 7bc97f82909..a49595f05cd 100644 --- a/lisp/org/ob-css.el +++ b/lisp/org/ob-css.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el index db638f6ef98..0aba9a6e47e 100644 --- a/lisp/org/ob-ditaa.el +++ b/lisp/org/ob-ditaa.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el index cc78ac5bf95..1b18ffd3617 100644 --- a/lisp/org/ob-dot.el +++ b/lisp/org/ob-dot.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index 2eccf19b6d1..c6d9d59c25d 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index e74be0b6e02..02738c17b88 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index 0fceb184c5e..de3a4c85d88 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -6,7 +6,6 @@ ;; Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -37,7 +36,6 @@ (declare-function org-babel-eval-wipe-error-buffer "ob-eval" ()) (add-to-list 'org-export-interblocks '(src org-babel-exp-inline-src-blocks)) (add-to-list 'org-export-interblocks '(lob org-babel-exp-lob-one-liners)) -(add-hook 'org-export-blocks-postblock-hook 'org-exp-res/src-name-cleanup) (org-export-blocks-add-block '(src org-babel-exp-src-block nil)) @@ -74,6 +72,7 @@ process." (setq results ,@body)) (set-buffer export-buffer) results))) +(def-edebug-spec org-babel-exp-in-export-file (form body)) (defun org-babel-exp-src-block (body &rest headers) "Process source block for export. @@ -105,7 +104,6 @@ none ----- do not display either code or results upon export" (org-babel-process-params (org-babel-merge-params org-babel-default-header-args - (org-babel-params-from-buffer) (org-babel-params-from-properties lang) (if (boundp lang-headers) (eval lang-headers) nil) raw-params)))) @@ -129,10 +127,10 @@ options and are taken from `org-babel-default-inline-header-args'." (while (and (< (point) end) (re-search-forward org-babel-inline-src-block-regexp end t)) (let* ((info (save-match-data (org-babel-parse-inline-src-block-match))) - (params (nth 2 info)) code-replacement) + (params (nth 2 info))) (save-match-data (goto-char (match-beginning 2)) - (when (not (org-babel-in-example-or-verbatim)) + (unless (org-babel-in-example-or-verbatim) ;; expand noweb references in the original file (setf (nth 1 info) (if (and (cdr (assoc :noweb params)) @@ -140,39 +138,25 @@ options and are taken from `org-babel-default-inline-header-args'." (org-babel-expand-noweb-references info (get-file-buffer org-current-export-file)) (nth 1 info))) - (setq code-replacement (org-babel-exp-do-export info 'inline)))) - (if code-replacement - (replace-match code-replacement nil nil nil 1) - (org-babel-examplize-region (match-beginning 1) (match-end 1)) - (forward-char 2)))))) - -(defun org-exp-res/src-name-cleanup () - "Clean up #+results and #+srcname lines for export. -This function should only be called after all block processing -has taken place." - (interactive) - (save-excursion - (goto-char (point-min)) - (while (org-re-search-forward-unprotected - (concat - "\\("org-babel-src-name-regexp"\\|"org-babel-result-regexp"\\)") - nil t) - (delete-region - (progn (beginning-of-line) (point)) - (progn (end-of-line) (+ 1 (point))))))) + (let ((code-replacement (save-match-data + (org-babel-exp-do-export info 'inline)))) + (if code-replacement + (replace-match code-replacement nil nil nil 1) + (org-babel-examplize-region (match-beginning 1) (match-end 1)) + (forward-char 2))))))))) (defun org-babel-in-example-or-verbatim () "Return true if point is in example or verbatim code. Example and verbatim code include escaped portions of an org-mode buffer code that should be treated as normal org-mode text." - (or (org-in-indented-comment-line) - (save-match-data + (or (save-match-data (save-excursion (goto-char (point-at-bol)) (looking-at "[ \t]*:[ \t]"))) (org-in-verbatim-emphasis) - (org-in-regexps-block-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src"))) + (org-in-block-p org-list-forbidden-blocks) + (org-between-regexps-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src"))) (defvar org-babel-default-lob-header-args) (defun org-babel-exp-lob-one-liners (start end) @@ -183,8 +167,8 @@ options are taken from `org-babel-default-header-args'." (save-excursion (goto-char start) (while (and (< (point) end) - (re-search-forward org-babel-lob-one-liner-regexp nil t)) - (unless (and (match-string 12) (org-babel-in-example-or-verbatim)) + (re-search-forward org-babel-lob-one-liner-regexp end t)) + (unless (org-babel-in-example-or-verbatim) (let* ((lob-info (org-babel-lob-get-info)) (inlinep (match-string 11)) (inline-start (match-end 11)) @@ -196,7 +180,6 @@ options are taken from `org-babel-default-header-args'." (org-babel-merge-params org-babel-default-header-args org-babel-default-lob-header-args - (org-babel-params-from-buffer) (org-babel-params-from-properties) (org-babel-parse-header-arguments (org-babel-clean-text-properties @@ -232,7 +215,7 @@ The function respects the value of the :exports header argument." (defun org-babel-exp-code (info) "Return the original code block formatted for export." (org-fill-template - "#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC\n" + "#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC" `(("lang" . ,(nth 0 info)) ("flags" . ,((lambda (f) (when f (concat " " f))) (nth 3 info))) ("body" . ,(nth 1 info))))) @@ -258,7 +241,15 @@ inhibit insertion of results into the buffer." (nth 2 info) `((:results . ,(if silent "silent" "replace"))))))) (cond - ((or (equal type 'block) (equal type 'inline)) + ((equal type 'block) + (org-babel-execute-src-block nil info)) + ((equal type 'inline) + ;; position the point on the inline source block allowing + ;; `org-babel-insert-result' to check that the block is + ;; inline + (re-search-backward "[ \f\t\n\r\v]" nil t) + (re-search-forward org-babel-inline-src-block-regexp nil t) + (re-search-backward "src_" nil t) (org-babel-execute-src-block nil info)) ((equal type 'lob) (save-excursion diff --git a/lisp/org/ob-fortran.el b/lisp/org/ob-fortran.el new file mode 100644 index 00000000000..b2c97909671 --- /dev/null +++ b/lisp/org/ob-fortran.el @@ -0,0 +1,162 @@ +;;; ob-fortran.el --- org-babel functions for fortran + +;; Copyright (C) 2011 Sergey Litvinov, Eric Schulte + +;; Authors: Sergey Litvinov (based on ob-C.el by Eric Schulte), Eric Schulte +;; Keywords: literate programming, reproducible research, fortran +;; Homepage: http://orgmode.org +;; Version: 7.8.02 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Org-Babel support for evaluating fortran code. + +;;; Code: +(require 'ob) +(require 'ob-eval) +(require 'cc-mode) + +(declare-function org-entry-get "org" + (pom property &optional inherit literal-nil)) + +(defvar org-babel-tangle-lang-exts) +(add-to-list 'org-babel-tangle-lang-exts '("fortran" . "F90")) + +(defvar org-babel-default-header-args:fortran '()) + +(defvar org-babel-fortran-compiler "gfortran" + "fortran command used to compile a fortran source code file into an + executable.") + +(defun org-babel-execute:fortran (body params) + "This function should only be called by `org-babel-execute:fortran'" + (let* ((tmp-src-file (org-babel-temp-file "fortran-src-" ".F90")) + (tmp-bin-file (org-babel-temp-file "fortran-bin-")) + (cmdline (cdr (assoc :cmdline params))) + (flags (cdr (assoc :flags params))) + (full-body (org-babel-expand-body:fortran body params)) + (compile + (progn + (with-temp-file tmp-src-file (insert full-body)) + (org-babel-eval + (format "%s -o %s %s %s" + org-babel-fortran-compiler + (org-babel-process-file-name tmp-bin-file) + (mapconcat 'identity + (if (listp flags) flags (list flags)) " ") + (org-babel-process-file-name tmp-src-file)) "")))) + ((lambda (results) + (org-babel-reassemble-table + (if (member "vector" (cdr (assoc :result-params params))) + (let ((tmp-file (org-babel-temp-file "f-"))) + (with-temp-file tmp-file (insert results)) + (org-babel-import-elisp-from-file tmp-file)) + (org-babel-read results)) + (org-babel-pick-name + (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) + (org-babel-pick-name + (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))) + (org-babel-trim + (org-babel-eval + (concat tmp-bin-file (if cmdline (concat " " cmdline) "")) ""))))) + +(defun org-babel-expand-body:fortran (body params) + "Expand a block of fortran or fortran code with org-babel according to +it's header arguments." + (let ((vars (mapcar #'cdr (org-babel-get-header params :var))) + (main-p (not (string= (cdr (assoc :main params)) "no"))) + (includes (or (cdr (assoc :includes params)) + (org-babel-read (org-entry-get nil "includes" t)))) + (defines (org-babel-read + (or (cdr (assoc :defines params)) + (org-babel-read (org-entry-get nil "defines" t)))))) + (mapconcat 'identity + (list + ;; includes + (mapconcat + (lambda (inc) (format "#include %s" inc)) + (if (listp includes) includes (list includes)) "\n") + ;; defines + (mapconcat + (lambda (inc) (format "#define %s" inc)) + (if (listp defines) defines (list defines)) "\n") + ;; body + (if main-p + (org-babel-fortran-ensure-main-wrap + (concat + ;; variables + (mapconcat 'org-babel-fortran-var-to-fortran vars "\n") + body) params) + body) "\n") "\n"))) + +(defun org-babel-fortran-ensure-main-wrap (body params) + "Wrap body in a \"program ... end program\" block if none exists." + (if (string-match "^[ \t]*program[ \t]*.*" (capitalize body)) + (let ((vars (mapcar #'cdr (org-babel-get-header params :var)))) + (if vars (error "cannot use :vars if 'program' statment is present")) + body) + (format "program main\n%s\nend program main\n" body))) + +(defun org-babel-prep-session:fortran (session params) + "This function does nothing as fortran is a compiled language with no +support for sessions" + (error "fortran is a compiled languages -- no support for sessions")) + +(defun org-babel-load-session:fortran (session body params) + "This function does nothing as fortran is a compiled language with no +support for sessions" + (error "fortran is a compiled languages -- no support for sessions")) + +;; helper functions + +(defun org-babel-fortran-var-to-fortran (pair) + "fortranonvert an elisp val into a string of fortran code specifying a var +of the same value." + ;; TODO list support + (let ((var (car pair)) + (val (cdr pair))) + (when (symbolp val) + (setq val (symbol-name val)) + (when (= (length val) 1) + (setq val (string-to-char val)))) + (cond + ((integerp val) + (format "integer, parameter :: %S = %S\n" var val)) + ((floatp val) + (format "real, parameter :: %S = %S\n" var val)) + ((or (integerp val)) + (format "character, parameter :: %S = '%S'\n" var val)) + ((stringp val) + (format "character(len=%d), parameter :: %S = '%s'\n" + (length val) var val)) + ((listp val) + (format "real, parameter :: %S(%d) = %s\n" + var (length val) (ob-fortran-transform-list val))) + (t + (error (format "the type of parameter %s is not supported by ob-fortran" + var)))))) + +(defun ob-fortran-transform-list (val) + "Return a fortran representation of enclose syntactic lists." + (if (listp val) + (concat "(/" (mapconcat #'ob-fortran-transform-list val ", ") "/)") + (format "%S" val))) + +(provide 'ob-fortran) + +;;; ob-fortran.el ends here diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 9bf0433f9fc..c1e533a95eb 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -149,7 +148,10 @@ This function is called by `org-babel-execute-src-block'." (shell-command-to-string (format "gnuplot \"%s\"" - (org-babel-process-file-name script-file)))) + (org-babel-process-file-name + script-file + (if (member system-type '(cygwin windows-nt ms-dos)) + t nil))))) (message output)) (with-temp-buffer (insert (concat body "\n")) diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index 236dbba28f1..10fd363f135 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -29,7 +28,7 @@ ;; they can be run, but haskell code can also be run through an ;; interactive interpreter. ;; -;; For now let's only allow evaluation using the haskell interpreter. +;; For now lets only allow evaluation using the haskell interpreter. ;;; Requirements: @@ -80,7 +79,7 @@ (cdr (member org-babel-haskell-eoe (reverse (mapcar #'org-babel-trim raw))))))) (org-babel-reassemble-table - (cond + (cond ((equal result-type 'output) (mapconcat #'identity (reverse (cdr results)) "\n")) ((equal result-type 'value) diff --git a/lisp/org/ob-java.el b/lisp/org/ob-java.el index 20824d4cb30..bd02d30f0ab 100644 --- a/lisp/org/ob-java.el +++ b/lisp/org/ob-java.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -46,11 +45,14 @@ "Can't compile a java block without a classname"))) (packagename (file-name-directory classname)) (src-file (concat classname ".java")) + (cmpflag (or (cdr (assoc :cmpflag params)) "")) + (cmdline (or (cdr (assoc :cmdline params)) "")) (full-body (org-babel-expand-body:generic body params)) (compile (progn (with-temp-file src-file (insert full-body)) (org-babel-eval - (concat org-babel-java-compiler " " src-file) "")))) + (concat org-babel-java-compiler + " " cmpflag " " src-file) "")))) ;; created package-name directories if missing (unless (or (not packagename) (file-exists-p packagename)) (make-directory packagename 'parents)) @@ -65,7 +67,8 @@ (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) (org-babel-pick-name (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))) - (org-babel-eval (concat org-babel-java-command " " classname) "")))) + (org-babel-eval (concat org-babel-java-command + " " cmdline " " classname) "")))) (provide 'ob-java) diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index 9e6751c9525..e4379a29acd 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-keys.el b/lisp/org/ob-keys.el index b56ba5cf01a..4f320a0afc0 100644 --- a/lisp/org/ob-keys.el +++ b/lisp/org/ob-keys.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -75,6 +74,8 @@ functions which are assigned key bindings, and see ("f" . org-babel-tangle-file) ("\C-c" . org-babel-check-src-block) ("c" . org-babel-check-src-block) + ("\C-j" . org-babel-insert-header-arg) + ("j" . org-babel-insert-header-arg) ("\C-l" . org-babel-load-in-session) ("l" . org-babel-load-in-session) ("\C-i" . org-babel-lob-ingest) diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index 731d83096d8..afd8e5f3693 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -73,6 +72,10 @@ This function is called by `org-babel-execute-src-block'." (let* ((out-file (cdr (assoc :file params))) (tex-file (org-babel-temp-file "latex-" ".tex")) (border (cdr (assoc :border params))) + (imagemagick (cdr (assoc :imagemagick params))) + (im-in-options (cdr (assoc :iminoptions params))) + (im-out-options (cdr (assoc :imoutoptions params))) + (pdfpng (cdr (assoc :pdfpng params))) (fit (or (cdr (assoc :fit params)) border)) (height (and fit (cdr (assoc :pdfheight params)))) (width (and fit (cdr (assoc :pdfwidth params)))) @@ -82,10 +85,10 @@ This function is called by `org-babel-execute-src-block'." (append (cdr (assoc :packages params)) org-export-latex-packages-alist))) (cond - ((string-match "\\.png$" out-file) + ((and (string-match "\\.png$" out-file) (not imagemagick)) (org-create-formula-image body out-file org-format-latex-options in-buffer)) - ((string-match "\\.pdf$" out-file) + ((or (string-match "\\.pdf$" out-file) imagemagick) (require 'org-latex) (with-temp-file tex-file (insert @@ -119,13 +122,29 @@ This function is called by `org-babel-execute-src-block'." (concat "\n\\begin{document}\n" body "\n\\end{document}\n"))) (org-export-latex-fix-inputenc)) (when (file-exists-p out-file) (delete-file out-file)) - (rename-file (org-babel-latex-tex-to-pdf tex-file) out-file)) + (let ((transient-pdf-file (org-babel-latex-tex-to-pdf tex-file))) + (cond + ((string-match "\\.pdf$" out-file) + (rename-file transient-pdf-file out-file)) + (imagemagick + (convert-pdf + transient-pdf-file out-file im-in-options im-out-options) + (when (file-exists-p transient-pdf-file) + (delete-file transient-pdf-file)))))) ((string-match "\\.\\([^\\.]+\\)$" out-file) - (error "can not create %s files, please specify a .png or .pdf file" + (error "can not create %s files, please specify a .png or .pdf file or try the :imagemagick header arguement" (match-string 1 out-file)))) nil) ;; signal that output has already been written to file body)) + +(defun convert-pdf (pdffile out-file im-in-options im-out-options) + "Generate a file from a pdf file using imagemagick." + (let ((cmd (concat "convert " im-in-options " " pdffile " " + im-out-options " " out-file))) + (message (concat "Converting pdffile file " cmd "...")) + (shell-command cmd))) + (defun org-babel-latex-tex-to-pdf (file) "Generate a pdf file according to the contents FILE. Extracted from `org-export-as-pdf' in org-latex.el." diff --git a/lisp/org/ob-ledger.el b/lisp/org/ob-ledger.el index 4fe61451982..7556ca19176 100644 --- a/lisp/org/ob-ledger.el +++ b/lisp/org/ob-ledger.el @@ -5,7 +5,6 @@ ;; Author: Eric S Fraga ;; Keywords: literate programming, reproducible research, accounting ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -30,7 +29,7 @@ ;; ;; 1) there is no such thing as a "session" in ledger ;; -;; 2) we are generally only going to return output from the ledger program +;; 2) we are generally only going to return output from the leger program ;; ;; 3) we are adding the "cmdline" header argument ;; diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index 23fc8f04c34..1f817adb4ec 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el @@ -5,7 +5,6 @@ ;; Author: Martyn Jago ;; Keywords: babel language, literate programming ;; Homepage: https://github.com/mjago/ob-lilypond -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index 4ff9c4076ec..31656c6e113 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el @@ -7,7 +7,6 @@ ;; David T. O'Toole ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -79,7 +78,7 @@ current directory string." (if (member "output" (cdr (assoc :result-params params))) (car result) (condition-case nil - (read (org-bable-lisp-vector-to-list (cadr result))) + (read (org-babel-lisp-vector-to-list (cadr result))) (error (cadr result))))) (with-temp-buffer (insert (org-babel-expand-body:lisp body params)) @@ -97,7 +96,7 @@ current directory string." (org-babel-pick-name (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))) -(defun org-bable-lisp-vector-to-list (results) +(defun org-babel-lisp-vector-to-list (results) ;; TODO: better would be to replace #(...) with [...] (replace-regexp-in-string "#(" "(" results)) diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 5cb40a057f3..181eee22b31 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -6,7 +6,6 @@ ;; Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -29,6 +28,8 @@ (require 'ob) (require 'ob-table) +(declare-function org-babel-in-example-or-verbatim "ob-exp" nil) + (defvar org-babel-library-of-babel nil "Library of source-code blocks. This is an association list. Populate the library by adding @@ -62,24 +63,15 @@ To add files to this list use the `org-babel-lob-ingest' command." lob-ingest-count (if (> lob-ingest-count 1) "s" "")) lob-ingest-count)) -(defconst org-babel-lob-call-aliases '("lob" "call") - "Aliases to call a source block function. -If you change the value of this variable then your files may - become unusable by other org-babel users, and vice versa.") - (defconst org-babel-block-lob-one-liner-regexp (concat - "^\\([ \t]*\\)#\\+\\(?:" - (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|") - "\\):[ \t]+\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" + "^\\([ \t]*\\)#\\+call:[ \t]+\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" "\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\(\\([^\n]*\\)\\)?") "Regexp to match non-inline calls to predefined source block functions.") (defconst org-babel-inline-lob-one-liner-regexp (concat - "\\([^\n]*\\)\\(?:" - (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|") - "\\)_\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" + "\\([^\n]*\\)call_\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" "\(\\([^\n]*\\)\)\\(\\[\\(.*?\\)\\]\\)?") "Regexp to match inline calls to predefined source block functions.") @@ -89,6 +81,7 @@ If you change the value of this variable then your files may "Regexp to match calls to predefined source block functions.") ;; functions for executing lob one-liners + ;;;###autoload (defun org-babel-lob-execute-maybe () "Execute a Library of Babel source block, if appropriate. @@ -96,7 +89,9 @@ Detect if this is context for a Library Of Babel source block and if so then run the appropriate source block from the Library." (interactive) (let ((info (org-babel-lob-get-info))) - (if (nth 0 info) (progn (org-babel-lob-execute info) t) nil))) + (if (and (nth 0 info) (not (org-babel-in-example-or-verbatim))) + (progn (org-babel-lob-execute info) t) + nil))) ;;;###autoload (defun org-babel-lob-get-info () @@ -126,7 +121,6 @@ if so then run the appropriate source block from the Library." (let ((params (org-babel-process-params (org-babel-merge-params org-babel-default-header-args - (org-babel-params-from-buffer) (org-babel-params-from-properties) (org-babel-parse-header-arguments (org-babel-clean-text-properties diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el index bb32c5a29f5..479100a80c4 100644 --- a/lisp/org/ob-matlab.el +++ b/lisp/org/ob-matlab.el @@ -5,7 +5,6 @@ ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-maxima.el b/lisp/org/ob-maxima.el index 279ba6b928b..f14cf550a71 100644 --- a/lisp/org/ob-maxima.el +++ b/lisp/org/ob-maxima.el @@ -6,7 +6,6 @@ ;; Eric Schulte ;; Keywords: literate programming, reproducible research, maxima ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -31,47 +30,96 @@ ;; ;; 1) there is no such thing as a "session" in maxima ;; -;; 2) we are generally only going to return output from maxima -;; -;; 3) we are adding the "cmdline" header argument -;; -;; 4) there are no variables +;; 2) we are adding the "cmdline" header argument ;;; Code: (require 'ob) +(defvar org-babel-tangle-lang-exts) +(add-to-list 'org-babel-tangle-lang-exts '("maxima" . "max")) + (defvar org-babel-default-header-args:maxima '()) (defun org-babel-maxima-expand (body params) "Expand a block of Maxima code according to its header arguments." - body) + (let ((vars (mapcar #'cdr (org-babel-get-header params :var)))) + (mapconcat 'identity + (list + ;; graphic output + (let ((graphic-file (org-babel-maxima-graphical-output-file params))) + (if graphic-file + (format + "set_plot_option ([gnuplot_term, png]); set_plot_option ([gnuplot_out_file, %S]);" + graphic-file) + "")) + ;; variables + (mapconcat 'org-babel-maxima-var-to-maxima vars "\n") + ;; body + body + "gnuplot_close ()$") + "\n"))) (defun org-babel-execute:maxima (body params) "Execute a block of Maxima entries with org-babel. This function is called by `org-babel-execute-src-block'." (message "executing Maxima source code block") - (let* ((result-params (split-string (or (cdr (assoc :results params)) ""))) - (cmdline (cdr (assoc :cmdline params))) - (in-file (org-babel-temp-file "maxima-")) - (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s" - in-file cmdline))) - (with-temp-file in-file (insert body)) - (message cmd) - ((lambda (raw) ;; " | grep -v batch | grep -v 'replaced' | sed '/^$/d' " - (mapconcat - #'identity - (delq nil - (mapcar (lambda (line) - (unless (or (string-match "batch" line) - (string-match "^rat: replaced .*$" line) - (= 0 (length line))) - line)) - (split-string raw "[\r\n]"))) "\n")) - (org-babel-eval cmd "")))) + (let ((result + (let* ((result-params (split-string (or (cdr (assoc :results params)) ""))) + (cmdline (cdr (assoc :cmdline params))) + (in-file (org-babel-temp-file "maxima-" ".max")) + (cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s" + in-file cmdline))) + (with-temp-file in-file (insert (org-babel-maxima-expand body params))) + (message cmd) + ((lambda (raw) ;; " | grep -v batch | grep -v 'replaced' | sed '/^$/d' " + (mapconcat + #'identity + (delq nil + (mapcar (lambda (line) + (unless (or (string-match "batch" line) + (string-match "^rat: replaced .*$" line) + (= 0 (length line))) + line)) + (split-string raw "[\r\n]"))) "\n")) + (org-babel-eval cmd ""))))) + (if (org-babel-maxima-graphical-output-file params) + nil + (if (or (member "scalar" result-params) + (member "verbatim" result-params) + (member "output" result-params)) + result + (let ((tmp-file (org-babel-temp-file "maxima-res-"))) + (with-temp-file tmp-file (insert result)) + (org-babel-import-elisp-from-file tmp-file)))))) + (defun org-babel-prep-session:maxima (session params) (error "Maxima does not support sessions")) +(defun org-babel-maxima-var-to-maxima (pair) + "Convert an elisp val into a string of maxima code specifying a var +of the same value." + (let ((var (car pair)) + (val (cdr pair))) + (when (symbolp val) + (setq val (symbol-name val)) + (when (= (length val) 1) + (setq val (string-to-char val)))) + (format "%S: %s$" var + (org-babel-maxima-elisp-to-maxima val)))) + +(defun org-babel-maxima-graphical-output-file (params) + "Name of file to which maxima should send graphical output." + (and (member "graphics" (cdr (assq :result-params params))) + (cdr (assq :file params)))) + +(defun org-babel-maxima-elisp-to-maxima (val) + "Return a string of maxima code which evaluates to VAL." + (if (listp val) + (concat "[" (mapconcat #'org-babel-maxima-elisp-to-maxima val ", ") "]") + (format "%s" val))) + + (provide 'ob-maxima) diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el index dc800a875c6..5e894717ddd 100644 --- a/lisp/org/ob-mscgen.el +++ b/lisp/org/ob-mscgen.el @@ -5,7 +5,6 @@ ;; Author: Juan Pechiar ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index 78d309b9e13..22ccc3b7ad5 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -29,7 +28,7 @@ ;; they can be run, but ocaml code can also be run through an ;; interactive interpreter. ;; -;; For now let's only allow evaluation using the ocaml interpreter. +;; For now lets only allow evaluation using the ocaml interpreter. ;;; Requirements: @@ -99,7 +98,7 @@ (lambda (pair) (format "let %s = %s;;" (car pair) (org-babel-ocaml-elisp-to-ocaml (cdr pair)))) (mapcar #'cdr (org-babel-get-header params :var)))) - + (defun org-babel-ocaml-elisp-to-ocaml (val) "Return a string of ocaml code which evaluates to VAL." (if (listp val) diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index 2003a6f18f7..7de1455b820 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el @@ -5,7 +5,6 @@ ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -87,13 +86,24 @@ end") (org-babel-expand-body:generic body params (org-babel-variable-assignments:octave params))) (result (org-babel-octave-evaluate - session full-body result-type matlabp))) - (org-babel-reassemble-table - result - (org-babel-pick-name - (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) - (org-babel-pick-name - (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)))))) + session + (if (org-babel-octave-graphical-output-file params) + (mapconcat 'identity + (list + "set (0, \"defaultfigurevisible\", \"off\");" + full-body + (format "print -dpng %s" (org-babel-octave-graphical-output-file params))) + "\n") + full-body) + result-type matlabp))) + (if (org-babel-octave-graphical-output-file params) + nil + (org-babel-reassemble-table + result + (org-babel-pick-name + (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) + (org-babel-pick-name + (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))))) (defun org-babel-prep-session:matlab (session params) "Prepare SESSION according to PARAMS." @@ -118,7 +128,11 @@ specifying a variable of the same value." (if (listp var) (concat "[" (mapconcat #'org-babel-octave-var-to-octave var (if (listp (car var)) "; " ",")) "]") - (format "%s" (or var "nil")))) + (cond + ((stringp var) + (format "\'%s\'" var)) + (t + (format "%s" var))))) (defun org-babel-prep-session:octave (session params &optional matlabp) "Prepare SESSION according to the header arguments specified in PARAMS." @@ -256,6 +270,11 @@ This removes initial blank and comment lines and then calls (match-string 1 string) string)) +(defun org-babel-octave-graphical-output-file (params) + "Name of file to which maxima should send graphical output." + (and (member "graphics" (cdr (assq :result-params params))) + (cdr (assq :file params)))) + (provide 'ob-octave) diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el index 37256d015c7..32820e55fa3 100644 --- a/lisp/org/ob-org.el +++ b/lisp/org/ob-org.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index 13d71413731..12e6c17a764 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el @@ -6,7 +6,6 @@ ;; Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el new file mode 100644 index 00000000000..75e3ae03f3d --- /dev/null +++ b/lisp/org/ob-picolisp.el @@ -0,0 +1,192 @@ +;;; ob-picolisp.el --- org-babel functions for picolisp evaluation + +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. + +;; Authors: Thorsten Jolitz and Eric Schulte +;; Keywords: literate programming, reproducible research +;; Homepage: http://orgmode.org + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library enables the use of PicoLisp in the multi-language +;; programming framework Org-Babel. PicoLisp is a minimal yet +;; fascinating lisp dialect and a highly productive application +;; framework for web-based client-server applications on top of +;; object-oriented databases. A good way to learn PicoLisp is to first +;; read Paul Grahams essay "The hundred year language" +;; (http://www.paulgraham.com/hundred.html) and then study the various +;; documents and essays published in the PicoLisp wiki +;; (http://picolisp.com/5000/-2.html). PicoLisp is included in some +;; GNU/Linux Distributions, and can be downloaded here: +;; http://software-lab.de/down.html. It ships with a picolisp-mode and +;; a inferior-picolisp-mode for Emacs (to be found in the /lib/el/ +;; directory). + +;; Although it might seem more natural to use Emacs Lisp for most +;; Lisp-based programming tasks inside Org-Mode, an Emacs library +;; written in Emacs Lisp, PicoLisp has at least two outstanding +;; features that make it a valuable addition to Org-Babel: + +;; PicoLisp _is_ an object-oriented database with a Prolog-based query +;; language implemented in PicoLisp (Pilog). Database objects are +;; first-class members of the language. + +;; PicoLisp is an extremely productive framework for the development +;; of interactive web-applications (on top of a database). + +;;; Requirements: + +;;; Code: +(require 'ob) +(require 'ob-eval) +(require 'ob-comint) +(require 'comint) +(eval-when-compile (require 'cl)) + +(declare-function run-picolisp "ext:inferior-picolisp" (cmd)) + +;; optionally define a file extension for this language +(add-to-list 'org-babel-tangle-lang-exts '("picolisp" . "l")) + +;;; interferes with settings in org-babel buffer? +;; optionally declare default header arguments for this language +;; (defvar org-babel-default-header-args:picolisp +;; '((:colnames . "no")) +;; "Default arguments for evaluating a picolisp source block.") + +(defvar org-babel-picolisp-eoe "org-babel-picolisp-eoe" + "String to indicate that evaluation has completed.") + +(defcustom org-babel-picolisp-cmd "pil" + "Name of command used to evaluate picolisp blocks." + :group 'org-babel + :type 'string) + +(defun org-babel-expand-body:picolisp (body params &optional processed-params) + "Expand BODY according to PARAMS, return the expanded body." + (let ((vars (mapcar #'cdr (org-babel-get-header params :var))) + (result-params (cdr (assoc :result-params params))) + (print-level nil) (print-length nil)) + (if (> (length vars) 0) + (concat "(prog (let (" + (mapconcat + (lambda (var) + (format "%S '%S)" + (print (car var)) + (print (cdr var)))) + vars "\n ") + " \n" body ") )") + body))) + +(defun org-babel-execute:picolisp (body params) + "Execute a block of Picolisp code with org-babel. This function is + called by `org-babel-execute-src-block'" + (message "executing Picolisp source code block") + (let* ( + ;; name of the session or "none" + (session-name (cdr (assoc :session params))) + ;; set the session if the session variable is non-nil + (session (org-babel-picolisp-initiate-session session-name)) + ;; either OUTPUT or VALUE which should behave as described above + (result-type (cdr (assoc :result-type params))) + (result-params (cdr (assoc :result-params params))) + ;; expand the body with `org-babel-expand-body:picolisp' + (full-body (org-babel-expand-body:picolisp body params)) + ;; wrap body appropriately for the type of evaluation and results + (wrapped-body + (cond + ((or (member "code" result-params) + (member "pp" result-params)) + (format "(pretty (out \"/dev/null\" %s))" full-body)) + ((and (member "value" result-params) (not session)) + (format "(print (out \"/dev/null\" %s))" full-body)) + ((member "value" result-params) + (format "(out \"/dev/null\" %s)" full-body)) + (t full-body)))) + + ((lambda (result) + (if (or (member "verbatim" result-params) + (member "scalar" result-params) + (member "output" result-params) + (member "code" result-params) + (member "pp" result-params) + (= (length result) 0)) + result + (read result))) + (if (not (string= session-name "none")) + ;; session based evaluation + (mapconcat ;; <- joins the list back together into a single string + #'identity + (butlast ;; <- remove the org-babel-picolisp-eoe line + (delq nil + (mapcar + (lambda (line) + (org-babel-chomp ;; remove trailing newlines + (when (> (length line) 0) ;; remove empty lines + (cond + ;; remove leading "-> " from return values + ((and (>= (length line) 3) + (string= "-> " (substring line 0 3))) + (substring line 3)) + ;; remove trailing "-> <>" on the + ;; last line of output + ((and (member "output" result-params) + (string-match-p "->" line)) + (substring line 0 (string-match "->" line))) + (t line) + ) + ;; (if (and (>= (length line) 3) ;; remove leading "<- " + ;; (string= "-> " (substring line 0 3))) + ;; (substring line 3) + ;; line) + ))) + ;; returns a list of the output of each evaluated expression + (org-babel-comint-with-output (session org-babel-picolisp-eoe) + (insert wrapped-body) (comint-send-input) + (insert "'" org-babel-picolisp-eoe) (comint-send-input))))) + "\n") + ;; external evaluation + (let ((script-file (org-babel-temp-file "picolisp-script-"))) + (with-temp-file script-file + (insert (concat wrapped-body "(bye)"))) + (org-babel-eval + (format "%s %s" + org-babel-picolisp-cmd + (org-babel-process-file-name script-file)) + "")))))) + +(defun org-babel-picolisp-initiate-session (&optional session-name) + "If there is not a current inferior-process-buffer in SESSION +then create. Return the initialized session." + (unless (string= session-name "none") + (require 'inferior-picolisp) + ;; provide a reasonable default session name + (let ((session (or session-name "*inferior-picolisp*"))) + ;; check if we already have a live session by this name + (if (org-babel-comint-buffer-livep session) + (get-buffer session) + (save-window-excursion + (run-picolisp org-babel-picolisp-cmd) + (rename-buffer session-name) + (current-buffer)))))) + +(provide 'ob-picolisp) + + + +;;; ob-picolisp.el ends here diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index 9fa55727592..9f60f583bb0 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el @@ -5,7 +5,6 @@ ;; Author: Zhang Weize ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 5234d83ecee..c84b11d77f0 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -6,7 +6,6 @@ ;; Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 1e14021a364..304e4783253 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -6,7 +6,6 @@ ;; Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -61,10 +60,15 @@ (declare-function org-narrow-to-subtree "org" ()) (declare-function org-id-find-id-in-file "org-id" (id file &optional markerp)) (declare-function org-show-context "org" (&optional key)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) (defvar org-babel-ref-split-regexp "[ \f\t\n\r\v]*\\(.+?\\)[ \f\t\n\r\v]*=[ \f\t\n\r\v]*\\(.+\\)[ \f\t\n\r\v]*") +(defvar org-babel-update-intermediate nil + "Update the in-buffer results of code blocks executed to resolve references.") + (defun org-babel-ref-parse (assignment) "Parse a variable ASSIGNMENT in a header argument. If the right hand side of the assignment has a literal value @@ -94,7 +98,7 @@ the variable." (m (when file (org-id-find-id-in-file id file 'marker)))) (when (and file m) (message "file:%S" file) - (switch-to-buffer (marker-buffer m)) + (org-pop-to-buffer-same-window (marker-buffer m)) (goto-char m) (move-marker m nil) (org-show-context) @@ -147,21 +151,19 @@ the variable." (save-restriction (widen) (goto-char (point-min)) - (if (let* ((rx (regexp-quote ref)) - (res-rx (concat org-babel-result-regexp rx "[ \t]*$")) - (src-rx (concat org-babel-src-name-regexp - rx "\\(\(.*\)\\)?" "[ \t]*$"))) + (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) + (res-rx (org-babel-named-data-regexp-for-name ref))) ;; goto ref in the current buffer - (or (and (not args) - (or (re-search-forward res-rx nil t) - (re-search-backward res-rx nil t))) - (re-search-forward src-rx nil t) - (re-search-backward src-rx nil t) - ;; check for local or global headlines by id - (setq id (org-babel-ref-goto-headline-id ref)) - ;; check the Library of Babel - (setq lob-info (cdr (assoc (intern ref) - org-babel-library-of-babel))))) + (or + ;; check for code blocks + (re-search-forward src-rx nil t) + ;; check for named data + (re-search-forward res-rx nil t) + ;; check for local or global headlines by id + (setq id (org-babel-ref-goto-headline-id ref)) + ;; check the Library of Babel + (setq lob-info (cdr (assoc (intern ref) + org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) ;; ;; TODO: allow searching for names in other buffers ;; (setq id-loc (org-id-find ref 'marker) @@ -172,6 +174,12 @@ the variable." (cond (lob-info (setq type 'lob)) (id (setq type 'id)) + ((and (looking-at org-babel-src-name-regexp) + (save-excursion + (forward-line 1) + (or (looking-at org-babel-src-block-regexp) + (looking-at org-babel-multi-line-header-regexp)))) + (setq type 'source-block)) (t (while (not (setq type (org-babel-ref-at-ref-p))) (forward-line 1) (beginning-of-line) @@ -184,7 +192,9 @@ the variable." (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) - (source-block (org-babel-execute-src-block nil nil params)) + (source-block (org-babel-execute-src-block + nil nil (if org-babel-update-intermediate + nil params))) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) @@ -234,20 +244,7 @@ to \"0:-1\"." (defun org-babel-ref-split-args (arg-string) "Split ARG-STRING into top-level arguments of balanced parenthesis." - (let ((index 0) (depth 0) (buffer "") holder return) - ;; crawl along string, splitting at any ","s which are on the top level - (while (< index (length arg-string)) - (setq holder (substring arg-string index (+ 1 index))) - (setq buffer (concat buffer holder)) - (setq index (+ 1 index)) - (cond - ((string= holder ",") - (when (= depth 0) - (setq return (cons (substring buffer 0 -1) return)) - (setq buffer ""))) - ((or (string= holder "(") (string= holder "[")) (setq depth (+ depth 1))) - ((or (string= holder ")") (string= holder "]")) (setq depth (- depth 1))))) - (mapcar #'org-babel-trim (reverse (cons buffer return))))) + (mapcar #'org-babel-trim (org-babel-balanced-split arg-string 44))) (defvar org-bracket-link-regexp) (defun org-babel-ref-at-ref-p () diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 02089b4a214..e48e372ebd0 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -129,8 +128,8 @@ Emacs-lisp table, otherwise return the results as a string." "Initiate a ruby session. If there is not a current inferior-process-buffer in SESSION then create one. Return the initialized session." - (require 'inf-ruby) (unless (string= session "none") + (require 'inf-ruby) (let ((session-buffer (save-window-excursion (run-ruby nil session) (current-buffer)))) (if (org-babel-comint-buffer-livep session-buffer) diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el index 162113ea5a8..b687eeb9fe2 100644 --- a/lisp/org/ob-sass.el +++ b/lisp/org/ob-sass.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index 3e93a3a74f7..14198ba6a21 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, scheme ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 367d73f787a..2b1b25d407c 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el @@ -5,7 +5,6 @@ ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-sh.el b/lisp/org/ob-sh.el index f46ba45770a..ac0cf94726c 100644 --- a/lisp/org/ob-sh.el +++ b/lisp/org/ob-sh.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-shen.el b/lisp/org/ob-shen.el new file mode 100644 index 00000000000..ccf3030b94c --- /dev/null +++ b/lisp/org/ob-shen.el @@ -0,0 +1,79 @@ +;;; ob-shen.el --- org-babel functions for Shen + +;; Copyright (C) 2010-2011 Free Software Foundation + +;; Author: Eric Schulte +;; Keywords: literate programming, reproducible research, shen +;; Homepage: http://orgmode.org + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Currently this only works using session evaluation as there is no +;; defined method for executing shen code outside of a session. + +;;; Requirements: + +;; - shen-mode and inf-shen will soon be available through the GNU +;; elpa, however in the interim they are available at +;; https://github.com/eschulte/shen-mode + +;;; Code: +(require 'ob) + +(declare-function shen-eval-defun "ext:inf-shen" (&optional and-go)) + +(defvar org-babel-default-header-args:shen '() + "Default header arguments for shen code blocks.") + +(defun org-babel-expand-body:shen (body params) + "Expand BODY according to PARAMS, return the expanded body." + (let ((vars (mapcar #'cdr (org-babel-get-header params :var)))) + (if (> (length vars) 0) + (concat "(let " + (mapconcat (lambda (var) + (format "%s %s" (car var) + (org-babel-shen-var-to-shen (cdr var)))) + vars " ") + body ")") + body))) + +(defun org-babel-shen-var-to-shen (var) + "Convert VAR into a shen variable." + (if (listp var) + (concat "[" (mapconcat #'org-babel-ruby-var-to-ruby var " ") "]") + (format "%S" var))) + +(defun org-babel-execute:shen (body params) + "Execute a block of Shen code with org-babel. +This function is called by `org-babel-execute-src-block'" + (require 'inf-shen) + (let* ((result-type (cdr (assoc :result-type params))) + (result-params (cdr (assoc :result-params params))) + (full-body (org-babel-expand-body:shen body params))) + ((lambda (results) + (if (or (member 'scalar result-params) + (member 'verbatim result-params)) + results + (condition-case nil (org-babel-script-escape results) + (error results)))) + (with-temp-buffer + (insert full-body) + (call-interactively #'shen-eval-defun))))) + +(provide 'ob-shen) +;;; ob-shen.el ends here diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 7a5c7c8a46a..8e92635bc1f 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -32,7 +31,7 @@ ;; ;; Also SQL evaluation generally takes place inside of a database. ;; -;; For now let's just allow a generic ':cmdline' header argument. +;; For now lets just allow a generic ':cmdline' header argument. ;; ;; TODO: ;; @@ -40,7 +39,7 @@ ;; - add more useful header arguments (user, passwd, database, etc...) ;; - support for more engines (currently only supports mysql) ;; - what's a reasonable way to drop table data into SQL? -;; +;; ;;; Code: (require 'ob) @@ -51,6 +50,9 @@ (defvar org-babel-default-header-args:sql '()) +(defvar org-babel-header-arg-names:sql + '(engine out-file)) + (defun org-babel-expand-body:sql (body params) "Expand BODY according to the values of PARAMS." (org-babel-sql-expand-vars @@ -85,31 +87,38 @@ This function is called by `org-babel-execute-src-block'." (insert (org-babel-expand-body:sql body params))) (message command) (shell-command command) - (with-temp-buffer - ;; need to figure out what the delimiter is for the header row + (if (or (member "scalar" result-params) + (member "verbatim" result-params) + (member "html" result-params) + (member "code" result-params) + (equal (point-min) (point-max))) + (with-temp-buffer + (progn (insert-file-contents-literally out-file) (buffer-string))) (with-temp-buffer - (insert-file-contents out-file) - (goto-char (point-min)) - (when (re-search-forward "^\\(-+\\)[^-]" nil t) - (setq header-delim (match-string-no-properties 1))) - (goto-char (point-max)) - (forward-char -1) - (while (looking-at "\n") - (delete-char 1) - (goto-char (point-max)) - (forward-char -1)) - (write-file out-file)) - (org-table-import out-file '(16)) - (org-babel-reassemble-table - (mapcar (lambda (x) - (if (string= (car x) header-delim) - 'hline - x)) - (org-table-to-lisp)) - (org-babel-pick-name (cdr (assoc :colname-names params)) - (cdr (assoc :colnames params))) - (org-babel-pick-name (cdr (assoc :rowname-names params)) - (cdr (assoc :rownames params))))))) + ;; need to figure out what the delimiter is for the header row + (with-temp-buffer + (insert-file-contents out-file) + (goto-char (point-min)) + (when (re-search-forward "^\\(-+\\)[^-]" nil t) + (setq header-delim (match-string-no-properties 1))) + (goto-char (point-max)) + (forward-char -1) + (while (looking-at "\n") + (delete-char 1) + (goto-char (point-max)) + (forward-char -1)) + (write-file out-file)) + (org-table-import out-file '(16)) + (org-babel-reassemble-table + (mapcar (lambda (x) + (if (string= (car x) header-delim) + 'hline + x)) + (org-table-to-lisp)) + (org-babel-pick-name (cdr (assoc :colname-names params)) + (cdr (assoc :colnames params))) + (org-babel-pick-name (cdr (assoc :rowname-names params)) + (cdr (assoc :rownames params)))))))) (defun org-babel-sql-expand-vars (body vars) "Expand the variables held in VARS in BODY." diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index c08c7f38e8a..edd230e78c0 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index ea253b2f048..15ebff94fcb 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -31,7 +30,7 @@ ;; (defun fibbd (n) (if (< n 2) 1 (+ (fibbd (- n 1)) (fibbd (- n 2))))) ;; #+end_src -;; #+srcname: fibbd +;; #+name: fibbd ;; #+begin_src emacs-lisp :var n=2 :results silent ;; (fibbd n) ;; #+end_src @@ -78,46 +77,60 @@ NOTE: by default string variable names are interpreted as references to source-code blocks, to force interpretation of a cell's value as a string, prefix the identifier with two \"$\"s rather than a single \"$\" (i.e. \"$$2\" instead of \"$2\" in the -example above." - (let* (quote - (variables - (mapcar - (lambda (var) - ;; ensure that all cells prefixed with $'s are strings - (cons (car var) - (delq nil (mapcar - (lambda (el) - (if (eq '$ el) - (setq quote t) - (prog1 (if quote - (format "\"%s\"" el) - (org-babel-clean-text-properties el)) - (setq quote nil)))) - (cdr var))))) - variables))) - (unless (stringp source-block) - (setq source-block (symbol-name source-block))) - ((lambda (result) - (org-babel-trim (if (stringp result) result (format "%S" result)))) - (if (and source-block (> (length source-block) 0)) - (let ((params - (eval `(org-babel-parse-header-arguments - (concat ":var results=" - ,source-block - "(" - (mapconcat - (lambda (var-spec) - (if (> (length (cdr var-spec)) 1) - (format "%S='%S" - (car var-spec) - (mapcar #'read (cdr var-spec))) - (format "%S=%s" - (car var-spec) (cadr var-spec)))) - ',variables ", ") - ")"))))) - (org-babel-execute-src-block - nil (list "emacs-lisp" "results" params) '((:results . "silent")))) - "")))) +example above. + +NOTE: it is also possible to pass header arguments to the code +block. In this case a table cell should hold the string value of +the header argument which can then be passed before all variables +as shown in the example below. + +| 1 | 2 | :file nothing.png | nothing.png | +#+TBLFM: @1$4='(sbe test-sbe $3 (x $1) (y $2))" + (let* ((header-args (if (stringp (car variables)) (car variables) "")) + (variables (if (stringp (car variables)) (cdr variables) variables))) + (let* (quote + (variables + (mapcar + (lambda (var) + ;; ensure that all cells prefixed with $'s are strings + (cons (car var) + (delq nil (mapcar + (lambda (el) + (if (eq '$ el) + (setq quote t) + (prog1 (if quote + (format "\"%s\"" el) + (org-babel-clean-text-properties el)) + (setq quote nil)))) + (cdr var))))) + variables))) + (unless (stringp source-block) + (setq source-block (symbol-name source-block))) + ((lambda (result) + (org-babel-trim (if (stringp result) result (format "%S" result)))) + (if (and source-block (> (length source-block) 0)) + (let ((params + (eval `(org-babel-parse-header-arguments + (concat + ":var results=" + ,source-block + "[" ,header-args "]" + "(" + (mapconcat + (lambda (var-spec) + (if (> (length (cdr var-spec)) 1) + (format "%S='%S" + (car var-spec) + (mapcar #'read (cdr var-spec))) + (format "%S=%s" + (car var-spec) (cadr var-spec)))) + ',variables ", ") + ")"))))) + (org-babel-execute-src-block + nil (list "emacs-lisp" "results" params) + '((:results . "silent")))) + ""))))) +(def-edebug-spec sbe (form form)) (provide 'ob-table) diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index 26549126009..f5dbb30631a 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -96,6 +95,14 @@ controlled by the :comments header argument." :group 'org-babel :type 'string) +(defcustom org-babel-process-comment-text #'org-babel-trim + "Function called to process raw Org-mode text collected to be +inserted as comments in tangled source-code files. The function +should take a single string argument and return a string +result. The default value is `org-babel-trim'." + :group 'org-babel + :type 'function) + (defun org-babel-find-file-noselect-refresh (file) "Find file ensuring that the latest changes on disk are represented in the file." @@ -119,6 +126,7 @@ evaluating BODY." (setf ,temp-result (progn ,@body))) (unless ,visited-p (kill-buffer ,temp-file)) ,temp-result))) +(def-edebug-spec org-babel-with-temp-filebuffer (form body)) ;;;###autoload (defun org-babel-load-file (file) @@ -345,16 +353,20 @@ code blocks by language." (when (or (string= "both" (cdr (assoc :comments params))) (string= "org" (cdr (assoc :comments params)))) ;; from the previous heading or code-block end - (buffer-substring - (max (condition-case nil - (save-excursion - (org-back-to-heading t) (point)) - (error 0)) - (save-excursion - (re-search-backward - org-babel-src-block-regexp nil t) - (match-end 0))) - (point)))) + (funcall + org-babel-process-comment-text + (buffer-substring + (max (condition-case nil + (save-excursion + (org-back-to-heading t) ; sets match data + (match-end 0)) + (error (point-min))) + (save-excursion + (if (re-search-backward + org-babel-src-block-regexp nil t) + (match-end 0) + (point-min)))) + (point))))) by-lang) ;; add the spec for this block to blocks under it's language (setq by-lang (cdr (assoc src-lang blocks))) @@ -396,12 +408,11 @@ form (eval el)))) '(start-line file link source-name)))) (flet ((insert-comment (text) - (let ((text (org-babel-trim text))) - (when (and comments (not (string= comments "no")) - (> (length text) 0)) - (when padline (insert "\n")) - (comment-region (point) (progn (insert text) (point))) - (end-of-line nil) (insert "\n"))))) + (when (and comments (not (string= comments "no")) + (> (length text) 0)) + (when padline (insert "\n")) + (comment-region (point) (progn (insert text) (point))) + (end-of-line nil) (insert "\n")))) (when comment (insert-comment comment)) (when link-p (insert-comment diff --git a/lisp/org/ob.el b/lisp/org/ob.el index 8bba4672169..3eee92a906e 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el @@ -6,7 +6,6 @@ ;; Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -33,6 +32,7 @@ (defvar org-src-lang-modes) (defvar org-babel-library-of-babel) (declare-function show-all "outline" ()) +(declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) (declare-function tramp-compat-make-temp-file "tramp-compat" (filename &optional dir-flag)) (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) @@ -114,7 +114,7 @@ remove code block execution from the C-c C-c keybinding." :type 'boolean) (defvar org-babel-src-name-regexp - "^[ \t]*#\\+\\(srcname\\|source\\|function\\):[ \t]*" + "^[ \t]*#\\+name:[ \t]*" "Regular expression used to match a source name line.") (defvar org-babel-multi-line-header-regexp @@ -144,7 +144,7 @@ remove code block execution from the C-c C-c keybinding." (defvar org-babel-inline-src-block-regexp (concat ;; (1) replacement target (2) lang - "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)" + "\\(?:^\\|[^-[:alnum:]]\\)\\(src_\\([^ \f\t\n\r\v]+\\)" ;; (3,4) (unused, headers) "\\(\\|\\[\\(.*?\\)\\]\\)" ;; (5) body @@ -160,6 +160,39 @@ not match KEY should be returned." (lambda (p) (when (funcall (if others #'not #'identity) (eq (car p) key)) p)) params))) +(defun org-babel-get-inline-src-block-matches() + "Set match data if within body of an inline source block. +Returns non-nil if match-data set" + (let ((src-at-0-p (save-excursion + (beginning-of-line 1) + (string= "src" (thing-at-point 'word)))) + (first-line-p (= 1 (line-number-at-pos))) + (orig (point))) + (let ((search-for (cond ((and src-at-0-p first-line-p "src_")) + (first-line-p "[ \t]src_") + (t "[ \f\t\n\r\v]src_"))) + (lower-limit (if first-line-p + nil + (- (point-at-bol) 1)))) + (save-excursion + (when (or (and src-at-0-p (bobp)) + (and (re-search-forward "}" (point-at-eol) t) + (re-search-backward search-for lower-limit t) + (> orig (point)))) + (when (looking-at org-babel-inline-src-block-regexp) + t )))))) + +(defvar org-babel-inline-lob-one-liner-regexp) +(defun org-babel-get-lob-one-liner-matches() + "Set match data if on line of an lob one liner. +Returns non-nil if match-data set" + (save-excursion + (unless (= (point) (point-at-bol)) ;; move before inline block + (re-search-backward "[ \f\t\n\r\v]" nil t)) + (if (looking-at org-babel-inline-lob-one-liner-regexp) + t + nil))) + (defun org-babel-get-src-block-info (&optional light) "Get information on the current source block. @@ -184,22 +217,30 @@ Returns a list (nth 2 info) (org-babel-parse-header-arguments (match-string 1))))) (when (looking-at org-babel-src-name-w-name-regexp) - (setq name (org-babel-clean-text-properties (match-string 4))) - (when (match-string 6) + (setq name (org-babel-clean-text-properties (match-string 3))) + (when (and (match-string 5) (> (length (match-string 5)) 0)) (setf (nth 2 info) ;; merge functional-syntax vars and header-args (org-babel-merge-params - (mapcar (lambda (ref) (cons :var ref)) - (org-babel-ref-split-args (match-string 6))) + (mapcar + (lambda (ref) (cons :var ref)) + (mapcar + (lambda (var) ;; check that each variable is initialized + (if (string-match ".+=.+" var) + var + (error + "variable \"%s\"%s must be assigned a default value" + var (if name (format " in block \"%s\"" name) "")))) + (org-babel-ref-split-args (match-string 5)))) (nth 2 info)))))) ;; inline source block - (when (save-excursion (re-search-backward "[ \f\t\n\r\v]" nil t) - (looking-at org-babel-inline-src-block-regexp)) + (when (org-babel-get-inline-src-block-matches) (setq info (org-babel-parse-inline-src-block-match)))) ;; resolve variable references and add summary parameters (when (and info (not light)) (setf (nth 2 info) (org-babel-process-params (nth 2 info)))) (when info (append info (list name indent))))) +(defvar org-current-export-file) ; dynamically bound (defun org-babel-confirm-evaluate (info) "Confirm evaluation of the code block INFO. This behavior can be suppressed by setting the value of @@ -212,11 +253,15 @@ of potentially harmful code." (let* ((eval (or (cdr (assoc :eval (nth 2 info))) (when (assoc :noeval (nth 2 info)) "no"))) (query (cond ((equal eval "query") t) + ((and org-current-export-file + (equal eval "query-export")) t) ((functionp org-confirm-babel-evaluate) (funcall org-confirm-babel-evaluate (nth 0 info) (nth 1 info))) (t org-confirm-babel-evaluate)))) (if (or (equal eval "never") (equal eval "no") + (and org-current-export-file (or (equal eval "no-export") + (equal eval "never-export"))) (and query (not (yes-or-no-p (format "Evaluate this%scode block%son your system? " @@ -224,7 +269,9 @@ of potentially harmful code." (if (nth 4 info) (format " (%s) " (nth 4 info)) " ")))))) (prog1 nil (message "Evaluation %s" - (if (or (equal eval "never") (equal eval "no")) + (if (or (equal eval "never") (equal eval "no") + (equal eval "no-export") + (equal eval "never-export")) "Disabled" "Aborted"))) t))) @@ -314,10 +361,35 @@ then run `org-babel-pop-to-session'." (add-hook 'org-metadown-hook 'org-babel-pop-to-session-maybe) +(defconst org-babel-common-header-args-w-values + '((cache . ((no yes))) + (cmdline . :any) + (colnames . ((nil no yes))) + (comments . ((no link yes org both noweb))) + (dir . :any) + (eval . ((never query))) + (exports . ((code results both none))) + (file . :any) + (hlines . ((no yes))) + (mkdirp . ((yes no))) + (no-expand) + (noeval) + (noweb . ((yes no tangle))) + (noweb-ref . :any) + (padline . ((yes no))) + (results . ((file list vector table scalar verbatim) + (raw org html latex code pp wrap) + (replace silent append prepend) + (output value))) + (rownames . ((no yes))) + (sep . :any) + (session . :any) + (shebang . :any) + (tangle . ((tangle yes no :any))) + (var . :any))) + (defconst org-babel-header-arg-names - '(cache cmdline colnames dir exports file noweb results - session tangle var eval noeval comments no-expand shebang - padline noweb-ref) + (mapcar #'car org-babel-common-header-args-w-values) "Common header arguments used by org-babel. Note that individual languages may define their own language specific header arguments as well.") @@ -332,7 +404,7 @@ specific header arguments as well.") '((:session . "none") (:results . "replace") (:exports . "results")) "Default arguments to use when evaluating an inline source block.") -(defvar org-babel-data-names '("TBLNAME" "RESNAME" "RESULTS" "DATA")) +(defvar org-babel-data-names '("TBLNAME" "RESULTS" "NAME")) (defvar org-babel-result-regexp (concat "^[ \t]*#\\+" @@ -365,11 +437,17 @@ can not be resolved.") (defvar org-babel-after-execute-hook nil "Hook for functions to be called after `org-babel-execute-src-block'") + (defun org-babel-named-src-block-regexp-for-name (name) "This generates a regexp used to match a src block named NAME." - (concat org-babel-src-name-regexp (regexp-quote name) "[ \t\n]*" + (concat org-babel-src-name-regexp (regexp-quote name) + "\\([ \t]\\|$\\|(\\)" ".*[\r\n]" (substring org-babel-src-block-regexp 1))) +(defun org-babel-named-data-regexp-for-name (name) + "This generates a regexp used to match data named NAME." + (concat org-babel-result-regexp (regexp-quote name) "\\([ \t]\\|$\\)")) + ;;; functions (defvar call-process-region) ;;;###autoload @@ -380,9 +458,8 @@ Insert the results of execution into the buffer. Source code execution and the collection and formatting of results can be controlled through a variety of header arguments. -With prefix argument ARG, force re-execution even if an -existing result cached in the buffer would otherwise have been -returned. +With prefix argument ARG, force re-execution even if an existing +result cached in the buffer would otherwise have been returned. Optionally supply a value for INFO in the form returned by `org-babel-get-src-block-info'. @@ -519,6 +596,7 @@ arguments and pop open the results in a preview buffer." (interactive) ;; TODO: report malformed code block ;; TODO: report incompatible combinations of header arguments + ;; TODO: report uninitialized variables (let ((too-close 2)) ;; <- control closeness to report potential match (dolist (header (mapcar (lambda (arg) (substring (symbol-name (car arg)) 1)) (and (org-babel-where-is-src-block-head) @@ -532,6 +610,41 @@ arguments and pop open the results in a preview buffer." header name)))) (message "No suspicious header arguments found."))) +;;;###autoload +(defun org-babel-insert-header-arg () + "Insert a header argument selecting from lists of common args and values." + (interactive) + (let* ((lang (car (org-babel-get-src-block-info 'light))) + (lang-headers (intern (concat "org-babel-header-arg-names:" lang))) + (headers (append (if (boundp lang-headers) + (mapcar (lambda (h) (cons h :any)) + (eval lang-headers)) + nil) + org-babel-common-header-args-w-values)) + (arg (org-icompleting-read + "Header Arg: " + (mapcar + (lambda (header-spec) (symbol-name (car header-spec))) + headers)))) + (insert ":" arg) + (let ((vals (cdr (assoc (intern arg) headers)))) + (when vals + (insert + " " + (cond + ((eq vals :any) + (read-from-minibuffer "value: ")) + ((listp vals) + (mapconcat + (lambda (group) + (let ((arg (org-icompleting-read + "value: " + (cons "default" (mapcar #'symbol-name group))))) + (if (and arg (not (string= "default" arg))) + (concat arg " ") + ""))) + vals "")))))))) + ;;;###autoload (defun org-babel-load-in-session (&optional arg info) "Load the body of the current source-code block. @@ -625,6 +738,7 @@ Return t if a code block was found at point, nil otherwise." (if (org-bound-and-true-p org-edit-src-from-org-mode) (org-edit-src-exit))) t))) +(def-edebug-spec org-babel-do-in-edit-buffer (body)) (defun org-babel-do-key-sequence-in-edit-buffer (key) "Read key sequence and execute the command in edit buffer. @@ -721,6 +835,7 @@ end-body --------- point at the end of the body" (goto-char end-block)))) (unless visited-p (kill-buffer to-be-removed)) (goto-char point)))) +(def-edebug-spec org-babel-map-src-blocks (form body)) ;;;###autoload (defmacro org-babel-map-inline-src-blocks (file &rest body) @@ -743,6 +858,31 @@ buffer." (goto-char (match-end 0)))) (unless visited-p (kill-buffer to-be-removed)) (goto-char point)))) +(def-edebug-spec org-babel-map-inline-src-blocks (form body)) + +(defvar org-babel-lob-one-liner-regexp) +;;;###autoload +(defmacro org-babel-map-call-lines (file &rest body) + "Evaluate BODY forms on each call line in FILE. +If FILE is nil evaluate BODY forms on source blocks in current +buffer." + (declare (indent 1)) + (let ((tempvar (make-symbol "file"))) + `(let* ((,tempvar ,file) + (visited-p (or (null ,tempvar) + (get-file-buffer (expand-file-name ,tempvar)))) + (point (point)) to-be-removed) + (save-window-excursion + (when ,tempvar (find-file ,tempvar)) + (setq to-be-removed (current-buffer)) + (goto-char (point-min)) + (while (re-search-forward org-babel-lob-one-liner-regexp nil t) + (goto-char (match-beginning 1)) + (save-match-data ,@body) + (goto-char (match-end 0)))) + (unless visited-p (kill-buffer to-be-removed)) + (goto-char point)))) +(def-edebug-spec org-babel-map-call-lines (form body)) ;;;###autoload (defun org-babel-execute-buffer (&optional arg) @@ -755,7 +895,9 @@ the current buffer." (org-babel-map-src-blocks nil (org-babel-execute-src-block arg)) (org-babel-map-inline-src-blocks nil - (org-babel-execute-src-block arg)))) + (org-babel-execute-src-block arg)) + (org-babel-map-call-lines nil + (org-babel-lob-execute-maybe)))) ;;;###autoload (defun org-babel-execute-subtree (&optional arg) @@ -784,7 +926,7 @@ the current subtree." lst) (norm (arg) (let ((v (if (and (listp (cdr arg)) (null (cddr arg))) - (copy-seq (cdr arg)) + (copy-sequence (cdr arg)) (cdr arg)))) (when (and v (not (and (sequencep v) (not (consp v)) @@ -857,86 +999,6 @@ This can be called with C-c C-c." (when hash (kill-new hash) (message hash)))) (add-hook 'org-ctrl-c-ctrl-c-hook 'org-babel-hash-at-point) -(defun org-babel-result-hide-spec () - "Hide portions of results lines. -Add `org-babel-hide-result' as an invisibility spec for hiding -portions of results lines." - (add-to-invisibility-spec '(org-babel-hide-result . t))) -(add-hook 'org-mode-hook 'org-babel-result-hide-spec) - -(defvar org-babel-hide-result-overlays nil - "Overlays hiding results.") - -(defun org-babel-result-hide-all () - "Fold all results in the current buffer." - (interactive) - (org-babel-show-result-all) - (save-excursion - (while (re-search-forward org-babel-result-regexp nil t) - (save-excursion (goto-char (match-beginning 0)) - (org-babel-hide-result-toggle-maybe))))) - -(defun org-babel-show-result-all () - "Unfold all results in the current buffer." - (mapc 'delete-overlay org-babel-hide-result-overlays) - (setq org-babel-hide-result-overlays nil)) - -;;;###autoload -(defun org-babel-hide-result-toggle-maybe () - "Toggle visibility of result at point." - (interactive) - (let ((case-fold-search t)) - (if (save-excursion - (beginning-of-line 1) - (looking-at org-babel-result-regexp)) - (progn (org-babel-hide-result-toggle) - t) ;; to signal that we took action - nil))) ;; to signal that we did not - -(defun org-babel-hide-result-toggle (&optional force) - "Toggle the visibility of the current result." - (interactive) - (save-excursion - (beginning-of-line) - (if (re-search-forward org-babel-result-regexp nil t) - (let ((start (progn (beginning-of-line 2) (- (point) 1))) - (end (progn (goto-char (- (org-babel-result-end) 1)) (point))) - ov) - (if (memq t (mapcar (lambda (overlay) - (eq (overlay-get overlay 'invisible) - 'org-babel-hide-result)) - (overlays-at start))) - (if (or (not force) (eq force 'off)) - (mapc (lambda (ov) - (when (member ov org-babel-hide-result-overlays) - (setq org-babel-hide-result-overlays - (delq ov org-babel-hide-result-overlays))) - (when (eq (overlay-get ov 'invisible) - 'org-babel-hide-result) - (delete-overlay ov))) - (overlays-at start))) - (setq ov (make-overlay start end)) - (overlay-put ov 'invisible 'org-babel-hide-result) - ;; make the block accessible to isearch - (overlay-put - ov 'isearch-open-invisible - (lambda (ov) - (when (member ov org-babel-hide-result-overlays) - (setq org-babel-hide-result-overlays - (delq ov org-babel-hide-result-overlays))) - (when (eq (overlay-get ov 'invisible) - 'org-babel-hide-result) - (delete-overlay ov)))) - (push ov org-babel-hide-result-overlays))) - (error "Not looking at a result line")))) - -;; org-tab-after-check-for-cycling-hook -(add-hook 'org-tab-first-hook 'org-babel-hide-result-toggle-maybe) -;; Remove overlays when changing major mode -(add-hook 'org-mode-hook - (lambda () (org-add-hook 'change-major-mode-hook - 'org-babel-show-result-all 'append 'local))) - (defvar org-file-properties) (defun org-babel-params-from-properties (&optional lang) "Retrieve parameters specified as properties. @@ -944,40 +1006,21 @@ Return an association list of any source block params which may be specified in the properties of the current outline entry." (save-match-data (let (val sym) - (delq nil - (mapcar - (lambda (header-arg) - (and (setq val - (or (org-entry-get (point) header-arg t) - (org-entry-get (point) (concat ":" header-arg) t))) - (cons (intern (concat ":" header-arg)) - (org-babel-read val)))) + (org-babel-parse-multiple-vars + (delq nil (mapcar - 'symbol-name - (append - org-babel-header-arg-names - (progn - (setq sym (intern (concat "org-babel-header-arg-names:" lang))) - (and (boundp sym) (eval sym)))))))))) - -(defun org-babel-params-from-buffer () - "Retrieve per-buffer parameters. - Return an association list of any source block params which -may be specified in the current buffer." - (let (local-properties) - (save-match-data - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (re-search-forward - (org-make-options-regexp (list "BABEL" "PROPERTIES")) nil t) - (setq local-properties - (org-babel-merge-params - local-properties - (org-babel-parse-header-arguments - (org-match-string-no-properties 2))))) - local-properties))))) + (lambda (header-arg) + (and (setq val (org-entry-get (point) header-arg t)) + (cons (intern (concat ":" header-arg)) + (org-babel-read val)))) + (mapcar + 'symbol-name + (append + org-babel-header-arg-names + (progn + (setq sym (intern (concat "org-babel-header-arg-names:" + lang))) + (and (boundp sym) (eval sym))))))))))) (defvar org-src-preserve-indentation) (defun org-babel-parse-src-block-match () @@ -989,9 +1032,10 @@ may be specified in the current buffer." (body (org-babel-clean-text-properties (let* ((body (match-string 5)) (sub-length (- (length body) 1))) - (if (string= "\n" (substring body sub-length)) + (if (and (> sub-length 0) + (string= "\n" (substring body sub-length))) (substring body 0 sub-length) - body)))) + (or body ""))))) (preserve-indentation (or org-src-preserve-indentation (string-match "-i\\>" switches)))) (list lang @@ -1003,7 +1047,6 @@ may be specified in the current buffer." (buffer-string))) (org-babel-merge-params org-babel-default-header-args - (org-babel-params-from-buffer) (org-babel-params-from-properties lang) (if (boundp lang-headers) (eval lang-headers) nil) (org-babel-parse-header-arguments @@ -1020,50 +1063,105 @@ may be specified in the current buffer." (org-babel-clean-text-properties (match-string 5))) (org-babel-merge-params org-babel-default-inline-header-args - (org-babel-params-from-buffer) (org-babel-params-from-properties lang) (if (boundp lang-headers) (eval lang-headers) nil) (org-babel-parse-header-arguments (org-babel-clean-text-properties (or (match-string 4) ""))))))) +(defun org-babel-balanced-split (string alts) + "Split STRING on instances of ALTS. +ALTS is a cons of two character options where each option may be +either the numeric code of a single character or a list of +character alternatives. For example to split on balanced +instances of \"[ \t]:\" set ALTS to '((32 9) . 58)." + (flet ((matches (ch spec) (or (and (numberp spec) (= spec ch)) + (member ch spec))) + (matched (ch last) + (if (consp alts) + (and (matches ch (cdr alts)) + (matches last (car alts))) + (matches ch alts)))) + (let ((balance 0) (quote nil) (partial nil) (lst nil) (last 0)) + (mapc (lambda (ch) ; split on [], (), "" balanced instances of [ \t]: + (setq balance (+ balance + (cond ((or (equal 91 ch) (equal 40 ch)) 1) + ((or (equal 93 ch) (equal 41 ch)) -1) + (t 0)))) + (when (and (equal 34 ch) (not (equal 92 last))) + (setq quote (not quote))) + (setq partial (cons ch partial)) + (when (and (= balance 0) (not quote) (matched ch last)) + (setq lst (cons (apply #'string (nreverse + (if (consp alts) + (cddr partial) + (cdr partial)))) + lst)) + (setq partial nil)) + (setq last ch)) + (string-to-list string)) + (nreverse (cons (apply #'string (nreverse partial)) lst))))) + +(defun org-babel-join-splits-near-ch (ch list) + "Join splits where \"=\" is on either end of the split." + (flet ((last= (str) (= ch (aref str (1- (length str))))) + (first= (str) (= ch (aref str 0)))) + (reverse + (org-reduce (lambda (acc el) + (let ((head (car acc))) + (if (and head (or (last= head) (first= el))) + (cons (concat head el) (cdr acc)) + (cons el acc)))) + list :initial-value nil)))) + (defun org-babel-parse-header-arguments (arg-string) "Parse a string of header arguments returning an alist." (when (> (length arg-string) 0) - (delq nil - (mapcar - (lambda (arg) - (if (string-match - "\\([^ \f\t\n\r\v]+\\)[ \f\t\n\r\v]+\\([^ \f\t\n\r\v]+.*\\)" - arg) - (cons (intern (match-string 1 arg)) - (org-babel-read (org-babel-chomp (match-string 2 arg)))) - (cons (intern (org-babel-chomp arg)) nil))) - (let ((balance 0) (partial nil) (lst nil) (last 0)) - (mapc (lambda (ch) ; split on [] balanced instances of [ \t]: - (setq balance (+ balance - (cond ((equal 91 ch) 1) - ((equal 93 ch) -1) - (t 0)))) - (setq partial (cons ch partial)) - (when (and (= ch 58) (= balance 0) - (or (= last 32) (= last 9))) - (setq lst (cons (apply #'string (nreverse (cddr partial))) - lst)) - (setq partial (list ch))) - (setq last ch)) - (string-to-list arg-string)) - (nreverse (cons (apply #'string (nreverse partial)) lst))))))) + (org-babel-parse-multiple-vars + (delq nil + (mapcar + (lambda (arg) + (if (string-match + "\\([^ \f\t\n\r\v]+\\)[ \f\t\n\r\v]+\\([^ \f\t\n\r\v]+.*\\)" + arg) + (cons (intern (match-string 1 arg)) + (org-babel-read (org-babel-chomp (match-string 2 arg)))) + (cons (intern (org-babel-chomp arg)) nil))) + ((lambda (raw) + (cons (car raw) (mapcar (lambda (r) (concat ":" r)) (cdr raw)))) + (org-babel-balanced-split arg-string '((32 9) . 58)))))))) + +(defun org-babel-parse-multiple-vars (header-arguments) + "Expand multiple variable assignments behind a single :var keyword. + +This allows expression of multiple variables with one :var as +shown below. + +#+PROPERTY: var foo=1, bar=2" + (let (results) + (mapc (lambda (pair) + (if (eq (car pair) :var) + (mapcar (lambda (v) (push (cons :var (org-babel-trim v)) results)) + (org-babel-join-splits-near-ch + 61 (org-babel-balanced-split (cdr pair) 32))) + (push pair results))) + header-arguments) + (nreverse results))) (defun org-babel-process-params (params) "Expand variables in PARAMS and add summary parameters." - (let* ((vars-and-names (org-babel-disassemble-tables - (mapcar (lambda (el) - (if (consp (cdr el)) - (cdr el) (org-babel-ref-parse (cdr el)))) - (org-babel-get-header params :var)) - (cdr (assoc :hlines params)) - (cdr (assoc :colnames params)) - (cdr (assoc :rownames params)))) + (let* ((processed-vars (mapcar (lambda (el) + (if (consp (cdr el)) + (cdr el) + (org-babel-ref-parse (cdr el)))) + (org-babel-get-header params :var))) + (vars-and-names (if (and (assoc :colname-names params) + (assoc :rowname-names params)) + (list processed-vars) + (org-babel-disassemble-tables + processed-vars + (cdr (assoc :hlines params)) + (cdr (assoc :colnames params)) + (cdr (assoc :rownames params))))) (raw-result (or (cdr (assoc :results params)) "")) (result-params (append (split-string (if (stringp raw-result) @@ -1170,7 +1268,7 @@ of the vars, cnames and rnames." (setq var (cons (car var) (org-babel-del-hlines (cdr var)))))) var) vars) - cnames rnames))) + (reverse cnames) (reverse rnames)))) (defun org-babel-reassemble-table (table colnames rownames) "Add column and row names to a table. @@ -1245,7 +1343,7 @@ org-babel-named-src-block-regexp." (regexp (org-babel-named-src-block-regexp-for-name name)) msg) (goto-char (point-min)) (when (or (re-search-forward regexp nil t) - (re-search-backward regexp nil t)) + (re-search-backward regexp nil t)) (match-beginning 0))))) (defun org-babel-src-block-names (&optional file) @@ -1254,7 +1352,7 @@ org-babel-named-src-block-regexp." (when file (find-file file)) (goto-char (point-min)) (let (names) (while (re-search-forward org-babel-src-name-w-name-regexp nil t) - (setq names (cons (match-string 4) names))) + (setq names (cons (match-string 3) names))) names))) ;;;###autoload @@ -1270,16 +1368,21 @@ org-babel-named-src-block-regexp." (progn (goto-char point) (org-show-context)) (message "result '%s' not found in this buffer" name)))) -(defun org-babel-find-named-result (name) +(defun org-babel-find-named-result (name &optional point) "Find a named result. Return the location of the result named NAME in the current buffer or nil if no such result exists." (save-excursion - (goto-char (point-min)) - (when (re-search-forward - (concat org-babel-result-regexp - "[ \t]" (regexp-quote name) "[ \t\n\f\v\r]") nil t) - (beginning-of-line 0) (point)))) + (goto-char (or point (point-min))) + (catch 'is-a-code-block + (when (re-search-forward + (concat org-babel-result-regexp + "[ \t]" (regexp-quote name) "[ \t\n\f\v\r]") nil t) + (when (and (string= "name" (downcase (match-string 1))) + (or (looking-at org-babel-src-block-regexp) + (looking-at org-babel-multi-line-header-regexp))) + (throw 'is-a-code-block (org-babel-find-named-result name (point)))) + (beginning-of-line 0) (point))))) (defun org-babel-result-names (&optional file) "Returns the names of results in FILE or the current buffer." @@ -1334,6 +1437,8 @@ is created. In both cases if the region is demarcated and if the region is not active then the point is demarcated." (interactive "P") (let ((info (org-babel-get-src-block-info 'light)) + (headers (progn (org-babel-where-is-src-block-head) + (match-string 4))) (stars (concat (make-string (or (org-current-level) 1) ?*) " "))) (if info (mapc @@ -1346,11 +1451,16 @@ region is not active then the point is demarcated." (buffer-substring (point-at-bol) (point-at-eol))) (delete-region (point-at-bol) (point-at-eol))) - (insert (concat (if (looking-at "^") "" "\n") - indent "#+end_src\n" - (if arg stars indent) "\n" - indent "#+begin_src " lang - (if (looking-at "[\n\r]") "" "\n"))))) + (insert (concat + (if (looking-at "^") "" "\n") + indent "#+end_src\n" + (if arg stars indent) "\n" + indent "#+begin_src " lang + (if (> (length headers) 1) + (concat " " headers) headers) + (if (looking-at "[\n\r]") + "" + (concat "\n" (make-string (current-column) ? ))))))) (move-end-of-line 2)) (sort (if (region-active-p) (list (mark) (point)) (list (point))) #'>)) (let ((start (point)) @@ -1369,7 +1479,6 @@ region is not active then the point is demarcated." (goto-char start) (move-end-of-line 1))))) (defvar org-babel-lob-one-liner-regexp) -(defvar org-babel-inline-lob-one-liner-regexp) (defun org-babel-where-is-src-block-result (&optional insert info hash indent) "Find where the current source block results begin. Return the point at the beginning of the result of the current @@ -1380,13 +1489,11 @@ following the source block." (let* ((on-lob-line (save-excursion (beginning-of-line 1) (looking-at org-babel-lob-one-liner-regexp))) - (inlinep (save-excursion - (re-search-backward "[ \f\t\n\r\v]" nil t) - (when (looking-at org-babel-inline-src-block-regexp) - (match-end 0)))) + (inlinep (when (org-babel-get-inline-src-block-matches) + (match-end 0))) (name (if on-lob-line (nth 0 (org-babel-lob-get-info)) - (nth 4 (or info (org-babel-get-src-block-info))))) + (nth 4 (or info (org-babel-get-src-block-info 'light))))) (head (unless on-lob-line (org-babel-where-is-src-block-head))) found beg end) (when head (goto-char head)) @@ -1538,6 +1645,10 @@ raw ----- results are added directly to the Org-mode file. This is a good option if you code block will output org-mode formatted text. +wrap ---- results are added directly to the Org-mode file as with + \"raw\", but are wrapped in a RESULTS drawer, allowing + them to later be replaced or removed automatically. + org ----- similar in effect to raw, only the results are wrapped in an org code block. Similar to the raw option, on export the results will be interpreted as org-formatted @@ -1571,10 +1682,8 @@ code ---- the results are extracted in the syntax of the source (save-excursion (let* ((inlinep (save-excursion - (or (= (point) (point-at-bol)) - (re-search-backward "[ \f\t\n\r\v]" nil t)) - (when (or (looking-at org-babel-inline-src-block-regexp) - (looking-at org-babel-inline-lob-one-liner-regexp)) + (when (or (org-babel-get-inline-src-block-matches) + (org-babel-get-lob-one-liner-matches)) (goto-char (match-end 0)) (insert (if (listp result) "\n" " ")) (point)))) @@ -1606,41 +1715,45 @@ code ---- the results are extracted in the syntax of the source ((member "prepend" result-params)))) ; already there (setq results-switches (if results-switches (concat " " results-switches) "")) - ;; insert results based on type - (cond - ;; do nothing for an empty result - ((= (length result) 0)) - ;; insert a list if preferred - ((member "list" result-params) - (insert - (org-babel-trim - (org-list-to-generic - (cons 'unordered - (mapcar - (lambda (el) (list nil (if (stringp el) el (format "%S" el)))) - (if (listp result) result (list result)))) - '(:splicep nil :istart "- " :iend "\n"))) - "\n")) - ;; assume the result is a table if it's not a string - ((not (stringp result)) - (goto-char beg) - (insert (concat (orgtbl-to-orgtbl - (if (or (eq 'hline (car result)) - (and (listp (car result)) - (listp (cdr (car result))))) - result (list result)) - '(:fmt (lambda (cell) (format "%s" cell)))) "\n")) - (goto-char beg) (when (org-at-table-p) (org-table-align))) - ((member "file" result-params) - (insert result)) - (t (goto-char beg) (insert result))) - (when (listp result) (goto-char (org-table-end))) - (setq end (point-marker)) - ;; possibly wrap result (flet ((wrap (start finish) (goto-char beg) (insert (concat start "\n")) (goto-char end) (insert (concat finish "\n")) - (setq end (point-marker)))) + (setq end (point-marker))) + (proper-list-p (it) (and (listp it) (null (cdr (last it)))))) + ;; insert results based on type + (cond + ;; do nothing for an empty result + ((null result)) + ;; insert a list if preferred + ((member "list" result-params) + (insert + (org-babel-trim + (org-list-to-generic + (cons 'unordered + (mapcar + (lambda (el) (list nil (if (stringp el) el (format "%S" el)))) + (if (listp result) result (list result)))) + '(:splicep nil :istart "- " :iend "\n"))) + "\n")) + ;; assume the result is a table if it's not a string + ((proper-list-p result) + (goto-char beg) + (insert (concat (orgtbl-to-orgtbl + (if (or (eq 'hline (car result)) + (and (listp (car result)) + (listp (cdr (car result))))) + result (list result)) + '(:fmt (lambda (cell) (format "%s" cell)))) "\n")) + (goto-char beg) (when (org-at-table-p) (org-table-align))) + ((and (listp result) (not (proper-list-p result))) + (insert (format "%s\n" result))) + ((member "file" result-params) + (when inlinep (goto-char inlinep)) + (insert result)) + (t (goto-char beg) (insert result))) + (when (proper-list-p result) (goto-char (org-table-end))) + (setq end (point-marker)) + ;; possibly wrap result (cond ((member "html" result-params) (wrap "#+BEGIN_HTML" "#+END_HTML")) @@ -1654,10 +1767,9 @@ code ---- the results are extracted in the syntax of the source ((member "raw" result-params) (goto-char beg) (if (org-at-table-p) (org-cycle))) ((member "wrap" result-params) - (when (and (stringp result) (not (member "file" result-params))) - (org-babel-examplize-region beg end results-switches)) - (wrap "#+BEGIN_RESULT" "#+END_RESULT")) - ((and (stringp result) (not (member "file" result-params))) + (wrap ":RESULTS:" ":END:")) + ((and (not (proper-list-p result)) + (not (member "file" result-params))) (org-babel-examplize-region beg end results-switches) (setq end (point))))) ;; possibly indent the results to match the #+results line @@ -1666,7 +1778,7 @@ code ---- the results are extracted in the syntax of the source (not (and (listp result) (member "append" result-params)))) (indent-rigidly beg end indent)))) - (if (= (length result) 0) + (if (null result) (if (member "value" result-params) (message "Code block returned no value.") (message "Code block produced no output.")) @@ -1677,8 +1789,9 @@ code ---- the results are extracted in the syntax of the source (interactive) (let ((location (org-babel-where-is-src-block-result nil info)) start) (when location + (setq start (- location 1)) (save-excursion - (goto-char location) (setq start (point)) (forward-line 1) + (goto-char location) (forward-line 1) (delete-region start (org-babel-result-end)))))) (defun org-babel-result-end () @@ -1689,6 +1802,8 @@ code ---- the results are extracted in the syntax of the source ((org-at-item-p) (let* ((struct (org-list-struct)) (prvs (org-list-prevs-alist struct))) (org-list-get-list-end (point-at-bol) struct prvs))) + ((looking-at "^\\([ \t]*\\):RESULTS:") + (re-search-forward (concat "^" (match-string 1) ":END:"))) (t (let ((case-fold-search t) (blocks-re (regexp-opt @@ -1757,12 +1872,11 @@ Later elements of PLISTS override the values of previous elements. This takes into account some special considerations for certain parameters when merging lists." (let ((results-exclusive-groups - '(("file" "list" "vector" "table" "scalar" "verbatim" "raw" "org" - "html" "latex" "code" "pp" "wrap") - ("replace" "silent" "append" "prepend") - ("output" "value"))) + (mapcar (lambda (group) (mapcar #'symbol-name group)) + (cdr (assoc 'results org-babel-common-header-args-w-values)))) (exports-exclusive-groups - '(("code" "results" "both" "none"))) + (mapcar (lambda (group) (mapcar #'symbol-name group)) + (cdr (assoc 'exports org-babel-common-header-args-w-values)))) (variable-index 0) params results exports tangle noweb cache vars shebang comments padline) (flet ((e-merge (exclusive-groups &rest result-params) @@ -1806,12 +1920,16 @@ parameters when merging lists." vars)) vars) (list (cons name pair)))) - ;; if no name is given, then assign to variables in order - (prog1 (setf (cddr (nth variable-index vars)) - (concat (symbol-name - (car (nth variable-index vars))) - "=" (cdr pair))) - (incf variable-index))))) + ;; if no name is given and we already have named variables + ;; then assign to named variables in order + (if (and vars (nth variable-index vars)) + (prog1 (setf (cddr (nth variable-index vars)) + (concat (symbol-name + (car (nth variable-index vars))) + "=" (cdr pair))) + (incf variable-index)) + (error "variable \"%s\" must be assigned a default value" + (cdr pair)))))) (:results (setq results (e-merge results-exclusive-groups results @@ -1861,6 +1979,12 @@ parameters when merging lists." '(results exports tangle noweb padline cache shebang comments)) params)) +(defvar *org-babel-use-quick-and-dirty-noweb-expansion* nil + "Set to true to use regular expressions to expand noweb references. +This results in much faster noweb reference expansion but does +not properly allow code blocks to inherit the \":noweb-ref\" +header argument from buffer or subtree wide properties.") + (defun org-babel-expand-noweb-references (&optional info parent-buffer) "Expand Noweb references in the body of the current source code block. @@ -1896,21 +2020,15 @@ block but are passed literally to the \"example-block\"." (lang (nth 0 info)) (body (nth 1 info)) (comment (string= "noweb" (cdr (assoc :comments (nth 2 info))))) + (rx-prefix (concat "\\(" org-babel-src-name-regexp "\\|" + ":noweb-ref[ \t]+" "\\)")) (new-body "") index source-name evaluate prefix blocks-in-buffer) (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)))) - (blocks () ;; return the info lists of all blocks in this buffer - (let (infos) - (save-restriction - (widen) - (org-babel-map-src-blocks nil - (setq infos (cons (org-babel-get-src-block-info 'light) - infos)))) - (reverse infos)))) + (org-babel-trim (buffer-string))))) (with-temp-buffer (insert body) (goto-char (point-min)) (setq index (point)) @@ -1944,21 +2062,33 @@ block but are passed literally to the \"example-block\"." (when (org-babel-ref-goto-headline-id source-name) (org-babel-ref-headline-body))) ;; find the expansion of reference in this buffer - (mapconcat - (lambda (i) - (when (string= source-name - (or (cdr (assoc :noweb-ref (nth 2 i))) - (nth 4 i))) - (let ((body (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)))) - (or blocks-in-buffer - (setq blocks-in-buffer (blocks))) - "") + (let ((rx (concat rx-prefix source-name)) + expansion) + (save-excursion + (goto-char (point-min)) + (if *org-babel-use-quick-and-dirty-noweb-expansion* + (while (re-search-forward rx nil t) + (let* ((i (org-babel-get-src-block-info 'light)) + (body (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)) + (setq expansion (concat expansion body))))) + (org-babel-map-src-blocks nil + (let ((i (org-babel-get-src-block-info 'light))) + (when (equal (or (cdr (assoc :noweb-ref (nth 2 i))) + (nth 4 i)) + source-name) + (let ((body (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)) + (setq expansion (concat expansion body))))))))) + expansion) ;; possibly raise an error if named block doesn't exist (if (member lang org-babel-noweb-error-langs) (error "%s" (concat diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index a54f3c4c3d3..f3024b171a6 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1,11 +1,10 @@ ;;; org-agenda.el --- Dynamic task and appointment lists for Org -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -26,6 +25,23 @@ ;;; Commentary: ;; This file contains the code for creating and using the Agenda for Org-mode. +;; +;; The functions `org-batch-agenda', `org-batch-agenda-csv', and +;; `org-batch-store-agenda-views' are implemented as macros to provide +;; a conveniant way for extracting agenda information from the command +;; line. The Lisp does not evaluate parameters of a macro call; thus +;; it is not necessary to quote the parameters passed to one of those +;; functions. E.g. you can write: +;; +;; emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a" org-agenda-span 7)' +;; +;; To export an agenda spanning 7 days. If `org-batch-agenda' would +;; have been implemented as a regular function you'd have to quote the +;; symbol org-agenda-span. Moreover: To use a symbol as parameter +;; value you would have to double quote the symbol. +;; +;; This is a hack, but it works even when running Org byte-compiled. +;; ;;; Code: @@ -50,6 +66,8 @@ (declare-function calendar-julian-date-string "cal-julian" (&optional date)) (declare-function calendar-mayan-date-string "cal-mayan" (&optional date)) (declare-function calendar-persian-date-string "cal-persia" (&optional date)) +(declare-function calendar-check-holidays "holidays" (date)) + (declare-function org-datetree-find-date-create "org-datetree" (date &optional keep-restriction)) (declare-function org-columns-quit "org-colview" ()) @@ -60,6 +78,8 @@ (declare-function org-is-habit-p "org-habit" (&optional pom)) (declare-function org-habit-parse-todo "org-habit" (&optional pom)) (declare-function org-habit-get-priority "org-habit" (habit &optional moment)) +(declare-function org-pop-to-buffer-same-window "org-compat" + (&optional buffer-or-name norecord label)) (defvar calendar-mode-map) (defvar org-clock-current-task) ; defined in org-clock.el @@ -156,7 +176,7 @@ and `org-agenda-entry-text-maxlines'." "Non-nil means export org-links as descriptive links in agenda added text. This variable applies to the text added to the agenda when `org-agenda-add-entry-text-maxlines' is larger than 0. -When this variable is nil, the URL will (also) be shown." +When this variable nil, the URL will (also) be shown." :group 'org-agenda :type 'boolean) @@ -225,6 +245,10 @@ you can \"misuse\" it to also add other text to the header. However, (const user-defined-up) (const user-defined-down)) "Sorting choices.") +;; Keep custom values for `org-agenda-filter-preset' compatible with +;; the new variable `org-agenda-tag-filter-preset'. +(defvaralias 'org-agenda-filter-preset 'org-agenda-tag-filter-preset) + (defconst org-agenda-custom-commands-local-options `(repeat :tag "Local settings for this command. Remember to quote values" (choice :tag "Setting" @@ -266,8 +290,14 @@ you can \"misuse\" it to also add other text to the header. However, (list :tag "Deadline Warning days" (const org-deadline-warning-days) (integer :value 1)) + (list :tag "Category filter preset" + (const org-agenda-category-filter-preset) + (list + (const :format "" quote) + (repeat + (string :tag "+category or -category")))) (list :tag "Tags filter preset" - (const org-agenda-filter-preset) + (const org-agenda-tag-filter-preset) (list (const :format "" quote) (repeat @@ -330,7 +360,8 @@ This will be spliced into the custom type of `org-agenda-custom-commands'.") -(defcustom org-agenda-custom-commands nil +(defcustom org-agenda-custom-commands '(("n" "Agenda and all TODO's" + ((agenda "") (alltodo)))) "Custom commands for the agenda. These commands will be offered on the splash screen displayed by the agenda dispatcher \\[org-agenda]. Each entry is a list like this: @@ -339,7 +370,7 @@ agenda dispatcher \\[org-agenda]. Each entry is a list like this: key The key (one or more characters as a string) to be associated with the command. -desc A description of the command; when omitted or nil, a default +desc A description of the command, when omitted or nil, a default description is built using MATCH. type The command type, any of the following symbols: agenda The daily/weekly agenda. @@ -354,7 +385,7 @@ type The command type, any of the following symbols: match What to search for: - a single keyword for TODO keyword searches - a tags match expression for tags searches - - a word search expression for text searches + - a word search expression for text searches. - a regular expression for occur searches For all other commands, this should be the empty string. settings A list of option settings, similar to that in a let form, so like @@ -363,7 +394,7 @@ settings A list of option settings, similar to that in a let form, so like files A list of files file to write the produced agenda buffer to with the command `org-store-agenda-views'. If a file name ends in \".html\", an HTML version of the buffer - is written out. If it ends in \".ps\", a PostScript version is + is written out. If it ends in \".ps\", a postscript version is produced. Otherwise, only the plain text is written to the file. You can also define a set of commands, to create a composite agenda buffer. @@ -764,11 +795,11 @@ because you will take care of it on the day when scheduled." :group 'org-agenda-skip :group 'org-agenda-daily/weekly :type '(choice - (const :tag "Always show prewarning" nil) + (const :tag "Alwas show prewarning" nil) (const :tag "Remove prewarning if entry is scheduled" t) (integer :tag "Restart prewarning N days before deadline"))) -(defcustom org-agenda-skip-additional-timestamps-same-entry t +(defcustom org-agenda-skip-additional-timestamps-same-entry nil "When nil, multiple same-day timestamps in entry make multiple agenda lines. When non-nil, after the search for timestamps has matched once in an entry, the rest of the entry will not be searched." @@ -853,6 +884,12 @@ Needs to be set before org.el is loaded." :group 'org-agenda-startup :type 'boolean) +(defcustom org-agenda-follow-indirect nil + "Non-nil means `org-agenda-follow-mode' displays only the +current item's tree, in an indirect buffer." + :group 'org-agenda + :type 'boolean) + (defcustom org-agenda-show-outline-path t "Non-nil means show outline path in echo area after line motion." :group 'org-agenda-startup @@ -1048,6 +1085,15 @@ and timeline buffers." (const :tag "Saturday" 6) (const :tag "Sunday" 0))) +(defcustom org-agenda-move-date-from-past-immediately-to-today t + "Non-nil means jumpt to today when moving a past date forward in time. +When using S-right in the agenda to move a a date forward, and the date +stamp currently points to the past, the first key press will move it +to today. WHen nil, just move one day forward even if the date stays +in the past." + :group 'org-agenda-daily/weekly + :type 'boolean) + (defcustom org-agenda-include-diary nil "If non-nil, include in the agenda entries from the Emacs Calendar's diary. Custom commands can set this variable in the options section." @@ -1060,14 +1106,6 @@ Custom commands can set this variable in the options section." :group 'org-agenda-daily/weekly :type 'boolean) -(defcustom org-agenda-include-all-todo nil - "Set means weekly/daily agenda will always contain all TODO entries. -The TODO entries will be listed at the top of the agenda, before -the entries for specific days. -This option is deprecated, it is better to define a block agenda instead." - :group 'org-agenda-daily/weekly - :type 'boolean) - (defcustom org-agenda-repeating-timestamp-show-all t "Non-nil means show all occurrences of a repeating stamp in the agenda. When set to a list of strings, only show occurrences of repeating @@ -1396,6 +1434,7 @@ This format works similar to a printf format, with the following meaning: %c the category of the item, \"Diary\" for entries from the diary, or as given by the CATEGORY keyword or derived from the file name + %e the effort required by the item %i the icon category of the item, see `org-agenda-category-icon-alist' %T the last tag of the item (ignore inherited tags, which come first) %t the HH:MM time-of-day specification if one applies to the entry @@ -1619,7 +1658,7 @@ Where CATEGORY-REGEXP is a regexp matching the categories where the icon should be displayed. FILE-OR-DATA either a file path or a string containing image data. -The other fields can be omitted safely if not needed: +The other fields can be omited safely if not needed: TYPE indicates the image type. DATA-P is a boolean indicating whether the FILE-OR-DATA string is image data. @@ -1711,12 +1750,14 @@ Note that functions in this alist don't need to be quoted." If STRING is non-nil, the text property will be fetched from position 0 in that string. If STRING is nil, it will be fetched from the beginning of the current line." - `(let ((marker (get-text-property (if string 0 (point-at-bol)) - 'org-hd-marker string))) - (with-current-buffer (marker-buffer marker) - (save-excursion - (goto-char marker) - ,@body)))) + (org-with-gensyms (marker) + `(let ((,marker (get-text-property (if string 0 (point-at-bol)) + 'org-hd-marker ,string))) + (with-current-buffer (marker-buffer ,marker) + (save-excursion + (goto-char ,marker) + ,@body))))) +(def-edebug-spec org-agenda-with-point-at-orig-entry (form body)) (defun org-add-agenda-custom-command (entry) "Replace or add a command in `org-agenda-custom-commands'. @@ -1870,7 +1911,7 @@ The following commands are available: (org-defkey org-agenda-mode-map "\C-c\C-xp" 'org-agenda-set-property) (org-defkey org-agenda-mode-map "q" 'org-agenda-quit) (org-defkey org-agenda-mode-map "x" 'org-agenda-exit) -(org-defkey org-agenda-mode-map "\C-x\C-w" 'org-write-agenda) +(org-defkey org-agenda-mode-map "\C-x\C-w" 'org-agenda-write) (org-defkey org-agenda-mode-map "\C-x\C-s" 'org-save-all-org-buffers) (org-defkey org-agenda-mode-map "s" 'org-save-all-org-buffers) (org-defkey org-agenda-mode-map "P" 'org-agenda-show-priority) @@ -1918,6 +1959,7 @@ The following commands are available: (org-defkey org-agenda-mode-map "}" 'org-agenda-manipulate-query-subtract-re) (org-defkey org-agenda-mode-map "/" 'org-agenda-filter-by-tag) (org-defkey org-agenda-mode-map "\\" 'org-agenda-filter-by-tag-refine) +(org-defkey org-agenda-mode-map "<" 'org-agenda-filter-by-category) (org-defkey org-agenda-mode-map ";" 'org-timer-set-timer) (define-key org-agenda-mode-map "?" 'org-agenda-show-the-flagging-note) (org-defkey org-agenda-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull) @@ -1984,7 +2026,7 @@ The following commands are available: :keys "v A"] "--" ["Remove Restriction" org-agenda-remove-restriction-lock org-agenda-restrict]) - ["Write view to file" org-write-agenda t] + ["Write view to file" org-agenda-write t] ["Rebuild buffer" org-agenda-redo t] ["Save all Org-mode Buffers" org-save-all-org-buffers t] "--" @@ -2295,7 +2337,7 @@ Pressing `<' twice means to restrict to the current subtree or region nil 'face 'org-warning))))))) t t)) ((equal keys "L") - (unless (org-mode-p) + (unless (eq major-mode 'org-mode) (error "This is not an Org-mode file")) (unless restriction (put 'org-agenda-files 'org-restrict (list bfn)) @@ -2330,7 +2372,7 @@ Agenda views are separated by `org-agenda-block-separator'." "The user interface for selecting an agenda command." (catch 'exit (let* ((bfn (buffer-file-name (buffer-base-buffer))) - (restrict-ok (and bfn (org-mode-p))) + (restrict-ok (and bfn (eq major-mode 'org-mode))) (region-p (org-region-active-p)) (custom org-agenda-custom-commands) (selstring "") @@ -2572,23 +2614,13 @@ If CMD-KEY is a string of length 1, it is used as a key in longer string it is used as a tags/todo match string. Parameters are alternating variable names and values that will be bound before running the agenda command." - (let (pars) - (while parameters - (push (list (pop parameters) (if parameters (pop parameters))) pars)) + (org-eval-in-environment (org-make-parameter-alist parameters) (if (> (length cmd-key) 2) - (eval (list 'let (nreverse pars) - (list 'org-tags-view nil cmd-key))) - (eval (list 'let (nreverse pars) (list 'org-agenda nil cmd-key)))) - (set-buffer org-agenda-buffer-name) - (princ (org-encode-for-stdout (buffer-string))))) - -;(defun org-encode-for-stdout (string) -; (if (fboundp 'encode-coding-string) -; (encode-coding-string string buffer-file-coding-system) -; string)) - -(defun org-encode-for-stdout (string) - string) + (org-tags-view nil cmd-key) + (org-agenda nil cmd-key))) + (set-buffer org-agenda-buffer-name) + (princ (buffer-string))) +(def-edebug-spec org-batch-agenda (form &rest sexp)) (defvar org-agenda-info nil) @@ -2627,30 +2659,26 @@ extra Sting with extra planning info priority-l The priority letter if any was given priority-n The computed numerical priority agenda-day The day in the agenda where this is listed" - - (let (pars) - (while parameters - (push (list (pop parameters) (if parameters (pop parameters))) pars)) - (push (list 'org-agenda-remove-tags t) pars) + (org-eval-in-environment (append '((org-agenda-remove-tags t)) + (org-make-parameter-alist parameters)) (if (> (length cmd-key) 2) - (eval (list 'let (nreverse pars) - (list 'org-tags-view nil cmd-key))) - (eval (list 'let (nreverse pars) (list 'org-agenda nil cmd-key)))) - (set-buffer org-agenda-buffer-name) - (let* ((lines (org-split-string (buffer-string) "\n")) - line) - (while (setq line (pop lines)) - (catch 'next - (if (not (get-text-property 0 'org-category line)) (throw 'next nil)) - (setq org-agenda-info - (org-fix-agenda-info (text-properties-at 0 line))) - (princ - (org-encode-for-stdout - (mapconcat 'org-agenda-export-csv-mapper - '(org-category txt type todo tags date time extra - priority-letter priority agenda-day) - ","))) - (princ "\n")))))) + (org-tags-view nil cmd-key) + (org-agenda nil cmd-key))) + (set-buffer org-agenda-buffer-name) + (let* ((lines (org-split-string (buffer-string) "\n")) + line) + (while (setq line (pop lines)) + (catch 'next + (if (not (get-text-property 0 'org-category line)) (throw 'next nil)) + (setq org-agenda-info + (org-fix-agenda-info (text-properties-at 0 line))) + (princ + (mapconcat 'org-agenda-export-csv-mapper + '(org-category txt type todo tags date time extra + priority-letter priority agenda-day) + ",")) + (princ "\n"))))) +(def-edebug-spec org-batch-agenda-csv (form &rest sexp)) (defun org-fix-agenda-info (props) "Make sure all properties on an agenda item have a canonical form. @@ -2700,17 +2728,14 @@ This ensures the export commands can easily use it." (interactive) (eval (list 'org-batch-store-agenda-views))) -;; FIXME, why is this a macro????? ;;;###autoload (defmacro org-batch-store-agenda-views (&rest parameters) "Run all custom agenda commands that have a file argument." (let ((cmds (org-agenda-normalize-custom-commands org-agenda-custom-commands)) (pop-up-frames nil) (dir default-directory) - pars cmd thiscmdkey files opts cmd-or-set) - (while parameters - (push (list (pop parameters) (if parameters (pop parameters))) pars)) - (setq pars (reverse pars)) + (pars (org-make-parameter-alist parameters)) + cmd thiscmdkey files opts cmd-or-set) (save-window-excursion (while cmds (setq cmd (pop cmds) @@ -2720,15 +2745,17 @@ This ensures the export commands can easily use it." files (nth (if (listp cmd-or-set) 4 5) cmd)) (if (stringp files) (setq files (list files))) (when files - (eval (list 'let (append org-agenda-exporter-settings opts pars) - (list 'org-agenda nil thiscmdkey))) + (org-eval-in-environment (append org-agenda-exporter-settings + opts pars) + (org-agenda nil thiscmdkey)) (set-buffer org-agenda-buffer-name) (while files - (eval (list 'let (append org-agenda-exporter-settings opts pars) - (list 'org-write-agenda - (expand-file-name (pop files) dir) nil t)))) + (org-eval-in-environment (append org-agenda-exporter-settings + opts pars) + (org-agenda-write (expand-file-name (pop files) dir) nil t))) (and (get-buffer org-agenda-buffer-name) (kill-buffer org-agenda-buffer-name))))))) +(def-edebug-spec org-batch-store-agenda-views (&rest sexp)) (defun org-agenda-mark-header-line (pos) "Mark the line at POS as an agenda structure header." @@ -2741,11 +2768,12 @@ This ensures the export commands can easily use it." 'org-agenda-title-append org-agenda-title-append)))) (defvar org-mobile-creating-agendas) -(defun org-write-agenda (file &optional open nosettings) +(defvar org-agenda-write-buffer-name "Agenda View") +(defun org-agenda-write (file &optional open nosettings) "Write the current buffer (an agenda view) as a file. Depending on the extension of the file name, plain text (.txt), -HTML (.html or .htm) or PostScript (.ps) is produced. -If the extension is .ics, run iCalendar export over all files used +HTML (.html or .htm) or Postscript (.ps) is produced. +If the extension is .ics, run icalendar export over all files used to construct the agenda and limit the export to entries listed in the agenda now. With prefix argument OPEN, open the new file immediately. @@ -2763,7 +2791,7 @@ higher priority settings." (let ((bs (copy-sequence (buffer-string))) beg) (org-agenda-unmark-filtered-text) (with-temp-buffer - (rename-buffer "Agenda View" t) + (rename-buffer org-agenda-write-buffer-name t) (set-buffer-modified-p nil) (insert bs) (org-agenda-remove-marked-text 'org-filtered) @@ -2793,7 +2821,7 @@ higher priority settings." ((string-match "\\.ps\\'" file) (require 'ps-print) (ps-print-buffer-with-faces file) - (message "PostScript written to %s" file)) + (message "Postscript written to %s" file)) ((string-match "\\.pdf\\'" file) (require 'ps-print) (ps-print-buffer-with-faces @@ -2824,7 +2852,8 @@ higher priority settings." (set-buffer org-agenda-buffer-name)) (when open (org-open-file file))) -(defvar org-agenda-filter-overlays nil) +(defvar org-agenda-tag-filter-overlays nil) +(defvar org-agenda-cat-filter-overlays nil) (defun org-agenda-mark-filtered-text () "Mark all text hidden by filtering with a text property." @@ -2835,7 +2864,8 @@ higher priority settings." (put-text-property (overlay-start o) (overlay-end o) 'org-filtered t))) - org-agenda-filter-overlays))) + (append org-agenda-tag-filter-overlays + org-agenda-cat-filter-overlays)))) (defun org-agenda-unmark-filtered-text () "Remove the filtering text property." @@ -2882,7 +2912,7 @@ removed from the entry content. Currently only `planning' is allowed here." (let (txt drawer-re kwd-time-re ind) (save-excursion (with-current-buffer (marker-buffer marker) - (if (not (org-mode-p)) + (if (not (eq major-mode 'org-mode)) (setq txt "") (save-excursion (save-restriction @@ -2972,7 +3002,7 @@ removed from the entry content. Currently only `planning' is allowed here." (nreverse markers))) (defun org-create-marker-find-array (marker-list) - "Create an alist of files names with all marker positions in that file." + "Create a alist of files names with all marker positions in that file." (let (f tbl m a p) (while (setq m (pop marker-list)) (setq p (marker-position m) @@ -2997,8 +3027,8 @@ removed from the entry content. Currently only `planning' is allowed here." (member (point) (cdr a))))))) (defun org-check-for-org-mode () - "Make sure current buffer is in Org-mode. Error if not." - (or (org-mode-p) + "Make sure current buffer is in org-mode. Error if not." + (or (eq major-mode 'org-mode) (error "Cannot execute org-mode agenda command on buffer in %s" major-mode))) @@ -3018,9 +3048,10 @@ removed from the entry content. Currently only `planning' is allowed here." (defvar org-pre-agenda-window-conf nil) (defvar org-agenda-columns-active nil) (defvar org-agenda-name nil) -(defvar org-agenda-filter nil) -(defvar org-agenda-filter-while-redo nil) -(defvar org-agenda-filter-preset nil +(defvar org-agenda-tag-filter nil) +(defvar org-agenda-category-filter nil) +(defvar org-agenda-tag-filter-while-redo nil) +(defvar org-agenda-tag-filter-preset nil "A preset of the tags filter used for secondary agenda filtering. This must be a list of strings, each string must be a single tag preceded by \"+\" or \"-\". @@ -3030,13 +3061,25 @@ the entire agenda view. In a block agenda, it will not work reliably to define a filter for one of the individual blocks. You need to set it in the global options and expect it to be applied to the entire view.") +(defvar org-agenda-category-filter-preset nil + "A preset of the categeory filter used for secondary agenda filtering. +This must be a list of strings, each string must be a single category +preceded by \"+\" or \"-\". +This variable should not be set directly, but agenda custom commands can +bind it in the options section. The preset filter is a global property of +the entire agenda view. In a block agenda, it will not work reliably to +define a filter for one of the individual blocks. You need to set it in +the global options and expect it to be applied to the entire view.") + (defun org-prepare-agenda (&optional name) (setq org-todo-keywords-for-agenda nil) (setq org-done-keywords-for-agenda nil) (setq org-drawers-for-agenda nil) (unless org-agenda-persistent-filter - (setq org-agenda-filter nil)) - (put 'org-agenda-filter :preset-filter org-agenda-filter-preset) + (setq org-agenda-tag-filter nil + org-agenda-category-filter nil)) + (put 'org-agenda-tag-filter :preset-filter org-agenda-tag-filter-preset) + (put 'org-agenda-category-filter :preset-filter org-agenda-category-filter-preset) (if org-agenda-multi (progn (setq buffer-read-only nil) @@ -3065,7 +3108,7 @@ the global options and expect it to be applied to the entire view.") (awin (select-window awin)) ((not (setq org-pre-agenda-window-conf (current-window-configuration)))) ((equal org-agenda-window-setup 'current-window) - (switch-to-buffer abuf)) + (org-pop-to-buffer-same-window abuf)) ((equal org-agenda-window-setup 'other-window) (org-switch-to-buffer-other-window abuf)) ((equal org-agenda-window-setup 'other-frame) @@ -3076,7 +3119,7 @@ the global options and expect it to be applied to the entire view.") ;; additional test in case agenda is invoked from within agenda ;; buffer via elisp link (unless (equal (current-buffer) abuf) - (switch-to-buffer abuf))) + (org-pop-to-buffer-same-window abuf))) (setq buffer-read-only nil) (let ((inhibit-read-only t)) (erase-buffer)) (org-agenda-mode) @@ -3115,8 +3158,10 @@ the global options and expect it to be applied to the entire view.") (org-habit-insert-consistency-graphs)) (run-hooks 'org-finalize-agenda-hook) (setq org-agenda-type (org-get-at-bol 'org-agenda-type)) - (when (or org-agenda-filter (get 'org-agenda-filter :preset-filter)) - (org-agenda-filter-apply org-agenda-filter)) + (when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter)) + (org-agenda-filter-apply org-agenda-tag-filter 'tag)) + (when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter)) + (org-agenda-filter-apply org-agenda-category-filter 'category)) ))) (defun org-agenda-mark-clocking-task () @@ -3190,17 +3235,9 @@ the global options and expect it to be applied to the entire view.") (setq org-blocked-by-checkboxes nil invis1 invis) (let ((marker (org-get-at-bol 'org-hd-marker))) (when (and marker - (not (with-current-buffer (marker-buffer marker) - (save-excursion - (goto-char marker) - (if (org-entry-get nil "NOBLOCKING") - t ;; Never block this entry - (run-hook-with-args-until-failure - 'org-blocker-hook - (list :type 'todo-state-change - :position marker - :from 'todo - :to 'done))))))) + (with-current-buffer (marker-buffer marker) + (save-excursion (goto-char marker) + (org-entry-blocked-p)))) (if org-blocked-by-checkboxes (setq invis1 nil)) (setq b (if invis1 (max (point-min) (1- (point-at-bol))) @@ -3334,7 +3371,7 @@ no longer in use." (defvar org-agenda-only-exact-dates nil) ; dynamically scoped -(defun org-timeline (&optional include-all) +(defun org-timeline (&optional dotodo) "Show a time-sorted view of the entries in the current org file. Only entries with a time stamp of today or later will be listed. With \\[universal-argument] prefix, all unfinished TODO items will also be shown, @@ -3345,7 +3382,6 @@ dates." (org-compile-prefix-format 'timeline) (org-set-sorting-strategy 'timeline) (let* ((dopast t) - (dotodo include-all) (doclosed org-agenda-show-log) (entry (buffer-file-name (or (buffer-base-buffer (current-buffer)) (current-buffer)))) @@ -3364,7 +3400,7 @@ dates." (setq org-agenda-redo-command (list 'progn (list 'org-switch-to-buffer-other-window (current-buffer)) - (list 'org-timeline (list 'quote include-all)))) + (list 'org-timeline (list 'quote dotodo)))) (if (not dopast) ;; Remove past dates from the list of dates. (setq day-numbers (delq nil (mapcar (lambda(x) @@ -3432,22 +3468,26 @@ When EMPTY is non-nil, also include days without any entries." (let ((re (concat (if pre-re pre-re "") (if inactive org-ts-regexp-both org-ts-regexp))) - dates dates1 date day day1 day2 ts1 ts2) + dates dates1 date day day1 day2 ts1 ts2 pos) (if force-today (setq dates (list (org-today)))) (save-excursion (goto-char beg) (while (re-search-forward re end t) (setq day (time-to-days (org-time-string-to-time - (substring (match-string 1) 0 10)))) + (substring (match-string 1) 0 10) + (current-buffer) (match-beginning 0)))) (or (memq day dates) (push day dates))) (unless no-ranges (goto-char beg) (while (re-search-forward org-tr-regexp end t) + (setq pos (match-beginning 0)) (setq ts1 (substring (match-string 1) 0 10) ts2 (substring (match-string 2) 0 10) - day1 (time-to-days (org-time-string-to-time ts1)) - day2 (time-to-days (org-time-string-to-time ts2))) + day1 (time-to-days (org-time-string-to-time + ts1 (current-buffer) pos)) + day2 (time-to-days (org-time-string-to-time + ts2 (current-buffer) pos))) (while (< (setq day1 (1+ day1)) day2) (or (memq day1 dates) (push day1 dates))))) (setq dates (sort dates '<)) @@ -3472,7 +3512,7 @@ Custom commands can set this variable in the options section.") (defvar org-starting-day nil) ; local variable in the agenda buffer (defvar org-agenda-current-span nil "The current span used in the agenda view.") ; local variable in the agenda buffer -(defvar org-include-all-loc nil) ; local variable +(defvar org-arg-loc nil) ; local variable (defvar org-agenda-entry-types '(:deadline :scheduled :timestamp :sexp) "List of types searched for when creating the daily/weekly agenda. @@ -3508,29 +3548,29 @@ somewhat less efficient) way of determining what is included in the daily/weekly agenda, see `org-agenda-skip-function'.") ;;;###autoload -(defun org-agenda-list (&optional include-all start-day span) +(defun org-agenda-list (&optional arg start-day span) "Produce a daily/weekly view from all files in variable `org-agenda-files'. The view will be for the current day or week, but from the overview buffer you will be able to go to other days/weeks. With a numeric prefix argument in an interactive call, the agenda will -span INCLUDE-ALL days. Lisp programs should instead specify SPAN to change +span ARG days. Lisp programs should instead specify SPAN to change the number of days. SPAN defaults to `org-agenda-span'. START-DAY defaults to TODAY, or to the most recent match for the weekday given in `org-agenda-start-on-weekday'." (interactive "P") - (if (and (integerp include-all) (> include-all 0)) - (setq span include-all include-all nil)) + (if (and (integerp arg) (> arg 0)) + (setq span arg arg nil)) (setq start-day (or start-day org-agenda-start-day)) (if org-agenda-overriding-arguments - (setq include-all (car org-agenda-overriding-arguments) + (setq arg (car org-agenda-overriding-arguments) start-day (nth 1 org-agenda-overriding-arguments) span (nth 2 org-agenda-overriding-arguments))) (if (stringp start-day) ;; Convert to an absolute day number (setq start-day (time-to-days (org-read-date nil t start-day)))) - (setq org-agenda-last-arguments (list include-all start-day span)) + (setq org-agenda-last-arguments (list arg start-day span)) (org-compile-prefix-format 'agenda) (org-set-sorting-strategy 'agenda) (let* ((span (org-agenda-ndays-to-span @@ -3557,7 +3597,7 @@ given in `org-agenda-start-on-weekday'." s e rtn rtnall file date d start-pos end-pos todayp clocktable-start clocktable-end filter) (setq org-agenda-redo-command - (list 'org-agenda-list (list 'quote include-all) start-day (list 'quote span))) + (list 'org-agenda-list (list 'quote arg) start-day (list 'quote span))) (dotimes (n (1- ndays)) (push (1+ (car day-numbers)) day-numbers)) (setq day-numbers (nreverse day-numbers)) @@ -3565,7 +3605,7 @@ given in `org-agenda-start-on-weekday'." clocktable-end (1+ (or (org-last day-numbers) 0))) (org-prepare-agenda "Day/Week") (org-set-local 'org-starting-day (car day-numbers)) - (org-set-local 'org-include-all-loc include-all) + (org-set-local 'org-arg-loc arg) (org-set-local 'org-agenda-current-span (org-agenda-ndays-to-span span)) (unless org-agenda-compact-blocks (let* ((d1 (car day-numbers)) @@ -3616,7 +3656,7 @@ given in `org-agenda-start-on-weekday'." (setq rtn (apply 'org-agenda-get-day-entries file date org-agenda-entry-types))))) - (setq rtnall (append rtnall rtn)))) + (setq rtnall (append rtnall rtn)))) ;; all entries (if org-agenda-include-diary (let ((org-agenda-search-headline-for-time t)) (require 'diary-lib) @@ -3638,7 +3678,7 @@ given in `org-agenda-start-on-weekday'." (put-text-property s (1- (point)) 'org-day-cnt day-cnt) (when todayp (put-text-property s (1- (point)) 'org-today t)) - (if rtnall (insert + (if rtnall (insert ;; all entries (org-finalize-agenda-entries (org-agenda-add-time-grid-maybe rtnall ndays todayp)) @@ -3655,8 +3695,8 @@ given in `org-agenda-start-on-weekday'." (setq p (plist-put p :tend clocktable-end)) (setq p (plist-put p :scope 'agenda)) (when (and (eq org-agenda-clockreport-mode 'with-filter) - (setq filter (or org-agenda-filter-while-redo - (get 'org-agenda-filter :preset-filter)))) + (setq filter (or org-agenda-tag-filter-while-redo + (get 'org-agenda-tag-filter :preset-filter)))) (setq p (plist-put p :tags (mapconcat (lambda (x) (if (string-match "[<>=]" x) "" @@ -3715,9 +3755,9 @@ given in `org-agenda-start-on-weekday'." (defvar org-todo-only nil) (defvar org-search-syntax-table nil - "Special syntax table for Org-mode search. -In this table, we have single quotes not as word constituents, so -that when \"+Ameli\" is searched as a word, it will also match \"Ameli's\"") + "Special syntax table for org-mode search. +In this table, we have single quotes not as word constituents, to +that when \"+Ameli\" is searched as a work, it will also match \"Ameli's\"") (defun org-search-syntax-table () (unless org-search-syntax-table @@ -3786,7 +3826,7 @@ in `org-agenda-text-search-extra-files'." (full-words org-agenda-search-view-force-full-words) (org-agenda-text-search-extra-files org-agenda-text-search-extra-files) regexp rtn rtnall files file pos - marker category tags c neg re boolean + marker category org-category-pos tags c neg re boolean ee txt beg end words regexps+ regexps- hdl-only buffer beg1 str) (unless (and (not edit-at) (stringp string) @@ -3869,7 +3909,7 @@ in `org-agenda-text-search-extra-files'." (if (not regexps+) (setq regexp org-outline-regexp-bol) (setq regexp (pop regexps+)) - (if hdl-only (setq regexp (concat "^" org-outline-regexp ".*?" + (if hdl-only (setq regexp (concat org-outline-regexp-bol ".*?" regexp)))) (setq files (org-agenda-files nil 'ifmode)) (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives) @@ -3890,7 +3930,7 @@ in `org-agenda-text-search-extra-files'." file)))) (with-current-buffer buffer (with-syntax-table (org-search-syntax-table) - (unless (org-mode-p) + (unless (eq major-mode 'org-mode) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion @@ -3900,7 +3940,7 @@ in `org-agenda-text-search-extra-files'." org-agenda-restrict-end) (widen)) (goto-char (point-min)) - (unless (or (org-on-heading-p) + (unless (or (org-at-heading-p) (outline-next-heading)) (throw 'nextfile t)) (goto-char (max (point-min) (1- (point)))) @@ -3930,8 +3970,9 @@ in `org-agenda-text-search-extra-files'." (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) + org-category-pos (get-text-property (point) 'org-category-position) tags (org-get-tags-at (point)) - txt (org-format-agenda-item + txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 (point-at-eol)) @@ -3941,6 +3982,7 @@ in `org-agenda-text-search-extra-files'." 'org-todo-regexp org-todo-regexp 'org-complex-heading-regexp org-complex-heading-regexp 'priority 1000 'org-category category + 'org-category-position org-category-pos 'type "search") (push txt ee) (goto-char (1- end)))))))))) @@ -4081,7 +4123,7 @@ The prefix arg TODO-ONLY limits the search to TODO entries." (format "ORG-AGENDA-ERROR: No such org-file %s" file)) rtnall (append rtnall rtn)) (with-current-buffer buffer - (unless (org-mode-p) + (unless (eq major-mode 'org-mode) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction @@ -4305,8 +4347,8 @@ of what a project is and how to check if it stuck, customize the variable "\\)\\>")) (tags (nth 2 org-stuck-projects)) (tags-re (if (member "*" tags) - (org-re (concat org-outline-regexp-bol - ".*:[[:alnum:]_@#%]+:[ \t]*$")) + (concat org-outline-regexp-bol + (org-re ".*:[[:alnum:]_@#%]+:[ \t]*$")) (if tags (concat org-outline-regexp-bol ".*:\\(" @@ -4380,7 +4422,7 @@ of what a project is and how to check if it stuck, customize the variable (setq entries (mapcar (lambda (x) - (setq x (org-format-agenda-item "" x "Diary" nil 'time)) + (setq x (org-agenda-format-item "" x "Diary" nil 'time)) ;; Extend the text properties to the beginning of the line (org-add-props x (text-properties-at (1- (length x)) x) 'type "diary" 'date date 'face 'org-agenda-diary)) @@ -4425,7 +4467,7 @@ date. It also removes lines that contain only whitespace." (setq string (org-modify-diary-entry-string string)))))) (defun org-modify-diary-entry-string (string) - "Add text properties to string, allowing Org-mode to act on it." + "Add text properties to string, allowing org-mode to act on it." (org-add-props string nil 'mouse-face 'highlight 'help-echo (if buffer-file-name @@ -4525,7 +4567,7 @@ the documentation of `org-diary'." ;; If file does not exist, make sure an error message ends up in diary (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) (with-current-buffer buffer - (unless (org-mode-p) + (unless (eq major-mode 'org-mode) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search nil)) (save-excursion @@ -4562,6 +4604,7 @@ the documentation of `org-diary'." (setq results (append results rtn)))))))) results)))) +(defvar org-heading-keyword-regexp-format) ; defined in org.el (defun org-agenda-get-todos () "Return the TODO information for agenda display." (let* ((props (list 'face nil @@ -4573,16 +4616,20 @@ the documentation of `org-diary'." 'help-echo (format "mouse-2 or RET jump to org file %s" (abbreviate-file-name buffer-file-name)))) - (regexp (concat "^\\*+[ \t]+\\(" - (if org-select-this-todo-keyword - (if (equal org-select-this-todo-keyword "*") - org-todo-regexp - (concat "\\<\\(" - (mapconcat 'identity (org-split-string org-select-this-todo-keyword "|") "\\|") - "\\)\\>")) - org-not-done-regexp) - "[^\n\r]*\\)")) - marker priority category tags todo-state + (regexp (format org-heading-keyword-regexp-format + (cond + ((and org-select-this-todo-keyword + (equal org-select-this-todo-keyword "*")) + org-todo-regexp) + (org-select-this-todo-keyword + (concat "\\(" + (mapconcat 'identity + (org-split-string + org-select-this-todo-keyword + "|") + "\\|") "\\)")) + (t org-not-done-regexp)))) + marker priority category org-category-pos tags todo-state ee txt beg end) (goto-char (point-min)) (while (re-search-forward regexp nil t) @@ -4595,21 +4642,24 @@ the documentation of `org-diary'." (goto-char (1+ beg)) (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible)) (throw :skip nil))) - (goto-char (match-beginning 1)) + (goto-char (match-beginning 2)) (setq marker (org-agenda-new-marker (match-beginning 0)) category (org-get-category) - txt (match-string 1) + org-category-pos (get-text-property (point) 'org-category-position) + txt (org-trim + (buffer-substring (match-beginning 2) (match-end 0))) tags (org-get-tags-at (point)) - txt (org-format-agenda-item "" txt category tags) + txt (org-agenda-format-item "" txt category tags) priority (1+ (org-get-priority txt)) todo-state (org-get-todo-state)) (org-add-props txt props 'org-marker marker 'org-hd-marker marker 'priority priority 'org-category category + 'org-category-position org-category-pos 'type "todo" 'todo-state todo-state) (push txt ee) (if org-agenda-todo-list-sublevels - (goto-char (match-end 1)) + (goto-char (match-end 2)) (org-end-of-subtree 'invisible)))) (nreverse ee))) @@ -4691,7 +4741,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (defun org-agenda-get-timestamps () "Return the date stamp information for agenda display." - (let* ((props (list 'face nil + (let* ((props (list 'face 'org-agenda-calendar-event 'org-not-done-regexp org-not-done-regexp 'org-todo-regexp org-todo-regexp 'org-complex-heading-regexp org-complex-heading-regexp @@ -4720,8 +4770,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', "\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)" "\\|\\(<%%\\(([^>\n]+)\\)>\\)")) marker hdmarker deadlinep scheduledp clockp closedp inactivep - donep tmp priority category ee txt timestr tags b0 b3 e3 head - todo-state end-of-match show-all) + donep tmp priority category org-category-pos ee txt timestr tags + b0 b3 e3 head todo-state end-of-match show-all) (goto-char (point-min)) (while (setq end-of-match (re-search-forward regexp nil t)) (setq b0 (match-beginning 0) @@ -4735,7 +4785,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (org-agenda-skip) (if (and (match-end 1) (not (= d1 (org-time-string-to-absolute - (match-string 1) d1 nil show-all)))) + (match-string 1) d1 nil show-all + (current-buffer) b0)))) (throw :skip nil)) (if (and e3 (not (org-diary-sexp-entry (buffer-substring b3 e3) "" date))) @@ -4760,7 +4811,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', ;; substring should only run to end of time stamp (setq timestr (substring timestr 0 (match-end 0)))) (setq marker (org-agenda-new-marker b0) - category (org-get-category b0)) + category (org-get-category b0) + org-category-pos (get-text-property b0 'org-category-position)) (save-excursion (if (not (re-search-backward org-outline-regexp-bol nil t)) (setq txt org-agenda-no-heading-message) @@ -4769,7 +4821,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', tags (org-get-tags-at)) (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") (setq head (or (match-string 1) "")) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item (if inactivep org-agenda-inactive-leader nil) head category tags timestr remove-re))) @@ -4778,6 +4830,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', 'org-marker marker 'org-hd-marker hdmarker) (org-add-props txt nil 'priority priority 'org-category category 'date date + 'org-category-position org-category-pos 'todo-state todo-state 'type "timestamp") (push txt ee)) @@ -4789,13 +4842,14 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (defun org-agenda-get-sexps () "Return the sexp information for agenda display." (require 'diary-lib) - (let* ((props (list 'mouse-face 'highlight + (let* ((props (list 'face 'org-agenda-calendar-sexp + 'mouse-face 'highlight 'help-echo (format "mouse-2 or RET jump to org file %s" (abbreviate-file-name buffer-file-name)))) (regexp "^&?%%(") - marker category ee txt tags entry result beg b sexp sexp-entry - todo-state) + marker category org-category-pos ee txt tags entry + result beg b sexp sexp-entry todo-state) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip @@ -4812,6 +4866,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (when result (setq marker (org-agenda-new-marker beg) category (org-get-category beg) + org-category-pos (get-text-property beg 'org-category-position) todo-state (org-get-todo-state)) (dolist (r (if (stringp result) @@ -4821,11 +4876,12 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (setq txt r) (setq txt "SEXP entry returned empty string")) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item "" txt category tags 'time)) (org-add-props txt props 'org-marker marker) (org-add-props txt nil 'org-category category 'date date 'todo-state todo-state + 'org-category-position org-category-pos 'type "sexp") (push txt ee))))) (nreverse ee))) @@ -4860,9 +4916,11 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', ;; Define the` org-class' function (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks) "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS. -DAYNAME is a number between 0 (Sunday) and 6 (Saturday). SKIP-WEEKS -is any number of ISO weeks in the block period for which the item should -be skipped." +DAYNAME is a number between 0 (Sunday) and 6 (Saturday). +SKIP-WEEKS is any number of ISO weeks in the block period for which the +item should be skipped. If any of the SKIP-WEEKS arguments is the symbol +`holidays', then any date that is known by the Emacs calendar to be a +holidy will also be skipped." (let* ((date1 (calendar-absolute-from-gregorian (list m1 d1 y1))) (date2 (calendar-absolute-from-gregorian (list m2 d2 y2))) (d (calendar-absolute-from-gregorian date))) @@ -4874,6 +4932,8 @@ be skipped." (progn (require 'cal-iso) (not (member (car (calendar-iso-from-absolute d)) skip-weeks)))) + (not (and (memq 'holidays skip-weeks) + (calendar-check-holidays date))) entry))) (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks) @@ -4894,6 +4954,7 @@ please use `org-class' instead." (nth 2 date1) (car date1) (nth 1 date1) (nth 2 date2) (car date2) (nth 1 date2) dayname skip-weeks))) +(make-obsolete 'org-diary-class 'org-class "") (defalias 'org-get-closed 'org-agenda-get-progress) (defun org-agenda-get-progress () @@ -4929,8 +4990,8 @@ please use `org-class' instead." (list 0 0 0 (nth 1 date) (car date) (nth 2 date)))) 1 11)))) (org-agenda-search-headline-for-time nil) - marker hdmarker priority category tags closedp statep clockp state - ee txt extra timestr rest clocked) + marker hdmarker priority category org-category-pos tags closedp + statep clockp state ee txt extra timestr rest clocked) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip @@ -4941,14 +5002,15 @@ please use `org-class' instead." clockp (not (or closedp statep)) state (and statep (match-string 2)) category (org-get-category (match-beginning 0)) - timestr (buffer-substring (match-beginning 0) (point-at-eol)) - ) + org-category-pos (get-text-property (match-beginning 0) 'org-category-position) + timestr (buffer-substring (match-beginning 0) (point-at-eol))) (when (string-match "\\]" timestr) ;; substring should only run to end of time stamp (setq rest (substring timestr (match-end 0)) timestr (substring timestr 0 (match-end 0))) (if (and (not closedp) (not statep) - (string-match "\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)\\].*?\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)" rest)) + (string-match "\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)\\].*?\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)" + rest)) (progn (setq timestr (concat (substring timestr 0 -1) "-" (match-string 1 rest) "]")) (setq clocked (match-string 2 rest))) @@ -4975,7 +5037,7 @@ please use `org-class' instead." (setq txt (concat (substring txt 0 (match-beginning 1)) " - " extra " " (match-string 2 txt))) (setq txt (concat txt " - " extra)))) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item (cond (closedp "Closed: ") (statep (concat "State: (" state ")")) @@ -4985,6 +5047,7 @@ please use `org-class' instead." (org-add-props txt props 'org-marker marker 'org-hd-marker hdmarker 'face 'org-agenda-done 'priority priority 'org-category category + 'org-category-position org-category-pos 'type "closed" 'date date 'undone-face 'org-warning 'done-face 'org-agenda-done) (push txt ee)) @@ -5059,7 +5122,7 @@ See also the user option `org-agenda-clock-consistency-checks'." (/ (- tlend ts) 60)) face (or (plist-get pl :overlap-face) face))) ((and (> tlend 0) (> ts (+ tlend (* 60 maxgap)))) - ;; There is a gap, let's see if we need to report it + ;; There is a gap, lets see if we need to report it (unless (org-agenda-check-clock-gap tlend ts gapok) (setq issue (format "Clocking gap: %d minutes" (/ (- ts tlend) 60)) @@ -5122,9 +5185,9 @@ See also the user option `org-agenda-clock-consistency-checks'." (regexp org-deadline-time-regexp) (todayp (org-agenda-todayp date)) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar - d2 diff dfrac wdays pos pos1 category tags - suppress-prewarning - ee txt head face s todo-state show-all upcomingp donep timestr) + d2 diff dfrac wdays pos pos1 category org-category-pos + tags suppress-prewarning ee txt head face s todo-state + show-all upcomingp donep timestr) (goto-char (point-min)) (while (re-search-forward regexp nil t) (setq suppress-prewarning nil) @@ -5147,13 +5210,14 @@ See also the user option `org-agenda-clock-consistency-checks'." (member todo-state org-agenda-repeating-timestamp-show-all)) d2 (org-time-string-to-absolute - (match-string 1) d1 'past show-all) + (match-string 1) d1 'past show-all + (current-buffer) pos) diff (- d2 d1) wdays (if suppress-prewarning (let ((org-deadline-warning-days suppress-prewarning)) (org-get-wdays s)) (org-get-wdays s)) - dfrac (/ (* 1.0 (- wdays diff)) (max wdays 1)) + dfrac (- 1 (/ (* 1.0 diff) (max wdays 1))) upcomingp (and todayp (> diff 0))) ;; When to show a deadline in the calendar: ;; If the expiration is within wdays warning time. @@ -5168,7 +5232,8 @@ See also the user option `org-agenda-clock-consistency-checks'." (or org-agenda-skip-deadline-if-done (not (= diff 0)))) (setq txt nil) - (setq category (org-get-category)) + (setq category (org-get-category) + org-category-pos (get-text-property (point) 'org-category-position)) (if (not (re-search-backward "^\\*+[ \t]+" nil t)) (setq txt org-agenda-no-heading-message) (goto-char (match-end 0)) @@ -5182,7 +5247,7 @@ See also the user option `org-agenda-clock-consistency-checks'." (setq timestr (concat (substring s (match-beginning 1)) " ")) (setq timestr 'time)) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item (if (= diff 0) (car org-agenda-deadline-leaders) (if (functionp @@ -5195,13 +5260,14 @@ See also the user option `org-agenda-clock-consistency-checks'." head category tags (if (not (= diff 0)) nil timestr))))) (when txt - (setq face (org-agenda-deadline-face dfrac wdays)) + (setq face (org-agenda-deadline-face dfrac)) (org-add-props txt props 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker pos1) 'priority (+ (- diff) (org-get-priority txt)) 'org-category category + 'org-category-position org-category-pos 'todo-state todo-state 'type (if upcomingp "upcoming-deadline" "deadline") 'date (if upcomingp date d2) @@ -5210,10 +5276,9 @@ See also the user option `org-agenda-clock-consistency-checks'." (push txt ee)))))) (nreverse ee))) -(defun org-agenda-deadline-face (fraction &optional wdays) +(defun org-agenda-deadline-face (fraction) "Return the face to displaying a deadline item. FRACTION is what fraction of the head-warning time has passed." - (if (equal wdays 0) (setq fraction 1.)) (let ((faces org-agenda-deadline-faces) f) (catch 'exit (while (setq f (pop faces)) @@ -5238,7 +5303,7 @@ FRACTION is what fraction of the head-warning time has passed." 0 'org-hd-marker a)) (cons (marker-position mm) a))) deadline-results)) - d2 diff pos pos1 category tags donep + d2 diff pos pos1 category org-category-pos tags donep ee txt head pastschedp todo-state face timestr s habitp show-all) (goto-char (point-min)) (while (re-search-forward regexp nil t) @@ -5252,7 +5317,8 @@ FRACTION is what fraction of the head-warning time has passed." (member todo-state org-agenda-repeating-timestamp-show-all)) d2 (org-time-string-to-absolute - (match-string 1) d1 'past show-all) + (match-string 1) d1 'past show-all + (current-buffer) pos) diff (- d2 d1)) (setq pastschedp (and todayp (< diff 0))) ;; When to show a scheduled item in the calendar: @@ -5271,7 +5337,8 @@ FRACTION is what fraction of the head-warning time has passed." (setq txt nil) (setq habitp (and (functionp 'org-is-habit-p) (org-is-habit-p))) - (setq category (org-get-category)) + (setq category (org-get-category) + org-category-pos (get-text-property (point) 'org-category-position)) (if (not (re-search-backward "^\\*+[ \t]+" nil t)) (setq txt org-agenda-no-heading-message) (goto-char (match-end 0)) @@ -5295,7 +5362,7 @@ FRACTION is what fraction of the head-warning time has passed." (setq timestr (concat (substring s (match-beginning 1)) " ")) (setq timestr 'time)) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item (if (= diff 0) (car org-agenda-scheduled-leaders) (format (nth 1 org-agenda-scheduled-leaders) @@ -5322,6 +5389,7 @@ FRACTION is what fraction of the head-warning time has passed." (org-habit-get-priority habitp) (+ 94 (- 5 diff) (org-get-priority txt))) 'org-category category + 'org-category-position org-category-pos 'org-habit-p habitp 'todo-state todo-state) (push txt ee)))))) @@ -5339,8 +5407,8 @@ FRACTION is what fraction of the head-warning time has passed." (abbreviate-file-name buffer-file-name)))) (regexp org-tr-regexp) (d0 (calendar-absolute-from-gregorian date)) - marker hdmarker ee txt d1 d2 s1 s2 category todo-state tags pos - head donep) + marker hdmarker ee txt d1 d2 s1 s2 category org-category-pos + todo-state tags pos head donep) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip @@ -5350,8 +5418,8 @@ FRACTION is what fraction of the head-warning time has passed." (end-time (match-string 2))) (setq s1 (match-string 1) s2 (match-string 2) - d1 (time-to-days (org-time-string-to-time s1)) - d2 (time-to-days (org-time-string-to-time s2))) + d1 (time-to-days (org-time-string-to-time s1 (current-buffer) pos)) + d2 (time-to-days (org-time-string-to-time s2 (current-buffer) pos))) (if (and (> (- d0 d1) -1) (> (- d2 d0) -1)) ;; Only allow days between the limits, because the normal ;; date stamps will catch the limits. @@ -5361,7 +5429,8 @@ FRACTION is what fraction of the head-warning time has passed." (if (and donep org-agenda-skip-timestamp-if-done) (throw :skip t)) (setq marker (org-agenda-new-marker (point))) - (setq category (org-get-category)) + (setq category (org-get-category) + org-category-pos (get-text-property (point) 'org-category-position)) (if (not (re-search-backward org-outline-regexp-bol nil t)) (setq txt org-agenda-no-heading-message) (goto-char (match-beginning 0)) @@ -5376,13 +5445,15 @@ FRACTION is what fraction of the head-warning time has passed." "--" "<" (regexp-quote s2) ".*?>") nil))) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item (format (nth (if (= d1 d2) 0 1) org-agenda-timerange-leaders) (1+ (- d0 d1)) (1+ (- d2 d1))) head category tags - (cond ((= d1 d0) + (cond ((and (= d1 d0) (= d2 d0)) + (concat "<" start-time ">--<" end-time ">")) + ((= d1 d0) (concat "<" start-time ">")) ((= d2 d0) (concat "<" end-time ">")) @@ -5392,7 +5463,8 @@ FRACTION is what fraction of the head-warning time has passed." 'org-marker marker 'org-hd-marker hdmarker 'type "block" 'date date 'todo-state todo-state - 'priority (org-get-priority txt) 'org-category category) + 'priority (org-get-priority txt) 'org-category category + 'org-category-position org-category-pos) (push txt ee)))) (goto-char pos))) ;; Sort the entries by expiration date. @@ -5422,7 +5494,7 @@ The flag is set if the currently compiled format contains a `%e'.") (return (cadr entry)) (return (apply 'create-image (cdr entry))))))) -(defun org-format-agenda-item (extra txt &optional category tags dotime +(defun org-agenda-format-item (extra txt &optional category tags dotime remove-re habitp) "Format TXT to be inserted into the agenda buffer. In particular, it adds the prefix and corresponding text properties. EXTRA @@ -5464,7 +5536,7 @@ Any match of REMOVE-RE will be removed from TXT." (time-of-day (and dotime (org-get-time-of-day ts))) stamp plain s0 s1 s2 rtn srp l duration thecategory) - (and (org-mode-p) buffer-file-name + (and (eq major-mode 'org-mode) buffer-file-name (add-to-list 'org-agenda-contributing-files buffer-file-name)) (when (and dotime time-of-day) ;; Extract starting and ending time and move them to prefix @@ -5512,7 +5584,7 @@ Any match of REMOVE-RE will be removed from TXT." (concat (make-string (max (- 50 (length txt)) 1) ?\ ) (match-string 2 txt)) t t txt)))) - (when (org-mode-p) + (when (eq major-mode 'org-mode) (setq effort (condition-case nil (org-get-effort @@ -5642,14 +5714,14 @@ The modified list may contain inherited tags, and tags matched by (while (setq time (pop gridtimes)) (unless (and remove (member time have)) (setq time (replace-regexp-in-string " " "0" (format "%04s" time))) - (push (org-format-agenda-item + (push (org-agenda-format-item nil string "" nil (concat (substring time 0 -2) ":" (substring time -2))) new) (put-text-property 2 (length (car new)) 'face 'org-time-grid (car new)))) (when (and todayp org-agenda-show-current-time-in-grid) - (push (org-format-agenda-item + (push (org-agenda-format-item nil org-agenda-current-time-string "" nil @@ -5667,7 +5739,8 @@ The modified list may contain inherited tags, and tags matched by The resulting form is returned and stored in the variable `org-prefix-format-compiled'." (setq org-prefix-has-time nil org-prefix-has-tag nil - org-prefix-category-length nil org-prefix-has-effort nil) + org-prefix-category-length nil + org-prefix-has-effort nil) (let ((s (cond ((stringp org-agenda-prefix-format) org-agenda-prefix-format) @@ -5779,7 +5852,7 @@ could bind the variable in the options section of a custom command.") (defun org-agenda-highlight-todo (x) (let ((org-done-keywords org-done-keywords-for-agenda) (case-fold-search nil) - re) + re) (if (eq x 'line) (save-excursion (beginning-of-line 1) @@ -5800,13 +5873,13 @@ could bind the variable in the options section of a custom command.") (add-text-properties (or (match-end 1) (match-end 0)) (match-end 0) (list 'face (org-get-todo-face (match-string 2 x))) - x) + x) (when (match-end 1) (setq x (concat (substring x 0 (match-end 1)) (format org-agenda-todo-keyword-format (match-string 2 x)) - (org-add-props " " (text-properties-at 0 x)) - (substring x (match-end 3))))))) + (org-add-props " " (text-properties-at 0 x)) + (substring x (match-end 3))))))) x))) (defsubst org-cmp-priority (a b) @@ -5818,7 +5891,7 @@ could bind the variable in the options section of a custom command.") (t nil)))) (defsubst org-cmp-effort (a b) - "Compare the priorities of string A and B." + "Compare the effort values of string A and B." (let* ((def (if org-sort-agenda-noeffort-is-high 32767 -1)) (ea (or (get-text-property 1 'effort-minutes a) def)) (eb (or (get-text-property 1 'effort-minutes b) def))) @@ -6081,29 +6154,45 @@ in the agenda." When this is the global TODO list, a prefix argument will be interpreted." (interactive) (let* ((org-agenda-keep-modes t) - (filter org-agenda-filter) - (preset (get 'org-agenda-filter :preset-filter)) - (org-agenda-filter-while-redo (or filter preset)) + (tag-filter org-agenda-tag-filter) + (tag-preset (get 'org-agenda-tag-filter :preset-filter)) + (cat-filter org-agenda-category-filter) + (cat-preset (get 'org-agenda-category-filter :preset-filter)) + (org-agenda-tag-filter-while-redo (or tag-filter tag-preset)) (cols org-agenda-columns-active) (line (org-current-line)) (window-line (- line (org-current-line (window-start)))) (lprops (get 'org-agenda-redo-command 'org-lprops))) - (put 'org-agenda-filter :preset-filter nil) + (put 'org-agenda-tag-filter :preset-filter nil) + (put 'org-agenda-category-filter :preset-filter nil) (and cols (org-columns-quit)) (message "Rebuilding agenda buffer...") (org-let lprops '(eval org-agenda-redo-command)) (setq org-agenda-undo-list nil org-agenda-pending-undo-list nil) (message "Rebuilding agenda buffer...done") - (put 'org-agenda-filter :preset-filter preset) - (and (or filter preset) (org-agenda-filter-apply filter)) + (put 'org-agenda-tag-filter :preset-filter tag-preset) + (put 'org-agenda-category-filter :preset-filter cat-preset) + (and (or tag-filter tag-preset) (org-agenda-filter-apply tag-filter 'tag)) + (and (or cat-filter cat-preset) (org-agenda-filter-apply cat-filter 'category)) (and cols (org-called-interactively-p 'any) (org-agenda-columns)) (org-goto-line line) (recenter window-line))) - (defvar org-global-tags-completion-table nil) (defvar org-agenda-filter-form nil) + +(defun org-agenda-filter-by-category (strip) + "Keep only those lines in the agenda buffer that have a specific category. +The category is that of the current line." + (interactive "P") + (if org-agenda-filtered-by-category + (org-agenda-filter-show-all-cat) + (let ((cat (org-no-properties (get-text-property (point) 'org-category)))) + (if cat (org-agenda-filter-apply + (list (concat (if strip "-" "+") cat)) 'category) + (error "No category at point"))))) + (defun org-agenda-filter-by-tag (strip &optional char narrow) "Keep only those lines in the agenda buffer that have a specific tag. The tag is selected with its fast selection letter, as configured. @@ -6127,21 +6216,21 @@ to switch to narrowing." (effort-op org-agenda-filter-effort-default-operator) (effort-prompt "") (inhibit-read-only t) - (current org-agenda-filter) + (current org-agenda-tag-filter) maybe-refresh a n tag) (unless char (message "%s by tag [%s ], [TAB], %s[/]:off, [+-]:narrow, [>==<]:effort: " tag-chars) - (setq char (read-char))) + (setq char (read-char-exclusive))) (when (member char '(?< ?> ?= ??)) ;; An effort operator (setq effort-op (char-to-string char)) @@ -6154,7 +6243,7 @@ to switch to narrowing." (if (= i 9) "0" (int-to-string (1+ i))) "]" (nth i efforts)))) (message "Effort%s: %s " effort-op effort-prompt) - (setq char (read-char)) + (setq char (read-char-exclusive)) (when (or (< char ?0) (> char ?9)) (error "Need 1-9,0 to select effort" )))) (when (equal char ?\t) @@ -6166,20 +6255,26 @@ to switch to narrowing." "Tag: " org-global-tags-completion-table)))) (cond ((equal char ?\r) - (org-agenda-filter-by-tag-show-all) + (org-agenda-filter-show-all-tag) (when org-agenda-auto-exclude-function - (setq org-agenda-filter '()) + (setq org-agenda-tag-filter '()) (dolist (tag (org-agenda-get-represented-tags)) (let ((modifier (funcall org-agenda-auto-exclude-function tag))) (if modifier - (push modifier org-agenda-filter)))) - (if (not (null org-agenda-filter)) - (org-agenda-filter-apply org-agenda-filter))) + (push modifier org-agenda-tag-filter)))) + (if (not (null org-agenda-tag-filter)) + (org-agenda-filter-apply org-agenda-tag-filter 'tag))) (setq maybe-refresh t)) ((equal char ?/) - (org-agenda-filter-by-tag-show-all) - (when (get 'org-agenda-filter :preset-filter) - (org-agenda-filter-apply org-agenda-filter)) + (org-agenda-filter-show-all-tag) + (when (get 'org-agenda-tag-filter :preset-filter) + (org-agenda-filter-apply org-agenda-tag-filter 'tag)) + (setq maybe-refresh t)) + ((equal char ?. ) + (setq org-agenda-tag-filter + (mapcar (lambda(tag) (concat "+" tag)) + (org-get-at-bol 'tags))) + (org-agenda-filter-apply org-agenda-tag-filter 'tag) (setq maybe-refresh t)) ((or (equal char ?\ ) (setq a (rassoc char alist)) @@ -6191,12 +6286,12 @@ to switch to narrowing." (setq tag "?eff") a (cons tag nil)) (and tag (setq a (cons tag nil)))) - (org-agenda-filter-by-tag-show-all) + (org-agenda-filter-show-all-tag) (setq tag (car a)) - (setq org-agenda-filter + (setq org-agenda-tag-filter (cons (concat (if strip "-" "+") tag) (if narrow current nil))) - (org-agenda-filter-apply org-agenda-filter) + (org-agenda-filter-apply org-agenda-tag-filter 'tag) (setq maybe-refresh t)) (t (error "Invalid tag selection character %c" char))) (when (and maybe-refresh @@ -6215,15 +6310,17 @@ to switch to narrowing." tags)) (defun org-agenda-filter-by-tag-refine (strip &optional char) - "Refine the current filter. See `org-agenda-filter-by-tag." + "Refine the current filter. See `org-agenda-filter-by-tag'." (interactive "P") (org-agenda-filter-by-tag strip char 'refine)) (defun org-agenda-filter-make-matcher () - "Create the form that tests a line for the agenda filter." + "Create the form that tests a line for agenda filter." (let (f f1) - (dolist (x (append (get 'org-agenda-filter :preset-filter) - org-agenda-filter)) + ;; first compute the tag-filter matcher + (dolist (x (delete-dups + (append (get 'org-agenda-tag-filter + :preset-filter) org-agenda-tag-filter))) (if (member x '("-" "+")) (setq f1 (if (equal x "-") 'tags '(not tags))) (if (string-match "[<=>?]" x) @@ -6232,6 +6329,12 @@ to switch to narrowing." (if (equal (string-to-char x) ?-) (setq f1 (list 'not f1)))) (push f1 f)) + ;; then compute the category-filter matcher + (dolist (x (delete-dups + (append (get 'org-agenda-category-filter + :preset-filter) org-agenda-category-filter))) + (setq f1 (list 'equal (substring x 1) 'cat)) + (push f1 f)) (cons 'and (nreverse f)))) (defun org-agenda-filter-effort-form (e) @@ -6256,49 +6359,64 @@ If the line does not have an effort defined, return nil." (funcall op (or eff (if org-sort-agenda-noeffort-is-high 32767 0)) value)))) -(defun org-agenda-filter-apply (filter) +(defvar org-agenda-filtered-by-category nil) +(defun org-agenda-filter-apply (filter type) "Set FILTER as the new agenda filter and apply it." (let (tags) - (setq org-agenda-filter filter - org-agenda-filter-form (org-agenda-filter-make-matcher)) + (if (eq type 'tag) + (setq org-agenda-tag-filter filter) + (setq org-agenda-category-filter filter + org-agenda-filtered-by-category t)) + (setq org-agenda-filter-form (org-agenda-filter-make-matcher)) (org-agenda-set-mode-name) (save-excursion (goto-char (point-min)) (while (not (eobp)) (if (org-get-at-bol 'org-marker) (progn - (setq tags (org-get-at-bol 'tags)) ; used in eval + (setq tags (org-get-at-bol 'tags) ; used in eval + cat (get-text-property (point) 'org-category)) (if (not (eval org-agenda-filter-form)) - (org-agenda-filter-by-tag-hide-line)) + (org-agenda-filter-hide-line type)) (beginning-of-line 2)) (beginning-of-line 2)))) (if (get-char-property (point) 'invisible) (org-agenda-previous-line)))) -(defun org-agenda-filter-by-tag-hide-line () +(defun org-agenda-filter-hide-line (type) (let (ov) (setq ov (make-overlay (max (point-min) (1- (point-at-bol))) (point-at-eol))) (overlay-put ov 'invisible t) - (overlay-put ov 'type 'tags-filter) - (push ov org-agenda-filter-overlays))) + (overlay-put ov 'type type) + (if (eq type 'tag) + (push ov org-agenda-tag-filter-overlays) + (push ov org-agenda-cat-filter-overlays)))) (defun org-agenda-fix-tags-filter-overlays-at (&optional pos) (setq pos (or pos (point))) (save-excursion (dolist (ov (overlays-at pos)) (when (and (overlay-get ov 'invisible) - (eq (overlay-get ov 'type) 'tags-filter)) + (eq (overlay-get ov 'type) 'tag)) (goto-char pos) (if (< (overlay-start ov) (point-at-eol)) (move-overlay ov (point-at-eol) (overlay-end ov))))))) -(defun org-agenda-filter-by-tag-show-all () - (mapc 'delete-overlay org-agenda-filter-overlays) - (setq org-agenda-filter-overlays nil) - (setq org-agenda-filter nil) - (setq org-agenda-filter-form nil) +(defun org-agenda-filter-show-all-tag nil + (mapc 'delete-overlay org-agenda-tag-filter-overlays) + (setq org-agenda-tag-filter-overlays nil + org-agenda-tag-filter nil + org-agenda-filter-form nil) + (org-agenda-set-mode-name)) + +(defun org-agenda-filter-show-all-cat nil + (mapc 'delete-overlay org-agenda-cat-filter-overlays) + (setq org-agenda-cat-filter-overlays nil + org-agenda-filtered-by-category nil + org-agenda-category-filter nil + org-agenda-filter-form nil) (org-agenda-set-mode-name)) (defun org-agenda-manipulate-query-add () @@ -6592,8 +6710,7 @@ so that the date SD will be in that range." (interactive) (setq org-agenda-follow-mode (not org-agenda-follow-mode)) (org-agenda-set-mode-name) - (if (and org-agenda-follow-mode (org-get-at-bol 'org-marker)) - (org-agenda-show)) + (org-agenda-do-context-action) (message "Follow mode is %s" (if org-agenda-follow-mode "on" "off"))) @@ -6714,13 +6831,33 @@ When called with a prefix argument, include all archive files as well." ((eq org-agenda-show-log 'clockcheck) " ClkCk") (org-agenda-show-log " Log") (t "")) - (if (or org-agenda-filter (get 'org-agenda-filter + (if (or org-agenda-category-filter (get 'org-agenda-category-filter + :preset-filter)) + '(:eval (org-propertize + (concat " <" + (mapconcat + 'identity + (append + (get 'org-agenda-category-filter :preset-filter) + org-agenda-category-filter) + "") + ">") + 'face 'org-agenda-filter-category + 'help-echo "Category used in filtering")) + "") + (if (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter)) - (concat " {" (mapconcat - 'identity - (append (get 'org-agenda-filter - :preset-filter) - org-agenda-filter) "") "}") + '(:eval (org-propertize + (concat " {" + (mapconcat + 'identity + (append + (get 'org-agenda-tag-filter :preset-filter) + org-agenda-tag-filter) + "") + "}") + 'face 'org-agenda-filter-tags + 'help-echo "Tags used in filtering")) "") (if org-agenda-archives-mode (if (eq org-agenda-archives-mode t) @@ -6754,11 +6891,13 @@ When called with a prefix argument, include all archive files as well." (defun org-agenda-do-context-action () "Show outline path and, maybe, follow mode window." (let ((m (org-get-at-bol 'org-marker))) - (if (and org-agenda-follow-mode m) - (org-agenda-show)) - (if (and m org-agenda-show-outline-path) - (org-with-point-at m - (org-display-outline-path t))))) + (when (and (markerp m) (marker-buffer m)) + (and org-agenda-follow-mode + (if org-agenda-follow-indirect + (org-agenda-tree-to-indirect-buffer) + (org-agenda-show))) + (and org-agenda-show-outline-path + (org-with-point-at m (org-display-outline-path t)))))) (defun org-agenda-show-priority () "Show the priority of the current item. @@ -6788,7 +6927,7 @@ and by additional input from the age of a schedules or deadline entry." (widen) (push-mark) (goto-char pos) - (when (org-mode-p) + (when (eq major-mode 'org-mode) (org-show-context 'agenda) (save-excursion (and (outline-next-heading) @@ -6817,7 +6956,7 @@ Point is in the buffer where the item originated.") (with-current-buffer buffer (save-excursion (goto-char pos) - (if (and (org-mode-p) (not (member type '("sexp")))) + (if (and (eq major-mode 'org-mode) (not (member type '("sexp")))) (setq dbeg (progn (org-back-to-heading t) (point)) dend (org-end-of-subtree t t)) (setq dbeg (point-at-bol) @@ -6869,7 +7008,7 @@ Point is in the buffer where the item originated.") (pos (marker-position marker))) (org-with-remote-undo buffer (with-current-buffer buffer - (if (org-mode-p) + (if (eq major-mode 'org-mode) (if (and confirm (not (y-or-n-p "Archive this subtree or entry? "))) (error "Abort") @@ -6970,11 +7109,11 @@ at the text of the entry itself." (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) - (switch-to-buffer buffer) + (org-pop-to-buffer-same-window buffer) (and delete-other-windows (delete-other-windows)) (widen) (goto-char pos) - (when (org-mode-p) + (when (eq major-mode 'org-mode) (org-show-context 'agenda) (save-excursion (and (outline-next-heading) @@ -7138,6 +7277,22 @@ With numerical prefix arg ARG, go up to this level and then take that tree. With a \\[universal-argument] prefix, make a separate frame for this tree (i.e. don't use the dedicated frame)." (interactive) + (if (and current-prefix-arg (listp current-prefix-arg)) + (org-agenda-do-tree-to-indirect-buffer) + (let ((agenda-window (selected-window)) + (indirect-window (get-buffer-window org-last-indirect-buffer))) + (save-window-excursion (org-agenda-do-tree-to-indirect-buffer)) + (unwind-protect + (progn + (unless indirect-window + (setq indirect-window (split-window agenda-window))) + (select-window indirect-window) + (switch-to-buffer org-last-indirect-buffer :norecord) + (fit-window-to-buffer indirect-window)) + (select-window agenda-window))))) + +(defun org-agenda-do-tree-to-indirect-buffer () + "Same as `org-agenda-tree-to-indirect-buffer' without saving window." (org-agenda-check-no-diary) (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) @@ -7227,7 +7382,7 @@ the same tree node, and the headline of the tree node in the Org-mode file." &optional fixface just-this) "Change all lines in the agenda buffer which match HDMARKER. The new content of the line will be NEWHEAD (as modified by -`org-format-agenda-item'). HDMARKER is checked with +`org-agenda-format-item'). HDMARKER is checked with `equal' against all `org-hd-marker' text properties in the file. If FIXFACE is non-nil, the face of each item is modified according to the new TODO state. @@ -7260,7 +7415,7 @@ If FORCE-TAGS is non nil, the car of it returns the new tags." (save-excursion (save-restriction (widen) - (org-format-agenda-item (org-get-at-bol 'extra) + (org-agenda-format-item (org-get-at-bol 'extra) newhead cat tags dotime))))) pl (text-property-any (point-at-bol) (point-at-eol) 'org-heading t) undone-face (org-get-at-bol 'undone-face) @@ -7494,15 +7649,33 @@ the same tree node, and the headline of the tree node in the Org-mode file." (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) (buffer (marker-buffer marker)) - (pos (marker-position marker))) + (pos (marker-position marker)) + cdate today) (org-with-remote-undo buffer - (with-current-buffer buffer - (widen) - (goto-char pos) - (if (not (org-at-timestamp-p)) - (error "Cannot find time stamp")) - (org-timestamp-change arg (or what 'day))) - (org-agenda-show-new-time marker org-last-changed-timestamp)) + (with-current-buffer buffer + (widen) + (goto-char pos) + (if (not (org-at-timestamp-p)) + (error "Cannot find time stamp")) + (when (and org-agenda-move-date-from-past-immediately-to-today + (equal arg 1) + (or (not what) (eq what 'day)) + (not (save-match-data (org-at-date-range-p)))) + (setq cdate (org-parse-time-string (match-string 0) 'nodefault) + cdate (calendar-absolute-from-gregorian + (list (nth 4 cdate) (nth 3 cdate) (nth 5 cdate))) + today (org-today)) + (if (> today cdate) + ;; immediately shift to today + (setq arg (- today cdate)))) + (org-timestamp-change arg (or what 'day)) + (when (and (org-at-date-range-p) + (re-search-backward org-tr-regexp-both (point-at-bol))) + (let ((end org-last-changed-timestamp)) + (org-timestamp-change arg (or what 'day)) + (setq org-last-changed-timestamp + (concat org-last-changed-timestamp "--" end))))) + (org-agenda-show-new-time marker org-last-changed-timestamp)) (message "Time stamp changed to %s" org-last-changed-timestamp))) (defun org-agenda-date-earlier (arg &optional what) @@ -7827,7 +8000,7 @@ the resulting entry will not be shown. When TEXT is empty, switch to ((eq type 'anniversary) (or (re-search-forward "^*[ \t]+Anniversaries" nil t) (progn - (or (org-on-heading-p t) + (or (org-at-heading-p t) (progn (outline-next-heading) (insert "* Anniversaries\n\n") @@ -7843,10 +8016,10 @@ the resulting entry will not be shown. When TEXT is empty, switch to (org-agenda-time-leading-zero t) fmt time time2) (if org-agenda-insert-diary-extract-time - ;; Use org-format-agenda-item to parse text for a time-range and + ;; Use org-agenda-format-item to parse text for a time-range and ;; remove it. FIXME: This is a hack, we should refactor ;; that function to make time extraction available separately - (setq fmt (org-format-agenda-item nil text nil nil t) + (setq fmt (org-agenda-format-item nil text nil nil t) time (get-text-property 0 'time fmt) time2 (if (> (length time) 0) ;; split-string removes trailing ...... if @@ -8299,7 +8472,8 @@ The prefix arg is passed through to the command if possible." (progn (message "Skipping removed entry at %s" e) (setq cntskip (1+ cntskip))) (goto-char pos) - (eval cmd) + (let (org-loop-over-headlines-in-active-region) + (eval cmd)) (setq org-agenda-bulk-marked-entries (delete e org-agenda-bulk-marked-entries)) (setq cnt (1+ cnt)))) @@ -8331,7 +8505,7 @@ tag and (if present) the flagging note." (org-agenda-remove-flag hdmarker) (let ((win (get-buffer-window "*Flagging Note*"))) (and win (delete-window win))) - (message "Entry unflagged")) + (message "Entry unflaged")) (setq note (org-entry-get hdmarker "THEFLAGGINGNOTE")) (unless note (error "No flagging note")) @@ -8354,7 +8528,7 @@ tag and (if present) the flagging note." (org-entry-delete nil "THEFLAGGINGNOTE") (setq newhead (org-get-heading))) (org-agenda-change-all-lines newhead marker) - (message "Entry unflagged"))) + (message "Entry unflaged"))) (defun org-agenda-get-any-marker (&optional pos) (or (get-text-property (or pos (point-at-bol)) 'org-hd-marker) @@ -8365,7 +8539,7 @@ tag and (if present) the flagging note." (defvar appt-time-msg-list) ;;;###autoload -(defun org-agenda-to-appt (&optional refresh filter) +(defun org-agenda-to-appt (&optional refresh filter &rest args) "Activate appointments found in `org-agenda-files'. With a \\[universal-argument] prefix, refresh the list of appointments. @@ -8376,6 +8550,10 @@ expression, and filter out entries that don't match it. If FILTER is a string, use this string as a regular expression for filtering entries out. +If FILTER is a function, filter out entries against which +calling the function returns nil. This function takes one +argument: an entry from `org-agenda-get-day-entries'. + FILTER can also be an alist with the car of each cell being either 'headline or 'category. For example: @@ -8383,12 +8561,18 @@ either 'headline or 'category. For example: (category \"Work\")) will only add headlines containing IMPORTANT or headlines -belonging to the \"Work\" category." +belonging to the \"Work\" category. + +ARGS are symbols indicating what kind of entries to consider. +By default `org-agenda-to-appt' will use :deadline, :scheduled +and :timestamp entries. See the docstring of `org-diary' for +details and examples." (interactive "P") (if refresh (setq appt-time-msg-list nil)) (if (eq filter t) (setq filter (read-from-minibuffer "Regexp filter: "))) (let* ((cnt 0) ; count added events + (scope (or args '(:deadline :scheduled :timestamp))) (org-agenda-new-buffers nil) (org-deadline-warning-days 0) ;; Do not use `org-today' here because appt only takes @@ -8402,10 +8586,10 @@ belonging to the \"Work\" category." (org-prepare-agenda-buffers files) (while (setq file (pop files)) (setq entries - (append entries - (org-agenda-get-day-entries - file today :timestamp :scheduled :deadline)))) - (setq entries (delq nil entries)) + (delq nil + (append entries + (apply 'org-agenda-get-day-entries + file today scope))))) ;; Map thru entries and find if we should filter them out (mapc (lambda(x) @@ -8414,11 +8598,14 @@ belonging to the \"Work\" category." (tod (get-text-property 1 'time-of-day x)) (ok (or (null filter) (and (stringp filter) (string-match filter evt)) + (and (functionp filter) (funcall filter x)) (and (listp filter) - (or (string-match - (cadr (assoc 'category filter)) cat) - (string-match - (cadr (assoc 'headline filter)) evt)))))) + (let ((cat-filter (cadr (assoc 'category filter))) + (evt-filter (cadr (assoc 'headline filter)))) + (or (and (stringp cat-filter) + (string-match cat-filter cat)) + (and (stringp evt-filter) + (string-match evt-filter evt)))))))) ;; FIXME: Shall we remove text-properties for the appt text? ;; (setq evt (set-text-properties 0 (length evt) nil evt)) (when (and ok tod) @@ -8441,8 +8628,14 @@ belonging to the \"Work\" category." date))) (eq date today))) -(provide 'org-agenda) - +(defun org-agenda-todo-yesterday (&optional arg) + "Like `org-agenda-todo' but the time of change will be 23:59 of yesterday" + (interactive "P") + (let* ((hour (third (decode-time + (org-current-time)))) + (org-extend-today-until (1+ hour))) + (org-agenda-todo arg))) +(provide 'org-agenda) ;;; org-agenda.el ends here diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 7436696433c..ffa7f1cabee 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el @@ -1,11 +1,10 @@ ;;; org-archive.el --- Archiving for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -191,158 +190,166 @@ If the cursor is not at a headline when this command is called, try all level 1 trees. If the cursor is on a headline, only try the direct children of this heading." (interactive "P") - (if find-done - (org-archive-all-done) - ;; Save all relevant TODO keyword-relatex variables - - (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler - (tr-org-todo-keywords-1 org-todo-keywords-1) - (tr-org-todo-kwd-alist org-todo-kwd-alist) - (tr-org-done-keywords org-done-keywords) - (tr-org-todo-regexp org-todo-regexp) - (tr-org-todo-line-regexp org-todo-line-regexp) - (tr-org-odd-levels-only org-odd-levels-only) - (this-buffer (current-buffer)) - ;; start of variables that will be used for saving context - ;; The compiler complains about them - keep them anyway! - (file (abbreviate-file-name - (or (buffer-file-name (buffer-base-buffer)) - (error "No file associated to buffer")))) - (olpath (mapconcat 'identity (org-get-outline-path) "/")) - (time (format-time-string - (substring (cdr org-time-stamp-formats) 1 -1) - (current-time))) - category todo priority ltags itags atags - ;; end of variables that will be used for saving context - location afile heading buffer level newfile-p infile-p visiting) - - ;; Find the local archive location - (setq location (org-get-local-archive-location) - afile (org-extract-archive-file location) - heading (org-extract-archive-heading location) - infile-p (equal file (abbreviate-file-name afile))) - (unless afile - (error "Invalid `org-archive-location'")) - - (if (> (length afile) 0) - (setq newfile-p (not (file-exists-p afile)) - visiting (find-buffer-visiting afile) - buffer (or visiting (find-file-noselect afile))) - (setq buffer (current-buffer))) - (unless buffer - (error "Cannot access file \"%s\"" afile)) - (if (and (> (length heading) 0) - (string-match "^\\*+" heading)) - (setq level (match-end 0)) - (setq heading nil level 0)) - (save-excursion - (org-back-to-heading t) - ;; Get context information that will be lost by moving the tree - (setq category (org-get-category nil 'force-refresh) - todo (and (looking-at org-todo-line-regexp) - (match-string 2)) - priority (org-get-priority - (if (match-end 3) (match-string 3) "")) - ltags (org-get-tags) - itags (org-delete-all ltags (org-get-tags-at)) - atags (org-get-tags-at)) - (setq ltags (mapconcat 'identity ltags " ") - itags (mapconcat 'identity itags " ")) - ;; We first only copy, in case something goes wrong - ;; we need to protect `this-command', to avoid kill-region sets it, - ;; which would lead to duplication of subtrees - (let (this-command) (org-copy-subtree 1 nil t)) - (set-buffer buffer) - ;; Enforce org-mode for the archive buffer - (if (not (org-mode-p)) - ;; Force the mode for future visits. - (let ((org-insert-mode-line-in-empty-file t) - (org-inhibit-startup t)) - (call-interactively 'org-mode))) - (when newfile-p - (goto-char (point-max)) - (insert (format "\nArchived entries from file %s\n\n" - (buffer-file-name this-buffer)))) - ;; Force the TODO keywords of the original buffer - (let ((org-todo-line-regexp tr-org-todo-line-regexp) - (org-todo-keywords-1 tr-org-todo-keywords-1) - (org-todo-kwd-alist tr-org-todo-kwd-alist) - (org-done-keywords tr-org-done-keywords) - (org-todo-regexp tr-org-todo-regexp) - (org-todo-line-regexp tr-org-todo-line-regexp) - (org-odd-levels-only - (if (local-variable-p 'org-odd-levels-only (current-buffer)) - org-odd-levels-only - tr-org-odd-levels-only))) - (goto-char (point-min)) - (show-all) - (if heading - (progn - (if (re-search-forward - (concat "^" (regexp-quote heading) - (org-re "[ \t]*\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\($\\|\r\\)")) - nil t) - (goto-char (match-end 0)) - ;; Heading not found, just insert it at the end - (goto-char (point-max)) - (or (bolp) (insert "\n")) - (insert "\n" heading "\n") - (end-of-line 0)) - ;; Make the subtree visible - (show-subtree) - (if org-archive-reversed-order - (progn - (org-back-to-heading t) - (outline-next-heading)) - (org-end-of-subtree t)) - (skip-chars-backward " \t\r\n") - (and (looking-at "[ \t\r\n]*") - (replace-match "\n\n"))) - ;; No specific heading, just go to end of file. - (goto-char (point-max)) (insert "\n")) - ;; Paste - (org-paste-subtree (org-get-valid-level level (and heading 1))) - ;; Shall we append inherited tags? - (and itags - (or (and (eq org-archive-subtree-add-inherited-tags 'infile) - infile-p) - (eq org-archive-subtree-add-inherited-tags t)) - (org-set-tags-to atags)) - ;; Mark the entry as done - (when (and org-archive-mark-done - (looking-at org-todo-line-regexp) - (or (not (match-end 2)) - (not (member (match-string 2) org-done-keywords)))) - (let (org-log-done org-todo-log-states) - (org-todo - (car (or (member org-archive-mark-done org-done-keywords) - org-done-keywords))))) - - ;; Add the context info - (when org-archive-save-context-info - (let ((l org-archive-save-context-info) e n v) - (while (setq e (pop l)) - (when (and (setq v (symbol-value e)) - (stringp v) (string-match "\\S-" v)) - (setq n (concat "ARCHIVE_" (upcase (symbol-name e)))) - (org-entry-put (point) n v))))) - - ;; Save and kill the buffer, if it is not the same buffer. - (when (not (eq this-buffer buffer)) - (save-buffer)))) - ;; Here we are back in the original buffer. Everything seems to have - ;; worked. So now cut the tree and finish up. - (let (this-command) (org-cut-subtree)) - (when (featurep 'org-inlinetask) - (org-inlinetask-remove-END-maybe)) - (setq org-markers-to-move nil) - (message "Subtree archived %s" - (if (eq this-buffer buffer) - (concat "under heading: " heading) - (concat "in file: " (abbreviate-file-name afile)))))) - (org-reveal) - (if (looking-at "^[ \t]*$") - (outline-next-visible-heading 1))) + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + `(progn (setq org-map-continue-from (progn (org-back-to-heading) (point))) + (org-archive-subtree ,find-done)) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (if find-done + (org-archive-all-done) + ;; Save all relevant TODO keyword-relatex variables + (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler + (tr-org-todo-keywords-1 org-todo-keywords-1) + (tr-org-todo-kwd-alist org-todo-kwd-alist) + (tr-org-done-keywords org-done-keywords) + (tr-org-todo-regexp org-todo-regexp) + (tr-org-todo-line-regexp org-todo-line-regexp) + (tr-org-odd-levels-only org-odd-levels-only) + (this-buffer (current-buffer)) + ;; start of variables that will be used for saving context + ;; The compiler complains about them - keep them anyway! + (file (abbreviate-file-name + (or (buffer-file-name (buffer-base-buffer)) + (error "No file associated to buffer")))) + (olpath (mapconcat 'identity (org-get-outline-path) "/")) + (time (format-time-string + (substring (cdr org-time-stamp-formats) 1 -1) + (current-time))) + category todo priority ltags itags atags + ;; end of variables that will be used for saving context + location afile heading buffer level newfile-p infile-p visiting) + + ;; Find the local archive location + (setq location (org-get-local-archive-location) + afile (org-extract-archive-file location) + heading (org-extract-archive-heading location) + infile-p (equal file (abbreviate-file-name afile))) + (unless afile + (error "Invalid `org-archive-location'")) + + (if (> (length afile) 0) + (setq newfile-p (not (file-exists-p afile)) + visiting (find-buffer-visiting afile) + buffer (or visiting (find-file-noselect afile))) + (setq buffer (current-buffer))) + (unless buffer + (error "Cannot access file \"%s\"" afile)) + (if (and (> (length heading) 0) + (string-match "^\\*+" heading)) + (setq level (match-end 0)) + (setq heading nil level 0)) + (save-excursion + (org-back-to-heading t) + ;; Get context information that will be lost by moving the tree + (setq category (org-get-category nil 'force-refresh) + todo (and (looking-at org-todo-line-regexp) + (match-string 2)) + priority (org-get-priority + (if (match-end 3) (match-string 3) "")) + ltags (org-get-tags) + itags (org-delete-all ltags (org-get-tags-at)) + atags (org-get-tags-at)) + (setq ltags (mapconcat 'identity ltags " ") + itags (mapconcat 'identity itags " ")) + ;; We first only copy, in case something goes wrong + ;; we need to protect `this-command', to avoid kill-region sets it, + ;; which would lead to duplication of subtrees + (let (this-command) (org-copy-subtree 1 nil t)) + (set-buffer buffer) + ;; Enforce org-mode for the archive buffer + (if (not (eq major-mode 'org-mode)) + ;; Force the mode for future visits. + (let ((org-insert-mode-line-in-empty-file t) + (org-inhibit-startup t)) + (call-interactively 'org-mode))) + (when newfile-p + (goto-char (point-max)) + (insert (format "\nArchived entries from file %s\n\n" + (buffer-file-name this-buffer)))) + ;; Force the TODO keywords of the original buffer + (let ((org-todo-line-regexp tr-org-todo-line-regexp) + (org-todo-keywords-1 tr-org-todo-keywords-1) + (org-todo-kwd-alist tr-org-todo-kwd-alist) + (org-done-keywords tr-org-done-keywords) + (org-todo-regexp tr-org-todo-regexp) + (org-todo-line-regexp tr-org-todo-line-regexp) + (org-odd-levels-only + (if (local-variable-p 'org-odd-levels-only (current-buffer)) + org-odd-levels-only + tr-org-odd-levels-only))) + (goto-char (point-min)) + (show-all) + (if heading + (progn + (if (re-search-forward + (concat "^" (regexp-quote heading) + (org-re "[ \t]*\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\($\\|\r\\)")) + nil t) + (goto-char (match-end 0)) + ;; Heading not found, just insert it at the end + (goto-char (point-max)) + (or (bolp) (insert "\n")) + (insert "\n" heading "\n") + (end-of-line 0)) + ;; Make the subtree visible + (show-subtree) + (if org-archive-reversed-order + (progn + (org-back-to-heading t) + (outline-next-heading)) + (org-end-of-subtree t)) + (skip-chars-backward " \t\r\n") + (and (looking-at "[ \t\r\n]*") + (replace-match "\n\n"))) + ;; No specific heading, just go to end of file. + (goto-char (point-max)) (insert "\n")) + ;; Paste + (org-paste-subtree (org-get-valid-level level (and heading 1))) + ;; Shall we append inherited tags? + (and itags + (or (and (eq org-archive-subtree-add-inherited-tags 'infile) + infile-p) + (eq org-archive-subtree-add-inherited-tags t)) + (org-set-tags-to atags)) + ;; Mark the entry as done + (when (and org-archive-mark-done + (looking-at org-todo-line-regexp) + (or (not (match-end 2)) + (not (member (match-string 2) org-done-keywords)))) + (let (org-log-done org-todo-log-states) + (org-todo + (car (or (member org-archive-mark-done org-done-keywords) + org-done-keywords))))) + + ;; Add the context info + (when org-archive-save-context-info + (let ((l org-archive-save-context-info) e n v) + (while (setq e (pop l)) + (when (and (setq v (symbol-value e)) + (stringp v) (string-match "\\S-" v)) + (setq n (concat "ARCHIVE_" (upcase (symbol-name e)))) + (org-entry-put (point) n v))))) + + ;; Save and kill the buffer, if it is not the same buffer. + (when (not (eq this-buffer buffer)) + (save-buffer)))) + ;; Here we are back in the original buffer. Everything seems to have + ;; worked. So now cut the tree and finish up. + (let (this-command) (org-cut-subtree)) + (when (featurep 'org-inlinetask) + (org-inlinetask-remove-END-maybe)) + (setq org-markers-to-move nil) + (message "Subtree archived %s" + (if (eq this-buffer buffer) + (concat "under heading: " heading) + (concat "in file: " (abbreviate-file-name afile)))))) + (org-reveal) + (if (looking-at "^[ \t]*$") + (outline-next-visible-heading 1)))) (defun org-archive-to-archive-sibling () "Archive the current heading by moving it under the archive sibling. @@ -350,69 +357,83 @@ The archive sibling is a sibling of the heading with the heading name `org-archive-sibling-heading' and an `org-archive-tag' tag. If this sibling does not exist, it will be created at the end of the subtree." (interactive) - (save-restriction - (widen) - (let (b e pos leader level) - (org-back-to-heading t) - (looking-at outline-regexp) - (setq leader (match-string 0) - level (funcall outline-level)) - (setq pos (point)) - (condition-case nil - (outline-up-heading 1 t) - (error (setq e (point-max)) (goto-char (point-min)))) - (setq b (point)) - (unless e + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (when (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + '(progn (setq org-map-continue-from + (progn (org-back-to-heading) + (if (looking-at (concat "^.*:" org-archive-tag ":.*$")) + (org-end-of-subtree t) + (point)))) + (when (org-at-heading-p) + (org-archive-to-archive-sibling))) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (save-restriction + (widen) + (let (b e pos leader level) + (org-back-to-heading t) + (looking-at org-outline-regexp) + (setq leader (match-string 0) + level (funcall outline-level)) + (setq pos (point)) (condition-case nil - (org-end-of-subtree t t) - (error (goto-char (point-max)))) - (setq e (point))) - (goto-char b) - (unless (re-search-forward - (concat "^" (regexp-quote leader) - "[ \t]*" - org-archive-sibling-heading - "[ \t]*:" - org-archive-tag ":") e t) - (goto-char e) - (or (bolp) (newline)) - (insert leader org-archive-sibling-heading "\n") - (beginning-of-line 0) - (org-toggle-tag org-archive-tag 'on)) - (beginning-of-line 1) - (if org-archive-reversed-order - (outline-next-heading) - (org-end-of-subtree t t)) - (save-excursion - (goto-char pos) - (let ((this-command this-command)) (org-cut-subtree))) - (org-paste-subtree (org-get-valid-level level 1)) - (org-set-property - "ARCHIVE_TIME" - (format-time-string - (substring (cdr org-time-stamp-formats) 1 -1) - (current-time))) - (outline-up-heading 1 t) - (hide-subtree) - (org-cycle-show-empty-lines 'folded) - (goto-char pos))) - (org-reveal) - (if (looking-at "^[ \t]*$") - (outline-next-visible-heading 1))) + (outline-up-heading 1 t) + (error (setq e (point-max)) (goto-char (point-min)))) + (setq b (point)) + (unless e + (condition-case nil + (org-end-of-subtree t t) + (error (goto-char (point-max)))) + (setq e (point))) + (goto-char b) + (unless (re-search-forward + (concat "^" (regexp-quote leader) + "[ \t]*" + org-archive-sibling-heading + "[ \t]*:" + org-archive-tag ":") e t) + (goto-char e) + (or (bolp) (newline)) + (insert leader org-archive-sibling-heading "\n") + (beginning-of-line 0) + (org-toggle-tag org-archive-tag 'on)) + (beginning-of-line 1) + (if org-archive-reversed-order + (outline-next-heading) + (org-end-of-subtree t t)) + (save-excursion + (goto-char pos) + (let ((this-command this-command)) (org-cut-subtree))) + (org-paste-subtree (org-get-valid-level level 1)) + (org-set-property + "ARCHIVE_TIME" + (format-time-string + (substring (cdr org-time-stamp-formats) 1 -1) + (current-time))) + (outline-up-heading 1 t) + (hide-subtree) + (org-cycle-show-empty-lines 'folded) + (goto-char pos))) + (org-reveal) + (if (looking-at "^[ \t]*$") + (outline-next-visible-heading 1)))) (defun org-archive-all-done (&optional tag) "Archive sublevels of the current tree without open TODO items. If the cursor is not on a headline, try all level 1 trees. If it is on a headline, try all direct children. When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." - (let ((re (concat org-outline-regexp-bol "+" org-not-done-regexp)) re1 + (let ((re org-not-done-heading-regexp) re1 (rea (concat ".*:" org-archive-tag ":")) (begm (make-marker)) (endm (make-marker)) (question (if tag "Set ARCHIVE tag (no open TODO items)? " "Move subtree to archive (no open TODO items)? ")) beg end (cntarch 0)) - (if (org-on-heading-p) + (if (org-at-heading-p) (progn (setq re1 (concat "^" (regexp-quote (make-string @@ -449,20 +470,36 @@ When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag." With prefix ARG, check all children of current headline and offer tagging the children that do not contain any open TODO items." (interactive "P") - (if find-done - (org-archive-all-done 'tag) - (let (set) - (save-excursion - (org-back-to-heading t) - (setq set (org-toggle-tag org-archive-tag)) - (when set (hide-subtree))) - (and set (beginning-of-line 1)) - (message "Subtree %s" (if set "archived" "unarchived"))))) + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + `(org-toggle-archive-tag ,find-done) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (if find-done + (org-archive-all-done 'tag) + (let (set) + (save-excursion + (org-back-to-heading t) + (setq set (org-toggle-tag org-archive-tag)) + (when set (hide-subtree))) + (and set (beginning-of-line 1)) + (message "Subtree %s" (if set "archived" "unarchived")))))) (defun org-archive-set-tag () "Set the ARCHIVE tag." (interactive) - (org-toggle-tag org-archive-tag 'on)) + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + 'org-archive-set-tag + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (org-toggle-tag org-archive-tag 'on))) ;;;###autoload (defun org-archive-subtree-default () @@ -482,6 +519,4 @@ This command is set with the variable `org-archive-default-command'." (provide 'org-archive) - - ;;; org-archive.el ends here diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index d6a4e30714b..15413324480 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el @@ -1,11 +1,10 @@ ;;; org-ascii.el --- ASCII export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -145,7 +144,7 @@ command to convert it." (interactive "r") (let (reg ascii buf pop-up-frames) (save-window-excursion - (if (org-mode-p) + (if (eq major-mode 'org-mode) (setq ascii (org-export-region-as-ascii beg end t 'string)) (setq reg (buffer-substring beg end) @@ -284,7 +283,7 @@ publishing directory." "UNTITLED")) (email (plist-get opt-plist :email)) (language (plist-get opt-plist :language)) - (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) + (quote-re0 (concat "^\\(" org-quote-string "\\)\\( +\\|[ \t]*$\\)")) (todo nil) (lang-words nil) (region @@ -407,7 +406,7 @@ publishing directory." txt)) (setq txt (replace-match "" t t txt))) (if (string-match quote-re0 txt) - (setq txt (replace-match "" t t txt))) + (setq txt (replace-match "" t t txt 1))) (if org-export-with-section-numbers (setq txt (concat (org-section-number level) @@ -725,5 +724,4 @@ publishing directory." (provide 'org-ascii) - ;;; org-ascii.el ends here diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index aa8c476e89b..0525bee6198 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el @@ -4,7 +4,6 @@ ;; Author: John Wiegley ;; Keywords: org data task -;; Version: 7.7 ;; This file is part of GNU Emacs. ;; @@ -437,5 +436,4 @@ prefix." (provide 'org-attach) - ;;; org-attach.el ends here diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index 8401196c81a..ddb7e4ab8c5 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el @@ -1,12 +1,11 @@ ;;; org-bbdb.el --- Support for links to BBDB entries from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik , ;; Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -119,6 +118,9 @@ (defvar date) ;; dynamically scoped from Org +;; Support for version 2.35 +(defvar org-bbdb-old (fboundp 'bbdb-record-get-field-internal)) + ;; Customization (defgroup org-bbdb-anniversaries nil @@ -196,8 +198,11 @@ date year)." "Store a link to a BBDB database entry." (when (eq major-mode 'bbdb-mode) ;; This is BBDB, we make this link! - (let* ((name (bbdb-record-name (bbdb-current-record))) - (company (bbdb-record-getprop (bbdb-current-record) 'company)) + (let* ((rec (bbdb-current-record)) + (name (bbdb-record-name rec)) + (company (if org-bbdb-old + (bbdb-record-getprop rec 'company) + (car (bbdb-record-get-field rec 'organization)))) (link (org-make-link "bbdb:" name))) (org-store-link-props :type "bbdb" :name name :company company :link link :description name) @@ -219,24 +224,49 @@ italicized, in all other cases it is left unchanged." (require 'bbdb) (let ((inhibit-redisplay (not debug-on-error)) (bbdb-electric-p nil)) - (catch 'exit - ;; Exact match on name - (bbdb-name (concat "\\`" name "\\'") nil) - (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) - ;; Exact match on name - (bbdb-company (concat "\\`" name "\\'") nil) - (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) - ;; Partial match on name - (bbdb-name name nil) - (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) - ;; Partial match on company - (bbdb-company name nil) - (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) - ;; General match including network address and notes - (bbdb name nil) - (when (= 0 (buffer-size (get-buffer "*BBDB*"))) - (delete-window (get-buffer-window "*BBDB*")) - (error "No matching BBDB record"))))) + (if org-bbdb-old + (org-bbdb-open-old) + (org-bbdb-open-new)))) + +(defun org-bbdb-open-old () + (catch 'exit + ;; Exact match on name + (bbdb-name (concat "\\`" name "\\'") nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Exact match on name + (bbdb-company (concat "\\`" name "\\'") nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Partial match on name + (bbdb-name name nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Partial match on company + (bbdb-company name nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; General match including network address and notes + (bbdb name nil) + (when (= 0 (buffer-size (get-buffer "*BBDB*"))) + (delete-window (get-buffer-window "*BBDB*")) + (error "No matching BBDB record")))) + +(defun org-bbdb-open-new () + (catch 'exit + ;; Exact match on name + (bbdb-search-name (concat "\\`" name "\\'") nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Exact match on name + (bbdb-search-organization (concat "\\`" name "\\'") nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Partial match on name + (bbdb-search-name name nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Partial match on company + (bbdb-search-organization name nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; General match including network address and notes + (bbdb name nil) + (when (= 0 (buffer-size (get-buffer "*BBDB*"))) + (delete-window (get-buffer-window "*BBDB*")) + (error "No matching BBDB record")))) (defun org-bbdb-anniv-extract-date (time-str) "Convert YYYY-MM-DD to (month date year). @@ -357,7 +387,7 @@ This is used by Org to re-create the anniversary hash table." (bbdb-record-name (car (bbdb-completing-read-record "Name: "))))) (defun org-bbdb-anniv-export-ical () - "Extract anniversaries from BBDB and convert them to iCalendar format." + "Extract anniversaries from BBDB and convert them to icalendar format." (require 'bbdb) (require 'diary-lib) (unless (hash-table-p org-bbdb-anniv-hash) @@ -391,6 +421,4 @@ END:VEVENT\n" (provide 'org-bbdb) - - ;;; org-bbdb.el ends here diff --git a/lisp/org/org-beamer.el b/lisp/org/org-beamer.el index d5f9beea337..d64ce2ddc5a 100644 --- a/lisp/org/org-beamer.el +++ b/lisp/org/org-beamer.el @@ -2,7 +2,6 @@ ;; ;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; -;; Version: 7.7 ;; Author: Carsten Dominik ;; Maintainer: Carsten Dominik ;; Keywords: org, wp, tex @@ -400,7 +399,7 @@ the value will be inserted right after the documentclass statement." (insert org-beamer-header-extra) (or (bolp) (insert "\n")))))) -(defcustom org-beamer-fragile-re "^[ \t]*\\\\begin{\\(verbatim\\|lstlisting\\|minted\\)}" +(defcustom org-beamer-fragile-re "\\\\\\(verb\\|lstinline\\)\\|^[ \t]*\\\\begin{\\(verbatim\\|lstlisting\\|minted\\)}" "If this regexp matches in a frame, the frame is marked as fragile." :group 'org-beamer :type 'regexp) @@ -411,7 +410,7 @@ the value will be inserted right after the documentclass statement." ;; Functions to initialize and post-process -;; These functions will be hooked into various places in the export process +;; These fuctions will be hooked into various places in the export process (defun org-beamer-initialize-open-trackers () "Reset variables that track if certain environments are open during export." @@ -451,7 +450,7 @@ The effect is that these values will be accessible during export." ((stringp org-beamer-frame-level-now) (setq org-beamer-frame-level-now (string-to-number org-beamer-frame-level-now)))) - ;; Find the header additions, most likely theme commands + ;; Find the header additons, most likely theme commands (setq org-beamer-header-extra (or (and (org-region-active-p) (save-excursion @@ -632,6 +631,4 @@ include square brackets." (provide 'org-beamer) - - ;;; org-beamer.el ends here diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index 3607458a410..71a3bd07d80 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el @@ -6,7 +6,6 @@ ;; Carsten Dominik ;; Eric Schulte ;; Keywords: org, wp, remember -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -204,7 +203,7 @@ (:pages . "One or more page numbers or range of numbers, such as 42-111 or 7,41,73-97 or 43+ (the ‘+’ in this last example indicates pages following that don’t form simple range). BibTEX requires double dashes for page ranges (--).") (:publisher . "The publisher’s name.") (:school . "The name of the school where a thesis was written.") - (:series . "The name of a series or set of books. When citing an entire book, the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.") + (:series . "The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.") (:title . "The work’s title, typed as explained in the LaTeX book.") (:type . "The type of a technical report for example, 'Research Note'.") (:volume . "The volume of a journal or multi-volume book.") @@ -221,7 +220,7 @@ (defcustom org-bibtex-prefix nil "Optional prefix for all bibtex property names. -For example setting to 'BIB_' would allow interoperability with Fireforg." +For example setting to 'BIB_' would allow interoperability with fireforg." :group 'org-bibtex :type 'string) @@ -275,12 +274,20 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t." :group 'org-bibtex :type '(repeat :tag "Tag" (string))) +(defcustom org-bibtex-type-property-name "btype" + "Property in which to store bibtex entry type (e.g., article)." + :group 'org-bibtex + :type 'string) + ;;; Utility functions (defun org-bibtex-get (property) ((lambda (it) (when it (org-babel-trim it))) - (or (org-entry-get (point) (upcase property)) - (org-entry-get (point) (concat org-bibtex-prefix (upcase property)))))) + (let ((org-special-properties + (delete "FILE" (copy-sequence org-special-properties)))) + (or + (org-entry-get (point) (upcase property)) + (org-entry-get (point) (concat org-bibtex-prefix (upcase property))))))) (defun org-bibtex-put (property value) (let ((prop (upcase (if (keywordp property) @@ -303,7 +310,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t." lsts)))) (let ((notes (buffer-string)) (id (org-bibtex-get org-bibtex-key-property)) - (type (org-bibtex-get "type")) + (type (org-bibtex-get org-bibtex-type-property-name)) (tags (when org-bibtex-tags-are-keywords (delq nil (mapcar @@ -317,16 +324,20 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t." (let ((entry (format "@%s{%s,\n%s\n}\n" type id (mapconcat - (lambda (pair) (format " %s={%s}" (car pair) (cdr pair))) + (lambda (pair) + (format " %s={%s}" (car pair) (cdr pair))) (remove nil (if (and org-bibtex-export-arbitrary-fields org-bibtex-prefix) (mapcar (lambda (kv) (let ((key (car kv)) (val (cdr kv))) - (when (and (string-match org-bibtex-prefix key) - (not (string= - (downcase (concat org-bibtex-prefix "TYPE")) (downcase key)))) + (when (and + (string-match org-bibtex-prefix key) + (not (string= + (downcase (concat org-bibtex-prefix + org-bibtex-type-property-name)) + (downcase key)))) (cons (downcase (replace-regexp-in-string org-bibtex-prefix "" key)) val)))) @@ -514,9 +525,20 @@ Headlines are exported using `org-bibtex-export-headline'." "Bibtex file: " nil nil nil (file-name-nondirectory (concat (file-name-sans-extension (buffer-file-name)) ".bib"))))) - (let ((bibtex-entries (remove nil (org-map-entries #'org-bibtex-headline)))) - (with-temp-file filename - (insert (mapconcat #'identity bibtex-entries "\n"))))) + ((lambda (error-point) + (when error-point + (goto-char error-point) + (message "Bibtex error at %S" (nth 4 (org-heading-components))))) + (catch 'bib + (let ((bibtex-entries (remove nil (org-map-entries + (lambda () + (condition-case foo + (org-bibtex-headline) + (error (throw 'bib (point))))))))) + (with-temp-file filename + (insert (mapconcat #'identity bibtex-entries "\n"))) + (message "Successfully exported %d bibtex entries to %s" + (length bibtex-entries) filename) nil)))) (defun org-bibtex-check (&optional optional) "Check the current headline for required fields. @@ -525,7 +547,7 @@ With prefix argument OPTIONAL also prompt for optional fields." (save-restriction (org-narrow-to-subtree) (let ((type ((lambda (name) (when name (intern (concat ":" name)))) - (org-bibtex-get "TYPE")))) + (org-bibtex-get org-bibtex-type-property-name)))) (when type (org-bibtex-fleshout type optional))))) (defun org-bibtex-check-all (&optional optional) @@ -542,7 +564,8 @@ If nonew is t, add data to the headline of the entry at point." "Type: " (mapcar (lambda (type) (substring (symbol-name (car type)) 1)) org-bibtex-types) - nil nil (when nonew (org-bibtex-get "TYPE")))) + nil nil (when nonew + (org-bibtex-get org-bibtex-type-property-name)))) (type (if (keywordp type) type (intern (concat ":" type)))) (org-bibtex-treat-headline-as-title (if nonew nil t))) (unless (assoc type org-bibtex-types) @@ -553,7 +576,8 @@ If nonew is t, add data to the headline of the entry at point." (let ((title (org-bibtex-ask :title))) (insert title) (org-bibtex-put "TITLE" title))) - (org-bibtex-put "TYPE" (substring (symbol-name type) 1)) + (org-bibtex-put org-bibtex-type-property-name + (substring (symbol-name type) 1)) (org-bibtex-fleshout type arg) (mapc (lambda (tag) (org-toggle-tag tag 'on)) org-bibtex-tags))) @@ -598,7 +622,7 @@ This uses `bibtex-parse-entry'." (org-insert-heading) (insert (val :title)) (org-bibtex-put "TITLE" (val :title)) - (org-bibtex-put "TYPE" (downcase (val :type))) + (org-bibtex-put org-bibtex-type-property-name (downcase (val :type))) (dolist (pair entry) (case (car pair) (:title nil) @@ -637,11 +661,10 @@ This function relies `org-search-view' to locate results." (let ((org-agenda-overriding-header "Bib search results:") (org-agenda-search-view-always-boolean t)) (org-search-view nil - (format "%s +{:%sTYPE:}" - string org-bibtex-prefix)))) + (format "%s +{:%s%s:}" + string org-bibtex-prefix + org-bibtex-type-property-name)))) (provide 'org-bibtex) - - ;;; org-bibtex.el ends here diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index e3a87b77b5c..e0c75b59e92 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1,11 +1,10 @@ ;;; org-capture.el --- Fast note taking in Org-mode -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -57,6 +56,8 @@ (date &optional keep-restriction)) (declare-function org-table-get-specials "org-table" ()) (declare-function org-table-goto-line "org-table" (N)) +(declare-function org-pop-to-buffer-same-window "org-compat" + (&optional buffer-or-name norecord label)) (defvar org-remember-default-headline) (defvar org-remember-templates) @@ -332,7 +333,8 @@ calendar | %:type %:date" (defcustom org-capture-before-finalize-hook nil "Hook that is run right before a capture process is finalized. -The capture buffer is still current when this hook runs." +The capture buffer is still current when this hook runs and it is +widened to the entire buffer." :group 'org-capture :type 'hook) @@ -372,7 +374,7 @@ to avoid conflicts with other active capture processes." (plist-get (if local org-capture-current-plist org-capture-plist) prop)) (defun org-capture-member (prop &optional local) - "Is PROP a property in `org-capture-plist'. + "Is PROP a preperty in `org-capture-plist'. When LOCAL is set, use the local variable `org-capture-current-plist', this is necessary after initialization of the capture process, to avoid conflicts with other active capture processes." @@ -484,7 +486,7 @@ bypassed." (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) - (if (and (org-mode-p) + (if (and (eq major-mode 'org-mode) (org-capture-get :clock-in)) (condition-case nil (progn @@ -574,7 +576,7 @@ captured item after finalizing." (org-capture-empty-lines-after (or (org-capture-get :empty-lines 'local) 0)))) ;; Postprocessing: Update Statistics cookies, do the sorting - (when (org-mode-p) + (when (eq major-mode 'org-mode) (save-excursion (when (ignore-errors (org-back-to-heading)) (org-update-parent-todo-statistics) @@ -722,7 +724,7 @@ already gone. Any prefix argument will be passed to the refile command." (widen) (let ((hd (nth 2 target))) (goto-char (point-min)) - (unless (org-mode-p) + (unless (eq major-mode 'org-mode) (error "Target buffer \"%s\" for file+headline should be in Org mode" (current-buffer))) @@ -754,7 +756,7 @@ already gone. Any prefix argument will be passed to the refile command." (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) - (setq target-entry-p (and (org-mode-p) (org-at-heading-p)))) + (setq target-entry-p (and (eq major-mode 'org-mode) (org-at-heading-p)))) (error "No match for target regexp in file %s" (nth 1 target)))) ((memq (car target) '(file+datetree file+datetree+prompt)) @@ -776,7 +778,8 @@ already gone. Any prefix argument will be passed to the refile command." (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) - (org-capture-put :prompt-time prompt-time) + (org-capture-put :prompt-time prompt-time + :default-time prompt-time) (time-to-days prompt-time))) (t ;; current date, possible corrected for late night workers @@ -788,12 +791,12 @@ already gone. Any prefix argument will be passed to the refile command." (widen) (funcall (nth 2 target)) (org-capture-put :exact-position (point)) - (setq target-entry-p (and (org-mode-p) (org-at-heading-p)))) + (setq target-entry-p (and (eq major-mode 'org-mode) (org-at-heading-p)))) ((eq (car target) 'function) (funcall (nth 1 target)) (org-capture-put :exact-position (point)) - (setq target-entry-p (and (org-mode-p) (org-at-heading-p)))) + (setq target-entry-p (and (eq major-mode 'org-mode) (org-at-heading-p)))) ((eq (car target) 'clock) (if (and (markerp org-clock-hd-marker) @@ -847,6 +850,7 @@ it. When it is a variable, retrieve the value. Return whatever we get." (goto-char (org-capture-get :pos)) (org-set-local 'org-capture-target-marker (move-marker (make-marker) (point))) + (org-set-local 'outline-level 'org-outline-level) (let* ((template (org-capture-get :template)) (type (org-capture-get :type))) (case type @@ -1146,11 +1150,11 @@ Point will remain at the first line after the inserted text." (or (bolp) (newline)) (setq beg (point)) (cond - ((and (eq type 'entry) (org-mode-p)) + ((and (eq type 'entry) (eq major-mode 'org-mode)) (org-capture-verify-tree (org-capture-get :template)) (org-paste-subtree nil template t)) ((and (memq type '(item checkitem)) - (org-mode-p) + (eq major-mode 'org-mode) (save-excursion (skip-chars-backward " \t\n") (setq pp (point)) (org-in-item-p))) @@ -1199,7 +1203,7 @@ The user is queried for the template." (error "No capture template selected")) (org-capture-set-plist entry) (org-capture-set-target-location) - (switch-to-buffer (org-capture-get :buffer)) + (org-pop-to-buffer-same-window (org-capture-get :buffer)) (goto-char (org-capture-get :pos)))) (defun org-capture-get-indirect-buffer (&optional buffer prefix) @@ -1212,8 +1216,10 @@ Use PREFIX as a prefix for the name of the indirect buffer." (setq bname (concat prefix "-" (number-to-string (incf n)) "-" base))) (condition-case nil (make-indirect-buffer buffer bname 'clone) - (error (make-indirect-buffer buffer bname))))) - + (error + (let ((buf (make-indirect-buffer buffer bname))) + (with-current-buffer buf (org-mode)) + buf))))) (defun org-capture-verify-tree (tree) "Throw error if TREE is not a valid tree" @@ -1309,7 +1315,7 @@ The template may still contain \"%?\" for cursor positioning." (sit-for 1)) (save-window-excursion (delete-other-windows) - (switch-to-buffer (get-buffer-create "*Capture*")) + (org-pop-to-buffer-same-window (get-buffer-create "*Capture*")) (erase-buffer) (insert template) (goto-char (point-min)) @@ -1411,7 +1417,7 @@ The template may still contain \"%?\" for cursor positioning." (or (equal (char-before) ?:) (insert ":")) (insert ins) (or (equal (char-after) ?:) (insert ":")) - (and (org-on-heading-p) (org-set-tags nil 'align))))) + (and (org-at-heading-p) (org-set-tags nil 'align))))) ((equal char "C") (cond ((= (length clipboards) 1) (insert (car clipboards))) ((> (length clipboards) 1) @@ -1449,7 +1455,7 @@ The template may still contain \"%?\" for cursor positioning." (goto-char (point-min)) (while (looking-at "[ \t]*\n") (replace-match "")) (if (re-search-forward "[ \t\n]*\\'" nil t) (replace-match "\n")) - ;; Return the expanded template and kill the temporary buffer + ;; Return the expanded tempate and kill the temporary buffer (untabify (point-min) (point-max)) (set-buffer-modified-p nil) (prog1 (buffer-string) (kill-buffer (current-buffer)))))) @@ -1503,6 +1509,4 @@ The template may still contain \"%?\" for cursor positioning." (provide 'org-capture) - - ;;; org-capture.el ends here diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 09b646d40ba..411e3a4bc35 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1,11 +1,10 @@ ;;; org-clock.el --- The time clocking code for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -36,6 +35,7 @@ (declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) (declare-function notifications-notify "notifications" (&rest params)) +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defvar org-time-stamp-formats) (defvar org-ts-what) @@ -328,7 +328,7 @@ to add an effort property.") "Hook run when stopping the current clock.") (defvar org-clock-cancel-hook nil - "Hook run when canceling the current clock.") + "Hook run when cancelling the current clock.") (defvar org-clock-goto-hook nil "Hook run when selecting the currently clocked-in entry.") (defvar org-clock-has-been-used nil @@ -346,7 +346,7 @@ to add an effort property.") (defvar org-clock-start-time "") (defvar org-clock-leftover-time nil - "If non-nil, user canceled a clock; this is when leftover time started.") + "If non-nil, user cancelled a clock; this is when leftover time started.") (defvar org-clock-effort "" "Effort estimate of the currently clocking task.") @@ -658,7 +658,7 @@ Use alsa's aplay tool if available." (defun org-program-exists (program-name) "Checks whenever we can locate program and launch it." - (if (eq system-type 'gnu/linux) + (if (member system-type '(gnu/linux darwin)) (= 0 (call-process "which" nil nil nil program-name)))) (defvar org-clock-mode-line-entry nil @@ -691,7 +691,7 @@ Use alsa's aplay tool if available." (goto-char (car ,clock)) (beginning-of-line) ,@forms)))) - +(def-edebug-spec org-with-clock-position (form body)) (put 'org-with-clock-position 'lisp-indent-function 1) (defmacro org-with-clock (clock &rest forms) @@ -707,7 +707,7 @@ This macro also protects the current active clock from being altered." (outline-back-to-heading t) (point-marker)))) ,@forms))) - +(def-edebug-spec org-with-clock (form body)) (put 'org-with-clock 'lisp-indent-function 1) (defsubst org-clock-clock-in (clock &optional resume start-time) @@ -1066,7 +1066,7 @@ the clocking selection, associated with the letter `d'." ;; Clock in at which position? (setq target-pos - (if (and (eobp) (not (org-on-heading-p))) + (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks 'org-clock-in-prepare-hook) @@ -1115,9 +1115,9 @@ the clocking selection, associated with the letter `d'." (cond ((and org-clock-in-resume (looking-at - (concat "^[ \t]* " org-clock-string + (concat "^[ \t]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" - " +\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$"))) + " *\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$"))) (message "Matched %s" (match-string 1)) (setq ts (concat "[" (match-string 1) "]")) (goto-char (match-end 1)) @@ -1247,9 +1247,9 @@ line and position cursor in that line." (goto-char beg) (when (and find-unclosed (re-search-forward - (concat "^[ \t]* " org-clock-string + (concat "^[ \t]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" - " +\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$") + " *\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$") end t)) (beginning-of-line 1) (throw 'exit t)) @@ -1261,7 +1261,7 @@ line and position cursor in that line." (and (re-search-forward org-property-end-re nil t) (goto-char (match-beginning 0)))) (throw 'exit t)) - ;; Let's count the CLOCK lines + ;; Lets count the CLOCK lines (goto-char beg) (while (re-search-forward re end t) (setq first (or first (match-beginning 0)) @@ -1497,7 +1497,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection." (setq recent t) (car org-clock-history)) (t (error "No active or recent clock task"))))) - (switch-to-buffer (marker-buffer m)) + (org-pop-to-buffer-same-window (marker-buffer m)) (if (or (< m (point-min)) (> m (point-max))) (widen)) (goto-char m) (org-show-entry) @@ -1696,7 +1696,9 @@ from the `before-change-functions' in the current buffer." "Clock out if the current entry contains the running clock. This is used to stop the clock after a TODO entry is marked DONE, and is only done if the variable `org-clock-out-when-done' is not nil." - (when (and org-clock-out-when-done + (when (and (org-clocking-p) + org-clock-out-when-done + (marker-buffer org-clock-marker) (or (and (eq t org-clock-out-when-done) (member state org-done-keywords)) (and (listp org-clock-out-when-done) @@ -1998,7 +2000,8 @@ the currently selected interval size." (encode-time 0 0 0 (+ d n) m y)))) ((and wp (string-match "w\\|W" wp) mw (> (length wp) 0)) (require 'cal-iso) - (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (list (+ mw n) 1 y)))) + (setq date (calendar-gregorian-from-absolute + (calendar-absolute-from-iso (list (+ mw n) 1 y)))) (setq ins (format-time-string "%G-W%V" (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) @@ -2014,7 +2017,8 @@ the currently selected interval size." (setq mw 5 y (- y 1)) ()) - (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y)))) + (setq date (calendar-gregorian-from-absolute + (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y)))) (setq ins (format-time-string (concatenate 'string (number-to-string y) "-Q" (number-to-string (+ mw n))) (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) @@ -2050,7 +2054,6 @@ the currently selected interval size." 'org-clocktable-write-default)) cc range-text ipos pos one-file-with-archives scope-is-list tbls level) - ;; Check if we need to do steps (when block ;; Get the range text for the header @@ -2125,7 +2128,7 @@ the currently selected interval size." "Write out a clock table at position IPOS in the current buffer. TABLES is a list of tables with clocking data as produced by `org-clock-get-table-data'. PARAMS is the parameter property list obtained -from the dynamic block definition." +from the dynamic block defintion." ;; This function looks quite complicated, mainly because there are a ;; lot of options which can add or remove columns. I have massively ;; commented this function, the I hope it is understandable. If @@ -2638,6 +2641,5 @@ The details of what will be saved are regulated by the variable (provide 'org-clock) - - ;;; org-clock.el ends here + diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 0f6fc0bed6a..c62c6835d3f 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -1,11 +1,10 @@ ;;; org-colview.el --- Column View in Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -187,7 +186,7 @@ This is the compiled version of the format.") (cons "ITEM" ;; When in a buffer, get the whole line, ;; we'll clean it later… - (if (org-mode-p) + (if (eq major-mode 'org-mode) (save-match-data (org-no-properties (org-remove-tabs @@ -209,9 +208,9 @@ This is the compiled version of the format.") (funcall org-columns-modify-value-for-display-function title val)) ((equal property "ITEM") - (if (org-mode-p) - (org-columns-cleanup-item - val org-columns-current-fmt-compiled))) + (org-columns-cleanup-item + val org-columns-current-fmt-compiled + (or org-complex-heading-regexp cphr))) ((and calc (functionp calc) (not (string= val "")) (not (get-text-property 0 'org-computed val))) @@ -341,24 +340,28 @@ for the duration of the command.") (when (local-variable-p 'org-colview-initial-truncate-line-value) (setq truncate-lines org-colview-initial-truncate-line-value))))) -(defun org-columns-cleanup-item (item fmt) - "Remove from ITEM what is a column in the format FMT." - (if (not org-complex-heading-regexp) - item - (when (string-match org-complex-heading-regexp item) - (setq item - (concat - (org-add-props (match-string 1 item) nil - 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) - (and (match-end 2) (not (assoc "TODO" fmt)) (concat " " (match-string 2 item))) - (and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item))) - " " (save-match-data (org-columns-compact-links (match-string 4 item))) - (and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item))))) - (add-text-properties - 0 (1+ (match-end 1)) - (list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) - item) - item))) +(defun org-columns-cleanup-item (item fmt cphr) + "Remove from ITEM what is a column in the format FMT. +CPHR is the complex heading regexp to use for parsing ITEM." + (let (fixitem) + (if (not cphr) + item + (unless (string-match "^\*+ " item) + (setq item (concat "* " item) fixitem t)) + (if (string-match cphr item) + (setq item + (concat + (org-add-props (match-string 1 item) nil + 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) + (and (match-end 2) (not (assoc "TODO" fmt)) (concat " " (match-string 2 item))) + (and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item))) + " " (save-match-data (org-columns-compact-links (match-string 4 item))) + (and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item))))) + (add-text-properties + 0 (1+ (match-end 1)) + (list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) + item)) + (if fixitem (replace-regexp-in-string "^\*+ " "" item) item)))) (defun org-columns-compact-links (s) "Replace [[link][desc]] with [desc] or [link]." @@ -494,7 +497,7 @@ Where possible, use the standard interface for changing this line." (org-columns-eval eval)) (org-columns-display-here))) (org-move-to-column col) - (if (and (org-mode-p) + (if (and (eq major-mode 'org-mode) (nth 3 (assoc key org-columns-current-fmt-compiled))) (org-columns-update key))))))) @@ -544,7 +547,7 @@ Where possible, use the standard interface for changing this line." (beginning-of-line 1) ;; `next-line' is needed here, because it skips invisible line. (condition-case nil (org-no-warnings (next-line 1)) (error nil)) - (setq hidep (org-on-heading-p 1))) + (setq hidep (org-at-heading-p 1))) (eval form) (and hidep (hide-entry)))) @@ -872,7 +875,7 @@ display, or in the #+COLUMNS line of the current buffer." (replace-match (concat "#+COLUMNS: " fmt) t t)) (unless (> cnt 0) (goto-char (point-min)) - (or (org-on-heading-p t) (outline-next-heading)) + (or (org-at-heading-p t) (outline-next-heading)) (let ((inhibit-read-only t)) (insert-before-markers "#+COLUMNS: " fmt "\n"))) (org-set-local 'org-columns-default-format fmt)))))) @@ -1000,7 +1003,7 @@ Don't set this, this is meant for dynamic scoping.") (if (marker-position org-columns-begin-marker) (goto-char org-columns-begin-marker)) (org-columns-remove-overlays) - (if (org-mode-p) + (if (eq major-mode 'org-mode) (call-interactively 'org-columns) (org-agenda-redo) (call-interactively 'org-agenda-columns))) @@ -1139,6 +1142,8 @@ calc function to get values from base elements" ;;; Dynamic block for Column view +(defvar org-heading-regexp) ; defined in org.el +(defvar org-heading-keyword-regexp-format) ; defined in org.el (defun org-columns-capture-view (&optional maxlevel skip-empty-rows) "Get the column view of the current buffer or subtree. The first optional argument MAXLEVEL sets the level limit. A @@ -1149,11 +1154,12 @@ containing the title row and all other rows. Each row is a list of fields." (save-excursion (let* ((title (mapcar 'cadr org-columns-current-fmt-compiled)) - (re-comment (concat "\\*+[ \t]+" org-comment-string "\\>")) + (re-comment (format org-heading-keyword-regexp-format + org-comment-string)) (re-archive (concat ".*:" org-archive-tag ":")) (n (length title)) row tbl) (goto-char (point-min)) - (while (re-search-forward "^\\(\\*+\\) " nil t) + (while (re-search-forward org-heading-regexp nil t) (catch 'next (when (and (or (null maxlevel) (>= maxlevel @@ -1525,6 +1531,4 @@ The string should be two numbers joined with a \"-\"." (provide 'org-colview) - - ;;; org-colview.el ends here diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 5e4935caa7e..c053758bdd9 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -1,11 +1,10 @@ ;;; org-compat.el --- Compatibility code for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -252,8 +251,12 @@ Works on both Emacs and XEmacs." (defun org-activate-mark () (when (mark t) (setq mark-active t) - (unless transient-mark-mode - (setq transient-mark-mode 'lambda))))) + (when (and (boundp 'transient-mark-mode) + (not transient-mark-mode)) + (setq transient-mark-mode 'lambda)) + (when (boundp 'zmacs-regions) + (setq zmacs-regions t))))) + ;; Invisibility compatibility @@ -272,7 +275,7 @@ Works on both Emacs and XEmacs." nil)) (defmacro org-xemacs-without-invisibility (&rest body) - "Turn off extents with invisibility while executing BODY." + "Turn off exents with invisibility while executing BODY." `(let ((ext-inv (extent-list nil (point-at-bol) (point-at-eol) 'all-extents-closed-open 'invisible)) ext-inv-specs) @@ -285,6 +288,7 @@ Works on both Emacs and XEmacs." (dolist (ext-inv-spec ext-inv-specs) (set-extent-property (car ext-inv-spec) 'invisible (cadr ext-inv-spec))))) +(def-edebug-spec org-xemacs-without-invisibility (body)) (defun org-indent-to-column (column &optional minimum buffer) "Work around a bug with extents with invisibility in XEmacs." @@ -432,8 +436,15 @@ With two arguments, return floor and remainder of their quotient." (let ((q (floor x y))) (list q (- x (if y (* y q) q))))) -(provide 'org-compat) - +;; `pop-to-buffer-same-window' has been introduced with Emacs 24.1. +(defun org-pop-to-buffer-same-window + (&optional buffer-or-name norecord label) + "Pop to buffer specified by BUFFER-OR-NAME in the selected window." + (if (fboundp 'pop-to-buffer-same-window) + (funcall + 'pop-to-buffer-same-window buffer-or-name norecord) + (funcall 'switch-to-buffer buffer-or-name norecord))) +(provide 'org-compat) ;;; org-compat.el ends here diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index b260391a0da..f7644048f48 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el @@ -4,7 +4,6 @@ ;; Emacs Lisp Archive Entry ;; Filename: org-crypt.el -;; Version: 7.7 ;; Keywords: org-mode ;; Author: John Wiegley ;; Maintainer: Peter Jones @@ -117,6 +116,35 @@ nil : Leave auto-save-mode enabled. (const :tag "Ask" ask) (const :tag "Encrypt" encrypt))) +(defun org-crypt-check-auto-save () + "Check whether auto-save-mode is enabled for the current buffer. + +`auto-save-mode' may cause leakage when decrypting entries, so +check whether it's enabled, and decide what to do about it. + +See `org-crypt-disable-auto-save'." + (when buffer-auto-save-file-name + (cond + ((or + (eq org-crypt-disable-auto-save t) + (and + (eq org-crypt-disable-auto-save 'ask) + (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) + (message (concat "org-decrypt: Disabling auto-save-mode for " (or (buffer-file-name) (current-buffer)))) + ; The argument to auto-save-mode has to be "-1", since + ; giving a "nil" argument toggles instead of disabling. + (auto-save-mode -1)) + ((eq org-crypt-disable-auto-save nil) + (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) + ((eq org-crypt-disable-auto-save 'encrypt) + (message "org-decrypt: Enabling re-encryption on auto-save.") + (add-hook 'auto-save-hook + (lambda () + (message "org-crypt: Re-encrypting all decrypted entries due to auto-save.") + (org-encrypt-entries)) + nil t)) + (t nil)))) + (defun org-crypt-key-for-heading () "Return the encryption key for the current heading." (save-excursion @@ -165,30 +193,6 @@ nil : Leave auto-save-mode enabled. (defun org-decrypt-entry () "Decrypt the content of the current headline." (interactive) - - ; auto-save-mode may cause leakage, so check whether it's enabled. - (when buffer-auto-save-file-name - (cond - ((or - (eq org-crypt-disable-auto-save t) - (and - (eq org-crypt-disable-auto-save 'ask) - (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) - (message (concat "org-decrypt: Disabling auto-save-mode for " (or (buffer-file-name) (current-buffer)))) - ; The argument to auto-save-mode has to be "-1", since - ; giving a "nil" argument toggles instead of disabling. - (auto-save-mode -1)) - ((eq org-crypt-disable-auto-save nil) - (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) - ((eq org-crypt-disable-auto-save 'encrypt) - (message "org-decrypt: Enabling re-encryption on auto-save.") - (add-hook 'auto-save-hook - (lambda () - (message "org-crypt: Re-encrypting all decrypted entries due to auto-save.") - (org-encrypt-entries)) - nil t)) - (t nil))) - (require 'epg) (unless (org-before-first-heading-p) (save-excursion @@ -200,6 +204,7 @@ nil : Leave auto-save-mode enabled. (outline-invisible-p)))) (forward-line) (when (looking-at "-----BEGIN PGP MESSAGE-----") + (org-crypt-check-auto-save) (let* ((end (save-excursion (search-forward "-----END PGP MESSAGE-----") (forward-line) @@ -252,6 +257,4 @@ nil : Leave auto-save-mode enabled. (provide 'org-crypt) - - ;;; org-crypt.el ends here diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index d567b929056..609c0941423 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -3,10 +3,9 @@ ;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Paul Sexton -;; Version: 7.7 + ;; Keywords: org, wp -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -36,7 +35,7 @@ ;; links to these 'tagged' destinations, allowing seamless navigation between ;; multiple org-mode files. Topics can be created in any org mode file and ;; will always be found by plain links from other files. Other file types -;; recognized by ctags (source code files, latex files, etc) will also be +;; recognised by ctags (source code files, latex files, etc) will also be ;; available as destinations for plain links, and similarly, org-mode links ;; will be available as tags from source files. Finally, the function ;; `org-ctags-find-tag-interactive' lets you choose any known tag, using @@ -64,19 +63,19 @@ ;; with the same name as the link; then, if unsuccessful, ask the user if ;; he/she wants to rebuild the 'TAGS' database and try again; then ask if ;; the user wishes to append 'tag' as a new toplevel heading at the end of -;; the buffer; and finally, defer to org's default behavior which is to +;; the buffer; and finally, defer to org's default behaviour which is to ;; search the entire text of the current buffer for 'tag'. ;; -;; This behavior can be modified by changing the value of +;; This behaviour can be modified by changing the value of ;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my -;; .emacs, which describes the same behavior as the above paragraph with +;; .emacs, which describes the same behaviour as the above paragraph with ;; one difference: ;; ;; (setq org-ctags-open-link-functions ;; '(org-ctags-find-tag ;; org-ctags-ask-rebuild-tags-file-then-find-tag ;; org-ctags-ask-append-topic -;; org-ctags-fail-silently)) ; <-- prevents org default behavior +;; org-ctags-fail-silently)) ; <-- prevents org default behaviour ;; ;; ;; Usage @@ -140,6 +139,8 @@ (require 'org) +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) + (defgroup org-ctags nil "Options concerning use of ctags within org mode." :tag "Org-Ctags" @@ -305,7 +306,7 @@ The new topic will be titled NAME (or TITLE if supplied)." activate compile) "Before trying to find a tag, save our current position on org mark ring." (save-excursion - (if (and (org-mode-p) org-ctags-enabled-p) + (if (and (eq major-mode 'org-mode) org-ctags-enabled-p) (org-mark-ring-push)))) @@ -385,7 +386,7 @@ the new file." (cond ((get-buffer (concat name ".org")) ;; Buffer is already open - (switch-to-buffer (get-buffer (concat name ".org")))) + (org-pop-to-buffer-same-window (get-buffer (concat name ".org")))) ((file-exists-p filename) ;; File exists but is not open --> open it (message "Opening existing org file `%S'..." @@ -537,5 +538,4 @@ a new topic." (provide 'org-ctags) - ;;; org-ctags.el ends here diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index f02f3789823..ae3d04a24fa 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -195,6 +194,4 @@ before running this command, even though the command tries to be smart." (provide 'org-datetree) - - ;;; org-datetree.el ends here diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index f964a93fa1c..6b103543a31 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el @@ -4,7 +4,6 @@ ;; ;; Emacs Lisp Archive Entry ;; Filename: org-docbook.el -;; Version: 7.7 ;; Author: Baoqiu Cui ;; Maintainer: Baoqiu Cui ;; Keywords: org, wp, docbook @@ -294,7 +293,7 @@ then use this command to convert it." (interactive "r") (let (reg docbook buf) (save-window-excursion - (if (org-mode-p) + (if (eq major-mode 'org-mode) (setq docbook (org-export-region-as-docbook beg end t 'string)) (setq reg (buffer-substring beg end) @@ -394,6 +393,8 @@ in a window. A non-interactive call will only return the buffer." (org-open-file pdffile) (error "PDF file was not produced")))) +(defvar org-heading-keyword-regexp-format) ; defined in org.el + ;;;###autoload (defun org-export-as-docbook (&optional hidden ext-plist to-buffer body-only pub-dir) @@ -475,9 +476,11 @@ publishing directory." (current-dir (if buffer-file-name (file-name-directory buffer-file-name) default-directory)) + (auto-insert nil); Avoid any auto-insert stuff for the new file (buffer (if to-buffer (cond - ((eq to-buffer 'string) (get-buffer-create "*Org DocBook Export*")) + ((eq to-buffer 'string) + (get-buffer-create "*Org DocBook Export*")) (t (get-buffer-create to-buffer))) (find-file-noselect filename))) ;; org-levels-open is a global variable @@ -499,8 +502,9 @@ publishing directory." ;; We will use HTML table formatter to export tables to DocBook ;; format, so need to set html-table-tag here. (html-table-tag (plist-get opt-plist :html-table-tag)) - (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) - (quote-re (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)")) + (quote-re0 (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)")) + (quote-re (format org-heading-keyword-regexp-format + org-quote-string)) (inquote nil) (infixed nil) (inverse nil) @@ -970,7 +974,7 @@ publishing directory." (push (cons num 1) footref-seen)))))) (cond - ((string-match "^\\(\\*+\\)[ \t]+\\(.*\\)" line) + ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) ;; This is a headline (setq level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) @@ -1445,5 +1449,4 @@ the alist of previous items." (provide 'org-docbook) - ;;; org-docbook.el ends here diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 201567251d7..cf1801f2b53 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el @@ -5,7 +5,6 @@ ;; Author: Jan Böcker ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -88,6 +87,4 @@ and append it." (provide 'org-docview) - - ;;; org-docview.el ends here diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index 1e7fd627a17..eb6994e712f 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el @@ -6,7 +6,6 @@ ;; Ulf Stegemann ;; Keywords: outlines, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -568,6 +567,4 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'." ;; coding: utf-8 ;; End: - - ;;; org-entities.el ends here diff --git a/lisp/org/org-eshell.el b/lisp/org/org-eshell.el new file mode 100644 index 00000000000..5486b1e0e9e --- /dev/null +++ b/lisp/org/org-eshell.el @@ -0,0 +1,64 @@ +;;; org-eshell.el - Support for links to working directories in eshell +;; Copyright (C) 2011 Free Software Foundation, Inc. +;; +;; Author: Konrad Hinsen +;; Version: 0.1 +;; +;; This file is part of GNU Emacs. +;; +;; Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(require 'org) +(require 'eshell) +(require 'esh-mode) + +(org-add-link-type "eshell" 'org-eshell-open) +(add-hook 'org-store-link-functions 'org-eshell-store-link) + +(defun org-eshell-open (link) + "Switch to am eshell buffer and execute a command line. + The link can be just a command line (executed in the default + eshell buffer) or a command line prefixed by a buffer name + followed by a colon." + (let* ((buffer-and-command + (if (string-match "\\([A-Za-z0-9-+*]+\\):\\(.*\\)" link) + (list (match-string 1 link) + (match-string 2 link)) + (list eshell-buffer-name link))) + (eshell-buffer-name (car buffer-and-command)) + (command (cadr buffer-and-command))) + (if (get-buffer eshell-buffer-name) + (org-pop-to-buffer-same-window eshell-buffer-name) + (eshell)) + (end-of-buffer) + (eshell-kill-input) + (insert command) + (eshell-send-input))) + +(defun org-eshell-store-link () + "Store a link that, when opened, switches back to the current eshell buffer + and the current working directory." + (when (eq major-mode 'eshell-mode) + (let* ((command (concat "cd " dired-directory)) + (link (concat (buffer-name) ":" command))) + (org-store-link-props + :link (org-make-link "eshell:" link) + :description command)))) + +(provide 'org-eshell) + +;;; org-eshell.el ends here diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el index 398da3859d0..3396d5812a7 100644 --- a/lisp/org/org-exp-blocks.el +++ b/lisp/org/org-exp-blocks.el @@ -1,9 +1,8 @@ ;;; org-exp-blocks.el --- pre-process blocks when exporting org files -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte -;; Version: 7.7 ;; This file is part of GNU Emacs. ;; @@ -176,10 +175,10 @@ which defaults to the value of `org-export-blocks-witheld'." (setq start (point)) (let ((beg-re "^\\([ \t]*\\)#\\+begin_\\(\\S-+\\)[ \t]*\\(.*\\)?[\r\n]")) (while (re-search-forward beg-re nil t) - (let* ((match-start (match-beginning 0)) - (body-start (match-end 0)) + (let* ((match-start (copy-marker (match-beginning 0))) + (body-start (copy-marker (match-end 0))) (indentation (length (match-string 1))) - (inner-re (format "[\r\n]*[ \t]*#\\+\\(begin\\|end\\)_%s" + (inner-re (format "^[ \t]*#\\+\\(begin\\|end\\)_%s" (regexp-quote (downcase (match-string 2))))) (type (intern (downcase (match-string 2)))) (headers (save-match-data @@ -196,7 +195,7 @@ which defaults to the value of `org-export-blocks-witheld'." (when (not (zerop balanced)) (error "unbalanced begin/end_%s blocks with %S" type (buffer-substring match-start (point)))) - (setq match-end (match-end 0)) + (setq match-end (copy-marker (match-end 0))) (unless preserve-indent (setq body (save-match-data (org-remove-indentation (buffer-substring @@ -211,7 +210,11 @@ which defaults to the value of `org-export-blocks-witheld'." (delete-region match-start match-end) (goto-char match-start) (insert replacement) (unless preserve-indent - (indent-code-rigidly match-start (point) indentation)))))) + (indent-code-rigidly match-start (point) indentation))))) + ;; cleanup markers + (set-marker match-start nil) + (set-marker body-start nil) + (set-marker match-end nil)) (setq start (point)))) (interblock start (point-max)) (run-hooks 'org-export-blocks-postblock-hook))))) @@ -376,5 +379,4 @@ other backends, it converts the comment into an EXAMPLE segment." (provide 'org-exp-blocks) - ;;; org-exp-blocks.el ends here diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 20275714a0e..8a7ca622759 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el @@ -1,11 +1,10 @@ ;;; org-exp.el --- ASCII, HTML, XOXO and iCalendar export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -47,13 +46,15 @@ (declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ()) (declare-function org-table-cookie-line-p "org-table" (line)) (declare-function org-table-colgroup-line-p "org-table" (line)) +(declare-function org-pop-to-buffer-same-window "org-compat" + (&optional buffer-or-name norecord label)) (autoload 'org-export-generic "org-export-generic" "Export using the generic exporter" t) (autoload 'org-export-as-odt "org-odt" - "Export the outline to a OpenDocumentText file." t) + "Export the outline to a OpenDocument Text file." t) (autoload 'org-export-as-odt-and-open "org-odt" - "Export the outline to a OpenDocumentText file and open it." t) + "Export the outline to a OpenDocument Text file and open it." t) (defgroup org-export nil "Options for exporting org-listings." @@ -216,6 +217,11 @@ and in `org-clock-clocktable-language-setup'." :group 'org-export-general :type 'string) +(defcustom org-export-date-timestamp-format "%Y-%m-%d" + "Time string format for Org timestamps in the #+DATE option." + :group 'org-export-general + :type 'string) + (defvar org-export-page-description "" "The page description, for the XHTML meta tag. This is best set with the #+DESCRIPTION line in a file, it does not make @@ -725,6 +731,7 @@ must accept the property list as an argument, and must return the (possibly modified) list.") ;; FIXME: should we fold case here? + (defun org-infile-export-plist () "Return the property list with file-local settings for export." (save-excursion @@ -736,13 +743,13 @@ modified) list.") '("TITLE" "AUTHOR" "DATE" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE" "MATHJAX" "LINK_UP" "LINK_HOME" "SETUPFILE" "STYLE" - "LATEX_HEADER" "LATEX_CLASS" + "LATEX_HEADER" "LATEX_CLASS" "LATEX_CLASS_OPTIONS" "EXPORT_SELECT_TAGS" "EXPORT_EXCLUDE_TAGS" "KEYWORDS" "DESCRIPTION" "MACRO" "BIND" "XSLT") (mapcar 'car org-export-inbuffer-options-extra)))) (case-fold-search t) p key val text options mathjax a pr style - latex-header latex-class macros letbind + latex-header latex-class latex-class-options macros letbind ext-setup-or-nil setup-file setup-dir setup-contents (start 0)) (while (or (and ext-setup-or-nil (string-match re ext-setup-or-nil start) @@ -758,7 +765,15 @@ modified) list.") ((string-equal key "TITLE") (setq p (plist-put p :title val))) ((string-equal key "AUTHOR")(setq p (plist-put p :author val))) ((string-equal key "EMAIL") (setq p (plist-put p :email val))) - ((string-equal key "DATE") (setq p (plist-put p :date val))) + ((string-equal key "DATE") + ;; If date is an Org timestamp, convert it to a time + ;; string using `org-export-date-timestamp-format' + (when (string-match org-ts-regexp3 val) + (setq val (format-time-string + org-export-date-timestamp-format + (apply 'encode-time (org-parse-time-string + (match-string 0 val)))))) + (setq p (plist-put p :date val))) ((string-equal key "KEYWORDS") (setq p (plist-put p :keywords val))) ((string-equal key "DESCRIPTION") (setq p (plist-put p :description val))) @@ -769,6 +784,8 @@ modified) list.") (setq latex-header (concat latex-header "\n" val))) ((string-equal key "LATEX_CLASS") (setq latex-class val)) + ((string-equal key "LATEX_CLASS_OPTIONS") + (setq latex-class-options val)) ((string-equal key "TEXT") (setq text (if text (concat text "\n" val) val))) ((string-equal key "OPTIONS") @@ -812,6 +829,8 @@ modified) list.") (setq p (plist-put p :latex-header-extra (substring latex-header 1)))) (when latex-class (setq p (plist-put p :latex-class latex-class))) + (when latex-class-options + (setq p (plist-put p :latex-class-options latex-class-options))) (when options (setq p (org-export-add-options-to-plist p options))) (when mathjax @@ -947,7 +966,7 @@ Pressing `1' will switch between these two options." \[D] export as DocBook [V] export as DocBook, process to PDF, and open -\[o] export as OpenDocumentText [O] ... and open +\[o] export as OpenDocument Text [O] ... and open \[j] export as TaskJuggler [J] ... and open @@ -1011,6 +1030,7 @@ Pressing `1' will switch between these two options." (message "Export buffer: ")) ((not subtree-p) (setq subtree-p t) + (setq bpos (point)) (message "Export subtree: ")))) (when (eq r1 ?\ ) (let ((case-fold-search t) @@ -1027,7 +1047,7 @@ Pressing `1' will switch between these two options." (setq r1 (read-char-exclusive))) (error "No enclosing node with LaTeX_CLASS or EXPORT_TITLE or EXPORT_FILE_NAME") ))))) - (redisplay) + (if (fboundp 'redisplay) (redisplay)) ;; XEmacs does not have/need (redisplay) (and bpos (goto-char bpos)) (setq r2 (if (< r1 27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) @@ -1277,6 +1297,9 @@ on this string to produce the exported version." ;; Remove #+TBLFM and #+TBLNAME lines (org-export-handle-table-metalines) + ;; Remove #+results and #+name lines + (org-export-res/src-name-cleanup) + ;; Run the final hook (run-hooks 'org-export-preprocess-final-hook) @@ -1407,7 +1430,7 @@ the current file." (setq found (condition-case nil (org-link-search link) (error nil))) (when (and found - (or (org-on-heading-p) + (or (org-at-heading-p) (not (eq found 'dedicated)))) (or (get-text-property (point) 'target) (get-text-property @@ -1438,7 +1461,7 @@ the current file." (defvar org-export-format-drawer-function nil "Function to be called to format the contents of a drawer. -The function must accept three parameters: +The function must accept two parameters: NAME the drawer name, like \"PROPERTIES\" CONTENT the content of the drawer. You can check the export backend through `org-export-current-backend'. @@ -1518,7 +1541,7 @@ removed as well." (setq beg (point)) (put-text-property beg (point-max) :org-delete t) (while (re-search-forward re-sel nil t) - (when (org-on-heading-p) + (when (org-at-heading-p) (org-back-to-heading) (remove-text-properties (max (1- (point)) (point-min)) @@ -1588,7 +1611,7 @@ from the buffer." (when (not (eq export-archived-trees t)) (goto-char (point-min)) (while (re-search-forward re-archive nil t) - (if (not (org-on-heading-p t)) + (if (not (org-at-heading-p t)) (goto-char (point-at-eol)) (beginning-of-line 1) (setq a (if export-archived-trees @@ -1634,9 +1657,11 @@ from the buffer." (org-if-unprotected (replace-match ""))))) +(defvar org-heading-keyword-regexp-format) ; defined in org.el (defun org-export-protect-quoted-subtrees () "Mark quoted subtrees with the protection property." - (let ((org-re-quote (concat "^\\*+[ \t]+" org-quote-string "\\>"))) + (let ((org-re-quote (format org-heading-keyword-regexp-format + org-quote-string))) (goto-char (point-min)) (while (re-search-forward org-re-quote nil t) (goto-char (match-beginning 0)) @@ -1737,8 +1762,14 @@ from the buffer." (save-excursion (save-match-data (goto-char beg-content) - (while (re-search-forward "^[ \t]*\\(,\\)" end-content t) - (replace-match "" nil nil nil 1)))) + (let ((front-line (save-excursion + (re-search-forward + "[^[:space:]]" end-content t) + (goto-char (match-beginning 0)) + (current-column)))) + (while (re-search-forward "^[ \t]*\\(,\\)" end-content t) + (when (= (current-column) front-line) + (replace-match "" nil nil nil 1)))))) (delete-region (match-beginning 0) (match-end 0)) (save-excursion (goto-char beg) @@ -1924,7 +1955,8 @@ table line. If it is a link, add it to the line containing the link." (defun org-export-remove-comment-blocks-and-subtrees () "Remove the comment environment, and also commented subtrees." - (let ((re-commented (concat "^\\*+[ \t]+" org-comment-string "\\>")) + (let ((re-commented (format org-heading-keyword-regexp-format + org-comment-string)) case-fold-search) ;; Remove comment environment (goto-char (point-min)) @@ -1977,6 +2009,18 @@ When it is nil, all comments will be removed." (replace-match "") (goto-char (max (point-min) (1- pos))))))) +(defun org-export-res/src-name-cleanup () + "Clean up #+results and #+name lines for export. +This function should only be called after all block processing +has taken place." + (interactive) + (save-excursion + (goto-char (point-min)) + (let ((case-fold-search t)) + (while (org-re-search-forward-unprotected + "#\\+\\(name\\|results\\(\\[[a-z0-9]+\\]\\)?\\):" nil t) + (delete-region (match-beginning 0) (progn (forward-line) (point))))))) + (defun org-export-mark-radio-links () "Find all matches for radio targets and turn them into internal links." (let ((re-radio (and org-target-link-regexp @@ -1994,23 +2038,28 @@ When it is nil, all comments will be removed." (defun org-store-forced-table-alignment () "Find table lines which force alignment, store the results in properties." - (let (line cnt aligns) + (let (line cnt cookies) (goto-char (point-min)) - (while (re-search-forward "|[ \t]*<[lrc][0-9]*>[ \t]*|" nil t) + (while (re-search-forward "|[ \t]*<\\([lrc]?[0-9]+\\|[lrc]\\)>[ \t]*|" + nil t) ;; OK, this looks like a table line with an alignment cookie (org-if-unprotected (setq line (buffer-substring (point-at-bol) (point-at-eol))) (when (and (org-at-table-p) (org-table-cookie-line-p line)) - (setq cnt 0 aligns nil) + (setq cnt 0 cookies nil) (mapc (lambda (x) (setq cnt (1+ cnt)) - (if (string-match "\\`<\\([lrc]\\)" x) - (push (cons cnt (downcase (match-string 1 x))) aligns))) + (when (string-match "\\`<\\([lrc]\\)?\\([0-9]+\\)?>\\'" x) + (let ((align (and (match-end 1) + (downcase (match-string 1 x)))) + (width (and (match-end 2) + (string-to-number (match-string 2 x))))) + (push (cons cnt (list align width)) cookies)))) (org-split-string line "[ \t]*|[ \t]*")) (add-text-properties (org-table-begin) (org-table-end) - (list 'org-forced-aligns aligns)))) + (list 'org-col-cookies cookies)))) (goto-char (point-at-eol))))) (defun org-export-remove-special-table-lines () @@ -2048,10 +2097,11 @@ Also, store forced alignment information found in such lines." (re-angle-link (concat "\\([^[]\\)" org-angle-link-re)) nodesc) (goto-char (point-min)) + (while (re-search-forward org-bracket-link-regexp nil t) + (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t)) + (goto-char (point-min)) (while (re-search-forward re-plain-link nil t) - (unless (org-string-match-p - "\\[\\[\\S-+:\\S-*?\\<" - (buffer-substring (point-at-bol) (match-beginning 0))) + (unless (get-text-property (match-beginning 0) 'org-normalized-link) (goto-char (1- (match-end 0))) (org-if-unprotected-at (1+ (match-beginning 0)) (let* ((s (concat (match-string 1) @@ -2131,24 +2181,31 @@ can work correctly." (save-excursion (outline-next-heading) (point))))) (when (re-search-forward "^[ \t]*[^|# \t\r\n].*\n" end t) ;; Mark the line so that it will not be exported as normal text. - (org-unmodified - (add-text-properties (match-beginning 0) (match-end 0) - (list :org-license-to-kill t))) + (unless (org-in-block-p org-list-forbidden-blocks) + (org-unmodified + (add-text-properties (match-beginning 0) (match-end 0) + (list :org-license-to-kill t)))) ;; Return the title string (org-trim (match-string 0))))))) (defun org-export-get-title-from-subtree () "Return subtree title and exclude it from export." (let ((rbeg (region-beginning)) (rend (region-end)) - (inhibit-read-only t) title) + (inhibit-read-only t) + (tags (plist-get (org-infile-export-plist) :tags)) + title) (save-excursion (goto-char rbeg) (when (and (org-at-heading-p) (>= (org-end-of-subtree t t) rend)) + (when (plist-member org-export-opt-plist :tags) + (setq tags (or (plist-get org-export-opt-plist :tags) tags))) ;; This is a subtree, we take the title from the first heading (goto-char rbeg) - (looking-at org-todo-line-regexp) - (setq title (match-string 3)) + (looking-at org-todo-line-tags-regexp) + (setq title (if (eq tags t) + (format "%s\t%s" (match-string 3) (match-string 4)) + (match-string 3))) (org-unmodified (add-text-properties (point) (1+ (point-at-eol)) (list :org-license-to-kill t))) @@ -2688,11 +2745,11 @@ INDENT was the original indentation of the block." (format "\\begin{%s}\n%s\\end{%s}\n" custom-environment rtn custom-environment)) (listings-p - (format "\\begin{%s}\n%s\\end{%s}\n" + (format "\\begin{%s}\n%s\\end{%s}" "lstlisting" rtn "lstlisting")) (minted-p (format - "\\begin{minted}[%s]{%s}\n%s\\end{minted}\n" + "\\begin{minted}[%s]{%s}\n%s\\end{minted}" (mapconcat #'make-option-string org-export-latex-minted-options ",") backend-lang rtn))))))) @@ -2717,13 +2774,60 @@ INDENT was the original indentation of the block." "\n#+BEGIN_" backend-name "\n" (org-add-props rtn '(org-protected t org-example t org-native-text t)) - "\n#+END_" backend-name "\n\n")) + "\n#+END_" backend-name "\n")) (org-add-props rtn nil 'original-indentation indent)))) (defun org-export-number-lines (text &optional skip1 skip2 number cont - replace-labels label-format) + replace-labels label-format preprocess) + "Apply line numbers to literal examples and handle code references. +Handle user-specified options under info node `(org)Literal +examples' and return the modified source block. + +TEXT contains the source or example block. + +SKIP1 and SKIP2 are the number of lines that are to be skipped at +the beginning and end of TEXT. Use these to skip over +backend-specific lines pre-pended or appended to the original +source block. + +NUMBER is non-nil if the literal example specifies \"+n\" or +\"-n\" switch. If NUMBER is non-nil add line numbers. + +CONT is non-nil if the literal example specifies \"+n\" switch. +If CONT is nil, start numbering this block from 1. Otherwise +continue numbering from the last numbered block. + +REPLACE-LABELS is dual-purpose. +1. It controls the retention of labels in the exported block. +2. It specifies in what manner the links (or references) to a + labelled line be formatted. + +REPLACE-LABELS is the symbol `keep' if the literal example +specifies \"-k\" option, is numeric if the literal example +specifies \"-r\" option and is nil otherwise. + +Handle REPLACE-LABELS as below: +- If nil, retain labels in the exported block and use + user-provided labels for referencing the labelled lines. +- If it is a number, remove labels in the exported block and use + one of line numbers or labels for referencing labelled lines based + on NUMBER option. +- If it is a keep, retain labels in the exported block and use + one of line numbers or labels for referencing labelled lines + based on NUMBER option. + +LABEL-FORMAT is the value of \"-l\" switch associated with +literal example. See `org-coderef-label-format'. + +PREPROCESS is intended for backend-agnostic handling of source +block numbering. When non-nil do the following: +- do not number the lines +- always strip the labels from exported block +- do not make the labelled line a target of an incoming link. + Instead mark the labelled line with `org-coderef' property and + store the label in it." (setq skip1 (or skip1 0) skip2 (or skip2 0)) - (if (not cont) (setq org-export-last-code-line-counter-value 0)) + (if (and number (not cont)) (setq org-export-last-code-line-counter-value 0)) (with-temp-buffer (insert text) (goto-char (point-max)) @@ -2760,9 +2864,10 @@ INDENT was the original indentation of the block." (org-goto-line (1+ skip1)) (while (and (re-search-forward "^" nil t) (not (eobp)) (< n nmax)) - (if number - (insert (format fm (incf n))) - (forward-char 1)) + (when number (incf n)) + (if (or preprocess (not number)) + (forward-char 1) + (insert (format fm n))) (when (looking-at lbl-re) (setq ref (match-string 3)) (cond ((numberp replace-labels) @@ -2775,7 +2880,8 @@ INDENT was the original indentation of the block." ;; lines are numbered, use labels otherwise (goto-char (match-beginning 2)) (delete-region (match-beginning 2) (match-end 2)) - (insert "(" ref ")") + (unless preprocess + (insert "(" ref ")")) (push (cons ref (if (> n 0) n (concat "(" ref ")"))) org-export-code-refs)) (t @@ -2783,15 +2889,19 @@ INDENT was the original indentation of the block." ;; references (goto-char (match-beginning 2)) (delete-region (match-beginning 2) (match-end 2)) - (insert "(" ref ")") + (unless preprocess + (insert "(" ref ")")) (push (cons ref (concat "(" ref ")")) org-export-code-refs))) - (when (eq org-export-current-backend 'html) + (when (and (eq org-export-current-backend 'html) (not preprocess)) (save-excursion (beginning-of-line 1) (insert (format "" ref)) (end-of-line 1) - (insert ""))))) + (insert ""))) + (when preprocess + (add-text-properties + (point-at-bol) (point-at-eol) (list 'org-coderef ref))))) (setq org-export-last-code-line-counter-value n) (goto-char (point-max)) (newline) @@ -2893,17 +3003,6 @@ command." (switch-to-buffer-other-window buffer) (goto-char (point-min))))) -(defun org-find-visible () - (let ((s (point))) - (while (and (not (= (point-max) (setq s (next-overlay-change s)))) - (get-char-property s 'invisible))) - s)) -(defun org-find-invisible () - (let ((s (point))) - (while (and (not (= (point-max) (setq s (next-overlay-change s)))) - (not (get-char-property s 'invisible)))) - s)) - (defvar org-export-htmlized-org-css-url) ;; defined in org-html.el (defun org-export-string (string fmt &optional dir) @@ -2922,7 +3021,7 @@ to the value of `temporary-file-directory'." (org-load-modules-maybe) (unless org-local-vars (setq org-local-vars (org-get-local-variables))) - (eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode' + (eval ;; convert to fmt -- mimicing `org-run-like-in-org-mode' (list 'let org-local-vars (list (intern (format "org-export-as-%s" fmt)) nil nil nil ''string t)))) @@ -2972,7 +3071,7 @@ directory." (region (buffer-string)) str-ret) (save-excursion - (switch-to-buffer buffer) + (org-pop-to-buffer-same-window buffer) (erase-buffer) (insert region) (let ((org-inhibit-startup t)) (org-mode)) @@ -3218,7 +3317,7 @@ If yes remove the column and the special lines." (defun org-export-push-to-kill-ring (format) "Push buffer content to kill ring. -The depends on the variable `org-export-copy-to-kill'." +The depends on the variable `org-export-copy-to-kill-ring'." (when org-export-copy-to-kill-ring (org-kill-new (buffer-string)) (when (fboundp 'x-set-selection) @@ -3228,6 +3327,4 @@ The depends on the variable `org-export-copy-to-kill'." (provide 'org-exp) - - ;;; org-exp.el ends here diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index af9632eec44..3bf64df2d39 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -1,11 +1,10 @@ ;;; org-faces.el --- Face definitions for Org-mode. -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -673,6 +672,18 @@ month and 365.24 days for a year)." "Face for showing the agenda restriction lock." :group 'org-faces) +(defface org-agenda-filter-tags + (org-compatible-face 'modeline + nil) + "Face for tag(s) in the mode-line when filtering the agenda." + :group 'org-faces) + +(defface org-agenda-filter-category + (org-compatible-face 'modeline + nil) + "Face for tag(s) in the mode-line when filtering the agenda." + :group 'org-faces) + (defface org-time-grid ;; originally copied from font-lock-variable-name-face (org-compatible-face nil '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) @@ -690,6 +701,18 @@ month and 365.24 days for a year)." "Face used for agenda entries that come from the Emacs diary." :group 'org-faces) +(defface org-agenda-calendar-event + (org-compatible-face 'default + nil) + "Face used to show events and appointments in the agenda." + :group 'org-faces) + +(defface org-agenda-calendar-sexp + (org-compatible-face 'default + nil) + "Face used to show events computed from a S-expression." + :group 'org-faces) + (defconst org-level-faces '(org-level-1 org-level-2 org-level-3 org-level-4 org-level-5 org-level-6 org-level-7 org-level-8 @@ -735,6 +758,4 @@ level org-n-level-faces" (provide 'org-faces) - - ;;; org-faces.el ends here diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index d1b31f11b4a..4e300de7b06 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -436,7 +435,7 @@ it can be a list structured like an entry in `org-feed-alist'." (if (stringp feed) (setq feed (assoc feed org-feed-alist))) (unless feed (error "No such feed in `org-feed-alist")) - (switch-to-buffer + (org-pop-to-buffer-same-window (org-feed-update feed 'retrieve-only)) (goto-char (point-min))) @@ -674,5 +673,4 @@ formatted as a string, not the original XML data." (provide 'org-feed) - ;;; org-feed.el ends here diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 0d47132d2f8..a8125513db6 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -38,28 +37,33 @@ (require 'org-macs) (require 'org-compat) +(declare-function message-point-in-header-p "message" ()) +(declare-function org-back-over-empty-lines "org" ()) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) (declare-function org-combine-plists "org" (&rest plists)) +(declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading)) +(declare-function org-export-preprocess-string "org-exp" + (string &rest parameters)) +(declare-function org-fill-paragraph "org" (&optional justify)) +(declare-function org-icompleting-read "org" (&rest args)) +(declare-function org-id-uuid "org-id" ()) +(declare-function org-in-block-p "org" (names)) (declare-function org-in-commented-line "org" ()) (declare-function org-in-indented-comment-line "org" ()) (declare-function org-in-regexp "org" (re &optional nlines visually)) -(declare-function org-in-block-p "org" (names)) -(declare-function org-mark-ring-push "org" (&optional pos buffer)) -(declare-function outline-next-heading "outline") -(declare-function org-trim "org" (s)) -(declare-function org-show-context "org" (&optional key)) -(declare-function org-back-to-heading "org" (&optional invisible-ok)) -(declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading)) (declare-function org-in-verbatim-emphasis "org" ()) +(declare-function org-inside-LaTeX-fragment-p "org" ()) (declare-function org-inside-latex-macro-p "org" ()) -(declare-function org-id-uuid "org" ()) -(declare-function org-fill-paragraph "org" (&optional justify)) -(declare-function org-export-preprocess-string "org-exp" - (string &rest parameters)) +(declare-function org-mark-ring-push "org" (&optional pos buffer)) +(declare-function org-show-context "org" (&optional key)) +(declare-function org-trim "org" (s)) +(declare-function outline-next-heading "outline") -(defvar org-outline-regexp-bol) ; defined in org.el -(defvar org-odd-levels-only) ;; defined in org.el -(defvar org-bracket-link-regexp) ; defined in org.el -(defvar message-signature-separator) ;; defined in message.el +(defvar org-outline-regexp-bol) ; defined in org.el +(defvar org-odd-levels-only) ; defined in org.el +(defvar org-bracket-link-regexp) ; defined in org.el +(defvar message-cite-prefix-regexp) ; defined in message.el +(defvar message-signature-separator) ; defined in message.el (defconst org-footnote-re ;; Only [1]-like footnotes are closed in this regexp, as footnotes @@ -67,17 +71,17 @@ ;; their definition. ;; ;; `org-re' is used for regexp compatibility with XEmacs. - (org-re (concat "\\[\\(?:" - ;; Match inline footnotes. - "fn:\\([-_[:word:]]+\\)?:\\|" - ;; Match other footnotes. - "\\(?:\\([0-9]+\\)\\]\\)\\|" - "\\(fn:[-_[:word:]]+\\)" - "\\)")) + (concat "\\[\\(?:" + ;; Match inline footnotes. + (org-re "fn:\\([-_[:word:]]+\\)?:\\|") + ;; Match other footnotes. + "\\(?:\\([0-9]+\\)\\]\\)\\|" + (org-re "\\(fn:[-_[:word:]]+\\)") + "\\)") "Regular expression for matching footnotes.") (defconst org-footnote-definition-re - (org-re "^\\(\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]\\)") + (org-re "^\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]") "Regular expression matching the definition of a footnote.") (defvar org-footnote-forbidden-blocks '("example" "verse" "src" "ascii" "beamer" @@ -106,13 +110,17 @@ heading will be removed after extracting footnote definitions." (defcustom org-footnote-tag-for-non-org-mode-files "Footnotes:" "Tag marking the beginning of footnote section. -The Org-mode footnote engine can be used in arbitrary text files as well -as in Org-mode. Outside Org-mode, new footnotes are always placed at +The Org footnote engine can be used in arbitrary text files as well +as in Org-mode. Outside Org mode, new footnotes are always placed at the end of the file. When you normalize the notes, any line containing only this tag will be removed, a new one will be inserted at the end -of the file, followed by the collected and normalized footnotes." +of the file, followed by the collected and normalized footnotes. + +If you don't want any tag in such buffers, set this variable to nil." :group 'org-footnote - :type 'string) + :type '(choice + (string :tag "Collect footnotes under tag") + (const :tag "Don't use a tag" nil))) (defcustom org-footnote-define-inline nil "Non-nil means define footnotes inline, at reference location. @@ -171,8 +179,11 @@ extracted will be filled again." (save-match-data (not (or (org-in-commented-line) (org-in-indented-comment-line) - (org-in-verbatim-emphasis) + (org-inside-LaTeX-fragment-p) + ;; Avoid protected environments (LaTeX export) + (get-text-property (point) 'org-protected) ;; Avoid literal example. + (org-in-verbatim-emphasis) (save-excursion (beginning-of-line) (looking-at "[ \t]*:[ \t]+")) @@ -194,13 +205,13 @@ positions, and the definition, when inlined." (or (looking-at org-footnote-re) (org-in-regexp org-footnote-re) (save-excursion (re-search-backward org-footnote-re nil t))) - ;; Only inline footnotes can start at bol. - (or (eq (char-before (match-end 0)) 58) - (/= (match-beginning 0) (point-at-bol)))) + (/= (match-beginning 0) (point-at-bol))) (let* ((beg (match-beginning 0)) - (label (or (match-string 2) (match-string 3) + (label (or (org-match-string-no-properties 2) + (org-match-string-no-properties 3) ;; Anonymous footnotes don't have labels - (and (match-string 1) (concat "fn:" (match-string 1))))) + (and (match-string 1) + (concat "fn:" (org-match-string-no-properties 1))))) ;; Inline footnotes don't end at (match-end 0) as ;; `org-footnote-re' stops just after the second colon. ;; Find the real ending with `scan-sexps', so Org doesn't @@ -223,12 +234,12 @@ positions, and the definition, when inlined." ;; optional argument of the command. Thus, check ;; the `org-protected' property of that command. (or (not (org-inside-latex-macro-p)) - (and (get-text-property (1- beg) 'org-protected) - (not (get-text-property beg 'org-protected))))) + (get-text-property (1- beg) 'org-protected))) (list label beg end ;; Definition: ensure this is an inline footnote first. (and (or (not label) (match-string 1)) - (org-trim (buffer-substring (match-end 0) (1- end))))))))) + (org-trim (buffer-substring-no-properties + (match-end 0) (1- end))))))))) (defun org-footnote-at-definition-p () "Is the cursor at a footnote definition? @@ -239,7 +250,7 @@ footnote text is included and defined locally. The return value will be nil if not at a footnote definition, and a list with label, start, end and definition of the footnote otherwise." - (when (org-footnote-in-valid-context-p) + (when (save-excursion (beginning-of-line) (org-footnote-in-valid-context-p)) (save-excursion (end-of-line) (let ((lim (save-excursion (re-search-backward @@ -247,7 +258,7 @@ label, start, end and definition of the footnote otherwise." "\\|^[ \t]*$") nil t)))) (when (re-search-backward org-footnote-definition-re lim t) (end-of-line) - (list (match-string 2) + (list (org-match-string-no-properties 1) (match-beginning 0) (save-match-data ;; In a message, limit search to signature. @@ -257,15 +268,14 @@ label, start, end and definition of the footnote otherwise." (re-search-backward message-signature-separator nil t))))) (or (and (re-search-forward - (org-re - (concat "^[ \t]*$" "\\|" - org-outline-regexp-bol - "\\|" - "^\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]")) + (concat org-outline-regexp-bol "\\|" + org-footnote-definition-re "\\|" + "^[ \t]*$") bound 'move) (progn (skip-chars-forward " \t\n") (point-at-bol))) (point)))) - (org-trim (buffer-substring (match-end 0) (point))))))))) + (org-trim (buffer-substring-no-properties + (match-end 0) (point))))))))) (defun org-footnote-get-next-reference (&optional label backward limit) "Return complete reference of the next footnote. @@ -295,10 +305,11 @@ LIMIT is the buffer position bounding the search. Return value is a list like those provided by `org-footnote-at-reference-p' or `org-footnote-at-definition-p'. If no footnote is found, return nil." - (let* (ref) + (let* (ref (origin (point))) (catch 'exit (while t (unless (re-search-forward org-footnote-re limit t) + (goto-char origin) (throw 'exit nil)) ;; Beware: with [1]-like footnotes point will be just after ;; the closing square bracket. @@ -320,19 +331,21 @@ If no footnote is found, return nil." (re (format "^\\[%s\\]\\|.\\[%s:" label label)) pos) (save-excursion - (when (or (re-search-forward re nil t) - (and (goto-char (point-min)) - (re-search-forward re nil t)) - (and (progn (widen) t) - (goto-char (point-min)) - (re-search-forward re nil t))) - (let ((refp (org-footnote-at-reference-p))) - (cond - ((and (nth 3 refp) refp)) - ((org-footnote-at-definition-p)))))))) + (save-restriction + (when (or (re-search-forward re nil t) + (and (goto-char (point-min)) + (re-search-forward re nil t)) + (and (progn (widen) t) + (goto-char (point-min)) + (re-search-forward re nil t))) + (let ((refp (org-footnote-at-reference-p))) + (cond + ((and (nth 3 refp) refp)) + ((org-footnote-at-definition-p))))))))) (defun org-footnote-goto-definition (label) - "Move point to the definition of the footnote LABEL." + "Move point to the definition of the footnote LABEL. +Return a non-nil value when a definition has been found." (interactive "sLabel: ") (org-mark-ring-push) (let ((def (org-footnote-get-definition label))) @@ -342,7 +355,9 @@ If no footnote is found, return nil." (looking-at (format "\\[%s\\]\\|\\[%s:" label label)) (goto-char (match-end 0)) (org-show-context 'link-search) - (message "Edit definition and go back with `C-c &' or, if unique, with `C-c C-c'.")))) + (when (eq major-mode 'org-mode) + (message "Edit definition and go back with `C-c &' or, if unique, with `C-c C-c'.")) + t))) (defun org-footnote-goto-previous-reference (label) "Find the first closest (to point) reference of footnote with label LABEL." @@ -406,7 +421,12 @@ and value definition." (defun org-footnote-unique-label (&optional current) "Return a new unique footnote label. -The returns the firsts fn:N labels that is currently not used." + +The function returns the first \"fn:N\" or \"N\" label that is +currently not used. + +Optional argument CURRENT is the list of labels active in the +buffer." (unless current (setq current (org-footnote-all-labels))) (let ((fmt (if (eq org-footnote-auto-label 'plain) "%d" "fn:%d")) (cnt 1)) @@ -414,21 +434,17 @@ The returns the firsts fn:N labels that is currently not used." (incf cnt)) (format fmt cnt))) -(defvar org-footnote-label-history nil - "History of footnote labels entered in current buffer.") -(make-variable-buffer-local 'org-footnote-label-history) - (defun org-footnote-new () "Insert a new footnote. This command prompts for a label. If this is a label referencing an existing label, only insert the label. If the footnote label is empty or new, let the user edit the definition of the footnote." (interactive) - (unless (and (not (bolp)) (org-footnote-in-valid-context-p)) + (unless (org-footnote-in-valid-context-p) (error "Cannot insert a footnote here")) - (let* ((labels (and (not (equal org-footnote-auto-label 'random)) - (org-footnote-all-labels))) - (propose (org-footnote-unique-label labels)) + (let* ((lbls (and (not (equal org-footnote-auto-label 'random)) + (org-footnote-all-labels))) + (propose (org-footnote-unique-label lbls)) (label (org-footnote-normalize-label (cond @@ -438,16 +454,16 @@ or new, let the user edit the definition of the footnote." (require 'org-id) (substring (org-id-uuid) 0 8)) (t - (completing-read + (org-icompleting-read "Label (leave empty for anonymous): " - (mapcar 'list labels) nil nil - (if (eq org-footnote-auto-label 'confirm) propose nil) - 'org-footnote-label-history)))))) + (mapcar 'list lbls) nil nil + (if (eq org-footnote-auto-label 'confirm) propose nil))))))) (cond + ((bolp) (error "Cannot create a footnote reference at left margin")) ((not label) (insert "[fn:: ]") (backward-char 1)) - ((member label labels) + ((member label lbls) (insert "[" label "]") (message "New reference to existing note")) (org-footnote-define-inline @@ -459,51 +475,78 @@ or new, let the user edit the definition of the footnote." (org-footnote-create-definition label) (org-footnote-auto-adjust-maybe))))) +(defvar org-blank-before-new-entry nil) ; silence byte-compiler (defun org-footnote-create-definition (label) "Start the definition of a footnote with label LABEL." (interactive "sLabel: ") (let ((label (org-footnote-normalize-label label))) (cond - ((org-mode-p) - ;; No section, put footnote into the current outline node Try to - ;; find or make the special node + ;; In an Org file. + ((eq major-mode 'org-mode) + ;; If `org-footnote-section' is defined, find it, or create it + ;; at the end of the buffer. (when org-footnote-section (goto-char (point-min)) (let ((re (concat "^\\*+[ \t]+" org-footnote-section "[ \t]*$"))) (unless (or (re-search-forward re nil t) (and (progn (widen) t) (re-search-forward re nil t))) - (goto-char (point-max)) - (insert "\n\n* " org-footnote-section "\n")))) - ;; Now go to the end of this entry and insert there. + (goto-char (point-max)) + (skip-chars-backward " \t\r\n") + (unless (bolp) (newline)) + ;; Insert new section. Separate it from the previous one + ;; with a blank line, unless `org-blank-before-new-entry' + ;; explicitly says no. + (when (and (cdr (assq 'heading org-blank-before-new-entry)) + (zerop (save-excursion (org-back-over-empty-lines)))) + (insert "\n")) + (insert "* " org-footnote-section "\n")))) + ;; Move to the end of this entry (which may be + ;; `org-footnote-section' or the current one). (org-footnote-goto-local-insertion-point) (org-show-context 'link-search)) (t ;; In a non-Org file. Search for footnote tag, or create it if - ;; necessary (at the end of buffer, or before a signature if in + ;; specified (at the end of buffer, or before signature if in ;; Message mode). Set point after any definition already there. - (let ((tag (concat "^" org-footnote-tag-for-non-org-mode-files "[ \t]*$")) - (max (save-excursion - (if (and (derived-mode-p 'message-mode) - (re-search-forward - message-signature-separator nil t)) - (copy-marker (point-at-bol) t) - (copy-marker (point-max) t))))) + (let ((tag (and org-footnote-tag-for-non-org-mode-files + (concat "^" (regexp-quote + org-footnote-tag-for-non-org-mode-files) + "[ \t]*$"))) + (max (if (and (derived-mode-p 'message-mode) + (goto-char (point-max)) + (re-search-backward + message-signature-separator nil t)) + (progn + ;; Ensure one blank line separates last + ;; footnote from signature. + (beginning-of-line) + (open-line 2) + (point-marker)) + (point-max-marker)))) + (set-marker-insertion-type max t) (goto-char max) - (unless (re-search-backward tag nil t) + ;; Check if the footnote tag is defined but missing. In this + ;; case, insert it, before any footnote or one blank line + ;; after any previous text. + (when (and tag (not (re-search-backward tag nil t))) (skip-chars-backward " \t\r\n") - (delete-region (point) max) - (insert "\n\n" org-footnote-tag-for-non-org-mode-files "\n")) - ;; Skip existing footnotes. - (while (re-search-forward org-footnote-definition-re max t)) - (let ((def (org-footnote-at-definition-p))) - (when def (goto-char (nth 2 def)))) + (while (re-search-backward org-footnote-definition-re nil t)) + (unless (bolp) (newline 2)) + (insert org-footnote-tag-for-non-org-mode-files "\n\n")) + ;; Remove superfluous white space and clear marker. + (goto-char max) + (skip-chars-backward " \t\r\n") + (delete-region (point) max) + (unless (bolp) (newline)) (set-marker max nil)))) - ;; Insert footnote label, position point and notify user. - (unless (bolp) (insert "\n")) - (insert "\n[" label "] \n") - (backward-char) - (message "Edit definition and go back with `C-c &' or, if unique, with `C-c C-c'."))) + ;; Insert footnote label. + (insert "\n[" label "] ") + ;; Only notify user about next possible action when in an Org + ;; buffer, as the bindings may have different meanings otherwise. + (when (eq major-mode 'org-mode) + (message + "Edit definition and go back with `C-c &' or, if unique, with `C-c C-c'.")))) ;;;###autoload (defun org-footnote-action (&optional special) @@ -570,11 +613,11 @@ If Org is amidst an export process, EXPORT-PROPS will hold the export properties of the buffer. When EXPORT-PROPS is non-nil, the default action is to insert -normalized footnotes towards the end of the pre-processing buffer. -Some exporters like docbook, odt, etc. expect that footnote -definitions be available before any references to them. Such -exporters can let bind `org-footnote-insert-pos-for-preprocessor' to -symbol 'point-min to achieve the desired behavior. +normalized footnotes towards the end of the pre-processing +buffer. Some exporters (docbook, odt...) expect footnote +definitions to be available before any references to them. Such +exporters can let bind `org-footnote-insert-pos-for-preprocessor' +to symbol `point-min' to achieve the desired behaviour. Additional note on `org-footnote-insert-pos-for-preprocessor': 1. This variable has not effect when FOR-PREPROCESSOR is nil. @@ -634,8 +677,8 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (and inlinep org-footnote-fill-after-inline-note-extraction (org-fill-paragraph))) - ;; Add label (REF), identifier (MARKER) and definition (DEF) - ;; to REF-TABLE if data was unknown. + ;; Add label (REF), identifier (MARKER), definition (DEF) + ;; and type (INLINEP) to REF-TABLE if data was unknown. (unless a (let ((def (or (nth 3 ref) ; inline (and export-props @@ -646,52 +689,52 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': ;; through `org-export-preprocess-string' so ;; it is ready to insert in the ;; backend-specific buffer. - (if export-props + (if (and export-props def) (let ((parameters (org-combine-plists export-props '(:todo-keywords t :tags t :priority t)))) (org-export-preprocess-string def parameters)) def) - inlinep) ref-table))) - ;; Remove definition of non-inlined footnotes. - (unless inlinep (org-footnote-delete-definitions lbl)))) + inlinep) ref-table))))) ;; 2. Find and remove the footnote section, if any. Also ;; determine where footnotes shall be inserted (INS-POINT). (goto-char (point-min)) (cond - ((org-mode-p) - (if (and org-footnote-section - (re-search-forward - (concat "^\\*[ \t]+" (regexp-quote org-footnote-section) - "[ \t]*$") - nil t)) - (progn - (setq ins-point (match-beginning 0)) - (delete-region (match-beginning 0) (org-end-of-subtree t))) - (setq ins-point (point-max)))) + ((and org-footnote-section + (eq major-mode 'org-mode) + (re-search-forward + (concat "^\\*[ \t]+" (regexp-quote org-footnote-section) + "[ \t]*$") + nil t)) + (delete-region (match-beginning 0) (org-end-of-subtree t))) + ((eq major-mode 'org-mode) + (goto-char (point-max)) + (unless (bolp) (newline))) (t - (when (re-search-forward - (concat "^" - (regexp-quote org-footnote-tag-for-non-org-mode-files) - "[ \t]*$") - nil t) - (replace-match "")) - ;; In message-mode, ensure footnotes are inserted before the + ;; Remove any left-over tag in the buffer, if one is set up. + (when org-footnote-tag-for-non-org-mode-files + (let ((tag (concat "^" (regexp-quote + org-footnote-tag-for-non-org-mode-files) + "[ \t]*$"))) + (while (re-search-forward tag nil t) + (replace-match "") + (delete-region (point) (progn (forward-line) (point)))))) + ;; In Message mode, ensure footnotes are inserted before the ;; signature. - (let ((pt-max - (or (and (derived-mode-p 'message-mode) - (save-excursion - (goto-char (point-max)) - (re-search-backward - message-signature-separator nil t) - (1- (point)))) - (point-max)))) - (goto-char pt-max) - (skip-chars-backward " \t\n\r") - (forward-line) - (delete-region (point) pt-max)) - (setq ins-point (point)))) + (if (and (derived-mode-p 'message-mode) + (goto-char (point-max)) + (re-search-backward message-signature-separator nil t)) + (beginning-of-line) + (goto-char (point-max))))) + ;; During export, `org-footnote-insert-pos-for-preprocessor' has + ;; precedence over previously found position. + (setq ins-point + (copy-marker + (if (and export-props + (eq org-footnote-insert-pos-for-preprocessor 'point-min)) + (point-min) + (point)))) ;; 3. Clean-up REF-TABLE. (setq ref-table (delq nil @@ -708,34 +751,48 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (t x))) ref-table))) (setq ref-table (nreverse ref-table)) - ;; 4. Insert the footnotes again in the buffer, at the + ;; 4. Remove left-over definitions in the buffer. + (mapc (lambda (x) (unless (nth 3 x) + (org-footnote-delete-definitions (car x)))) + ref-table) + ;; 5. Insert the footnotes again in the buffer, at the ;; appropriate spot. - (goto-char (or - (and export-props - (eq org-footnote-insert-pos-for-preprocessor 'point-min) - (point-min)) - ins-point - (point-max))) + (goto-char ins-point) (cond ;; No footnote: exit. ((not ref-table)) ;; Cases when footnotes should be inserted in one place. - ((or (not (org-mode-p)) + ((or (not (eq major-mode 'org-mode)) org-footnote-section (not sort-only)) - ;; Insert again the section title. + ;; Insert again the section title, if any. Ensure that title, + ;; or the subsequent footnotes, will be separated by a blank + ;; lines from the rest of the document. In an Org buffer, + ;; separate section with a blank line, unless explicitly + ;; stated in `org-blank-before-new-entry'. (cond - ((not (org-mode-p)) - (insert "\n\n" org-footnote-tag-for-non-org-mode-files "\n")) + ((not (eq major-mode 'org-mode)) + (skip-chars-backward " \t\n\r") + (delete-region (point) ins-point) + (unless (bolp) (newline)) + ;; Keep one blank line between footnotes and signature. + (when (and (derived-mode-p 'message-mode) + (save-excursion + (re-search-forward message-signature-separator nil t))) + (open-line 1)) + (when org-footnote-tag-for-non-org-mode-files + (insert "\n" org-footnote-tag-for-non-org-mode-files "\n"))) ((and org-footnote-section (not export-props)) - (or (bolp) (insert "\n")) + (when (and (cdr (assq 'heading org-blank-before-new-entry)) + (zerop (save-excursion (org-back-over-empty-lines)))) + (insert "\n")) (insert "* " org-footnote-section "\n"))) - ;; Insert the footnotes. - (insert "\n" - (mapconcat (lambda (x) (format "[%s] %s" + (set-marker ins-point nil) + ;; Insert the footnotes, separated by a blank line. + (insert (mapconcat (lambda (x) (format "\n[%s] %s" (nth (if sort-only 0 1) x) (nth 2 x))) - ref-table "\n\n") - "\n\n") + ref-table "\n")) + (unless (eobp) (insert "\n")) ;; When exporting, add newly inserted markers along with their ;; associated definition to `org-export-footnotes-seen'. (when export-props @@ -831,20 +888,21 @@ If LABEL is non-nil, delete that footnote instead." (defun org-footnote-renumber-fn:N () "Renumber the simple footnotes like fn:17 into a sequence in the document." (interactive) - (let (map i (n 0)) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (re-search-forward "\\[fn:\\([0-9]+\\)[]:]" nil t) - (setq i (string-to-number (match-string 1))) - (when (and (string-match "\\S-" (buffer-substring - (point-at-bol) (match-beginning 0))) - (not (assq i map))) - (push (cons i (number-to-string (incf n))) map))) - (goto-char (point-min)) - (while (re-search-forward "\\(\\[fn:\\)\\([0-9]+\\)\\([]:]\\)" nil t) - (replace-match (concat "\\1" (cdr (assq (string-to-number (match-string 2)) map)) "\\3"))))))) + (let (map (n 0)) + (org-with-wide-buffer + (goto-char (point-min)) + (while (re-search-forward "\\[fn:\\([0-9]+\\)[]:]" nil t) + (save-excursion + (goto-char (match-beginning 0)) + ;; Ensure match is a footnote reference or definition. + (when (save-match-data (if (bolp) + (org-footnote-at-definition-p) + (org-footnote-at-reference-p))) + (let ((new-val (or (cdr (assoc (match-string 1) map)) + (number-to-string (incf n))))) + (unless (assoc (match-string 1) map) + (push (cons (match-string 1) new-val) map)) + (replace-match new-val nil nil nil 1)))))))) (defun org-footnote-auto-adjust-maybe () "Renumber and/or sort footnotes according to user settings." @@ -862,6 +920,4 @@ If LABEL is non-nil, delete that footnote instead." (provide 'org-footnote) - - ;;; org-footnote.el ends here diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index b01f6d9fa6e..7055bfade4e 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el @@ -5,7 +5,6 @@ ;; Author: Lennart Borgman (lennart O borgman A gmail O com) ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -1220,4 +1219,5 @@ PATH should be a list of steps, where each step has the form ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;;; org-freemind.el ends here diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index 0ccb66ca497..c7bccc0d8a2 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el @@ -1,12 +1,11 @@ ;;; org-gnus.el --- Support for links to Gnus groups and messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Tassilo Horn ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -291,5 +290,4 @@ If `org-store-link' was called with a prefix arg the meaning of (provide 'org-gnus) - ;;; org-gnus.el ends here diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el index c146a5bebbd..f8bd12ae429 100644 --- a/lisp/org/org-habit.el +++ b/lisp/org/org-habit.el @@ -5,7 +5,6 @@ ;; Author: John Wiegley ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -68,6 +67,16 @@ relative to the current effective date." :group 'org-habit :type 'boolean) +(defcustom org-habit-today-glyph ?! + "Glyph character used to identify today." + :group 'org-habit + :type 'character) + +(defcustom org-habit-completed-glyph ?* + "Glyph character used to show completed days on which a task was done." + :group 'org-habit + :type 'character) + (defface org-habit-clear-face '((((background light)) (:background "#8270f9")) (((background dark)) (:background "blue"))) @@ -297,7 +306,7 @@ current time." (days-to-time (- start (time-to-days starting)))))) - (aset graph index ?*) + (aset graph index org-habit-completed-glyph) (setq markedp t) (put-text-property index (1+ index) 'help-echo @@ -307,7 +316,7 @@ current time." (setq last-done-date (car done-dates) done-dates (cdr done-dates)))) (if todayp - (aset graph index ?!))) + (aset graph index org-habit-today-glyph))) (setq face (if (or in-the-past-p todayp) (car faces) (cdr faces))) @@ -358,6 +367,4 @@ current time." (provide 'org-habit) - - ;;; org-habit.el ends here diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index 46126ce2573..c6a19c8d8ba 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el @@ -1,11 +1,10 @@ ;;; org-html.el --- HTML export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -34,6 +33,8 @@ (declare-function org-id-find-id-file "org-id" (id)) (declare-function htmlize-region "ext:htmlize" (beg end)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) (defgroup org-export-html nil "Options specific for HTML export of Org-mode files." @@ -155,6 +156,12 @@ not be modified." dt { font-weight: bold; } div.figure { padding: 0.5em; } div.figure p { text-align: center; } + div.inlinetask { + padding:10px; + border:2px solid gray; + margin:10px; + background: #ffffcc; + } textarea { overflow-x: auto; } .linenr { font-size:smaller } .code-highlighted {background-color:#ffff00;} @@ -348,6 +355,14 @@ CSS classes, then this prefix can be very useful." :group 'org-export-html :type 'string) +(defcustom org-export-html-headline-anchor-format "" + "Format for anchors in HTML headlines. +It requires to %s: both will be replaced by the anchor referring +to the headline (e.g. \"sec-2\"). When set to `nil', don't insert +HTML anchors in headlines." + :group 'org-export-html + :type 'string) + (defcustom org-export-html-preamble t "Non-nil means insert a preamble in HTML export. @@ -355,8 +370,8 @@ When `t', insert a string as defined by one of the formatting strings in `org-export-html-preamble-format'. When set to a string, this string overrides `org-export-html-preamble-format'. When set to a function, apply this function and insert the -returned string. The function takes the property list of export -options as its only argument. +returned string. The function takes no argument, but you can +use `opt-plist' to access the current export options. Setting :html-preamble in publishing projects will take precedence over this variable." @@ -388,8 +403,8 @@ string overrides `org-export-html-postamble-format'. When set to 'auto, discard `org-export-html-postamble-format' and honor `org-export-author/email/creator-info' variables. When set to a function, apply this function and insert the returned string. -The function takes the property list of export options as its -only argument. +The function takes no argument, but you can use `opt-plist' to +access the current export options. Setting :html-postamble in publishing projects will take precedence over this variable." @@ -619,7 +634,10 @@ This variable is obsolete since Org version 7.7. Please set `org-export-html-divs' instead.") (defcustom org-export-html-divs '("preamble" "content" "postamble") - "The name of the main divs for HTML export." + "The name of the main divs for HTML export. +This is a list of three strings, the first one for the preamble +DIV, the second one for the content DIV and the third one for the +postamble DIV." :group 'org-export-html :type '(list (string :tag " Div for the preamble:") @@ -703,7 +721,7 @@ command to convert it." (interactive "r") (let (reg html buf pop-up-frames) (save-window-excursion - (if (org-mode-p) + (if (eq major-mode 'org-mode) (setq html (org-export-region-as-html beg end t 'string)) (setq reg (buffer-substring beg end) @@ -801,11 +819,11 @@ description. See variables `org-export-html-inline-images' and may-inline-p) "Make an HTML link. OPT-PLIST is an options list. -TYPE is the device-type of the link (THIS://foo.html) -PATH is the path of the link (http://THIS#locationx) -FRAGMENT is the fragment part of the link, if any (foo.html#THIS) +TYPE is the device-type of the link (THIS://foo.html). +PATH is the path of the link (http://THIS#location). +FRAGMENT is the fragment part of the link, if any (foo.html#THIS). DESC is the link description, if any. -ATTR is a string of other attributes of the a element. +ATTR is a string of other attributes of the \"a\" element. MAY-INLINE-P allows inlining it as an image." (declare (special org-par-open)) @@ -896,7 +914,7 @@ OPT-PLIST is the export options list." (string-match "^\\.\\.?/" path))) "file") (t "internal"))) - (setq path (org-extract-attributes (org-link-unescape path))) + (setq path (org-extract-attributes path)) (setq attr (get-text-property 0 'org-attributes path)) (setq desc1 (if (match-end 5) (match-string 5 line)) desc2 (if (match-end 2) (concat type ":" path) path) @@ -909,7 +927,7 @@ OPT-PLIST is the export options list." (if (string-match "^file:" desc) (setq desc (substring desc (match-end 0))))) (setq desc (org-add-props - (concat "\""") '(org-protected t)))) (cond @@ -1036,14 +1054,17 @@ OPT-PLIST is the export options list." (t ;; just publish the path, as default - (setq rpl (concat "@<" type ":" + (setq rpl (concat "<" type ":" (save-match-data (org-link-unescape path)) - ">@")))) + ">")))) (setq line (replace-match rpl t t line) start (+ start (length rpl)))) line)) ;;; org-export-as-html + +(defvar org-heading-keyword-regexp-format) ; defined in org.el + ;;;###autoload (defun org-export-as-html (arg &optional hidden ext-plist to-buffer body-only pub-dir) @@ -1137,14 +1158,15 @@ PUB-DIR is set, use this as the publishing directory." (current-dir (if buffer-file-name (file-name-directory buffer-file-name) default-directory)) + (auto-insert nil); Avoid any auto-insert stuff for the new file (buffer (if to-buffer (cond ((eq to-buffer 'string) (get-buffer-create "*Org HTML Export*")) (t (get-buffer-create to-buffer))) (find-file-noselect filename))) (org-levels-open (make-vector org-level-max nil)) - (date (plist-get opt-plist :date)) - (author (plist-get opt-plist :author)) + (date (org-html-expand (plist-get opt-plist :date))) + (author (org-html-expand (plist-get opt-plist :author))) (html-validation-link (or org-export-html-validation-link "")) (title (org-html-expand (or (and subtree-p (org-export-get-title-from-subtree)) @@ -1165,15 +1187,16 @@ PUB-DIR is set, use this as the publishing directory." (plist-get opt-plist :link-home))) (dummy (setq opt-plist (plist-put opt-plist :title title))) (html-table-tag (plist-get opt-plist :html-table-tag)) - (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) - (quote-re (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)")) + (quote-re0 (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)")) + (quote-re (format org-heading-keyword-regexp-format + org-quote-string)) (inquote nil) (infixed nil) (inverse nil) (email (plist-get opt-plist :email)) (language (plist-get opt-plist :language)) - (keywords (plist-get opt-plist :keywords)) - (description (plist-get opt-plist :description)) + (keywords (org-html-expand (plist-get opt-plist :keywords))) + (description (org-html-expand (plist-get opt-plist :description))) (num (plist-get opt-plist :section-numbers)) (lang-words nil) (head-count 0) cnt @@ -1287,11 +1310,11 @@ PUB-DIR is set, use this as the publishing directory." "%s - + %s + @@ -1314,7 +1337,7 @@ lang=\"%s\" xml:lang=\"%s\"> language language title (or charset "iso-8859-1") - date author description keywords + title date author description keywords style mathjax (if (or link-up link-home) @@ -1327,28 +1350,35 @@ lang=\"%s\" xml:lang=\"%s\"> ;; insert html preamble (when (plist-get opt-plist :html-preamble) - (let ((html-pre (plist-get opt-plist :html-preamble))) - (insert "
\n") + (let ((html-pre (plist-get opt-plist :html-preamble)) + html-pre-real-contents) (cond ((stringp html-pre) - (insert - (format-spec html-pre `((?t . ,title) (?a . ,author) - (?d . ,date) (?e . ,email))))) + (setq html-pre-real-contents + (format-spec html-pre `((?t . ,title) (?a . ,author) + (?d . ,date) (?e . ,email))))) ((functionp html-pre) - (funcall html-pre)) + (insert "
\n") + (if (stringp (funcall html-pre)) (insert (funcall html-pre))) + (insert "\n
\n")) (t - (insert + (setq html-pre-real-contents (format-spec (or (cadr (assoc (nth 0 lang-words) org-export-html-preamble-format)) (cadr (assoc "en" org-export-html-preamble-format))) `((?t . ,title) (?a . ,author) (?d . ,date) (?e . ,email)))))) - (insert "\n
\n"))) + ;; don't output an empty preamble DIV + (unless (and (functionp html-pre) + (equal html-pre-real-contents "")) + (insert "
\n") + (insert html-pre-real-contents) + (insert "\n
\n")))) ;; begin wrap around body - (insert (format "\n
" + (insert (format "\n
" ;; FIXME org-export-html-content-div is obsolete since 7.7 - (or org-export-html-content-div + (or org-export-html-content-div (nth 1 org-export-html-divs))) ;; FIXME this should go in the preamble but is here so ;; that org-infojs can still find it @@ -1365,7 +1395,7 @@ lang=\"%s\" xml:lang=\"%s\"> (push "
\n" thetoc) (push "
    \n
  • " thetoc) (setq lines - (mapcar + (mapcar #'(lambda (line) (if (and (string-match org-todo-line-regexp line) (not (get-text-property 0 'org-protected line))) @@ -1391,7 +1421,7 @@ lang=\"%s\" xml:lang=\"%s\"> line lines level)))) (if (string-match (org-re "[ \t]+:\\([[:alnum:]_@:]+\\):[ \t]*$") txt) - (setq txt (replace-match + (setq txt (replace-match "    \\1" t nil txt))) (if (string-match quote-re0 txt) (setq txt (replace-match "" t t txt))) @@ -1419,7 +1449,7 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Check for targets (while (string-match org-any-target-regexp line) (setq line (replace-match - (concat "@" + (concat "@" (match-string 1 line) "@ ") t t line))) (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) @@ -1427,8 +1457,8 @@ lang=\"%s\" xml:lang=\"%s\"> (setq href (replace-regexp-in-string "\\." "-" (format "sec-%s" snumber))) - (setq href (org-solidify-link-text - (or (cdr (assoc href + (setq href (org-solidify-link-text + (or (cdr (assoc href org-export-preferred-target-alist)) href))) (push (format @@ -1436,7 +1466,7 @@ lang=\"%s\" xml:lang=\"%s\"> "
  • \n
  • %s" "
  • \n
  • %s") href txt) thetoc) - + (setq org-last-level level))))) line) lines)) @@ -1445,15 +1475,15 @@ lang=\"%s\" xml:lang=\"%s\"> (push "
  • \n
\n" thetoc)) (push "
\n" thetoc) (setq thetoc (if have-headings (nreverse thetoc) nil)))) - + (setq head-count 0) (org-init-section-numbers) - + (org-open-par) - + (while (setq line (pop lines) origline line) (catch 'nextline - + ;; end of quote section? (when (and inquote (string-match org-outline-regexp-bol line)) (insert "\n") @@ -1588,7 +1618,8 @@ lang=\"%s\" xml:lang=\"%s\"> (setq line (org-html-handle-links line opt-plist)) ;; TODO items - (if (and (string-match org-todo-line-regexp line) + (if (and org-todo-line-regexp + (string-match org-todo-line-regexp line) (match-beginning 2)) (setq line @@ -1597,9 +1628,9 @@ lang=\"%s\" xml:lang=\"%s\"> (if (member (match-string 2 line) org-done-keywords) "done" "todo") - " " (match-string 2 line) - "\"> " (org-export-html-get-todo-kwd-class-name - (match-string 2 line)) + " " (org-export-html-get-todo-kwd-class-name + (match-string 2 line)) + "\"> " (match-string 2 line) "" (substring line (match-end 2))))) ;; Does this contain a reference to a footnote? @@ -1636,7 +1667,7 @@ lang=\"%s\" xml:lang=\"%s\"> t t line)))))) (cond - ((string-match "^\\(\\*+\\)[ \t]+\\(.*\\)" line) + ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) ;; This is a headline (setq level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) @@ -1785,7 +1816,7 @@ lang=\"%s\" xml:lang=\"%s\"> (?d . ,date) (?c . ,creator-info) (?v . ,html-validation-link))))) ((functionp html-post) - (funcall html-post)) + (if (stringp (funcall html-post)) (insert (funcall html-post)))) ((eq html-post 'auto) ;; fall back on default postamble (when (plist-get opt-plist :time-stamp-file) @@ -1808,7 +1839,7 @@ lang=\"%s\" xml:lang=\"%s\"> (?d . ,date) (?c . ,creator-info) (?v . ,html-validation-link)))))) (insert "\n
")))) - + ;; FIXME `org-export-html-with-timestamp' has been declared ;; obsolete since Org 7.7 -- don't forget to remove this. (if org-export-html-with-timestamp @@ -1941,7 +1972,7 @@ NO-CSS is passed to the exporter." (if (string-match "^[ \t]*|" (car lines)) ;; A normal org table (org-format-org-table-html lines nil no-css) - ;; Table made by table.el + ;; Table made by table.el (or (org-format-table-table-html-using-table-generate-source olines (not org-export-prefer-native-exporter-for-tables)) ;; We are here only when table.el table has NO col or row @@ -1969,8 +2000,8 @@ for formatting. This is required for the DocBook exporter." (let* ((caption (org-find-text-property-in-string 'org-caption (car lines))) (label (org-find-text-property-in-string 'org-label (car lines))) - (forced-aligns (org-find-text-property-in-string 'org-forced-aligns - (car lines))) + (col-cookies (org-find-text-property-in-string 'org-col-cookies + (car lines))) (attributes (org-find-text-property-in-string 'org-attributes (car lines))) (html-table-tag (org-export-splice-attributes @@ -1983,9 +2014,9 @@ for formatting. This is required for the DocBook exporter." tbopen line fields html gr colgropen rowstart rowend ali align aligns n) (setq caption (and caption (org-html-do-expand caption))) - (when (and forced-aligns org-table-clean-did-remove-column) - (setq forced-aligns - (mapcar (lambda (x) (cons (1- (car x)) (cdr x))) forced-aligns))) + (when (and col-cookies org-table-clean-did-remove-column) + (setq col-cookies + (mapcar (lambda (x) (cons (1- (car x)) (cdr x))) col-cookies))) (if splice (setq head nil)) (unless splice (push (if head "" "") html)) (setq tbopen t) @@ -2046,8 +2077,8 @@ for formatting. This is required for the DocBook exporter." (lambda (x) (setq gr (pop org-table-colgroup-info) i (1+ i) - align (if (assoc i forced-aligns) - (cdr (assoc (cdr (assoc i forced-aligns)) + align (if (nth 1 (assoc i col-cookies)) + (cdr (assoc (nth 1 (assoc i col-cookies)) '(("l" . "left") ("r" . "right") ("c" . "center")))) (if (> (/ (float x) nline) @@ -2203,19 +2234,20 @@ for further information." "Format time stamps in string S, or remove them." (catch 'exit (let (r b) - (while (string-match org-maybe-keyword-time-regexp s) - (or b (setq b (substring s 0 (match-beginning 0)))) - (setq r (concat - r (substring s 0 (match-beginning 0)) - " @" - (if (match-end 1) - (format "@%s @" - (match-string 1 s))) - (format " @%s@" - (substring - (org-translate-time (match-string 3 s)) 1 -1)) - "@") - s (substring s (match-end 0)))) + (when org-maybe-keyword-time-regexp + (while (string-match org-maybe-keyword-time-regexp s) + (or b (setq b (substring s 0 (match-beginning 0)))) + (setq r (concat + r (substring s 0 (match-beginning 0)) + " @" + (if (match-end 1) + (format "@%s @" + (match-string 1 s))) + (format " @%s@" + (substring + (org-translate-time (match-string 3 s)) 1 -1)) + "@") + s (substring s (match-end 0))))) ;; Line break if line started and ended with time stamp stuff (if (not r) s @@ -2263,7 +2295,7 @@ that uses these same face definitions." (when (and (symbolp f) (or (not i) (not (listp i)))) (insert (org-add-props (copy-sequence "1") nil 'face f)))) (htmlize-region (point-min) (point-max)))) - (switch-to-buffer "*html*") + (org-pop-to-buffer-same-window "*html*") (goto-char (point-min)) (if (re-search-forward "" - x x)) + (if (stringp org-export-html-headline-anchor-format) + (format org-export-html-headline-anchor-format x x) + "")) extra-targets "")) (while (>= l level) @@ -2604,5 +2639,4 @@ the alist of previous items." (provide 'org-html) - ;;; org-html.el ends here diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index 8a2d66306f3..969d895634a 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el @@ -1,11 +1,10 @@ ;;; org-icalendar.el --- iCalendar export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -204,7 +203,7 @@ When nil of the empty string, use the abbreviation retrieved from Emacs." (if org-icalendar-use-UTC-date-time ":%Y%m%dT%H%M%SZ" ":%Y%m%dT%H%M%S") - "Format-string for exporting iCalendar DATE-TIME. + "Format-string for exporting icalendar DATE-TIME. See `format-time-string' for a full documentation. The only difference is that `org-icalendar-timezone' is used for %Z. @@ -418,7 +417,7 @@ When COMBINE is non nil, add the category to each line." (let ((t1 (ignore-errors (org-parse-time-string ts 'nodefault)))) (if (and (> org-icalendar-alarm-time 0) (car t1) (nth 1 t1) (nth 2 t1)) - (setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0D0H%dM0S\nEND:VALARM" summary org-icalendar-alarm-time)) + (setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0DT0H%dM0S\nEND:VALARM" summary org-icalendar-alarm-time)) (setq alarm "")) ) (if (string-match org-bracket-link-regexp summary) @@ -684,5 +683,4 @@ a time), or the day by one (if it does not contain a time)." (provide 'org-icalendar) - ;;; org-icalendar.el ends here diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index c2d5cf0f25b..a00297d6a60 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -74,6 +73,8 @@ (require 'org) (declare-function message-make-fqdn "message" ()) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) ;;; Customization @@ -253,7 +254,7 @@ Move the cursor to that entry in that buffer." (let ((m (org-id-find id 'marker))) (unless m (error "Cannot find entry with ID \"%s\"" id)) - (switch-to-buffer (marker-buffer m)) + (org-pop-to-buffer-same-window (marker-buffer m)) (goto-char m) (move-marker m nil) (org-show-context))) @@ -430,7 +431,7 @@ When CHECK is given, prepare detailed information about duplicate IDs." (delq nil (mapcar (lambda (b) (with-current-buffer b - (and (org-mode-p) (buffer-file-name)))) + (and (eq major-mode 'org-mode) (buffer-file-name)))) (buffer-list))) ;; All files known to have IDs org-id-files))) @@ -599,7 +600,7 @@ optional argument MARKERP, return the position as a new marker." (defun org-id-store-link () "Store a link to the current entry, using its ID." (interactive) - (when (and (buffer-file-name (buffer-base-buffer)) (org-mode-p)) + (when (and (buffer-file-name (buffer-base-buffer)) (eq major-mode 'org-mode)) (let* ((link (org-make-link "id:" (org-id-get-create))) (case-fold-search nil) (desc (save-excursion diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index a2099a4bde3..034b1630b0c 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -4,7 +4,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -28,7 +27,12 @@ ;; This is an implementation of dynamic virtual indentation. It works ;; by adding text properties to a buffer to make sure lines are ;; indented according to outline structure. - +;; +;; The process is synchronous, toggled at every buffer modification. +;; Though, the initialization (indentation of text already in the +;; buffer), which can take a few seconds in large buffers, happens on +;; idle time. +;; ;;; Code: (require 'org-macs) @@ -38,9 +42,9 @@ (eval-when-compile (require 'cl)) -(defvar org-inlinetask-min-level) (declare-function org-inlinetask-get-task-level "org-inlinetask" ()) (declare-function org-inlinetask-in-task-p "org-inlinetask" ()) +(declare-function org-list-item-body-column "org-list" (item)) (defgroup org-indent nil "Options concerning dynamic virtual outline indentation." @@ -49,8 +53,11 @@ (defconst org-indent-max 40 "Maximum indentation in characters.") -(defconst org-indent-max-levels 40 - "Maximum indentation in characters.") +(defconst org-indent-max-levels 20 + "Maximum added level through virtual indentation, in characters. + +It is computed by multiplying `org-indent-indentation-per-level' +minus one by actual level of the headline minus one.") (defvar org-indent-strings nil "Vector with all indentation strings. @@ -58,8 +65,31 @@ It will be set in `org-indent-initialize'.") (defvar org-indent-stars nil "Vector with all indentation star strings. It will be set in `org-indent-initialize'.") +(defvar org-indent-inlinetask-first-star (org-add-props "*" '(face org-warning)) + "First star of inline tasks, with correct face.") +(defvar org-indent-agent-timer nil + "Timer running the initialize agent.") +(defvar org-indent-agentized-buffers nil + "List of buffers watched by the initialize agent.") +(defvar org-indent-agent-resume-timer nil + "Timer to reschedule agent after switching to other idle processes.") +(defvar org-indent-agent-active-delay '(0 2 0) + "Time to run agent before switching to other idle processes. +Delay used when the buffer to initialize is current.") +(defvar org-indent-agent-passive-delay '(0 0 400000) + "Time to run agent before switching to other idle processes. +Delay used when the buffer to initialize isn't current.") +(defvar org-indent-agent-resume-delay '(0 0 100000) + "Minimal time for other idle processes before switching back to agent.") +(defvar org-indent-initial-marker nil + "Position of initialization before interrupt. +This is used locally in each buffer being initialized.") (defvar org-hide-leading-stars-before-indent-mode nil "Used locally.") +(defvar org-indent-modified-headline-flag nil + "Non-nil means the last deletion operated on an headline. +It is modified by `org-indent-notify-modified-headline'.") + (defcustom org-indent-boundary-char ?\ ; comment to protect space char "The end of the virtual indentation strings, a single-character string. @@ -90,28 +120,15 @@ turn on `org-hide-leading-stars'." :group 'org-indent :type 'integer) -(defcustom org-indent-fix-section-after-idle-time 0.2 - "Seconds of idle time before fixing virtual indentation of section. -The hooking-in of virtual indentation is not yet perfect. Occasionally, -a change does not trigger to proper change of indentation. For this we -have a timer action that fixes indentation in the current section after -a short amount idle time. If we ever get the integration to work perfectly, -this variable can be set to nil to get rid of the timer." - :group 'org-indent - :type '(choice - (const "Do not install idle timer" nil) - (number :tag "Idle time"))) +(defface org-indent + (org-compatible-face nil nil) + "Face for outline indentation. +The default is to make it look like whitespace. But you may find it +useful to make it ever so slightly different." + :group 'org-faces) (defun org-indent-initialize () - "Initialize the indentation strings and set the idle timer." - ;; We use an idle timer to "repair" the current section, because the - ;; redisplay seems to have some problems. - (unless org-indent-strings - (when org-indent-fix-section-after-idle-time - (run-with-idle-timer - org-indent-fix-section-after-idle-time - t 'org-indent-refresh-section))) - ;; Initialize the indentation and star vectors + "Initialize the indentation strings." (setq org-indent-strings (make-vector (1+ org-indent-max) nil)) (setq org-indent-stars (make-vector (1+ org-indent-max) nil)) (aset org-indent-strings 0 nil) @@ -127,14 +144,21 @@ this variable can be set to nil to get rid of the timer." (org-add-props (make-string i ?*) nil 'face 'org-hide)))) +(defsubst org-indent-remove-properties (beg end) + "Remove indentations between BEG and END." + (with-silent-modifications + (remove-text-properties beg end '(line-prefix nil wrap-prefix nil)))) + ;;;###autoload (define-minor-mode org-indent-mode "When active, indent text according to outline structure. -Internally this works by adding `line-prefix' properties to all non-headlines. -These properties are updated locally in idle time. -FIXME: How to update when broken?" - nil " Ind" nil +Internally this works by adding `line-prefix' and `wrap-prefix' +properties, after each buffer modification, on the modified zone. + +The process is synchronous. Though, initial indentation of +buffer, which can take a few seconds on large buffers, is done +during idle time." nil " Ind" nil (cond ((org-bound-and-true-p org-inhibit-startup) (setq org-indent-mode nil)) @@ -151,6 +175,7 @@ FIXME: How to update when broken?" ;; mode was turned on. (org-set-local 'indent-tabs-mode nil) (or org-indent-strings (org-indent-initialize)) + (org-set-local 'org-indent-initial-marker (copy-marker 1)) (when org-indent-mode-turns-off-org-adapt-indentation (org-set-local 'org-adapt-indentation nil)) (when org-indent-mode-turns-on-hiding-stars @@ -160,56 +185,49 @@ FIXME: How to update when broken?" (make-local-variable 'buffer-substring-filters) (add-to-list 'buffer-substring-filters 'org-indent-remove-properties-from-string) - (org-add-hook 'org-after-demote-entry-hook - 'org-indent-refresh-section nil 'local) - (org-add-hook 'org-after-promote-entry-hook - 'org-indent-refresh-section nil 'local) - (org-add-hook 'org-font-lock-hook - 'org-indent-refresh-to nil 'local) + (org-add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local) + (org-add-hook 'before-change-functions + 'org-indent-notify-modified-headline nil 'local) (and font-lock-mode (org-restart-font-lock)) - ) + (org-indent-remove-properties (point-min) (point-max)) + ;; Submit current buffer to initialize agent. If it's the first + ;; buffer submitted, also start the agent. Current buffer is + ;; pushed in both cases to avoid a race condition. + (if org-indent-agentized-buffers + (push (current-buffer) org-indent-agentized-buffers) + (push (current-buffer) org-indent-agentized-buffers) + (setq org-indent-agent-timer + (run-with-idle-timer 0.2 t #'org-indent-initialize-agent)))) (t ;; mode was turned off (or we refused to turn it on) - (save-excursion - (save-restriction - (org-indent-remove-properties (point-min) (point-max)) - (kill-local-variable 'org-adapt-indentation) - (when (boundp 'org-hide-leading-stars-before-indent-mode) - (org-set-local 'org-hide-leading-stars - org-hide-leading-stars-before-indent-mode)) - (setq buffer-substring-filters - (delq 'org-indent-remove-properties-from-string - buffer-substring-filters)) - (remove-hook 'org-after-promote-entry-hook - 'org-indent-refresh-section 'local) - (remove-hook 'org-after-demote-entry-hook - 'org-indent-refresh-section 'local) - (and font-lock-mode (org-restart-font-lock)) - (redraw-display)))))) - - -(defface org-indent - (org-compatible-face nil nil) - "Face for outline indentation. -The default is to make it look like whitespace. But you may find it -useful to make it ever so slightly different." - :group 'org-faces) + (kill-local-variable 'org-adapt-indentation) + (setq org-indent-agentized-buffers + (delq (current-buffer) org-indent-agentized-buffers)) + (when (markerp org-indent-initial-marker) + (set-marker org-indent-initial-marker nil)) + (when (boundp 'org-hide-leading-stars-before-indent-mode) + (org-set-local 'org-hide-leading-stars + org-hide-leading-stars-before-indent-mode)) + (setq buffer-substring-filters + (delq 'org-indent-remove-properties-from-string + buffer-substring-filters)) + (remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local) + (remove-hook 'before-change-functions + 'org-indent-notify-modified-headline 'local) + (org-with-wide-buffer + (org-indent-remove-properties (point-min) (point-max))) + (and font-lock-mode (org-restart-font-lock)) + (redraw-display)))) (defun org-indent-indent-buffer () - "Add indentation properties for the whole buffer." + "Add indentation properties to the accessible part of the buffer." (interactive) - (when org-indent-mode - (save-excursion - (save-restriction - (widen) - (org-indent-remove-properties (point-min) (point-max)) - (org-indent-add-properties (point-min) (point-max)))))) - -(defun org-indent-remove-properties (beg end) - "Remove indentations between BEG and END." - (let ((inhibit-modification-hooks t)) - (with-silent-modifications - (remove-text-properties beg end '(line-prefix nil wrap-prefix nil))))) + (if (not (eq major-mode 'org-mode)) + (error "Not in Org mode") + (message "Setting buffer indentation. It may take a few seconds...") + (org-indent-remove-properties (point-min) (point-max)) + (org-indent-add-properties (point-min) (point-max)) + (message "Indentation of buffer set."))) (defun org-indent-remove-properties-from-string (string) "Remove indentation properties from STRING." @@ -217,110 +235,193 @@ useful to make it ever so slightly different." '(line-prefix nil wrap-prefix nil) string) string) -(defvar org-indent-outline-re org-outline-regexp-bol - "Outline heading regexp.") +(defun org-indent-initialize-agent () + "Start or resume current buffer initialization. +Only buffers in `org-indent-agentized-buffers' trigger an action. +When no more buffer is being watched, the agent suppress itself." + (when org-indent-agent-resume-timer + (cancel-timer org-indent-agent-resume-timer)) + (setq org-indent-agentized-buffers + (org-remove-if-not #'buffer-live-p org-indent-agentized-buffers)) + (cond + ;; Job done: kill agent. + ((not org-indent-agentized-buffers) (cancel-timer org-indent-agent-timer)) + ;; Current buffer is agentized: start/resume initialization + ;; somewhat aggressively. + ((memq (current-buffer) org-indent-agentized-buffers) + (org-indent-initialize-buffer (current-buffer) + org-indent-agent-active-delay)) + ;; Else, start/resume initialization of the last agentized buffer, + ;; softly. + (t (org-indent-initialize-buffer (car org-indent-agentized-buffers) + org-indent-agent-passive-delay)))) + +(defun org-indent-initialize-buffer (buffer delay) + "Set virtual indentation for the buffer BUFFER, asynchronously. +Give hand to other idle processes if it takes longer than DELAY, +a time value." + (with-current-buffer buffer + (when org-indent-mode + (org-with-wide-buffer + (let ((interruptp + ;; Always nil unless interrupted. + (catch 'interrupt + (and org-indent-initial-marker + (marker-position org-indent-initial-marker) + (org-indent-add-properties org-indent-initial-marker + (point-max) + delay) + nil)))) + (move-marker org-indent-initial-marker interruptp) + ;; Job is complete: un-agentize buffer. + (unless interruptp + (setq org-indent-agentized-buffers + (delq buffer org-indent-agentized-buffers)))))))) -(defun org-indent-add-properties (beg end) +(defsubst org-indent-set-line-properties (l w h) + "Set prefix properties on current line an move to next one. + +Prefix properties `line-prefix' and `wrap-prefix' in current line +are set to, respectively, length L and W. + +If H is non-nil, `line-prefix' will be starred. If H is +`inline', the first star will have `org-warning' face. + +Assume point is at beginning of line." + (let ((line (cond + ((eq 'inline h) + (let ((stars (aref org-indent-stars + (min l org-indent-max-levels)))) + (and stars + (concat org-indent-inlinetask-first-star + (substring stars 1))))) + (h (aref org-indent-stars + (min l org-indent-max-levels))) + (t (aref org-indent-strings + (min l org-indent-max))))) + (wrap (aref org-indent-strings (min w org-indent-max)))) + ;; Add properties down to the next line to indent empty lines. + (add-text-properties (point) (min (1+ (point-at-eol)) (point-max)) + `(line-prefix ,line wrap-prefix ,wrap))) + (forward-line 1)) + +(defun org-indent-add-properties (beg end &optional delay) "Add indentation properties between BEG and END. -Assumes that BEG is at the beginning of a line." - (let* ((inhibit-modification-hooks t) - (inlinetaskp (featurep 'org-inlinetask)) - (get-real-level (lambda (pos lvl) - (save-excursion - (goto-char pos) - (if (and inlinetaskp (org-inlinetask-in-task-p)) - (org-inlinetask-get-task-level) - lvl)))) - (b beg) - (e end) - (level 0) - (n 0) - exit nstars) - (with-silent-modifications - (save-excursion - (goto-char beg) - (while (not exit) - (setq e end) - (if (not (re-search-forward org-indent-outline-re nil t)) - (setq e (point-max) exit t) - (setq e (match-beginning 0)) - (if (>= e end) (setq exit t)) - (unless (and inlinetaskp (org-inlinetask-in-task-p)) - (setq level (- (match-end 0) (match-beginning 0) 1))) - (setq nstars (* (1- (funcall get-real-level e level)) - (1- org-indent-indentation-per-level))) - (add-text-properties - (point-at-bol) (point-at-eol) - (list 'line-prefix - (aref org-indent-stars nstars) - 'wrap-prefix - (aref org-indent-strings - (* (funcall get-real-level e level) - org-indent-indentation-per-level))))) - (when (> e b) - (add-text-properties - b e (list 'line-prefix (aref org-indent-strings n) - 'wrap-prefix (aref org-indent-strings n)))) - (setq b (1+ (point-at-eol)) - n (* (funcall get-real-level b level) - org-indent-indentation-per-level))))))) - -(defvar org-inlinetask-min-level) -(defun org-indent-refresh-section () - "Refresh indentation properties in the current outline section. -Point is assumed to be at the beginning of a headline." - (interactive) - (when org-indent-mode - (let (beg end) - (save-excursion - (when (ignore-errors (let ((org-outline-regexp (format "\\*\\{1,%s\\}[ \t]+" - (if (featurep 'org-inlinetask) - (1- org-inlinetask-min-level) - "")))) - (org-back-to-heading))) - (setq beg (point)) - (setq end (or (save-excursion (or (outline-next-heading) (point))))) - (org-indent-remove-properties beg end) - (org-indent-add-properties beg end)))))) - -(defun org-indent-refresh-to (limit) - "Refresh indentation properties in the current outline section. -Point is assumed to be at the beginning of a headline." - (interactive) - (when org-indent-mode - (let ((beg (point)) (end limit)) - (save-excursion - (and (ignore-errors (let ((org-outline-regexp (format "\\*\\{1,%s\\}[ \t]+" - (if (featurep 'org-inlinetask) - (1- org-inlinetask-min-level) - "")))) - (org-back-to-heading))) - (setq beg (point)))) - (org-indent-remove-properties beg end) - (org-indent-add-properties beg end))) - (goto-char limit)) - -(defun org-indent-refresh-subtree () - "Refresh indentation properties in the current outline subtree. -Point is assumed to be at the beginning of a headline." - (interactive) + +When DELAY is non-nil, it must be a time value. In that case, +the process is asynchronous and can be interrupted, either by +user request, or after DELAY. This is done by throwing the +`interrupt' tag along with the buffer position where the process +stopped." + (save-match-data + (org-with-wide-buffer + (goto-char beg) + (beginning-of-line) + ;; 1. Initialize prefix at BEG. This is done by storing two + ;; variables: INLINE-PF and PF, representing respectively + ;; length of current `line-prefix' when line is inside an + ;; inline task or not. + (let* ((case-fold-search t) + (limited-re (org-get-limited-outline-regexp)) + (added-ind-per-lvl (1- org-indent-indentation-per-level)) + (pf (save-excursion + (and (ignore-errors (let ((outline-regexp limited-re)) + (org-back-to-heading t))) + (+ (* org-indent-indentation-per-level + (- (match-end 0) (match-beginning 0) 2)) 2)))) + (pf-inline (and (featurep 'org-inlinetask) + (org-inlinetask-in-task-p) + (+ (* org-indent-indentation-per-level + (1- (org-inlinetask-get-task-level))) 2))) + (time-limit (and delay (time-add (current-time) delay)))) + ;; 2. For each line, set `line-prefix' and `wrap-prefix' + ;; properties depending on the type of line (headline, + ;; inline task, item or other). + (with-silent-modifications + (while (and (<= (point) end) (not (eobp))) + (cond + ;; When in asynchronous mode, check if interrupt is + ;; required. + ((and delay (input-pending-p)) (throw 'interrupt (point))) + ;; In asynchronous mode, take a break of + ;; `org-indent-agent-resume-delay' every DELAY to avoid + ;; blocking any other idle timer or process output. + ((and delay (time-less-p time-limit (current-time))) + (setq org-indent-agent-resume-timer + (run-with-idle-timer + (time-add (current-idle-time) + org-indent-agent-resume-delay) + nil #'org-indent-initialize-agent)) + (throw 'interrupt (point))) + ;; Headline or inline task. + ((looking-at org-outline-regexp) + (let* ((nstars (- (match-end 0) (match-beginning 0) 1)) + (line (* added-ind-per-lvl (1- nstars))) + (wrap (+ line (1+ nstars)))) + (cond + ;; Headline: new value for PF. + ((looking-at limited-re) + (org-indent-set-line-properties line wrap t) + (setq pf wrap)) + ;; End of inline task: PF-INLINE is now nil. + ((looking-at "\\*+ end[ \t]*$") + (org-indent-set-line-properties line wrap 'inline) + (setq pf-inline nil)) + ;; Start of inline task. Determine if it contains + ;; text, or if it is only one line long. Set + ;; PF-INLINE accordingly. + (t (org-indent-set-line-properties line wrap 'inline) + (setq pf-inline (and (org-inlinetask-in-task-p) wrap)))))) + ;; List item: `wrap-prefix' is set where body starts. + ((org-at-item-p) + (let* ((line (or pf-inline pf 0)) + (wrap (+ (org-list-item-body-column (point)) line))) + (org-indent-set-line-properties line wrap nil))) + ;; Normal line: use PF-INLINE, PF or nil as prefixes. + (t (let* ((line (or pf-inline pf 0)) + (wrap (+ line (org-get-indentation)))) + (org-indent-set-line-properties line wrap nil)))))))))) + +(defun org-indent-notify-modified-headline (beg end) + "Set `org-indent-modified-headline-flag' depending on context. + +BEG and END are the positions of the beginning and end of the +range of deleted text. + +This function is meant to be called by `before-change-functions'. +Flag will be non-nil if command is going to modify or delete an +headline." (when org-indent-mode - (save-excursion - (let (beg end) - (setq beg (point)) - (setq end (save-excursion (org-end-of-subtree t t))) - (org-indent-remove-properties beg end) - (org-indent-add-properties beg end))))) + (setq org-indent-modified-headline-flag + (save-excursion + (goto-char beg) + (save-match-data + (or (and (org-at-heading-p) (< beg (match-end 0))) + (re-search-forward org-outline-regexp-bol end t))))))) -(defun org-indent-refresh-buffer () - "Refresh indentation properties in the current outline subtree. -Point is assumed to be at the beginning of a headline." - (interactive) +(defun org-indent-refresh-maybe (beg end dummy) + "Refresh indentation properties in an adequate portion of buffer. +BEG and END are the positions of the beginning and end of the +range of inserted text. DUMMY is an unused argument. + +This function is meant to be called by `after-change-functions'." (when org-indent-mode - (org-indent-mode -1) - (org-indent-mode 1))) + (save-match-data + ;; If an headline was modified or inserted, set properties until + ;; next headline. + (if (or org-indent-modified-headline-flag + (save-excursion + (goto-char beg) + (re-search-forward org-outline-regexp-bol end t))) + (let ((end (save-excursion + (goto-char end) + (org-with-limited-levels (outline-next-heading)) + (point)))) + (setq org-indent-modified-headline-flag nil) + (org-indent-add-properties beg end)) + ;; Otherwise, only set properties on modified area. + (org-indent-add-properties beg end))))) (provide 'org-indent) - ;;; org-indent.el ends here diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 4f44045f9bf..a3e9cd1f9e7 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el @@ -1,11 +1,10 @@ ;;; org-info.el --- Support for links to Info nodes from within Org-Mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -77,6 +76,4 @@ (provide 'org-info) - - ;;; org-info.el ends here diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 72c19062983..a6331975f55 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -107,11 +106,14 @@ When nil, they will not be exported." :type 'boolean) (defvar org-inlinetask-export-templates - '((html "
%s%s
%s
" + '((html "
%s%s
%s
" '((unless (eq todo "") (format "%s%s " class todo todo priority)) heading content)) + (odt "%s" '((org-odt-format-inlinetask heading content + todo priority tags))) + (latex "\\begin\{description\}\n\\item[%s%s]~%s\\end\{description\}" '((unless (eq todo "") (format "\\textsc\{%s%s\} " todo priority)) heading content)) @@ -132,9 +134,9 @@ When nil, they will not be exported." heading content))) "Templates for inline tasks in various exporters. -This variable is an alist in the shape of (BACKEND STRING OBJECTS). +This variable is an alist in the shape of \(BACKEND STRING OBJECTS\). -BACKEND is the name of the backend for the template (ascii, html...). +BACKEND is the name of the backend for the template \(ascii, html...\). STRING is a format control string. @@ -151,14 +153,14 @@ defined in an inline task, their value is the empty string. As an example, valid associations are: -(html \"
  • %s

    %s

\" (heading content)) +\(html \"
  • %s

    %s

\" \(heading content\)\) or, with the additional package \"todonotes\" for LaTeX, -(latex \"\\todo[inline]{\\textbf{\\textsf{%s %s}}\\linebreak{} %s}\" - '((unless (eq todo \"\") - (format \"\\textsc{%s%s}\" todo priority)) - heading content)))") +\(latex \"\\todo[inline]{\\textbf{\\textsf{%s %s}}\\linebreak{} %s}\" + '\(\(unless \(eq todo \"\"\) + \(format \"\\textsc{%s%s}\" todo priority\)\) + heading content\)\)\)") (defvar org-odd-levels-only) (defvar org-keyword-time-regexp) @@ -179,15 +181,22 @@ default, or nil of no state should be assigned." "Insert an inline task. If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'." (interactive "P") + ;; Error when inside an inline task, except if point was at its very + ;; beginning, in which case the new inline task will be inserted + ;; before this one. + (when (and (org-inlinetask-in-task-p) + (not (and (org-inlinetask-at-task-p) (bolp)))) + (error "Cannot nest inline tasks")) (or (bolp) (newline)) - (let ((indent org-inlinetask-min-level)) - (if org-odd-levels-only - (setq indent (- (* 2 indent) 1))) - (insert (make-string indent ?*) - (if (or no-state (not org-inlinetask-default-state)) - " \n" - (concat " " org-inlinetask-default-state " \n")) - (make-string indent ?*) " END\n")) + (let* ((indent (if org-odd-levels-only + (1- (* 2 org-inlinetask-min-level)) + org-inlinetask-min-level)) + (indent-string (concat (make-string indent ?*) " "))) + (insert indent-string + (if (or no-state (not org-inlinetask-default-state)) + "\n" + (concat org-inlinetask-default-state " \n")) + indent-string "END\n")) (end-of-line -1)) (define-key org-mode-map "\C-c\C-xt" 'org-inlinetask-insert-task) @@ -228,21 +237,26 @@ The number of levels is controlled by `org-inlinetask-min-level'." (re-search-backward inlinetask-re nil t)))) (defun org-inlinetask-goto-end () - "Go to the end of the inline task at point." - (beginning-of-line) - (let ((case-fold-search t) - (inlinetask-re (org-inlinetask-outline-regexp))) - (cond - ((org-looking-at-p (concat inlinetask-re "END[ \t]*$")) - (forward-line 1)) - ((org-looking-at-p inlinetask-re) - (forward-line 1) - (when (org-inlinetask-in-task-p) - (re-search-forward inlinetask-re nil t) - (forward-line 1))) - (t - (re-search-forward inlinetask-re nil t) - (forward-line 1))))) + "Go to the end of the inline task at point. +Return point." + (save-match-data + (beginning-of-line) + (let* ((case-fold-search t) + (inlinetask-re (org-inlinetask-outline-regexp)) + (task-end-re (concat inlinetask-re "END[ \t]*$"))) + (cond + ((looking-at task-end-re) (forward-line)) + ((looking-at inlinetask-re) + (forward-line) + (cond + ((looking-at task-end-re) (forward-line)) + ((looking-at inlinetask-re)) + ((org-inlinetask-in-task-p) + (re-search-forward inlinetask-re nil t) + (forward-line)))) + (t (re-search-forward inlinetask-re nil t) + (forward-line))) + (point)))) (defun org-inlinetask-get-task-level () "Get the level of the inline task around. @@ -333,7 +347,9 @@ Either remove headline and meta data, or do special formatting." ;; Remove the task. (goto-char beg) (delete-region beg end) - (when org-inlinetask-export + (when (and org-inlinetask-export + (assq org-export-current-backend + org-inlinetask-export-templates)) ;; Format CONTENT, if appropriate. (setq content (if (not (and content (string-match "\\S-" content))) @@ -341,12 +357,14 @@ Either remove headline and meta data, or do special formatting." ;; Ensure CONTENT has minimal indentation, a single ;; newline character at its boundaries, and isn't ;; protected. - (when (string-match "`\\([ \t]*\n\\)+" content) + (when (string-match "\\`\\([ \t]*\n\\)+" content) (setq content (substring content (match-end 0)))) (when (string-match "[ \t\n]+\\'" content) (setq content (substring content 0 (match-beginning 0)))) - (org-add-props (concat "\n" (org-remove-indentation content) "\n") - '(org-protected nil)))) + (org-add-props + (concat "\n\n" (org-remove-indentation content) "\n\n") + '(org-protected nil org-native-text nil)))) + (when (string-match org-complex-heading-regexp headline) (let* ((nil-to-str (function @@ -363,7 +381,7 @@ Either remove headline and meta data, or do special formatting." (backend-spec (assq org-export-current-backend org-inlinetask-export-templates)) (format-str (org-add-props (nth 1 backend-spec) - '(org-protected t))) + '(org-protected t org-native-text t))) (tokens (cadr (nth 2 backend-spec))) ;; Build export string. Ensure it won't break ;; surrounding lists by giving it arbitrary high @@ -372,6 +390,11 @@ Either remove headline and meta data, or do special formatting." (eval (append '(format format-str) (mapcar nil-to-str tokens))) '(original-indentation 1000)))) + ;; Ensure task starts a new paragraph. + (unless (or (bobp) + (save-excursion (forward-line -1) + (looking-at "[ \t]*$"))) + (insert "\n")) (insert export-str) (unless (bolp) (insert "\n"))))))))) @@ -386,21 +409,34 @@ Either remove headline and meta data, or do special formatting." (goto-char (match-end 0)) (current-column))) +(defvar org-indent-indentation-per-level) ; defined in org-indent.el + +(defface org-inlinetask + (org-compatible-face 'shadow '((t (:bold t)))) + "Face for inlinetask headlines." + :group 'org-faces) + (defun org-inlinetask-fontify (limit) - "Fontify the inline tasks." + "Fontify the inline tasks down to LIMIT." (let* ((nstars (if org-odd-levels-only (1- (* 2 (or org-inlinetask-min-level 200))) (or org-inlinetask-min-level 200))) (re (concat "^\\(\\*\\)\\(\\*\\{" (format "%d" (- nstars 3)) - ",\\}\\)\\(\\*\\* .*\\)"))) + ",\\}\\)\\(\\*\\* .*\\)")) + ;; Virtual indentation will add the warning face on the first + ;; star. Thus, in that case, only hide it. + (start-face (if (and (org-bound-and-true-p org-indent-mode) + (> org-indent-indentation-per-level 1)) + 'org-hide + 'org-warning))) (while (re-search-forward re limit t) (add-text-properties (match-beginning 1) (match-end 1) - '(face org-warning font-lock-fontified t)) + `(face ,start-face font-lock-fontified t)) (add-text-properties (match-beginning 2) (match-end 2) '(face org-hide font-lock-fontified t)) (add-text-properties (match-beginning 3) (match-end 3) - '(face shadow font-lock-fontified t))))) + '(face org-inlinetask font-lock-fontified t))))) (defun org-inlinetask-toggle-visibility () "Toggle visibility of inline task at point." diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index 7a84d2053ad..c4ad32146d7 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el @@ -4,7 +4,6 @@ ;; ;; Author: Philip Jackson ;; Keywords: erc, irc, link, org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -60,6 +59,8 @@ (declare-function erc-server-buffer "erc" ()) (declare-function erc-get-server-nickname-list "erc" ()) (declare-function erc-cmd-JOIN "erc" (channel &optional key)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) (defvar org-irc-client 'erc "The IRC client to act on.") @@ -232,7 +233,7 @@ default." (throw 'found x)))))) (if chan-buf (progn - (switch-to-buffer chan-buf) + (org-pop-to-buffer-same-window chan-buf) ;; if we got a nick, and they're in the chan, ;; then start a chat with them (let ((nick (pop link))) @@ -243,14 +244,12 @@ default." (insert (concat nick ": "))) (error "%s not found in %s" nick chan-name))))) (progn - (switch-to-buffer server-buffer) + (org-pop-to-buffer-same-window server-buffer) (erc-cmd-JOIN chan-name)))) - (switch-to-buffer server-buffer))) + (org-pop-to-buffer-same-window server-buffer))) ;; no server match, make new connection (erc-select :server server :port port)))) (provide 'org-irc) - - ;;; org-irc.el ends here diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el index 3ef8c4c809c..22f5d4ecd6b 100644 --- a/lisp/org/org-jsinfo.el +++ b/lisp/org/org-jsinfo.el @@ -1,11 +1,10 @@ ;;; org-jsinfo.el --- Support for org-info.js Javascript in Org HTML export -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -204,6 +203,4 @@ Option settings will replace the %MANAGER-OPTIONS cookie." (provide 'org-infojs) (provide 'org-jsinfo) - - ;;; org-jsinfo.el ends here diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 7abf85a7092..57cb5bac702 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el @@ -4,8 +4,7 @@ ;; ;; Emacs Lisp Archive Entry ;; Filename: org-latex.el -;; Version: 7.7 -;; Author: Bastien Guerry +;; Author: Bastien Guerry ;; Maintainer: Carsten Dominik ;; Keywords: org, wp, tex ;; Description: Converts an org-mode buffer into LaTeX @@ -74,7 +73,6 @@ org-deadline-string "\\|" org-closed-string"\\)") "Regexp matching special time planning keywords plus the time after it.") - (defvar org-re-quote) ; dynamically scoped from org.el (defvar org-commentsp) ; dynamically scoped from org.el @@ -304,8 +302,8 @@ markup defined, the first one in the association list will be used." (defcustom org-export-latex-href-format "\\href{%s}{%s}" "A printf format string to be applied to href links. -The format must contain either two %s instances or just one. -If it contains two %s instances, the first will be filled with +The format must contain either two %s instances or just one. +If it contains two %s instances, the first will be filled with the link, the second with the link description. If it contains only one, the %s will be filled with the link." :group 'org-export-latex @@ -359,6 +357,12 @@ string defines the replacement string for this quote." :group 'org-export-latex :type 'boolean) +(defcustom org-export-latex-table-caption-above t + "When non-nil, the caption is set above the table. When nil, +the caption is set below the table." + :group 'org-export-latex + :type 'boolean) + (defcustom org-export-latex-tables-column-borders nil "When non-nil, grouping columns can cause outer vertical lines in tables. When nil, grouping causes only separation lines between groups." @@ -402,7 +406,7 @@ will pass them (combined with the LaTeX default list parameters) to :type 'plist) (defcustom org-export-latex-verbatim-wrap - '("\\begin{verbatim}\n" . "\\end{verbatim}\n") + '("\\begin{verbatim}\n" . "\\end{verbatim}") "Environment to be wrapped around a fixed-width section in LaTeX export. This is a cons with two strings, to be added before and after the fixed-with text. @@ -594,7 +598,7 @@ and `org-export-with-tags' instead." "Extensions of image files that can be inlined into LaTeX. Note that the image extension *actually* allowed depend on the way the LaTeX file is processed. When used with pdflatex, pdf, jpg and png images -are OK. When processing through dvi to PostScript, only ps and eps are +are OK. When processing through dvi to Postscript, only ps and eps are allowed. The default we use here encompasses both." :group 'org-export-latex :type '(repeat (string :tag "Extension"))) @@ -719,7 +723,7 @@ then use this command to convert it." (interactive "r") (let (reg latex buf) (save-window-excursion - (if (org-mode-p) + (if (eq major-mode 'org-mode) (setq latex (org-export-region-as-latex beg end t 'string)) (setq reg (buffer-substring beg end) @@ -865,6 +869,8 @@ when PUB-DIR is set, use this as the publishing directory." (file-truename (or buffer-file-name "dummy.org"))) (concat filename ".tex") filename))) + (auto-insert nil); Avoid any auto-insert stuff for the new file + (TeX-master t) ; Avoid the Query for TeX master from AUCTeX (buffer (if to-buffer (cond ((eq to-buffer 'string) (get-buffer-create @@ -1340,7 +1346,7 @@ LEVEL indicates the default depth for export." (save-restriction (widen) (goto-char (point-min)) - (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\(-[a-zA-Z]+\\)" nil t) + (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\([-/a-zA-Z]+\\)" nil t) (match-string 1)))) (plist-get org-export-latex-options-plist :latex-class) org-export-latex-default-class) @@ -1395,7 +1401,11 @@ OPT-PLIST is the options plist for current buffer." (email (replace-regexp-in-string "_" "\\\\_" (org-export-apply-macros-in-string - (plist-get opt-plist :email))))) + (plist-get opt-plist :email)))) + (description (org-export-apply-macros-in-string + (plist-get opt-plist :description))) + (keywords (org-export-apply-macros-in-string + (plist-get opt-plist :keywords)))) (concat (if (plist-get opt-plist :time-stamp-file) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) @@ -1429,6 +1439,12 @@ OPT-PLIST is the options plist for current buffer." (format-time-string (or (plist-get opt-plist :date) org-export-latex-date-format))) + ;; add some hyperref options + ;; FIXME: let's have a defcustom for this? + (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" + (org-export-latex-fontify-headline keywords) + (org-export-latex-fontify-headline description) + (concat "Emacs Org-mode version " org-version)) ;; beginning of the document "\n\\begin{document}\n\n" ;; insert the title command @@ -1837,7 +1853,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (replace-match (concat (match-string 1) (match-string 2)) t t) (forward-line)) - (insert "\\end{verbatim}\n\n")) + (insert "\\end{verbatim}\n")) (progn (goto-char (match-beginning 0)) (while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$") (replace-match (concat "%" (match-string 1) @@ -1966,13 +1982,13 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (concat "\\begin{longtable}{" align "}\n") (if floatp (format "\\begin{%s}%s\n" tblenv placement))) - (if floatp + (if (and floatp org-export-latex-table-caption-above) (format "\\caption%s{%s} %s" (if shortn (concat "[" shortn "]") "") (or caption "") (if label (format "\\label{%s}" label) ""))) - (if (and longtblp caption) "\\\\\n" "\n") + (if (and longtblp caption) "\\\\\n" "\n") (if (and org-export-latex-tables-centered (not longtblp)) "\\begin{center}\n") (if (not longtblp) @@ -1994,6 +2010,12 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (if (not longtblp) (format "\n\\end{%s}" tabular-env)) (if longtblp "\n" (if org-export-latex-tables-centered "\n\\end{center}\n" "\n")) + (if (and floatp (not org-export-latex-table-caption-above)) + (format + "\\caption%s{%s} %s" + (if shortn (concat "[" shortn "]") "") + (or caption "") + (if label (format "\\label{%s}" label) ""))) (if longtblp "\\end{longtable}" (if floatp (format "\\end{%s}" tblenv))))) @@ -2043,11 +2065,12 @@ 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" + (if (not org-export-latex-table-caption-above) tbl) (format "\\caption%s{%s%s}\n" (if shortn (format "[%s]" shortn) "") (if label (format "\\label{%s}" label) "") (or caption "")) - tbl + (if org-export-latex-table-caption-above tbl) "\n\\end{table}\n"))) (insert (org-export-latex-protect-string tbl)))) @@ -2203,7 +2226,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." ;; a LaTeX issue, but we here implement a work-around anyway. (setq path (org-export-latex-protect-amp path) desc (org-export-latex-protect-amp desc))) - (insert + (insert (if (string-match "%s.*%s" org-export-latex-href-format) (format org-export-latex-href-format path desc) (format org-export-latex-href-format path)))) @@ -2338,7 +2361,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (let ((next (org-footnote-get-next-reference))) (and next (= (nth 1 next) (nth 2 ref))))) org-export-latex-footnote-separator "")))) - (when (org-on-heading-p) + (when (org-at-heading-p) (setq fnote (concat (org-export-latex-protect-string "\\protect") fnote))) ;; Ensure a footnote at column 0 cannot end a list @@ -2769,6 +2792,4 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (provide 'org-export-latex) (provide 'org-latex) - - ;;; org-latex.el ends here diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 72fc71854e2..df14625bc61 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -1,12 +1,11 @@ ;;; org-list.el --- Plain lists for Org-mode ;; -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik -;; Bastien Guerry +;; Bastien Guerry ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -28,30 +27,31 @@ ;; This file contains the code dealing with plain lists in Org-mode. -;; The fundamental idea behind lists work is to use structures. -;; A structure is a snapshot of the list, in the shape of data tree -;; (see `org-list-struct'). +;; The core concept behind lists is their structure. A structure is +;; a snapshot of the list, in the shape of a data tree (see +;; `org-list-struct'). ;; Once the list structure is stored, it is possible to make changes -;; directly on it or get useful information about the list, with the -;; two helper functions, namely `org-list-parents-alist' and -;; `org-list-prevs-alist', and using accessors or methods. +;; on it that will be mirrored to the real list or to get information +;; about the list, using accessors and methods provided in the +;; library. Most of them require the use of one or two helper +;; functions, namely `org-list-parents-alist' and +;; `org-list-prevs-alist'. ;; Structure is eventually applied to the buffer with ;; `org-list-write-struct'. This function repairs (bullets, -;; indentation, checkboxes) the structure before applying it. It -;; should be called near the end of any function working on -;; structures. +;; indentation, checkboxes) the list in the process. It should be +;; called near the end of any function working on structures. ;; Thus, a function applying to lists should usually follow this ;; template: ;; 1. Verify point is in a list and grab item beginning (with the same ;; function `org-in-item-p'). If the function requires the cursor -;; to be at item's bullet, `org-at-item-p' is more selective. If -;; the cursor is amidst the buffer, it is possible to find the -;; closest item with `org-list-search-backward', or -;; `org-list-search-forward', applied to `org-item-beginning-re'. +;; to be at item's bullet, `org-at-item-p' is more selective. It +;; is also possible to move point to the closest item with +;; `org-list-search-backward', or `org-list-search-forward', +;; applied to the function `org-item-beginning-re'. ;; 2. Get list structure with `org-list-struct'. @@ -62,15 +62,16 @@ ;; 4. Proceed with the modifications, using methods and accessors. ;; 5. Verify and apply structure to buffer, using -;; `org-list-write-struct'. Possibly use -;; `org-update-checkbox-count-maybe' if checkboxes might have been -;; modified. +;; `org-list-write-struct'. -;; Computing a list structure can be a costly operation on huge lists -;; (a few thousand lines long). Thus, code should follow the rule : +;; 6. If changes made to the list might have modified check-boxes, +;; call `org-update-checkbox-count-maybe'. + +;; Computing a structure can be a costly operation on huge lists (a +;; few thousand lines long). Thus, code should follow the rule: ;; "collect once, use many". As a corollary, it is usually a bad idea ;; to use directly an interactive function inside the code, as those, -;; being independent entities, read the whole list structure another +;; being independant entities, read the whole list structure another ;; time. ;;; Code: @@ -95,7 +96,6 @@ (declare-function org-at-heading-p "org" (&optional ignored)) (declare-function org-before-first-heading-p "org" ()) -(declare-function org-back-over-empty-lines "org" ()) (declare-function org-back-to-heading "org" (&optional invisible-ok)) (declare-function org-combine-plists "org" (&rest plists)) (declare-function org-count "org" (cl-item cl-seq)) @@ -113,7 +113,7 @@ (declare-function org-inlinetask-outline-regexp "org-inlinetask" ()) (declare-function org-level-increment "org" ()) (declare-function org-narrow-to-subtree "org" ()) -(declare-function org-on-heading-p "org" (&optional invisible-ok)) +(declare-function org-at-heading-p "org" (&optional invisible-ok)) (declare-function org-previous-line-empty-p "org" ()) (declare-function org-remove-if "org" (predicate seq)) (declare-function org-reduced-level "org" (L)) @@ -128,6 +128,8 @@ (declare-function outline-next-heading "outline" ()) (declare-function outline-previous-heading "outline" ()) + + ;;; Configuration variables (defgroup org-plain-lists nil @@ -271,7 +273,7 @@ By default, automatic actions are taken when using \\[org-meta-return], \\[org-metaright], \\[org-metaleft], \\[org-shiftmetaright], \\[org-shiftmetaleft], \\[org-ctrl-c-minus], \\[org-toggle-checkbox] or - \\[org-insert-todo-heading]. You can disable individually these + \\[org-insert-todo-heading]. You can disable individually these rules by setting them to nil. Valid rules are: bullet when non-nil, cycling bullet do not allow lists at @@ -376,6 +378,7 @@ specifically, type `block' is determined by the variable `org-list-forbidden-blocks'.") + ;;; Predicates and regexps (defconst org-list-end-re (if org-empty-line-terminates-plain-lists @@ -385,9 +388,9 @@ specifically, type `block' is determined by the variable It depends on `org-empty-line-terminates-plain-lists'.") (defconst org-list-full-item-re - (concat "^[ \t]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)[ \t]+\\)" + (concat "^[ \t]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[ \t]+\\|$\\)\\)" "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?" - "\\(?:\\(\\[[ X-]\\]\\)[ \t]+\\)?" + "\\(?:\\(\\[[ X-]\\]\\)\\(?:[ \t]+\\|$\\)\\)?" "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?") "Matches a list item and puts everything into groups: group 1: bullet @@ -535,6 +538,7 @@ This checks `org-list-ending-method'." (match-string 2))) + ;;; Structures and helper functions (defun org-list-context () @@ -681,7 +685,7 @@ Assume point is at an item." (cond ((<= (point) lim-up) ;; At upward limit: if we ended at an item, store it, - ;; else dismiss useless data recorded above BEG-CELL. + ;; else dimiss useless data recorded above BEG-CELL. ;; Jump to part 2. (throw 'exit (setq itm-lst @@ -803,21 +807,9 @@ Assume point is at an item." (forward-line 1)))))) (setq struct (append itm-lst (cdr (nreverse itm-lst-2))) end-lst (append end-lst (cdr (nreverse end-lst-2)))) - ;; 3. Correct ill-formed lists by ensuring top item is the least - ;; indented. - (let ((min-ind (nth 1 (car struct)))) - (mapc (lambda (item) - (let ((ind (nth 1 item)) - (bul (nth 2 item))) - (when (< ind min-ind) - (setcar (cdr item) min-ind) - ;; Trim bullet so item will be seen as different - ;; when compared with repaired version. - (setcar (nthcdr 2 item) (org-trim bul))))) - struct)) - ;; 4. Associate each item to its end pos. + ;; 3. Associate each item to its end position. (org-list-struct-assoc-end struct end-lst) - ;; 5. Return STRUCT + ;; 4. Return STRUCT struct))) (defun org-list-struct-assoc-end (struct end-list) @@ -854,8 +846,9 @@ This function modifies STRUCT." (defun org-list-parents-alist (struct) "Return alist between item and parent in STRUCT." - (let ((ind-to-ori (list (list (nth 1 (car struct))))) - (prev-pos (list (caar struct)))) + (let* ((ind-to-ori (list (list (nth 1 (car struct))))) + (top-item (org-list-get-top-point struct)) + (prev-pos (list top-item))) (cons prev-pos (mapcar (lambda (item) (let ((pos (car item)) @@ -864,17 +857,34 @@ This function modifies STRUCT." (push pos prev-pos) (cond ((> prev-ind ind) + ;; A sub-list is over. Find the associated + ;; origin in IND-TO-ORI. If it cannot be + ;; found (ill-formed list), set its parent as + ;; the first item less indented. If there is + ;; none, make it a top-level item. (setq ind-to-ori - (member (assq ind ind-to-ori) ind-to-ori)) + (or (member (assq ind ind-to-ori) ind-to-ori) + (catch 'exit + (mapc + (lambda (e) + (when (< (car e) ind) + (throw 'exit (member e ind-to-ori)))) + ind-to-ori) + (list (list ind))))) (cons pos (cdar ind-to-ori))) + ;; A sub-list starts. Every item at IND will + ;; have previous item as its parent. ((< prev-ind ind) (let ((origin (nth 1 prev-pos))) (push (cons ind origin) ind-to-ori) (cons pos origin))) + ;; Another item in the same sub-list: it shares + ;; the same parent as the previous item. (t (cons pos (cdar ind-to-ori)))))) (cdr struct))))) + ;;; Accessors (defsubst org-list-get-nth (n key struct) @@ -992,8 +1002,8 @@ items, as returned by `org-list-prevs-alist'." (defun org-list-get-children (item struct parents) "List all children of ITEM, or nil. -STRUCT is the list structure. PARENTS is the alist of parents, as -returned by `org-list-parents-alist'." +STRUCT is the list structure. PARENTS is the alist of parents, +as returned by `org-list-parents-alist'." (let (all child) (while (setq child (car (rassq item parents))) (setq parents (cdr (member (assq child parents) parents))) @@ -1052,6 +1062,7 @@ type is determined by the first item of the list." (t 'unordered)))) + ;;; Searching (defun org-list-search-generic (search re bound noerr) @@ -1084,6 +1095,7 @@ Arguments REGEXP, BOUND and NOERROR are similar to those used in regexp (or bound (point-max)) noerror)) + ;;; Methods on structures (defsubst org-list-bullet-string (bullet) @@ -1168,7 +1180,16 @@ some heuristics to guess the result." (let ((item (point)) (insert-blank-p (cdr (assq 'plain-list-item org-blank-before-new-entry))) - usr-blank) + usr-blank + (count-blanks + (function + (lambda () + ;; Count blank lines above beginning of line. + (save-excursion + (count-lines (goto-char (point-at-bol)) + (progn (skip-chars-backward " \r\t\n") + (forward-line) + (point)))))))) (cond ;; Trivial cases where there should be none. ((or (and (not (eq org-list-ending-method 'indent)) @@ -1177,21 +1198,20 @@ some heuristics to guess the result." ;; When `org-blank-before-new-entry' says so, it is 1. ((eq insert-blank-p t) 1) ;; `plain-list-item' is 'auto. Count blank lines separating - ;; neighboring items in list. + ;; neighbours items in list. (t (let ((next-p (org-list-get-next-item item struct prevs))) (cond ;; Is there a next item? (next-p (goto-char next-p) - (org-back-over-empty-lines)) + (funcall count-blanks)) ;; Is there a previous item? ((org-list-get-prev-item item struct prevs) - (org-back-over-empty-lines)) + (funcall count-blanks)) ;; User inserted blank lines, trust him. ((and (> pos (org-list-get-item-end-before-blank item struct)) - (> (save-excursion - (goto-char pos) - (skip-chars-backward " \t") - (setq usr-blank (org-back-over-empty-lines))) 0)) + (> (save-excursion (goto-char pos) + (setq usr-blank (funcall count-blanks))) + 0)) usr-blank) ;; Are there blank lines inside the list so far? ((save-excursion @@ -1207,7 +1227,7 @@ some heuristics to guess the result." If POS is before first character after bullet of the item, the new item will be created before the current one. -STRUCT is the list structure. PREVS is the alist of previous +STRUCT is the list structure. PREVS is the the alist of previous items, as returned by `org-list-prevs-alist'. Insert a checkbox if CHECKBOX is non-nil, and string AFTER-BULLET @@ -1364,8 +1384,8 @@ If DEST is a buffer position, the function will assume it points to another item in the same list as ITEM, and will move the latter just before the former. -If DEST is `begin' \(resp. `end'\), ITEM will be moved at the -beginning \(resp. end\) of the list it belongs to. +If DEST is `begin' \(respectively `end'\), ITEM will be moved at +the beginning \(respectively end\) of the list it belongs to. If DEST is a string like \"N\", where N is an integer, ITEM will be moved at the Nth position in the list. @@ -1543,12 +1563,13 @@ bullets between START and END." (mapcar ind parents))) + ;;; Repairing structures (defun org-list-use-alpha-bul-p (first struct prevs) "Non-nil if list starting at FIRST can have alphabetical bullets. -STRUCT is list structure. PREVS is the alist of previous items, +STRUCT is list structure. PREVS is the alist of previous items, as returned by `org-list-prevs-alist'." (and org-alphabetical-lists (catch 'exit @@ -1746,15 +1767,41 @@ This function modifies STRUCT." ;; Return blocking item. (nth index all-items))))))) +(defun org-list-struct-fix-item-end (struct) + "Verify and correct each item end position in STRUCT. + +This function modifies STRUCT." + (let (end-list acc-end) + (mapc (lambda (e) + (let* ((pos (car e)) + (ind-pos (org-list-get-ind pos struct)) + (end-pos (org-list-get-item-end pos struct))) + (unless (assq end-pos struct) + ;; To determine real ind of an ending position that is + ;; not at an item, we have to find the item it belongs + ;; to: it is the last item (ITEM-UP), whose ending is + ;; further than the position we're interested in. + (let ((item-up (assoc-default end-pos acc-end '>))) + (push (cons + ;; Else part is for the bottom point. + (if item-up (+ (org-list-get-ind item-up struct) 2) 0) + end-pos) + end-list))) + (push (cons ind-pos pos) end-list) + (push (cons end-pos pos) acc-end))) + struct) + (setq end-list (sort end-list (lambda (e1 e2) (< (cdr e1) (cdr e2))))) + (org-list-struct-assoc-end struct end-list))) + (defun org-list-struct-apply-struct (struct old-struct) - "Apply set-difference between STRUCT and OLD-STRUCT to the buffer. + "Apply set difference between STRUCT and OLD-STRUCT to the buffer. OLD-STRUCT is the structure before any modifications, and STRUCT the structure to be applied. The function will only modify parts of the list which have changed. Initial position of cursor is restored after the changes." - (let* ((origin (copy-marker (point))) + (let* ((origin (point-marker)) (inlinetask-re (and (featurep 'org-inlinetask) (org-inlinetask-outline-regexp))) (item-re (org-item-re)) @@ -1804,13 +1851,11 @@ Initial position of cursor is restored after the changes." ((and (match-string 3) new-box) (replace-match new-box nil nil nil 3)) ((match-string 3) - ;; (goto-char (or (match-end 2) (match-end 1))) - ;; (skip-chars-backward " \t") (looking-at ".*?\\([ \t]*\\[[ X-]\\]\\)") (replace-match "" nil nil nil 1)) (t (let ((counterp (match-end 2))) (goto-char (if counterp (1+ counterp) (match-end 1))) - (insert (concat new-box (unless counterp " ")))))) + (insert (concat new-box (unless counterp " ")))))) ;; c. Indent item to appropriate column. (unless (= new-ind old-ind) (delete-region (goto-char (point-at-bol)) @@ -1869,53 +1914,38 @@ Initial position of cursor is restored after the changes." (goto-char origin) (move-marker origin nil))) -(defun org-list-write-struct (struct parents) +(defun org-list-write-struct (struct parents &optional old-struct) "Correct bullets, checkboxes and indentation in list at point. + STRUCT is the list structure. PARENTS is the alist of parents, -as returned by `org-list-parents-alist'." +as returned by `org-list-parents-alist'. + +When non-nil, optional argument OLD-STRUCT is the reference +structure of the list. It should be provided whenever STRUCT +doesn't correspond anymore to the real list in buffer." ;; Order of functions matters here: checkboxes and endings need ;; correct indentation to be set, and indentation needs correct ;; bullets. ;; ;; 0. Save a copy of structure before modifications - (let ((old-struct (copy-tree struct))) + (let ((old-struct (or old-struct (copy-tree struct)))) ;; 1. Set a temporary, but coherent with PARENTS, indentation in ;; order to get items endings and bullets properly (org-list-struct-fix-ind struct parents 2) - ;; 2. Get pseudo-alist of ending positions and sort it by position. - ;; Then associate them to the structure. - (let (end-list acc-end) - (mapc (lambda (e) - (let* ((pos (car e)) - (ind-pos (org-list-get-ind pos struct)) - (end-pos (org-list-get-item-end pos struct))) - (unless (assq end-pos struct) - ;; To determine real ind of an ending position that is - ;; not at an item, we have to find the item it belongs - ;; to: it is the last item (ITEM-UP), whose ending is - ;; further than the position we're interested in. - (let ((item-up (assoc-default end-pos acc-end '>))) - (push (cons - ;; Else part is for the bottom point. - (if item-up (+ (org-list-get-ind item-up struct) 2) 0) - end-pos) - end-list))) - (push (cons ind-pos pos) end-list) - (push (cons end-pos pos) acc-end))) - struct) - (setq end-list (sort end-list (lambda (e1 e2) (< (cdr e1) (cdr e2))))) - (org-list-struct-assoc-end struct end-list)) - ;; 3. Get bullets right. - (let ((prevs (org-list-prevs-alist struct))) - (org-list-struct-fix-bul struct prevs) - ;; 4. Now get real indentation. - (org-list-struct-fix-ind struct parents) - ;; 5. Eventually fix checkboxes. - (org-list-struct-fix-box struct parents prevs)) - ;; 6. Apply structure modifications to buffer. - (org-list-struct-apply-struct struct old-struct))) - - + ;; 2. Fix each item end to get correct prevs alist. + (org-list-struct-fix-item-end struct) + ;; 3. Get bullets right. + (let ((prevs (org-list-prevs-alist struct))) + (org-list-struct-fix-bul struct prevs) + ;; 4. Now get real indentation. + (org-list-struct-fix-ind struct parents) + ;; 5. Eventually fix checkboxes. + (org-list-struct-fix-box struct parents prevs)) + ;; 6. Apply structure modifications to buffer. + (org-list-struct-apply-struct struct old-struct))) + + + ;;; Misc Tools (defun org-apply-on-list (function init-value &rest args) @@ -1947,7 +1977,7 @@ beginning of the item." (defun org-list-set-item-visibility (item struct view) "Set visibility of ITEM in STRUCT to VIEW. -Possible values are: `folded', `children' or `subtree'. See +Possible values are: `folded', `children' or `subtree'. See `org-cycle' for more information." (cond ((eq view 'folded) @@ -1983,6 +2013,7 @@ Possible values are: `folded', `children' or `subtree'. See tcol)) + ;;; Interactive functions (defalias 'org-list-get-item-begin 'org-in-item-p) @@ -2257,7 +2288,7 @@ in subtree, ignoring drawers." (setq lim-up (point-at-bol)) (error "No item in region")) (setq lim-down (copy-marker limit)))) - ((org-on-heading-p) + ((org-at-heading-p) ;; On an heading, start at first item after drawers and ;; time-stamps (scheduled, etc.). (let ((limit (save-excursion (outline-next-heading) (point)))) @@ -2274,7 +2305,7 @@ in subtree, ignoring drawers." ((org-at-item-p) (setq singlep t) (setq lim-up (point-at-bol) - lim-down (point-at-eol))) + lim-down (copy-marker (point-at-eol)))) (t (error "Not at an item or heading, and no active region")))) ;; Determine the checkbox going to be applied to all items ;; within bounds. @@ -2328,9 +2359,9 @@ in subtree, ignoring drawers." "Checkboxes were removed due to unchecked box at line %d" (org-current-line block-item)))) (goto-char bottom) - (move-marker lim-down nil) (move-marker bottom nil) - (org-list-struct-apply-struct struct struct-copy))))) + (org-list-struct-apply-struct struct struct-copy))) + (move-marker lim-down nil))) (org-update-checkbox-count-maybe)) (defun org-reset-checkbox-state-subtree () @@ -2416,7 +2447,7 @@ With optional prefix argument ALL, do this for the whole buffer." (cond ; boxes count ;; Cookie is at an heading, but specifically for todo, ;; not for checkboxes: skip it. - ((and (org-on-heading-p) + ((and (org-at-heading-p) (string-match "\\" (downcase (or (org-entry-get nil "COOKIE_DATA") "")))) @@ -2425,14 +2456,14 @@ With optional prefix argument ALL, do this for the whole buffer." ;; heading already have been read. Use data collected ;; in STRUCTS-BAK. This should only happen when ;; heading has more than one cookie on it. - ((and (org-on-heading-p) + ((and (org-at-heading-p) (<= (save-excursion (outline-next-heading) (point)) backup-end)) (funcall count-boxes nil structs-bak recursivep)) ;; Cookie is at a fresh heading. Grab structure of ;; every list containing a checkbox between point and ;; next headline, and save them in STRUCTS-BAK. - ((org-on-heading-p) + ((org-at-heading-p) (setq backup-end (save-excursion (outline-next-heading) (point)) structs-bak nil) @@ -2491,7 +2522,8 @@ Otherwise it will be `org-todo'." 'org-checkbox-statistics-todo))) (defun org-update-checkbox-count-maybe (&optional all) - "Update checkbox statistics unless turned off by user." + "Update checkbox statistics unless turned off by user. +With an optional argument ALL, update them in the whole buffer." (when (cdr (assq 'checkbox org-list-automatic-rules)) (org-update-checkbox-count all)) (run-hooks 'org-checkbox-statistics-hook)) @@ -2642,7 +2674,7 @@ If a region is active, all items inside will be moved." (defvar org-tab-ind-state) (defun org-cycle-item-indentation () "Cycle levels of indentation of an empty item. -The first run indents the item, if applicable. Subsequent runs +The first run indents the item, if applicable. Subsequents runs outdent it at meaningful levels in the list. When done, item is put back at its original position with its original bullet. @@ -2711,7 +2743,7 @@ Capital letters will reverse the sort order. If the SORTING-TYPE is ?f or ?F, then GETKEY-FUNC specifies a function to be called with point at the beginning of the record. It must return either a string or a number that should -serve as the sorting key for that record. It will then use +serve as the sorting key for that record. It will then use COMPARE-FUNC to compare entries." (interactive "P") (let* ((case-func (if with-case 'identity 'downcase)) @@ -2786,6 +2818,7 @@ COMPARE-FUNC to compare entries." (message "Sorting items...done"))))) + ;;; Send and receive lists (defun org-list-parse-list (&optional delete) @@ -2975,6 +3008,10 @@ for this list." (insert txt "\n"))) (message "List converted and installed at receiver location")))) +(defsubst org-list-item-trim-br (item) + "Trim line breaks in a list ITEM." + (setq item (replace-regexp-in-string "\n +" " " item))) + (defun org-list-to-generic (list params) "Convert a LIST parsed through `org-list-parse-list' to other formats. Valid parameters PARAMS are: @@ -3006,9 +3043,11 @@ Valid parameters PARAMS are: :cbon String to insert for a checked check-box :cbtrans String to insert for a check-box in transitional state +:nobr Non-nil means remove line breaks in lists items. + Alternatively, each parameter can also be a form returning a string. These sexp can use keywords `counter' and `depth', -representing respectively counter associated to the current +reprensenting respectively counter associated to the current item, and depth of the current sub-list, starting at 0. Obviously, `counter' is only available for parameters applying to items." @@ -3034,6 +3073,7 @@ items." (cbon (plist-get p :cbon)) (cboff (plist-get p :cboff)) (cbtrans (plist-get p :cbtrans)) + (nobr (plist-get p :nobr)) export-sublist ; for byte-compiler (export-item (function @@ -3065,6 +3105,8 @@ items." (setq first (replace-match cboff t t first))) ((string-match "\\[CBTRANS\\]" first) (setq first (replace-match cbtrans t t first)))) + ;; Replace line breaks if required + (when nobr (setq first (org-list-item-trim-br first))) ;; Insert descriptive term if TYPE is `descriptive'. (when (eq type 'descriptive) (let* ((complete (string-match "^\\(.*\\)[ \t]+::" first)) @@ -3200,5 +3242,4 @@ with overruling parameters for `org-list-to-generic'." (provide 'org-list) - ;;; org-list.el ends here diff --git a/lisp/org/org-lparse.el b/lisp/org/org-lparse.el new file mode 100644 index 00000000000..8c98ea76732 --- /dev/null +++ b/lisp/org/org-lparse.el @@ -0,0 +1,2339 @@ +;;; org-lparse.el --- Line-oriented parser-exporter for Org-mode + +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. + +;; Author: Jambunathan K +;; Keywords: outlines, hypermedia, calendar, wp +;; Homepage: http://orgmode.org +;; +;; This file is not (yet) part of GNU Emacs. +;; However, it is distributed under the same license. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: + +;; `org-lparse' is the entry point for the generic line-oriented +;; exporter. `org-do-lparse' is the genericized version of the +;; original `org-export-as-html' routine. + +;; `org-lparse-native-backends' is a good starting point for +;; exploring the generic exporter. + +;; Following new interactive commands are provided by this library. +;; `org-lparse', `org-lparse-and-open', `org-lparse-to-buffer' +;; `org-replace-region-by', `org-lparse-region'. + +;; Note that the above routines correspond to the following routines +;; in the html exporter `org-export-as-html', +;; `org-export-as-html-and-open', `org-export-as-html-to-buffer', +;; `org-replace-region-by-html' and `org-export-region-as-html'. + +;; The new interactive command `org-lparse-convert' can be used to +;; convert documents between various formats. Use this to command, +;; for example, to convert odt file to doc or pdf format. + +;; See README.org file that comes with this library for answers to +;; FAQs and more information on using this library. + +;;; Code: +(eval-when-compile + (require 'cl)) +(require 'org-exp) +(require 'org-list) +(require 'format-spec) + +;;;###autoload +(defun org-lparse-and-open (target-backend native-backend arg + &optional file-or-buf) + "Export outline to TARGET-BACKEND via NATIVE-BACKEND and open exported file. +If there is an active region, export only the region. The prefix +ARG specifies how many levels of the outline should become +headlines. The default is 3. Lower levels will become bulleted +lists." + (let (f (file-or-buf (or file-or-buf + (org-lparse target-backend native-backend + arg 'hidden)))) + (when file-or-buf + (setq f (cond + ((bufferp file-or-buf) buffer-file-name) + ((file-exists-p file-or-buf) file-or-buf) + (t (error "org-lparse-and-open: This shouldn't happen")))) + (message "Opening file %s" f) + (org-open-file f) + (when org-export-kill-product-buffer-when-displayed + (kill-buffer (current-buffer)))))) + +;;;###autoload +(defun org-lparse-batch (target-backend &optional native-backend) + "Call the function `org-lparse'. +This function can be used in batch processing as: +emacs --batch + --load=$HOME/lib/emacs/org.el + --eval \"(setq org-export-headline-levels 2)\" + --visit=MyFile --funcall org-lparse-batch" + (setq native-backend (or native-backend target-backend)) + (org-lparse target-backend native-backend + org-export-headline-levels 'hidden)) + +;;;###autoload +(defun org-lparse-to-buffer (backend arg) + "Call `org-lparse' with output to a temporary buffer. +No file is created. The prefix ARG is passed through to +`org-lparse'." + (let ((tempbuf (format "*Org %s Export*" (upcase backend)))) + (org-lparse backend backend arg nil nil tempbuf) + (when org-export-show-temporary-export-buffer + (switch-to-buffer-other-window tempbuf)))) + +;;;###autoload +(defun org-replace-region-by (backend beg end) + "Assume the current region has org-mode syntax, and convert it to HTML. +This can be used in any buffer. For example, you could write an +itemized list in org-mode syntax in an HTML buffer and then use +this command to convert it." + (let (reg backend-string buf pop-up-frames) + (save-window-excursion + (if (eq major-mode 'org-mode) + (setq backend-string (org-lparse-region backend beg end t 'string)) + (setq reg (buffer-substring beg end) + buf (get-buffer-create "*Org tmp*")) + (with-current-buffer buf + (erase-buffer) + (insert reg) + (org-mode) + (setq backend-string (org-lparse-region backend (point-min) + (point-max) t 'string))) + (kill-buffer buf))) + (delete-region beg end) + (insert backend-string))) + +;;;###autoload +(defun org-lparse-region (backend beg end &optional body-only buffer) + "Convert region from BEG to END in org-mode buffer to HTML. +If prefix arg BODY-ONLY is set, omit file header, footer, and table of +contents, and only produce the region of converted text, useful for +cut-and-paste operations. +If BUFFER is a buffer or a string, use/create that buffer as a target +of the converted HTML. If BUFFER is the symbol `string', return the +produced HTML as a string and leave not buffer behind. For example, +a Lisp program could call this function in the following way: + + (setq html (org-lparse-region \"html\" beg end t 'string)) + +When called interactively, the output buffer is selected, and shown +in a window. A non-interactive call will only return the buffer." + (let ((transient-mark-mode t) (zmacs-regions t) + ext-plist rtn) + (setq ext-plist (plist-put ext-plist :ignore-subtree-p t)) + (goto-char end) + (set-mark (point)) ;; to activate the region + (goto-char beg) + (setq rtn (org-lparse backend backend nil nil ext-plist buffer body-only)) + (if (fboundp 'deactivate-mark) (deactivate-mark)) + (if (and (org-called-interactively-p 'any) (bufferp rtn)) + (switch-to-buffer-other-window rtn) + rtn))) + +(defvar org-lparse-par-open nil) + +(defun org-lparse-should-inline-p (filename descp) + "Return non-nil if link FILENAME should be inlined. +The decision to inline the FILENAME link is based on the current +settings. DESCP is the boolean of whether there was a link +description. See variables `org-export-html-inline-images' and +`org-export-html-inline-image-extensions'." + (let ((inline-images (org-lparse-get 'INLINE-IMAGES)) + (inline-image-extensions + (org-lparse-get 'INLINE-IMAGE-EXTENSIONS))) + (and (or (eq t inline-images) (and inline-images (not descp))) + (org-file-image-p filename inline-image-extensions)))) + +(defun org-lparse-format-org-link (line opt-plist) + "Return LINE with markup of Org mode links. +OPT-PLIST is the export options list." + (let ((start 0) + (current-dir (if buffer-file-name + (file-name-directory buffer-file-name) + default-directory)) + (link-validate (plist-get opt-plist :link-validation-function)) + type id-file fnc + rpl path attr desc descp desc1 desc2 link + org-lparse-link-description-is-image) + (while (string-match org-bracket-link-analytic-regexp++ line start) + (setq org-lparse-link-description-is-image nil) + (setq start (match-beginning 0)) + (setq path (save-match-data (org-link-unescape + (match-string 3 line)))) + (setq type (cond + ((match-end 2) (match-string 2 line)) + ((save-match-data + (or (file-name-absolute-p path) + (string-match "^\\.\\.?/" path))) + "file") + (t "internal"))) + (setq path (org-extract-attributes path)) + (setq attr (get-text-property 0 'org-attributes path)) + (setq desc1 (if (match-end 5) (match-string 5 line)) + desc2 (if (match-end 2) (concat type ":" path) path) + descp (and desc1 (not (equal desc1 desc2))) + desc (or desc1 desc2)) + ;; Make an image out of the description if that is so wanted + (when (and descp (org-file-image-p + desc (org-lparse-get 'INLINE-IMAGE-EXTENSIONS))) + (setq org-lparse-link-description-is-image t) + (save-match-data + (if (string-match "^file:" desc) + (setq desc (substring desc (match-end 0))))) + (save-match-data + (setq desc (org-add-props + (org-lparse-format 'INLINE-IMAGE desc) + '(org-protected t))))) + (cond + ((equal type "internal") + (let + ((frag-0 + (if (= (string-to-char path) ?#) + (substring path 1) + path))) + (setq rpl + (org-lparse-format + 'ORG-LINK opt-plist "" "" (org-solidify-link-text + (save-match-data + (org-link-unescape frag-0)) + nil) desc attr descp)))) + ((and (equal type "id") + (setq id-file (org-id-find-id-file path))) + ;; This is an id: link to another file (if it was the same file, + ;; it would have become an internal link...) + (save-match-data + (setq id-file (file-relative-name + id-file + (file-name-directory org-current-export-file))) + (setq rpl + (org-lparse-format + 'ORG-LINK opt-plist type id-file + (concat (if (org-uuidgen-p path) "ID-") path) + desc attr descp)))) + ((member type '("http" "https")) + ;; standard URL, can inline as image + (setq rpl + (org-lparse-format + 'ORG-LINK opt-plist type path nil desc attr descp))) + ((member type '("ftp" "mailto" "news")) + ;; standard URL, can't inline as image + (setq rpl + (org-lparse-format + 'ORG-LINK opt-plist type path nil desc attr descp))) + + ((string= type "coderef") + (setq rpl (org-lparse-format + 'ORG-LINK opt-plist type "" path desc nil descp))) + + ((functionp (setq fnc (nth 2 (assoc type org-link-protocols)))) + ;; The link protocol has a function for format the link + (setq rpl (save-match-data + (funcall fnc (org-link-unescape path) + desc1 (and (boundp 'org-lparse-backend) + (case org-lparse-backend + (xhtml 'html) + (t org-lparse-backend))))))) + ((string= type "file") + ;; FILE link + (save-match-data + (let* + ((components + (if + (string-match "::\\(.*\\)" path) + (list + (replace-match "" t nil path) + (match-string 1 path)) + (list path nil))) + + ;;The proper path, without a fragment + (path-1 + (first components)) + + ;;The raw fragment + (fragment-0 + (second components)) + + ;;Check the fragment. If it can't be used as + ;;target fragment we'll pass nil instead. + (fragment-1 + (if + (and fragment-0 + (not (string-match "^[0-9]*$" fragment-0)) + (not (string-match "^\\*" fragment-0)) + (not (string-match "^/.*/$" fragment-0))) + (org-solidify-link-text + (org-link-unescape fragment-0)) + nil)) + (desc-2 + ;;Description minus "file:" and ".org" + (if (string-match "^file:" desc) + (let + ((desc-1 (replace-match "" t t desc))) + (if (string-match "\\.org$" desc-1) + (replace-match "" t t desc-1) + desc-1)) + desc))) + + (setq rpl + (if + (and + (functionp link-validate) + (not (funcall link-validate path-1 current-dir))) + desc + (org-lparse-format + 'ORG-LINK opt-plist "file" path-1 fragment-1 + desc-2 attr descp)))))) + + (t + ;; just publish the path, as default + (setq rpl (concat "<" type ":" + (save-match-data (org-link-unescape path)) + ">")))) + (setq line (replace-match rpl t t line) + start (+ start (length rpl)))) + line)) + +(defvar org-lparse-par-open-stashed) ; bound during `org-do-lparse' +(defun org-lparse-stash-save-paragraph-state () + (assert (zerop org-lparse-par-open-stashed)) + (setq org-lparse-par-open-stashed org-lparse-par-open) + (setq org-lparse-par-open nil)) + +(defun org-lparse-stash-pop-paragraph-state () + (setq org-lparse-par-open org-lparse-par-open-stashed) + (setq org-lparse-par-open-stashed 0)) + +(defmacro with-org-lparse-preserve-paragraph-state (&rest body) + `(let ((org-lparse-do-open-par org-lparse-par-open)) + (org-lparse-end-paragraph) + ,@body + (when org-lparse-do-open-par + (org-lparse-begin-paragraph)))) +(def-edebug-spec with-org-lparse-preserve-paragraph-state (body)) + +(defvar org-lparse-native-backends nil + "List of native backends registered with `org-lparse'. +A backend can use `org-lparse-register-backend' to add itself to +this list. + +All native backends must implement a get routine and a mandatory +set of callback routines. + +The get routine must be named as org--get where backend +is the name of the backend. The exporter uses `org-lparse-get' +and retrieves the backend-specific callback by querying for +ENTITY-CONTROL and ENTITY-FORMAT variables. + +For the sake of illustration, the html backend implements +`org-xhtml-get'. It returns +`org-xhtml-entity-control-callbacks-alist' and +`org-xhtml-entity-format-callbacks-alist' as the values of +ENTITY-CONTROL and ENTITY-FORMAT settings.") + +(defun org-lparse-register-backend (backend) + "Make BACKEND known to `org-lparse' library. +Add BACKEND to `org-lparse-native-backends'." + (when backend + (setq backend (cond + ((symbolp backend) (symbol-name backend)) + ((stringp backend) backend) + (t (error "Error while registering backend: %S" backend)))) + (add-to-list 'org-lparse-native-backends backend))) + +(defun org-lparse-unregister-backend (backend) + (setq org-lparse-native-backends + (remove (cond + ((symbolp backend) (symbol-name backend)) + ((stringp backend) backend)) + org-lparse-native-backends)) + (message "Unregistered backend %S" backend)) + +(defun org-lparse-do-reachable-formats (in-fmt) + "Return verbose info about formats to which IN-FMT can be converted. +Return a list where each element is of the +form (CONVERTER-PROCESS . OUTPUT-FMT-ALIST). See +`org-export-odt-convert-processes' for CONVERTER-PROCESS and see +`org-export-odt-convert-capabilities' for OUTPUT-FMT-ALIST." + (let (reachable-formats) + (dolist (backend org-lparse-native-backends reachable-formats) + (let* ((converter (org-lparse-backend-get + backend 'CONVERT-METHOD)) + (capabilities (org-lparse-backend-get + backend 'CONVERT-CAPABILITIES))) + (when converter + (dolist (c capabilities) + (when (member in-fmt (nth 1 c)) + (push (cons converter (nth 2 c)) reachable-formats)))))))) + +(defun org-lparse-reachable-formats (in-fmt) + "Return list of formats to which IN-FMT can be converted. +The list of the form (OUTPUT-FMT-1 OUTPUT-FMT-2 ...)." + (let (l) + (mapc (lambda (e) (add-to-list 'l e)) + (apply 'append (mapcar + (lambda (e) (mapcar 'car (cdr e))) + (org-lparse-do-reachable-formats in-fmt)))) + l)) + +(defun org-lparse-reachable-p (in-fmt out-fmt) + "Return non-nil if IN-FMT can be converted to OUT-FMT." + (catch 'done + (let ((reachable-formats (org-lparse-do-reachable-formats in-fmt))) + (dolist (e reachable-formats) + (let ((out-fmt-spec (assoc out-fmt (cdr e)))) + (when out-fmt-spec + (throw 'done (cons (car e) out-fmt-spec)))))))) + +(defun org-lparse-backend-is-native-p (backend) + (member backend org-lparse-native-backends)) + +(defun org-lparse (target-backend native-backend arg + &optional hidden ext-plist + to-buffer body-only pub-dir) + "Export the outline to various formats. +If there is an active region, export only the region. The +outline is first exported to NATIVE-BACKEND and optionally +converted to TARGET-BACKEND. See `org-lparse-native-backends' +for list of known native backends. Each native backend can +specify a converter and list of target backends it exports to +using the CONVERT-PROCESS and OTHER-BACKENDS settings of it's get +method. See `org-xhtml-get' for an illustrative example. + +ARG is a prefix argument that specifies how many levels of +outline should become headlines. The default is 3. Lower levels +will become bulleted lists. + +HIDDEN is obsolete and does nothing. + +EXT-PLIST is a property list that controls various aspects of +export. The settings here override org-mode's default settings +and but are inferior to file-local settings. + +TO-BUFFER dumps the exported lines to a buffer or a string +instead of a file. If TO-BUFFER is the symbol `string' return the +exported lines as a string. If TO-BUFFER is non-nil, create a +buffer with that name and export to that buffer. + +BODY-ONLY controls the presence of header and footer lines in +exported text. If BODY-ONLY is non-nil, don't produce the file +header and footer, simply return the content of ..., +without even the body tags themselves. + +PUB-DIR specifies the publishing directory." + (let* ((org-lparse-backend (intern native-backend)) + (org-lparse-other-backend (and target-backend + (intern target-backend)))) + (unless (org-lparse-backend-is-native-p native-backend) + (error "Don't know how to export natively to backend %s" native-backend)) + + (unless (or (equal native-backend target-backend) + (org-lparse-reachable-p native-backend target-backend)) + (error "Don't know how to export to backend %s %s" target-backend + (format "via %s" native-backend))) + (run-hooks 'org-export-first-hook) + (org-do-lparse arg hidden ext-plist to-buffer body-only pub-dir))) + +(defcustom org-lparse-use-flashy-warning nil + "Control flashing of messages logged with `org-lparse-warn'. +When non-nil, messages are fontified with warning face and the +exporter lingers for a while to catch user's attention." + :type 'boolean + :group 'org-lparse) + +(defun org-lparse-convert-read-params () + "Return IN-FILE and OUT-FMT params for `org-lparse-do-convert'. +This is a helper routine for interactive use." + (let* ((input (if (featurep 'ido) 'ido-completing-read 'completing-read)) + (in-file (read-file-name "File to be converted: " + nil buffer-file-name t)) + (in-fmt (file-name-extension in-file)) + (out-fmt-choices (org-lparse-reachable-formats in-fmt)) + (out-fmt + (or (and out-fmt-choices + (funcall input "Output format: " + out-fmt-choices nil nil nil)) + (error + "No known converter or no known output formats for %s files" + in-fmt)))) + (list in-file out-fmt))) + +(eval-when-compile + (require 'browse-url)) + +(defun org-lparse-do-convert (in-file out-fmt &optional prefix-arg) + "Workhorse routine for `org-export-odt-convert'." + (require 'browse-url) + (let* ((in-file (expand-file-name (or in-file buffer-file-name))) + (dummy (or (file-readable-p in-file) + (error "Cannot read %s" in-file))) + (in-fmt (file-name-extension in-file)) + (out-fmt (or out-fmt (error "Output format unspecified"))) + (how (or (org-lparse-reachable-p in-fmt out-fmt) + (error "Cannot convert from %s format to %s format?" + in-fmt out-fmt))) + (convert-process (car how)) + (program (car convert-process)) + (dummy (and (or program (error "Converter not configured")) + (or (executable-find program) + (error "Cannot find converter %s" program)))) + (out-file (concat (file-name-sans-extension in-file) "." + (nth 1 (or (cdr how) out-fmt)))) + (out-dir (file-name-directory in-file)) + (arglist (mapcar (lambda (arg) + (format-spec + arg `((?i . ,in-file) + (?I . ,(browse-url-file-url in-file)) + (?f . ,out-fmt) + (?o . ,out-file) + (?O . ,(browse-url-file-url out-file)) + (?d . ,out-dir) + (?D . ,(browse-url-file-url out-dir))))) + (cdr convert-process)))) + (when (file-exists-p out-file) + (delete-file out-file)) + + (message "Executing %s %s" program (mapconcat 'identity arglist " ")) + (apply 'call-process program nil nil nil arglist) + (cond + ((file-exists-p out-file) + (message "Exported to %s using %s" out-file program) + (when prefix-arg + (message "Opening %s..." out-file) + (org-open-file out-file)) + out-file + ;; (set-buffer (find-file-noselect out-file)) + ) + (t + (message "Export to %s failed" out-file) + nil)))) + +(defvar org-lparse-insert-tag-with-newlines 'both) + +;; Following variables are let-bound during `org-lparse' +(defvar org-lparse-dyn-first-heading-pos) +(defvar org-lparse-toc) +(defvar org-lparse-entity-control-callbacks-alist) +(defvar org-lparse-entity-format-callbacks-alist) +(defvar org-lparse-backend nil + "The native backend to which the document is currently exported. +This variable is let bound during `org-lparse'. Valid values are +one of the symbols corresponding to `org-lparse-native-backends'. + +Compare this variable with `org-export-current-backend' which is +bound only during `org-export-preprocess-string' stage of the +export process. + +See also `org-lparse-other-backend'.") + +(defvar org-lparse-other-backend nil + "The target backend to which the document is currently exported. +This variable is let bound during `org-lparse'. This variable is +set to either `org-lparse-backend' or one of the symbols +corresponding to OTHER-BACKENDS specification of the +org-lparse-backend. + +For example, if a document is exported to \"odt\" then both +org-lparse-backend and org-lparse-other-backend are bound to +'odt. On the other hand, if a document is exported to \"odt\" +and then converted to \"doc\" then org-lparse-backend is set to +'odt and org-lparse-other-backend is set to 'doc.") + +(defvar org-lparse-body-only nil + "Bind this to BODY-ONLY arg of `org-lparse'.") + +(defvar org-lparse-to-buffer nil + "Bind this to TO-BUFFER arg of `org-lparse'.") + +(defun org-lparse-get-block-params (params) + (save-match-data + (when params + (setq params (org-trim params)) + (unless (string-match "\\`(.*)\\'" params) + (setq params (format "(%s)" params))) + (ignore-errors (read params))))) + +(defvar org-heading-keyword-regexp-format) ; defined in org.el +(defvar org-lparse-special-blocks '("list-table" "annotation")) +(defun org-do-lparse (arg &optional hidden ext-plist + to-buffer body-only pub-dir) + "Export the outline to various formats. +See `org-lparse' for more information. This function is a +html-agnostic version of the `org-export-as-html' function in 7.5 +version." + ;; Make sure we have a file name when we need it. + (when (and (not (or to-buffer body-only)) + (not buffer-file-name)) + (if (buffer-base-buffer) + (org-set-local 'buffer-file-name + (with-current-buffer (buffer-base-buffer) + buffer-file-name)) + (error "Need a file name to be able to export"))) + + (org-lparse-warn + (format "Exporting to %s using org-lparse..." + (upcase (symbol-name + (or org-lparse-backend org-lparse-other-backend))))) + + (setq-default org-todo-line-regexp org-todo-line-regexp) + (setq-default org-deadline-line-regexp org-deadline-line-regexp) + (setq-default org-done-keywords org-done-keywords) + (setq-default org-maybe-keyword-time-regexp org-maybe-keyword-time-regexp) + (let* (hfy-user-sheet-assoc ; let `htmlfontify' know that + ; we are interested in + ; collecting styles + org-lparse-encode-pending + org-lparse-par-open + (org-lparse-par-open-stashed 0) + + ;; list related vars + (org-lparse-list-level 0) ; list level starts at 1. A + ; value of 0 implies we are + ; outside of any list + (org-lparse-list-item-count 0) + org-lparse-list-stack + + ;; list-table related vars + org-lparse-list-table-p + org-lparse-list-table:table-cell-open + org-lparse-list-table:table-row + org-lparse-list-table:lines + + org-lparse-outline-text-open + (org-lparse-latex-fragment-fallback ; currently used only by + ; odt exporter + (or (ignore-errors (org-lparse-get 'LATEX-FRAGMENT-FALLBACK)) + (if (and (org-check-external-command "latex" "" t) + (org-check-external-command "dvipng" "" t)) + 'dvipng + 'verbatim))) + (org-lparse-insert-tag-with-newlines 'both) + (org-lparse-to-buffer to-buffer) + (org-lparse-body-only body-only) + (org-lparse-entity-control-callbacks-alist + (org-lparse-get 'ENTITY-CONTROL)) + (org-lparse-entity-format-callbacks-alist + (org-lparse-get 'ENTITY-FORMAT)) + (opt-plist + (org-export-process-option-filters + (org-combine-plists (org-default-export-plist) + ext-plist + (org-infile-export-plist)))) + (body-only (or body-only (plist-get opt-plist :body-only))) + valid org-lparse-dyn-first-heading-pos + (odd org-odd-levels-only) + (region-p (org-region-active-p)) + (rbeg (and region-p (region-beginning))) + (rend (and region-p (region-end))) + (subtree-p + (if (plist-get opt-plist :ignore-subtree-p) + nil + (when region-p + (save-excursion + (goto-char rbeg) + (and (org-at-heading-p) + (>= (org-end-of-subtree t t) rend)))))) + (level-offset (if subtree-p + (save-excursion + (goto-char rbeg) + (+ (funcall outline-level) + (if org-odd-levels-only 1 0))) + 0)) + (opt-plist (setq org-export-opt-plist + (if subtree-p + (org-export-add-subtree-options opt-plist rbeg) + opt-plist))) + ;; The following two are dynamically scoped into other + ;; routines below. + (org-current-export-dir + (or pub-dir (org-lparse-get 'EXPORT-DIR opt-plist))) + (org-current-export-file buffer-file-name) + (level 0) (line "") (origline "") txt todo + (umax nil) + (umax-toc nil) + (filename (if to-buffer nil + (expand-file-name + (concat + (file-name-sans-extension + (or (and subtree-p + (org-entry-get (region-beginning) + "EXPORT_FILE_NAME" t)) + (file-name-nondirectory buffer-file-name))) + "." (org-lparse-get 'FILE-NAME-EXTENSION opt-plist)) + (file-name-as-directory + (or pub-dir (org-lparse-get 'EXPORT-DIR opt-plist)))))) + (current-dir (if buffer-file-name + (file-name-directory buffer-file-name) + default-directory)) + (auto-insert nil) ; Avoid any auto-insert stuff for the new file + (buffer (if to-buffer + (cond + ((eq to-buffer 'string) + (get-buffer-create (org-lparse-get 'EXPORT-BUFFER-NAME))) + (t (get-buffer-create to-buffer))) + (find-file-noselect + (or (let ((f (org-lparse-get 'INIT-METHOD))) + (and f (functionp f) (funcall f filename))) + filename)))) + (org-levels-open (make-vector org-level-max nil)) + (dummy (mapc + (lambda(p) + (let* ((val (plist-get opt-plist p)) + (val (org-xml-encode-org-text-skip-links val))) + (setq opt-plist (plist-put opt-plist p val)))) + '(:date :author :keywords :description))) + (date (plist-get opt-plist :date)) + (date (cond + ((and date (string-match "%" date)) + (format-time-string date)) + (date date) + (t (format-time-string "%Y-%m-%d %T %Z")))) + (dummy (setq opt-plist (plist-put opt-plist :effective-date date))) + (title (org-xml-encode-org-text-skip-links + (or (and subtree-p (org-export-get-title-from-subtree)) + (plist-get opt-plist :title) + (and (not body-only) + (not + (plist-get opt-plist :skip-before-1st-heading)) + (org-export-grab-title-from-buffer)) + (and buffer-file-name + (file-name-sans-extension + (file-name-nondirectory buffer-file-name))) + "UNTITLED"))) + (dummy (setq opt-plist (plist-put opt-plist :title title))) + (html-table-tag (plist-get opt-plist :html-table-tag)) + (quote-re0 (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)")) + (quote-re (format org-heading-keyword-regexp-format + org-quote-string)) + (org-lparse-dyn-current-environment nil) + ;; Get the language-dependent settings + (lang-words (or (assoc (plist-get opt-plist :language) + org-export-language-setup) + (assoc "en" org-export-language-setup))) + (dummy (setq opt-plist (plist-put opt-plist :lang-words lang-words))) + (head-count 0) cnt + (start 0) + (coding-system-for-write + (or (ignore-errors (org-lparse-get 'CODING-SYSTEM-FOR-WRITE)) + (and (boundp 'buffer-file-coding-system) + buffer-file-coding-system))) + (save-buffer-coding-system + (or (ignore-errors (org-lparse-get 'CODING-SYSTEM-FOR-SAVE)) + (and (boundp 'buffer-file-coding-system) + buffer-file-coding-system))) + (region + (buffer-substring + (if region-p (region-beginning) (point-min)) + (if region-p (region-end) (point-max)))) + (org-export-have-math nil) + (org-export-footnotes-seen nil) + (org-export-footnotes-data (org-footnote-all-labels 'with-defs)) + (org-footnote-insert-pos-for-preprocessor 'point-min) + (org-lparse-opt-plist opt-plist) + (lines + (org-split-string + (org-export-preprocess-string + region + :emph-multiline t + :for-backend (if (equal org-lparse-backend 'xhtml) ; hack + 'html + org-lparse-backend) + :skip-before-1st-heading + (plist-get opt-plist :skip-before-1st-heading) + :drawers (plist-get opt-plist :drawers) + :todo-keywords (plist-get opt-plist :todo-keywords) + :tasks (plist-get opt-plist :tasks) + :tags (plist-get opt-plist :tags) + :priority (plist-get opt-plist :priority) + :footnotes (plist-get opt-plist :footnotes) + :timestamps (plist-get opt-plist :timestamps) + :archived-trees + (plist-get opt-plist :archived-trees) + :select-tags (plist-get opt-plist :select-tags) + :exclude-tags (plist-get opt-plist :exclude-tags) + :add-text + (plist-get opt-plist :text) + :LaTeX-fragments + (plist-get opt-plist :LaTeX-fragments)) + "[\r\n]")) + table-open + table-buffer table-orig-buffer + ind + rpl path attr desc descp desc1 desc2 link + snumber fnc + footnotes footref-seen + org-lparse-output-buffer + org-lparse-footnote-definitions + org-lparse-footnote-number + ;; collection + org-lparse-collect-buffer + (org-lparse-collect-count 0) ; things will get haywire if + ; collections are chained. Use + ; this variable to assert this + ; pre-requisite + org-lparse-toc + href + ) + + (let ((inhibit-read-only t)) + (org-unmodified + (remove-text-properties (point-min) (point-max) + '(:org-license-to-kill t)))) + + (message "Exporting...") + (org-init-section-numbers) + + ;; Switch to the output buffer + (setq org-lparse-output-buffer buffer) + (set-buffer org-lparse-output-buffer) + (let ((inhibit-read-only t)) (erase-buffer)) + (fundamental-mode) + (org-install-letbind) + + (and (fboundp 'set-buffer-file-coding-system) + (set-buffer-file-coding-system coding-system-for-write)) + + (let ((case-fold-search nil) + (org-odd-levels-only odd)) + ;; create local variables for all options, to make sure all called + ;; functions get the correct information + (mapc (lambda (x) + (set (make-local-variable (nth 2 x)) + (plist-get opt-plist (car x)))) + org-export-plist-vars) + (setq umax (if arg (prefix-numeric-value arg) + org-export-headline-levels)) + (setq umax-toc (if (integerp org-export-with-toc) + (min org-export-with-toc umax) + umax)) + + (when (and org-export-with-toc (not body-only)) + (setq lines (org-lparse-prepare-toc + lines level-offset opt-plist umax-toc))) + + (unless body-only + (org-lparse-begin 'DOCUMENT-CONTENT opt-plist) + (org-lparse-begin 'DOCUMENT-BODY opt-plist)) + + (setq head-count 0) + (org-init-section-numbers) + + (org-lparse-begin-paragraph) + + (while (setq line (pop lines) origline line) + (catch 'nextline + (when (and (org-lparse-current-environment-p 'quote) + (string-match org-outline-regexp-bol line)) + (org-lparse-end-environment 'quote)) + + (when (org-lparse-current-environment-p 'quote) + (org-lparse-insert 'LINE line) + (throw 'nextline nil)) + + ;; Fixed-width, verbatim lines (examples) + (when (and org-export-with-fixed-width + (string-match "^[ \t]*:\\(\\([ \t]\\|$\\)\\(.*\\)\\)" line)) + (when (not (org-lparse-current-environment-p 'fixedwidth)) + (org-lparse-begin-environment 'fixedwidth)) + (org-lparse-insert 'LINE (match-string 3 line)) + (when (or (not lines) + (not (string-match "^[ \t]*:\\(\\([ \t]\\|$\\)\\(.*\\)\\)" + (car lines)))) + (org-lparse-end-environment 'fixedwidth)) + (throw 'nextline nil)) + + ;; Notes: The baseline version of org-html.el (git commit + ;; 3d802e), while encoutering a *line-long* protected text, + ;; does one of the following two things based on the state + ;; of the export buffer. + + ;; 1. If a paragraph element has just been opened and + ;; contains only whitespace as content, insert the + ;; protected text as part of the previous paragraph. + + ;; 2. If the paragraph element has already been opened and + ;; contains some valid content insert the protected text + ;; as part of the current paragraph. + + ;; I think ---> + + ;; Scenario 1 mentioned above kicks in when a block of + ;; protected text has to be inserted enbloc. For example, + ;; this happens, when inserting an source or example block + ;; or preformatted content enclosed in #+backend, + ;; #+begin_bakend ... #+end_backend) + + ;; Scenario 2 mentioned above kicks in when the protected + ;; text is part of a running sentence. For example this + ;; happens in the case of an *multiline* LaTeX equation that + ;; needs to be inserted verbatim. + + ;; org-html.el in the master branch seems to do some + ;; jugglery by moving paragraphs around. Inorder to make + ;; these changes backend-agnostic introduce a new text + ;; property org-native-text and impose the added semantics + ;; that these protected blocks appear outside of a + ;; conventional paragraph element. + ;; + ;; Extra Note: Check whether org-example and org-native-text + ;; are entirely equivalent. + + ;; Fixes bug reported by Christian Moe concerning verbatim + ;; LaTeX fragments. + ;; on git commit 533ba3f90250a1f25f494c390d639ea6274f235c + ;; http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging + ;; See http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01379.html + + ;; Native Text + (when (and (get-text-property 0 'org-native-text line) + ;; Make sure it is the entire line that is protected + (not (< (or (next-single-property-change + 0 'org-native-text line) 10000) + (length line)))) + (let ((ind (get-text-property 0 'original-indentation line))) + (org-lparse-begin-environment 'native) + (org-lparse-insert 'LINE line) + (while (and lines + (or (= (length (car lines)) 0) + (not ind) + (equal ind (get-text-property + 0 'original-indentation (car lines)))) + (or (= (length (car lines)) 0) + (get-text-property 0 'org-native-text (car lines)))) + (org-lparse-insert 'LINE (pop lines))) + (org-lparse-end-environment 'native)) + (throw 'nextline nil)) + + ;; Protected HTML + (when (and (get-text-property 0 'org-protected line) + ;; Make sure it is the entire line that is protected + (not (< (or (next-single-property-change + 0 'org-protected line) 10000) + (length line)))) + (let ((ind (get-text-property 0 'original-indentation line))) + (org-lparse-insert 'LINE line) + (while (and lines + (or (= (length (car lines)) 0) + (not ind) + (equal ind (get-text-property + 0 'original-indentation (car lines)))) + (or (= (length (car lines)) 0) + (get-text-property 0 'org-protected (car lines)))) + (org-lparse-insert 'LINE (pop lines)))) + (throw 'nextline nil)) + + ;; Blockquotes, verse, and center + (when (string-match + "^ORG-\\(.+\\)-\\(START\\|END\\)\\([ \t]+.*\\)?$" line) + (let* ((style (intern (downcase (match-string 1 line)))) + (env-options-plist (org-lparse-get-block-params + (match-string 3 line))) + (f (cdr (assoc (match-string 2 line) + '(("START" . org-lparse-begin-environment) + ("END" . org-lparse-end-environment)))))) + (when (memq style + (append + '(blockquote verse center) + (mapcar 'intern org-lparse-special-blocks))) + (funcall f style env-options-plist) + (throw 'nextline nil)))) + + (run-hooks 'org-export-html-after-blockquotes-hook) + (when (org-lparse-current-environment-p 'verse) + (let ((i (org-get-string-indentation line))) + (if (> i 0) + (setq line (concat + (let ((org-lparse-encode-pending t)) + (org-lparse-format 'SPACES (* 2 i))) + " " (org-trim line)))) + (unless (string-match "\\\\\\\\[ \t]*$" line) + (setq line (concat line "\\\\"))))) + + ;; make targets to anchors + (setq start 0) + (while (string-match + "<<]*\\)>>>?\\((INVISIBLE)\\)?[ \t]*\n?" line start) + (cond + ((get-text-property (match-beginning 1) 'org-protected line) + (setq start (match-end 1))) + ((match-end 2) + (setq line (replace-match + (let ((org-lparse-encode-pending t)) + (org-lparse-format + 'ANCHOR "" (org-solidify-link-text + (match-string 1 line)))) + t t line))) + ((and org-export-with-toc (equal (string-to-char line) ?*)) + ;; FIXME: NOT DEPENDENT on TOC????????????????????? + (setq line (replace-match + (let ((org-lparse-encode-pending t)) + (org-lparse-format + 'FONTIFY (match-string 1 line) "target")) + ;; (concat "@" (match-string 1 line) "@ ") + t t line))) + (t + (setq line (replace-match + (concat + (let ((org-lparse-encode-pending t)) + (org-lparse-format + 'ANCHOR (match-string 1 line) + (org-solidify-link-text (match-string 1 line)) + "target")) " ") + t t line))))) + + (let ((org-lparse-encode-pending t)) + (setq line (org-lparse-handle-time-stamps line))) + + ;; replace "&" by "&", "<" and ">" by "<" and ">" + ;; handle @<..> HTML tags (replace "@>..<" by "<..>") + ;; Also handle sub_superscripts and checkboxes + (or (string-match org-table-hline-regexp line) + (string-match "^[ \t]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ \t]*$" line) + (setq line (org-xml-encode-org-text-skip-links line))) + + (setq line (org-lparse-format-org-link line opt-plist)) + + ;; TODO items + (if (and org-todo-line-regexp + (string-match org-todo-line-regexp line) + (match-beginning 2)) + (setq line (concat + (substring line 0 (match-beginning 2)) + (org-lparse-format 'TODO (match-string 2 line)) + (substring line (match-end 2))))) + + ;; Does this contain a reference to a footnote? + (when org-export-with-footnotes + (setq start 0) + (while (string-match "\\([^* \t].*?\\)[ \t]*\\[\\([0-9]+\\)\\]" line start) + ;; Discard protected matches not clearly identified as + ;; footnote markers. + (if (or (get-text-property (match-beginning 2) 'org-protected line) + (not (get-text-property (match-beginning 2) 'org-footnote line))) + (setq start (match-end 2)) + (let ((n (match-string 2 line)) refcnt a) + (if (setq a (assoc n footref-seen)) + (progn + (setcdr a (1+ (cdr a))) + (setq refcnt (cdr a))) + (setq refcnt 1) + (push (cons n 1) footref-seen)) + (setq line + (replace-match + (concat + (or (match-string 1 line) "") + (org-lparse-format + 'FOOTNOTE-REFERENCE + n (cdr (assoc n org-lparse-footnote-definitions)) + refcnt) + ;; If another footnote is following the + ;; current one, add a separator. + (if (save-match-data + (string-match "\\`\\[[0-9]+\\]" + (substring line (match-end 0)))) + (ignore-errors + (org-lparse-get 'FOOTNOTE-SEPARATOR)) + "")) + t t line)))))) + + (cond + ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" line) + ;; This is a headline + (setq level (org-tr-level (- (match-end 1) (match-beginning 1) + level-offset)) + txt (match-string 2 line)) + (if (string-match quote-re0 txt) + (setq txt (replace-match "" t t txt))) + (if (<= level (max umax umax-toc)) + (setq head-count (+ head-count 1))) + (unless org-lparse-dyn-first-heading-pos + (setq org-lparse-dyn-first-heading-pos (point))) + (org-lparse-begin-level level txt umax head-count) + + ;; QUOTES + (when (string-match quote-re line) + (org-lparse-begin-environment 'quote))) + + ((and org-export-with-tables + (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" line)) + (when (not table-open) + ;; New table starts + (setq table-open t table-buffer nil table-orig-buffer nil)) + + ;; Accumulate lines + (setq table-buffer (cons line table-buffer) + table-orig-buffer (cons origline table-orig-buffer)) + (when (or (not lines) + (not (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" + (car lines)))) + (setq table-open nil + table-buffer (nreverse table-buffer) + table-orig-buffer (nreverse table-orig-buffer)) + (org-lparse-end-paragraph) + (org-lparse-insert 'TABLE table-buffer table-orig-buffer))) + + ;; Normal lines + + (t + ;; This line either is list item or end a list. + (when (get-text-property 0 'list-item line) + (setq line (org-lparse-export-list-line + line + (get-text-property 0 'list-item line) + (get-text-property 0 'list-struct line) + (get-text-property 0 'list-prevs line)))) + + ;; Horizontal line + (when (string-match "^[ \t]*-\\{5,\\}[ \t]*$" line) + (with-org-lparse-preserve-paragraph-state + (org-lparse-insert 'HORIZONTAL-LINE)) + (throw 'nextline nil)) + + ;; Empty lines start a new paragraph. If hand-formatted lists + ;; are not fully interpreted, lines starting with "-", "+", "*" + ;; also start a new paragraph. + (when (string-match "^ [-+*]-\\|^[ \t]*$" line) + (when org-lparse-footnote-number + (org-lparse-end-footnote-definition org-lparse-footnote-number) + (setq org-lparse-footnote-number nil)) + (org-lparse-begin-paragraph)) + + ;; Is this the start of a footnote? + (when org-export-with-footnotes + (when (and (boundp 'footnote-section-tag-regexp) + (string-match (concat "^" footnote-section-tag-regexp) + line)) + ;; ignore this line + (throw 'nextline nil)) + (when (string-match "^[ \t]*\\[\\([0-9]+\\)\\]" line) + (org-lparse-end-paragraph) + (setq org-lparse-footnote-number (match-string 1 line)) + (setq line (replace-match "" t t line)) + (org-lparse-begin-footnote-definition org-lparse-footnote-number))) + ;; Check if the line break needs to be conserved + (cond + ((string-match "\\\\\\\\[ \t]*$" line) + (setq line (replace-match + (org-lparse-format 'LINE-BREAK) + t t line))) + (org-export-preserve-breaks + (setq line (concat line (org-lparse-format 'LINE-BREAK))))) + + ;; Check if a paragraph should be started + (let ((start 0)) + (while (and org-lparse-par-open + (string-match "\\\\par\\>" line start)) + (error "FIXME") + ;; Leave a space in the

so that the footnote matcher + ;; does not see this. + (if (not (get-text-property (match-beginning 0) + 'org-protected line)) + (setq line (replace-match "

" t t line))) + (setq start (match-end 0)))) + + (org-lparse-insert 'LINE line))))) + + ;; Properly close all local lists and other lists + (when (org-lparse-current-environment-p 'quote) + (org-lparse-end-environment 'quote)) + + (org-lparse-end-level 1 umax) + + ;; the

to close the last text-... div. + (when (and (> umax 0) org-lparse-dyn-first-heading-pos) + (org-lparse-end-outline-text-or-outline)) + + (org-lparse-end 'DOCUMENT-BODY opt-plist) + (unless body-only + (org-lparse-end 'DOCUMENT-CONTENT)) + + (unless (plist-get opt-plist :buffer-will-be-killed) + (set-auto-mode t)) + + (org-lparse-end 'EXPORT) + + ;; kill collection buffer + (when org-lparse-collect-buffer + (kill-buffer org-lparse-collect-buffer)) + + (goto-char (point-min)) + (or (org-export-push-to-kill-ring + (upcase (symbol-name org-lparse-backend))) + (message "Exporting... done")) + + (cond + ((not to-buffer) + (let ((f (org-lparse-get 'SAVE-METHOD))) + (or (and f (functionp f) (funcall f filename opt-plist)) + (save-buffer))) + (or (and (boundp 'org-lparse-other-backend) + org-lparse-other-backend + (not (equal org-lparse-backend org-lparse-other-backend)) + (org-lparse-do-convert + buffer-file-name (symbol-name org-lparse-other-backend))) + (current-buffer))) + ((eq to-buffer 'string) + (prog1 (buffer-substring (point-min) (point-max)) + (kill-buffer (current-buffer)))) + (t (current-buffer)))))) + +(defun org-lparse-format-table (lines olines) + "Retuns backend-specific code for org-type and table-type tables." + (if (stringp lines) + (setq lines (org-split-string lines "\n"))) + (if (string-match "^[ \t]*|" (car lines)) + ;; A normal org table + (org-lparse-format-org-table lines nil) + ;; Table made by table.el + (or (org-lparse-format-table-table-using-table-generate-source + ;; FIXME: Need to take care of this during merge + (if (eq org-lparse-backend 'xhtml) 'html org-lparse-backend) + olines + (not org-export-prefer-native-exporter-for-tables)) + ;; We are here only when table.el table has NO col or row + ;; spanning and the user prefers using org's own converter for + ;; exporting of such simple table.el tables. + (org-lparse-format-table-table lines)))) + +(defun org-lparse-table-get-colalign-info (lines) + (let ((col-cookies (org-find-text-property-in-string + 'org-col-cookies (car lines)))) + (when (and col-cookies org-table-clean-did-remove-column) + (setq col-cookies + (mapcar (lambda (x) (cons (1- (car x)) (cdr x))) col-cookies))) + col-cookies)) + +(defvar org-lparse-table-style) +(defvar org-lparse-table-ncols) +(defvar org-lparse-table-rownum) +(defvar org-lparse-table-is-styled) +(defvar org-lparse-table-begin-marker) +(defvar org-lparse-table-num-numeric-items-per-column) +(defvar org-lparse-table-colalign-info) +(defvar org-lparse-table-colalign-vector) + +;; Following variables are defined in org-table.el +(defvar org-table-number-fraction) +(defvar org-table-number-regexp) +(defun org-lparse-org-table-to-list-table (lines &optional splice) + "Convert org-table to list-table. +LINES is a list of the form (ROW1 ROW2 ROW3 ...) where each +element is a `string' representing a single row of org-table. +Thus each ROW has vertical separators \"|\" separating the table +fields. A ROW could also be a row-group separator of the form +\"|---...|\". Return a list of the form (ROW1 ROW2 ROW3 +...). ROW could either be symbol `:hrule' or a list of the +form (FIELD1 FIELD2 FIELD3 ...) as appropriate." + (let (line lines-1) + (cond + (splice + (while (setq line (pop lines)) + (unless (string-match "^[ \t]*|-" line) + (push (org-split-string line "[ \t]*|[ \t]*") lines-1)))) + (t + (while (setq line (pop lines)) + (cond + ((string-match "^[ \t]*|-" line) + (when lines + (push :hrule lines-1))) + (t + (push (org-split-string line "[ \t]*|[ \t]*") lines-1)))))) + (nreverse lines-1))) + +(defun org-lparse-insert-org-table (lines &optional splice) + "Format a org-type table into backend-specific code. +LINES is a list of lines. Optional argument SPLICE means, do not +insert header and surrounding tags, just format the lines. +Optional argument NO-CSS means use XHTML attributes instead of CSS +for formatting. This is required for the DocBook exporter." + (require 'org-table) + ;; Get rid of hlines at beginning and end + (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) + (setq lines (nreverse lines)) + (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) + (setq lines (nreverse lines)) + (when org-export-table-remove-special-lines + ;; Check if the table has a marking column. If yes remove the + ;; column and the special lines + (setq lines (org-table-clean-before-export lines))) + (let* ((caption (org-find-text-property-in-string 'org-caption (car lines))) + (caption (and caption (org-xml-encode-org-text caption))) + (label (org-find-text-property-in-string 'org-label (car lines))) + (org-lparse-table-colalign-info (org-lparse-table-get-colalign-info lines)) + (attributes (org-find-text-property-in-string 'org-attributes + (car lines))) + (head (and org-export-highlight-first-table-line + (delq nil (mapcar + (lambda (x) (string-match "^[ \t]*|-" x)) + (cdr lines)))))) + (setq lines (org-lparse-org-table-to-list-table lines splice)) + (org-lparse-insert-list-table + lines splice caption label attributes head org-lparse-table-colalign-info))) + +(defun org-lparse-insert-list-table (lines &optional splice + caption label attributes head + org-lparse-table-colalign-info) + (or (featurep 'org-table) ; required for + (require 'org-table)) ; `org-table-number-regexp' + (let* ((org-lparse-table-rownum -1) org-lparse-table-ncols i (cnt 0) + tbopen fields line + org-lparse-table-cur-rowgrp-is-hdr + org-lparse-table-rowgrp-open + org-lparse-table-num-numeric-items-per-column + org-lparse-table-colalign-vector n + org-lparse-table-rowgrp-info + org-lparse-table-begin-marker + (org-lparse-table-style 'org-table) + org-lparse-table-is-styled) + (cond + (splice + (setq org-lparse-table-is-styled nil) + (while (setq line (pop lines)) + (insert (org-lparse-format-table-row line) "\n"))) + (t + (setq org-lparse-table-is-styled t) + (org-lparse-begin 'TABLE caption label attributes) + (setq org-lparse-table-begin-marker (point)) + (org-lparse-begin-table-rowgroup head) + (while (setq line (pop lines)) + (cond + ((equal line :hrule) + (org-lparse-begin-table-rowgroup)) + (t + (insert (org-lparse-format-table-row line) "\n")))) + (org-lparse-end 'TABLE-ROWGROUP) + (org-lparse-end-table))))) + +(defun org-lparse-format-org-table (lines &optional splice) + (with-temp-buffer + (org-lparse-insert-org-table lines splice) + (buffer-substring-no-properties (point-min) (point-max)))) + +(defun org-lparse-format-list-table (lines &optional splice) + (with-temp-buffer + (org-lparse-insert-list-table lines splice) + (buffer-substring-no-properties (point-min) (point-max)))) + +(defun org-lparse-insert-table-table (lines) + "Format a table generated by table.el into backend-specific code. +This conversion does *not* use `table-generate-source' from table.el. +This has the advantage that Org-mode's HTML conversions can be used. +But it has the disadvantage, that no cell- or row-spanning is allowed." + (let (line field-buffer + (org-lparse-table-cur-rowgrp-is-hdr + org-export-highlight-first-table-line) + (caption nil) + (attributes nil) + (label nil) + (org-lparse-table-style 'table-table) + (org-lparse-table-is-styled nil) + fields org-lparse-table-ncols i (org-lparse-table-rownum -1) + (empty (org-lparse-format 'SPACES 1))) + (org-lparse-begin 'TABLE caption label attributes) + (while (setq line (pop lines)) + (cond + ((string-match "^[ \t]*\\+-" line) + (when field-buffer + (let ((org-export-table-row-tags '("" . "")) + ;; (org-export-html-table-use-header-tags-for-first-column nil) + ) + (insert (org-lparse-format-table-row field-buffer empty))) + (setq org-lparse-table-cur-rowgrp-is-hdr nil) + (setq field-buffer nil))) + (t + ;; Break the line into fields and store the fields + (setq fields (org-split-string line "[ \t]*|[ \t]*")) + (if field-buffer + (setq field-buffer (mapcar + (lambda (x) + (concat x (org-lparse-format 'LINE-BREAK) + (pop fields))) + field-buffer)) + (setq field-buffer fields))))) + (org-lparse-end-table))) + +(defun org-lparse-format-table-table (lines) + (with-temp-buffer + (org-lparse-insert-table-table lines) + (buffer-substring-no-properties (point-min) (point-max)))) + +(defvar table-source-languages) ; defined in table.el +(defun org-lparse-format-table-table-using-table-generate-source (backend + lines + &optional + spanned-only) + "Format a table into BACKEND, using `table-generate-source' from table.el. +Use SPANNED-ONLY to suppress exporting of simple table.el tables. + +When SPANNED-ONLY is nil, all table.el tables are exported. When +SPANNED-ONLY is non-nil, only tables with either row or column +spans are exported. + +This routine returns the generated source or nil as appropriate. + +Refer docstring of `org-export-prefer-native-exporter-for-tables' +for further information." + (require 'table) + (with-current-buffer (get-buffer-create " org-tmp1 ") + (erase-buffer) + (insert (mapconcat 'identity lines "\n")) + (goto-char (point-min)) + (if (not (re-search-forward "|[^+]" nil t)) + (error "Error processing table")) + (table-recognize-table) + (when (or (not spanned-only) + (let* ((dim (table-query-dimension)) + (c (nth 4 dim)) (r (nth 5 dim)) (cells (nth 6 dim))) + (not (= (* c r) cells)))) + (with-current-buffer (get-buffer-create " org-tmp2 ") (erase-buffer)) + (cond + ((member backend table-source-languages) + (table-generate-source backend " org-tmp2 ") + (set-buffer " org-tmp2 ") + (buffer-substring (point-min) (point-max))) + (t + ;; table.el doesn't support the given backend. Currently this + ;; happens in case of odt export. Strip the table from the + ;; generated document. A better alternative would be to embed + ;; the table as ascii text in the output document. + (org-lparse-warn + (concat + "Found table.el-type table in the source org file. " + (format "table.el doesn't support %s backend. " + (upcase (symbol-name backend))) + "Skipping ahead ...")) + ""))))) + +(defun org-lparse-handle-time-stamps (s) + "Format time stamps in string S, or remove them." + (catch 'exit + (let (r b) + (when org-maybe-keyword-time-regexp + (while (string-match org-maybe-keyword-time-regexp s) + (or b (setq b (substring s 0 (match-beginning 0)))) + (setq r (concat + r (substring s 0 (match-beginning 0)) " " + (org-lparse-format + 'FONTIFY + (concat + (if (match-end 1) + (org-lparse-format + 'FONTIFY + (match-string 1 s) "timestamp-kwd")) + " " + (org-lparse-format + 'FONTIFY + (substring (org-translate-time (match-string 3 s)) 1 -1) + "timestamp")) + "timestamp-wrapper")) + s (substring s (match-end 0))))) + + ;; Line break if line started and ended with time stamp stuff + (if (not r) + s + (setq r (concat r s)) + (unless (string-match "\\S-" (concat b s)) + (setq r (concat r (org-lparse-format 'LINE-BREAK)))) + r)))) + +(defun org-xml-encode-plain-text (s) + "Convert plain text characters to HTML equivalent. +Possible conversions are set in `org-export-html-protect-char-alist'." + (let ((cl (org-lparse-get 'PLAIN-TEXT-MAP)) c) + (while (setq c (pop cl)) + (let ((start 0)) + (while (string-match (car c) s start) + (setq s (replace-match (cdr c) t t s) + start (1+ (match-beginning 0)))))) + s)) + +(defun org-xml-encode-org-text-skip-links (string) + "Prepare STRING for HTML export. Apply all active conversions. +If there are links in the string, don't modify these. If STRING +is nil, return nil." + (when string + (let* ((re (concat org-bracket-link-regexp "\\|" + (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"))) + m s l res) + (while (setq m (string-match re string)) + (setq s (substring string 0 m) + l (match-string 0 string) + string (substring string (match-end 0))) + (push (org-xml-encode-org-text s) res) + (push l res)) + (push (org-xml-encode-org-text string) res) + (apply 'concat (nreverse res))))) + +(defun org-xml-encode-org-text (s) + "Apply all active conversions to translate special ASCII to HTML." + (setq s (org-xml-encode-plain-text s)) + (if org-export-html-expand + (while (string-match "@<\\([^&]*\\)>" s) + (setq s (replace-match "<\\1>" t nil s)))) + (if org-export-with-emphasize + (setq s (org-lparse-apply-char-styles s))) + (if org-export-with-special-strings + (setq s (org-lparse-convert-special-strings s))) + (if org-export-with-sub-superscripts + (setq s (org-lparse-apply-sub-superscript-styles s))) + (if org-export-with-TeX-macros + (let ((start 0) wd rep) + (while (setq start (string-match "\\\\\\([a-zA-Z]+[0-9]*\\)\\({}\\)?" + s start)) + (if (get-text-property (match-beginning 0) 'org-protected s) + (setq start (match-end 0)) + (setq wd (match-string 1 s)) + (if (setq rep (org-lparse-format 'ORG-ENTITY wd)) + (setq s (replace-match rep t t s)) + (setq start (+ start (length wd)))))))) + s) + +(defun org-lparse-convert-special-strings (string) + "Convert special characters in STRING to HTML." + (let ((all (org-lparse-get 'SPECIAL-STRING-REGEXPS)) + e a re rpl start) + (while (setq a (pop all)) + (setq re (car a) rpl (cdr a) start 0) + (while (string-match re string start) + (if (get-text-property (match-beginning 0) 'org-protected string) + (setq start (match-end 0)) + (setq string (replace-match rpl t nil string))))) + string)) + +(defun org-lparse-apply-sub-superscript-styles (string) + "Apply subscript and superscript styles to STRING. +Use `org-export-with-sub-superscripts' to control application of +sub and superscript styles." + (let (key c (s 0) (requireb (eq org-export-with-sub-superscripts '{}))) + (while (string-match org-match-substring-regexp string s) + (cond + ((and requireb (match-end 8)) (setq s (match-end 2))) + ((get-text-property (match-beginning 2) 'org-protected string) + (setq s (match-end 2))) + (t + (setq s (match-end 1) + key (if (string= (match-string 2 string) "_") + 'subscript 'superscript) + c (or (match-string 8 string) + (match-string 6 string) + (match-string 5 string)) + string (replace-match + (concat (match-string 1 string) + (org-lparse-format 'FONTIFY c key)) + t t string))))) + (while (string-match "\\\\\\([_^]\\)" string) + (setq string (replace-match (match-string 1 string) t t string))) + string)) + +(defvar org-lparse-char-styles + `(("*" bold) + ("/" emphasis) + ("_" underline) + ("=" code) + ("~" verbatim) + ("+" strike)) + "Map Org emphasis markers to char styles. +This is an alist where each element is of the +form (ORG-EMPHASIS-CHAR . CHAR-STYLE).") + +(defun org-lparse-apply-char-styles (string) + "Apply char styles to STRING. +The variable `org-lparse-char-styles' controls how the Org +emphasis markers are interpreted." + (let ((s 0) rpl) + (while (string-match org-emph-re string s) + (if (not (equal + (substring string (match-beginning 3) (1+ (match-beginning 3))) + (substring string (match-beginning 4) (1+ (match-beginning 4))))) + (setq s (match-beginning 0) + rpl + (concat + (match-string 1 string) + (org-lparse-format + 'FONTIFY (match-string 4 string) + (nth 1 (assoc (match-string 3 string) + org-lparse-char-styles))) + (match-string 5 string)) + string (replace-match rpl t t string) + s (+ s (- (length rpl) 2))) + (setq s (1+ s)))) + string)) + +(defun org-lparse-export-list-line (line pos struct prevs) + "Insert list syntax in export buffer. Return LINE, maybe modified. + +POS is the item position or line position the line had before +modifications to buffer. STRUCT is the list structure. PREVS is +the alist of previous items." + (let* ((get-type + (function + ;; Translate type of list containing POS to "d", "o" or + ;; "u". + (lambda (pos struct prevs) + (let ((type (org-list-get-list-type pos struct prevs))) + (cond + ((eq 'ordered type) "o") + ((eq 'descriptive type) "d") + (t "u")))))) + (get-closings + (function + ;; Return list of all items and sublists ending at POS, in + ;; reverse order. + (lambda (pos) + (let (out) + (catch 'exit + (mapc (lambda (e) + (let ((end (nth 6 e)) + (item (car e))) + (cond + ((= end pos) (push item out)) + ((>= item pos) (throw 'exit nil))))) + struct)) + out))))) + ;; First close any previous item, or list, ending at POS. + (mapc (lambda (e) + (let* ((lastp (= (org-list-get-last-item e struct prevs) e)) + (first-item (org-list-get-list-begin e struct prevs)) + (type (funcall get-type first-item struct prevs))) + (org-lparse-end-paragraph) + ;; Ending for every item + (org-lparse-end-list-item-1 type) + ;; We're ending last item of the list: end list. + (when lastp + (org-lparse-end-list type) + (org-lparse-begin-paragraph)))) + (funcall get-closings pos)) + (cond + ;; At an item: insert appropriate tags in export buffer. + ((assq pos struct) + (string-match + (concat "[ \t]*\\(\\S-+[ \t]*\\)" + "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?" + "\\(?:\\(\\[[ X-]\\]\\)[ \t]+\\)?" + "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?" + "\\(.*\\)") line) + (let* ((checkbox (match-string 3 line)) + (desc-tag (or (match-string 4 line) "???")) + (body (or (match-string 5 line) "")) + (list-beg (org-list-get-list-begin pos struct prevs)) + (firstp (= list-beg pos)) + ;; Always refer to first item to determine list type, in + ;; case list is ill-formed. + (type (funcall get-type list-beg struct prevs)) + (counter (let ((count-tmp (org-list-get-counter pos struct))) + (cond + ((not count-tmp) nil) + ((string-match "[A-Za-z]" count-tmp) + (- (string-to-char (upcase count-tmp)) 64)) + ((string-match "[0-9]+" count-tmp) + count-tmp))))) + (when firstp + (org-lparse-end-paragraph) + (org-lparse-begin-list type)) + + (let ((arg (cond ((equal type "d") desc-tag) + ((equal type "o") counter)))) + (org-lparse-begin-list-item type arg)) + + ;; If line had a checkbox, some additional modification is required. + (when checkbox + (setq body + (concat + (org-lparse-format + 'FONTIFY (concat + "[" + (cond + ((string-match "X" checkbox) "X") + ((string-match " " checkbox) + (org-lparse-format 'SPACES 1)) + (t "-")) + "]") + 'code) + " " + body))) + ;; Return modified line + body)) + ;; At a list ender: go to next line (side-effects only). + ((equal "ORG-LIST-END-MARKER" line) (throw 'nextline nil)) + ;; Not at an item: return line unchanged (side-effects only). + (t line)))) + +(defun org-lparse-bind-local-variables (opt-plist) + (mapc (lambda (x) + (set (make-local-variable (nth 2 x)) + (plist-get opt-plist (car x)))) + org-export-plist-vars)) + +(defvar org-lparse-table-rowgrp-open) +(defvar org-lparse-table-cur-rowgrp-is-hdr) +(defvar org-lparse-footnote-number) +(defvar org-lparse-footnote-definitions) +(defvar org-lparse-output-buffer nil + "Buffer to which `org-do-lparse' writes to. +This buffer contains the contents of the to-be-created exported +document.") + +(defcustom org-lparse-debug nil + "Enable or Disable logging of `org-lparse' callbacks. +The parameters passed to the backend-registered ENTITY-CONTROL +and ENTITY-FORMAT callbacks are logged as comment strings in the +exported buffer. (org-lparse-format 'COMMENT fmt args) is used +for logging. Customize this variable only if you are an expert +user. Valid values of this variable are: +nil : Disable logging +control : Log all invocations of `org-lparse-begin' and + `org-lparse-end' callbacks. +format : Log invocations of `org-lparse-format' callbacks. +t : Log all invocations of `org-lparse-begin', `org-lparse-end' + and `org-lparse-format' callbacks," + :group 'org-lparse + :type '(choice + (const :tag "Disable" nil) + (const :tag "Format callbacks" format) + (const :tag "Control callbacks" control) + (const :tag "Format and Control callbacks" t))) + +(defun org-lparse-begin (entity &rest args) + "Begin ENTITY in current buffer. ARGS is entity specific. +ENTITY can be one of PARAGRAPH, LIST, LIST-ITEM etc. + +Use (org-lparse-begin 'LIST \"o\") to begin a list in current +buffer. + +See `org-xhtml-entity-control-callbacks-alist' for more +information." + (when (and (member org-lparse-debug '(t control)) + (not (eq entity 'DOCUMENT-CONTENT))) + (insert (org-lparse-format 'COMMENT "%s BEGIN %S" entity args))) + + (let ((f (cadr (assoc entity org-lparse-entity-control-callbacks-alist)))) + (unless f (error "Unknown entity: %s" entity)) + (apply f args))) + +(defun org-lparse-end (entity &rest args) + "Close ENTITY in current buffer. ARGS is entity specific. +ENTITY can be one of PARAGRAPH, LIST, LIST-ITEM +etc. + +Use (org-lparse-end 'LIST \"o\") to close a list in current +buffer. + +See `org-xhtml-entity-control-callbacks-alist' for more +information." + (when (and (member org-lparse-debug '(t control)) + (not (eq entity 'DOCUMENT-CONTENT))) + (insert (org-lparse-format 'COMMENT "%s END %S" entity args))) + + (let ((f (caddr (assoc entity org-lparse-entity-control-callbacks-alist)))) + (unless f (error "Unknown entity: %s" entity)) + (apply f args))) + +(defun org-lparse-begin-paragraph (&optional style) + "Insert

, but first close previous paragraph if any." + (org-lparse-end-paragraph) + (org-lparse-begin 'PARAGRAPH style) + (setq org-lparse-par-open t)) + +(defun org-lparse-end-paragraph () + "Close paragraph if there is one open." + (when org-lparse-par-open + (org-lparse-end 'PARAGRAPH) + (setq org-lparse-par-open nil))) + +(defun org-lparse-end-list-item-1 (&optional type) + "Close

  • if necessary." + (org-lparse-end-paragraph) + (org-lparse-end-list-item (or type "u"))) + +(defun org-lparse-preprocess-after-blockquote-hook () + "Treat `org-lparse-special-blocks' specially." + (goto-char (point-min)) + (while (re-search-forward + "^[ \t]*#\\+\\(begin\\|end\\)_\\(\\S-+\\)[ \t]*\\(.*\\)$" nil t) + (when (member (downcase (match-string 2)) org-lparse-special-blocks) + (replace-match + (if (equal (downcase (match-string 1)) "begin") + (format "ORG-%s-START %s" (upcase (match-string 2)) + (match-string 3)) + (format "ORG-%s-END %s" (upcase (match-string 2)) + (match-string 3))) t t)))) + +(add-hook 'org-export-preprocess-after-blockquote-hook + 'org-lparse-preprocess-after-blockquote-hook) + +(defun org-lparse-strip-experimental-blocks-maybe-hook () + "Strip \"list-table\" and \"annotation\" blocks. +Stripping happens only when the exported backend is not one of +\"odt\" or \"xhtml\"." + (when (not org-lparse-backend) + (message "Stripping following blocks - %S" org-lparse-special-blocks) + (goto-char (point-min)) + (let ((case-fold-search t)) + (while + (re-search-forward + "^[ \t]*#\\+begin_\\(\\S-+\\)\\([ \t]+.*\\)?\n\\([^\000]*?\\)\n[ \t]*#\\+end_\\1\\>.*" + nil t) + (when (member (match-string 1) org-lparse-special-blocks) + (replace-match "" t t)))))) + +(add-hook 'org-export-preprocess-hook + 'org-lparse-strip-experimental-blocks-maybe-hook) + +(defvar org-lparse-list-table-p nil + "Non-nil if `org-do-lparse' is within a list-table.") + +(defvar org-lparse-dyn-current-environment nil) +(defun org-lparse-begin-environment (style &optional env-options-plist) + (case style + (list-table + (setq org-lparse-list-table-p t)) + (t (setq org-lparse-dyn-current-environment style) + (org-lparse-begin 'ENVIRONMENT style env-options-plist)))) + +(defun org-lparse-end-environment (style &optional env-options-plist) + (case style + (list-table + (setq org-lparse-list-table-p nil)) + (t (org-lparse-end 'ENVIRONMENT style env-options-plist) + (setq org-lparse-dyn-current-environment nil)))) + +(defun org-lparse-current-environment-p (style) + (eq org-lparse-dyn-current-environment style)) + +(defun org-lparse-begin-footnote-definition (n) + (org-lparse-begin-collect) + (setq org-lparse-insert-tag-with-newlines nil) + (org-lparse-begin 'FOOTNOTE-DEFINITION n)) + +(defun org-lparse-end-footnote-definition (n) + (org-lparse-end 'FOOTNOTE-DEFINITION n) + (setq org-lparse-insert-tag-with-newlines 'both) + (let ((footnote-def (org-lparse-end-collect))) + (push (cons n footnote-def) org-lparse-footnote-definitions))) + +(defvar org-lparse-collect-buffer nil + "An auxiliary buffer named \"*Org Lparse Collect*\". +`org-do-lparse' uses this as output buffer while collecting +footnote definitions and table-cell contents of list-tables. See +`org-lparse-begin-collect' and `org-lparse-end-collect'.") + +(defvar org-lparse-collect-count nil + "Count number of calls to `org-lparse-begin-collect'. +Use this counter to catch chained collections if they ever +happen.") + +(defun org-lparse-begin-collect () + "Temporarily switch to `org-lparse-collect-buffer'. +Also erase it's contents." + (unless (zerop org-lparse-collect-count) + (error "FIXME (org-lparse.el): Encountered chained collections")) + (incf org-lparse-collect-count) + (unless org-lparse-collect-buffer + (setq org-lparse-collect-buffer + (get-buffer-create "*Org Lparse Collect*"))) + (set-buffer org-lparse-collect-buffer) + (erase-buffer)) + +(defun org-lparse-end-collect () + "Switch to `org-lparse-output-buffer'. +Return contents of `org-lparse-collect-buffer' as a `string'." + (assert (> org-lparse-collect-count 0)) + (decf org-lparse-collect-count) + (prog1 (buffer-string) + (erase-buffer) + (set-buffer org-lparse-output-buffer))) + +(defun org-lparse-format (entity &rest args) + "Format ENTITY in backend-specific way and return it. +ARGS is specific to entity being formatted. + +Use (org-lparse-format 'HEADING \"text\" 1) to format text as +level 1 heading. + +See `org-xhtml-entity-format-callbacks-alist' for more information." + (when (and (member org-lparse-debug '(t format)) + (not (equal entity 'COMMENT))) + (insert (org-lparse-format 'COMMENT "%s: %S" entity args))) + (cond + ((consp entity) + (let ((text (pop args))) + (apply 'org-lparse-format 'TAGS entity text args))) + (t + (let ((f (cdr (assoc entity org-lparse-entity-format-callbacks-alist)))) + (unless f (error "Unknown entity: %s" entity)) + (apply f args))))) + +(defun org-lparse-insert (entity &rest args) + (insert (apply 'org-lparse-format entity args))) + +(defun org-lparse-prepare-toc (lines level-offset opt-plist umax-toc) + (let* ((quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) + (org-min-level (org-get-min-level lines level-offset)) + (org-last-level org-min-level) + level) + (with-temp-buffer + (org-lparse-bind-local-variables opt-plist) + (erase-buffer) + (org-lparse-begin 'TOC (nth 3 (plist-get opt-plist :lang-words)) umax-toc) + (setq + lines + (mapcar + #'(lambda (line) + (when (and (string-match org-todo-line-regexp line) + (not (get-text-property 0 'org-protected line)) + (<= (setq level (org-tr-level + (- (match-end 1) (match-beginning 1) + level-offset))) + umax-toc)) + (let ((txt (save-match-data + (org-xml-encode-org-text-skip-links + (org-export-cleanup-toc-line + (match-string 3 line))))) + (todo (and + org-export-mark-todo-in-toc + (or (and (match-beginning 2) + (not (member (match-string 2 line) + org-done-keywords))) + (and (= level umax-toc) + (org-search-todo-below + line lines level))))) + tags) + ;; Check for targets + (while (string-match org-any-target-regexp line) + (setq line + (replace-match + (let ((org-lparse-encode-pending t)) + (org-lparse-format 'FONTIFY + (match-string 1 line) "target")) + t t line))) + (when (string-match + (org-re "[ \t]+:\\([[:alnum:]_@:]+\\):[ \t]*$") txt) + (setq tags (match-string 1 txt) + txt (replace-match "" t nil txt))) + (when (string-match quote-re0 txt) + (setq txt (replace-match "" t t txt))) + (while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt) + (setq txt (replace-match "" t t txt))) + (org-lparse-format + 'TOC-ITEM + (let* ((snumber (org-section-number level)) + (href (replace-regexp-in-string + "\\." "-" (format "sec-%s" snumber))) + (href + (or + (cdr (assoc + href org-export-preferred-target-alist)) + href)) + (href (org-solidify-link-text href))) + (org-lparse-format 'TOC-ENTRY snumber todo txt tags href)) + level org-last-level) + (setq org-last-level level))) + line) + lines)) + (org-lparse-end 'TOC) + (setq org-lparse-toc (buffer-string)))) + lines) + +(defun org-lparse-format-table-row (fields &optional text-for-empty-fields) + (if org-lparse-table-ncols + ;; second and subsequent rows of the table + (when (and org-lparse-list-table-p + (> (length fields) org-lparse-table-ncols)) + (error "Table row has %d columns but header row claims %d columns" + (length fields) org-lparse-table-ncols)) + ;; first row of the table + (setq org-lparse-table-ncols (length fields)) + (when org-lparse-table-is-styled + (setq org-lparse-table-num-numeric-items-per-column + (make-vector org-lparse-table-ncols 0)) + (setq org-lparse-table-colalign-vector + (make-vector org-lparse-table-ncols nil)) + (let ((c -1)) + (while (< (incf c) org-lparse-table-ncols) + (let* ((col-cookie (cdr (assoc (1+ c) org-lparse-table-colalign-info))) + (align (nth 0 col-cookie))) + (setf (aref org-lparse-table-colalign-vector c) + (cond + ((string= align "l") "left") + ((string= align "r") "right") + ((string= align "c") "center") + (t nil)))))))) + (incf org-lparse-table-rownum) + (let ((i -1)) + (org-lparse-format + 'TABLE-ROW + (mapconcat + (lambda (x) + (when (and (string= x "") text-for-empty-fields) + (setq x text-for-empty-fields)) + (incf i) + (let (col-cookie horiz-span) + (when org-lparse-table-is-styled + (when (and (< i org-lparse-table-ncols) + (string-match org-table-number-regexp x)) + (incf (aref org-lparse-table-num-numeric-items-per-column i))) + (setq col-cookie (cdr (assoc (1+ i) org-lparse-table-colalign-info)) + horiz-span (nth 1 col-cookie))) + (org-lparse-format + 'TABLE-CELL x org-lparse-table-rownum i (or horiz-span 0)))) + fields "\n")))) + +(defun org-lparse-get (what &optional opt-plist) + "Query for value of WHAT for the current backend `org-lparse-backend'. +See also `org-lparse-backend-get'." + (if (boundp 'org-lparse-backend) + (org-lparse-backend-get (symbol-name org-lparse-backend) what opt-plist) + (error "org-lparse-backend is not bound yet"))) + +(defun org-lparse-backend-get (backend what &optional opt-plist) + "Query BACKEND for value of WHAT. +Dispatch the call to `org--user-get'. If that throws an +error, dispatch the call to `org--get'. See +`org-xhtml-get' for all known settings queried for by +`org-lparse' during the course of export." + (assert (stringp backend) t) + (unless (org-lparse-backend-is-native-p backend) + (error "Unknown native backend %s" backend)) + (let ((backend-get-method (intern (format "org-%s-get" backend))) + (backend-user-get-method (intern (format "org-%s-user-get" backend)))) + (cond + ((functionp backend-get-method) + (condition-case nil + (funcall backend-user-get-method what opt-plist) + (error (funcall backend-get-method what opt-plist)))) + (t + (error "Native backend %s doesn't define %s" backend backend-get-method))))) + +(defun org-lparse-insert-tag (tag &rest args) + (when (member org-lparse-insert-tag-with-newlines '(lead both)) + (insert "\n")) + (insert (apply 'format tag args)) + (when (member org-lparse-insert-tag-with-newlines '(trail both)) + (insert "\n"))) + +(defun org-lparse-get-targets-from-title (title) + (let* ((target (org-get-text-property-any 0 'target title)) + (extra-targets (assoc target org-export-target-aliases)) + (target (or (cdr (assoc target org-export-preferred-target-alist)) + target))) + (cons target (remove target extra-targets)))) + +(defun org-lparse-suffix-from-snumber (snumber) + (let* ((snu (replace-regexp-in-string "\\." "-" snumber)) + (href (cdr (assoc (concat "sec-" snu) + org-export-preferred-target-alist)))) + (org-solidify-link-text (or href snu)))) + +(defun org-lparse-begin-level (level title umax head-count) + "Insert a new LEVEL in HTML export. +When TITLE is nil, just close all open levels." + (org-lparse-end-level level umax) + (unless title (error "Why is heading nil")) + (let* ((targets (org-lparse-get-targets-from-title title)) + (target (car targets)) (extra-targets (cdr targets)) + (target (and target (org-solidify-link-text target))) + (extra-class (org-get-text-property-any 0 'html-container-class title)) + snumber tags level1 class) + (when (string-match (org-re "\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title) + (setq tags (and org-export-with-tags (match-string 1 title))) + (setq title (replace-match "" t t title))) + (if (> level umax) + (progn + (if (aref org-levels-open (1- level)) + (org-lparse-end-list-item-1) + (aset org-levels-open (1- level) t) + (org-lparse-end-paragraph) + (org-lparse-begin-list 'unordered)) + (org-lparse-begin-list-item + 'unordered target (org-lparse-format + 'HEADLINE title extra-targets tags))) + (aset org-levels-open (1- level) t) + (setq snumber (org-section-number level)) + (setq level1 (+ level (or (org-lparse-get 'TOPLEVEL-HLEVEL) 1) -1)) + (unless (= head-count 1) + (org-lparse-end-outline-text-or-outline)) + (org-lparse-begin-outline-and-outline-text + level1 snumber title tags target extra-targets extra-class) + (org-lparse-begin-paragraph)))) + +(defun org-lparse-end-level (level umax) + (org-lparse-end-paragraph) + (loop for l from org-level-max downto level + do (when (aref org-levels-open (1- l)) + ;; Terminate one level in HTML export + (if (<= l umax) + (org-lparse-end-outline-text-or-outline) + (org-lparse-end-list-item-1) + (org-lparse-end-list 'unordered)) + (aset org-levels-open (1- l) nil)))) + +(defvar org-lparse-outline-text-open) +(defun org-lparse-begin-outline-and-outline-text (level1 snumber title tags + target extra-targets + extra-class) + (org-lparse-begin + 'OUTLINE level1 snumber title tags target extra-targets extra-class) + (org-lparse-begin-outline-text level1 snumber extra-class)) + +(defun org-lparse-end-outline-text-or-outline () + (cond + (org-lparse-outline-text-open + (org-lparse-end 'OUTLINE-TEXT) + (setq org-lparse-outline-text-open nil)) + (t (org-lparse-end 'OUTLINE)))) + +(defun org-lparse-begin-outline-text (level1 snumber extra-class) + (assert (not org-lparse-outline-text-open) t) + (setq org-lparse-outline-text-open t) + (org-lparse-begin 'OUTLINE-TEXT level1 snumber extra-class)) + +(defun org-lparse-html-list-type-to-canonical-list-type (ltype) + (cdr (assoc ltype '(("o" . ordered) + ("u" . unordered) + ("d" . description))))) + +;; following vars are bound during `org-do-lparse' +(defvar org-lparse-list-level) +(defvar org-lparse-list-item-count) +(defvar org-lparse-list-stack) +(defvar org-lparse-list-table:table-row) +(defvar org-lparse-list-table:lines) + +;; Notes on LIST-TABLES +;; ==================== +;; Lists withing "list-table" blocks (as shown below) +;; +;; #+begin_list-table +;; - Row 1 +;; - 1.1 +;; - 1.2 +;; - 1.3 +;; - Row 2 +;; - 2.1 +;; - 2.2 +;; - 2.3 +;; #+end_list-table +;; +;; will be exported as though it were a table as shown below. +;; +;; | Row 1 | 1.1 | 1.2 | 1.3 | +;; | Row 2 | 2.1 | 2.2 | 2.3 | +;; +;; Note that org-tables are NOT multi-line and each line is mapped to +;; a unique row in the exported document. So if an exported table +;; needs to contain a single paragraph (with copious text) it needs to +;; be typed up in a single line. Editing such long lines using the +;; table editor will be a cumbersome task. Furthermore inclusion of +;; multi-paragraph text in a table cell is well-nigh impossible. +;; +;; LIST-TABLEs are meant to circumvent the above problems with +;; org-tables. +;; +;; Note that in the example above the list items could be paragraphs +;; themselves and the list can be arbitrarily deep. +;; +;; Inspired by following thread: +;; https://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01101.html + +(defun org-lparse-begin-list (ltype) + (incf org-lparse-list-level) + (push org-lparse-list-item-count org-lparse-list-stack) + (setq org-lparse-list-item-count 0) + (cond + ((not org-lparse-list-table-p) + (org-lparse-begin 'LIST ltype)) + ;; process LIST-TABLE + ((= 1 org-lparse-list-level) + ;; begin LIST-TABLE + (setq org-lparse-list-table:lines nil) + (setq org-lparse-list-table:table-row nil)) + ((= 2 org-lparse-list-level) + (ignore)) + (t + (org-lparse-begin 'LIST ltype)))) + +(defun org-lparse-end-list (ltype) + (setq org-lparse-list-item-count (pop org-lparse-list-stack)) + (decf org-lparse-list-level) + (cond + ((not org-lparse-list-table-p) + (org-lparse-end 'LIST ltype)) + ;; process LIST-TABLE + ((= 0 org-lparse-list-level) + ;; end LIST-TABLE + (insert (org-lparse-format-list-table + (nreverse org-lparse-list-table:lines)))) + ((= 1 org-lparse-list-level) + (ignore)) + (t + (org-lparse-end 'LIST ltype)))) + +(defun org-lparse-begin-list-item (ltype &optional arg headline) + (incf org-lparse-list-item-count) + (cond + ((not org-lparse-list-table-p) + (org-lparse-begin 'LIST-ITEM ltype arg headline)) + ;; process LIST-TABLE + ((and (= 1 org-lparse-list-level) + (= 1 org-lparse-list-item-count)) + ;; begin TABLE-ROW for LIST-TABLE + (setq org-lparse-list-table:table-row nil) + (org-lparse-begin-list-table:table-cell)) + ((and (= 2 org-lparse-list-level) + (= 1 org-lparse-list-item-count)) + ;; begin TABLE-CELL for LIST-TABLE + (org-lparse-begin-list-table:table-cell)) + (t + (org-lparse-begin 'LIST-ITEM ltype arg headline)))) + +(defun org-lparse-end-list-item (ltype) + (decf org-lparse-list-item-count) + (cond + ((not org-lparse-list-table-p) + (org-lparse-end 'LIST-ITEM ltype)) + ;; process LIST-TABLE + ((and (= 1 org-lparse-list-level) + (= 0 org-lparse-list-item-count)) + ;; end TABLE-ROW for LIST-TABLE + (org-lparse-end-list-table:table-cell) + (push (nreverse org-lparse-list-table:table-row) + org-lparse-list-table:lines)) + ((= 2 org-lparse-list-level) + ;; end TABLE-CELL for LIST-TABLE + (org-lparse-end-list-table:table-cell)) + (t + (org-lparse-end 'LIST-ITEM ltype)))) + +(defvar org-lparse-list-table:table-cell-open) +(defun org-lparse-begin-list-table:table-cell () + (org-lparse-end-list-table:table-cell) + (setq org-lparse-list-table:table-cell-open t) + (org-lparse-begin-collect) + (org-lparse-begin-paragraph)) + +(defun org-lparse-end-list-table:table-cell () + (when org-lparse-list-table:table-cell-open + (setq org-lparse-list-table:table-cell-open nil) + (org-lparse-end-paragraph) + (push (org-lparse-end-collect) + org-lparse-list-table:table-row))) + +(defvar org-lparse-table-rowgrp-info) +(defun org-lparse-begin-table-rowgroup (&optional is-header-row) + (push (cons (1+ org-lparse-table-rownum) :start) org-lparse-table-rowgrp-info) + (org-lparse-begin 'TABLE-ROWGROUP is-header-row)) + +(defun org-lparse-end-table () + (when org-lparse-table-is-styled + ;; column groups + (unless (car org-table-colgroup-info) + (setq org-table-colgroup-info + (cons :start (cdr org-table-colgroup-info)))) + + ;; column alignment + (let ((c -1)) + (mapc + (lambda (x) + (incf c) + (setf (aref org-lparse-table-colalign-vector c) + (or (aref org-lparse-table-colalign-vector c) + (if (> (/ (float x) (1+ org-lparse-table-rownum)) + org-table-number-fraction) + "right" "left")))) + org-lparse-table-num-numeric-items-per-column))) + (org-lparse-end 'TABLE)) + +(defvar org-lparse-encode-pending nil) + +(defun org-lparse-format-tags (tag text prefix suffix &rest args) + (cond + ((consp tag) + (concat prefix (apply 'format (car tag) args) text suffix + (format (cdr tag)))) + ((stringp tag) ; singleton tag + (concat prefix (apply 'format tag args) text)))) + +(defun org-xml-fix-class-name (kwd) ; audit callers of this function + "Turn todo keyword into a valid class name. +Replaces invalid characters with \"_\"." + (save-match-data + (while (string-match "[^a-zA-Z0-9_]" kwd) + (setq kwd (replace-match "_" t t kwd)))) + kwd) + +(defun org-lparse-format-todo (todo) + (org-lparse-format 'FONTIFY + (concat + (ignore-errors (org-lparse-get 'TODO-KWD-CLASS-PREFIX)) + (org-xml-fix-class-name todo)) + (list (if (member todo org-done-keywords) "done" "todo") + todo))) + +(defun org-lparse-format-extra-targets (extra-targets) + (if (not extra-targets) "" + (mapconcat (lambda (x) + (setq x (org-solidify-link-text + (if (org-uuidgen-p x) (concat "ID-" x) x))) + (org-lparse-format 'ANCHOR "" x)) + extra-targets ""))) + +(defun org-lparse-format-org-tags (tags) + (if (not tags) "" + (org-lparse-format + 'FONTIFY (mapconcat + (lambda (x) + (org-lparse-format + 'FONTIFY x + (concat + (ignore-errors (org-lparse-get 'TAG-CLASS-PREFIX)) + (org-xml-fix-class-name x)))) + (org-split-string tags ":") + (org-lparse-format 'SPACES 1)) "tag"))) + +(defun org-lparse-format-section-number (&optional snumber level) + (and org-export-with-section-numbers + (not org-lparse-body-only) snumber level + (org-lparse-format 'FONTIFY snumber (format "section-number-%d" level)))) + +(defun org-lparse-warn (msg) + (if (not org-lparse-use-flashy-warning) + (message msg) + (put-text-property 0 (length msg) 'face 'font-lock-warning-face msg) + (message msg) + (sleep-for 3))) + +(defun org-xml-format-href (s) + "Make sure the S is valid as a href reference in an XHTML document." + (save-match-data + (let ((start 0)) + (while (string-match "&" s start) + (setq start (+ (match-beginning 0) 3) + s (replace-match "&" t t s))))) + s) + +(defun org-xml-format-desc (s) + "Make sure the S is valid as a description in a link." + (if (and s (not (get-text-property 1 'org-protected s))) + (save-match-data + (org-xml-encode-org-text s)) + s)) + +(provide 'org-lparse) + +;;; org-lparse.el ends here diff --git a/lisp/org/org-mac-message.el b/lisp/org/org-mac-message.el index fc52b92a21d..8f63a196e88 100644 --- a/lisp/org/org-mac-message.el +++ b/lisp/org/org-mac-message.el @@ -5,7 +5,6 @@ ;; Author: John Wiegley ;; Christopher Suckling -;; Version: 7.7 ;; Keywords: outlines, hypermedia, calendar, wp ;; This file is part of GNU Emacs. @@ -214,6 +213,4 @@ list of message:// links to flagged mail after heading." (provide 'org-mac-message) - - ;;; org-mac-message.el ends here diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index dc413f4d993..521f5fd8633 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -1,11 +1,10 @@ ;;; org-macs.el --- Top-level definitions for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -46,6 +45,13 @@ (declare-function org-add-props "org-compat" (string plist &rest props)) (declare-function org-string-match-p "org-compat" (&rest args)) +(defmacro org-with-gensyms (symbols &rest body) + `(let ,(mapcar (lambda (s) + `(,s (make-symbol (concat "--" (symbol-name ',s))))) symbols) + ,@body)) +(def-edebug-spec org-with-gensyms (sexp body)) +(put 'org-with-gensyms 'lisp-indent-function 1) + (defmacro org-called-interactively-p (&optional kind) (if (featurep 'xemacs) `(interactive-p) @@ -54,17 +60,20 @@ (>= emacs-minor-version 2))) `(with-no-warnings (called-interactively-p ,kind)) ;; defined with no argument in <=23.1 `(interactive-p)))) +(def-edebug-spec org-called-interactively-p (&optional ("quote" symbolp))) -(if (and (not (fboundp 'with-silent-modifications)) +(when (and (not (fboundp 'with-silent-modifications)) (or (< emacs-major-version 23) (and (= emacs-major-version 23) (< emacs-minor-version 2)))) (defmacro with-silent-modifications (&rest body) - `(org-unmodified ,@body))) + `(org-unmodified ,@body)) + (def-edebug-spec with-silent-modifications (body))) (defmacro org-bound-and-true-p (var) "Return the value of symbol VAR if it is bound, else nil." `(and (boundp (quote ,var)) ,var)) +(def-edebug-spec org-bound-and-true-p (symbolp)) (defun org-string-nw-p (s) "Is S a string with a non-white character?" @@ -85,30 +94,36 @@ Also, do not record undo information." (let ((buffer-undo-list t) before-change-functions after-change-functions) ,@body)))) +(def-edebug-spec org-unmodified (body)) + +(defun org-substitute-posix-classes (re) + "Substitute posix classes in regular expression RE." + (let ((ss re)) + (save-match-data + (while (string-match "\\[:alnum:\\]" ss) + (setq ss (replace-match "a-zA-Z0-9" t t ss))) + (while (string-match "\\[:word:\\]" ss) + (setq ss (replace-match "a-zA-Z0-9" t t ss))) + (while (string-match "\\[:alpha:\\]" ss) + (setq ss (replace-match "a-zA-Z" t t ss))) + (while (string-match "\\[:punct:\\]" ss) + (setq ss (replace-match "\001-@[-`{-~" t t ss))) + ss))) (defmacro org-re (s) "Replace posix classes in regular expression." - (if (featurep 'xemacs) - (let ((ss s)) - (save-match-data - (while (string-match "\\[:alnum:\\]" ss) - (setq ss (replace-match "a-zA-Z0-9" t t ss))) - (while (string-match "\\[:word:\\]" ss) - (setq ss (replace-match "a-zA-Z0-9" t t ss))) - (while (string-match "\\[:alpha:\\]" ss) - (setq ss (replace-match "a-zA-Z" t t ss))) - (while (string-match "\\[:punct:\\]" ss) - (setq ss (replace-match "\001-@[-`{-~" t t ss))) - ss)) - s)) + (if (featurep 'xemacs) `(org-substitute-posix-classes ,s) s)) +(def-edebug-spec org-re (form)) (defmacro org-preserve-lc (&rest body) - `(let ((_line (org-current-line)) - (_col (current-column))) - (unwind-protect - (progn ,@body) - (org-goto-line _line) - (org-move-to-column _col)))) + (org-with-gensyms (line col) + `(let ((,line (org-current-line)) + (,col (current-column))) + (unwind-protect + (progn ,@body) + (org-goto-line ,line) + (org-move-to-column ,col))))) +(def-edebug-spec org-preserve-lc (body)) (defmacro org-without-partial-completion (&rest body) `(if (and (boundp 'partial-completion-mode) @@ -120,7 +135,9 @@ Also, do not record undo information." ,@body) (partial-completion-mode 1)) ,@body)) +(def-edebug-spec org-without-partial-completion (body)) +;; FIXME: Slated for removal. Current Org mode does not support Emacs < 22 (defmacro org-maybe-intangible (props) "Add '(intangible t) to PROPS if Emacs version is earlier than Emacs 22. In Emacs 21, invisible text is not avoided by the command loop, so the @@ -135,31 +152,37 @@ We use a macro so that the test can happen at compilation time." (defmacro org-with-point-at (pom &rest body) "Move to buffer and point of point-or-marker POM for the duration of BODY." - `(let ((pom ,pom)) - (save-excursion - (if (markerp pom) (set-buffer (marker-buffer pom))) + (org-with-gensyms (mpom) + `(let ((,mpom ,pom)) (save-excursion - (goto-char (or pom (point))) - ,@body)))) + (if (markerp ,mpom) (set-buffer (marker-buffer ,mpom))) + (save-excursion + (goto-char (or ,mpom (point))) + ,@body))))) +(def-edebug-spec org-with-point-at (form body)) (put 'org-with-point-at 'lisp-indent-function 1) (defmacro org-no-warnings (&rest body) (cons (if (fboundp 'with-no-warnings) 'with-no-warnings 'progn) body)) +(def-edebug-spec org-no-warnings (body)) (defmacro org-if-unprotected (&rest body) "Execute BODY if there is no `org-protected' text property at point." `(unless (get-text-property (point) 'org-protected) ,@body)) +(def-edebug-spec org-if-unprotected (body)) (defmacro org-if-unprotected-1 (&rest body) "Execute BODY if there is no `org-protected' text property at point-1." `(unless (get-text-property (1- (point)) 'org-protected) ,@body)) +(def-edebug-spec org-if-unprotected-1 (body)) (defmacro org-if-unprotected-at (pos &rest body) "Execute BODY if there is no `org-protected' text property at POS." `(unless (get-text-property ,pos 'org-protected) ,@body)) +(def-edebug-spec org-if-unprotected-at (form body)) (put 'org-if-unprotected-at 'lisp-indent-function 1) (defun org-re-search-forward-unprotected (&rest args) @@ -171,33 +194,37 @@ We use a macro so that the test can happen at compilation time." (unless (get-text-property (match-beginning 0) 'org-protected) (throw 'exit (point)))))) +;; FIXME: Normalize argument names (defmacro org-with-remote-undo (_buffer &rest _body) "Execute BODY while recording undo information in two buffers." - `(let ((_cline (org-current-line)) - (_cmd this-command) - (_buf1 (current-buffer)) - (_buf2 ,_buffer) - (_undo1 buffer-undo-list) - (_undo2 (with-current-buffer ,_buffer buffer-undo-list)) - _c1 _c2) - ,@_body - (when org-agenda-allow-remote-undo - (setq _c1 (org-verify-change-for-undo - _undo1 (with-current-buffer _buf1 buffer-undo-list)) - _c2 (org-verify-change-for-undo - _undo2 (with-current-buffer _buf2 buffer-undo-list))) - (when (or _c1 _c2) - ;; make sure there are undo boundaries - (and _c1 (with-current-buffer _buf1 (undo-boundary))) - (and _c2 (with-current-buffer _buf2 (undo-boundary))) - ;; remember which buffer to undo - (push (list _cmd _cline _buf1 _c1 _buf2 _c2) - org-agenda-undo-list))))) + (org-with-gensyms (cline cmd buf1 buf2 undo1 undo2 c1 c2) + `(let ((,cline (org-current-line)) + (,cmd this-command) + (,buf1 (current-buffer)) + (,buf2 ,_buffer) + (,undo1 buffer-undo-list) + (,undo2 (with-current-buffer ,_buffer buffer-undo-list)) + ,c1 ,c2) + ,@_body + (when org-agenda-allow-remote-undo + (setq ,c1 (org-verify-change-for-undo + ,undo1 (with-current-buffer ,buf1 buffer-undo-list)) + ,c2 (org-verify-change-for-undo + ,undo2 (with-current-buffer ,buf2 buffer-undo-list))) + (when (or ,c1 ,c2) + ;; make sure there are undo boundaries + (and ,c1 (with-current-buffer ,buf1 (undo-boundary))) + (and ,c2 (with-current-buffer ,buf2 (undo-boundary))) + ;; remember which buffer to undo + (push (list ,cmd ,cline ,buf1 ,c1 ,buf2 ,c2) + org-agenda-undo-list)))))) +(def-edebug-spec org-with-remote-undo (form body)) (put 'org-with-remote-undo 'lisp-indent-function 1) (defmacro org-no-read-only (&rest body) "Inhibit read-only for BODY." `(let ((inhibit-read-only t)) ,@body)) +(def-edebug-spec org-no-read-only (body)) (defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t rear-nonsticky t mouse-map t fontified t @@ -245,10 +272,6 @@ we turn off invisibility temporarily. Use this in a `let' form." "Make VAR local in current buffer and set it to VALUE." (set (make-local-variable var) value)) -(defsubst org-mode-p () - "Check if the current buffer is in Org-mode." - (eq major-mode 'org-mode)) - (defsubst org-last (list) "Return the last element of LIST." (car (last list))) @@ -324,18 +347,20 @@ but it also means that the buffer should stay alive during the operation, because otherwise all these markers will point nowhere." (declare (indent 1)) - `(let ((data (org-outline-overlay-data ,use-markers)) - rtn) - (unwind-protect - (progn - (setq rtn (progn ,@body)) - (org-set-outline-overlay-data data)) - (when ,use-markers - (mapc (lambda (c) - (and (markerp (car c)) (move-marker (car c) nil)) - (and (markerp (cdr c)) (move-marker (cdr c) nil))) - data))) - rtn)) + (org-with-gensyms (data rtn) + `(let ((,data (org-outline-overlay-data ,use-markers)) + ,rtn) + (unwind-protect + (progn + (setq ,rtn (progn ,@body)) + (org-set-outline-overlay-data ,data)) + (when ,use-markers + (mapc (lambda (c) + (and (markerp (car c)) (move-marker (car c) nil)) + (and (markerp (cdr c)) (move-marker (cdr c) nil))) + ,data))) + ,rtn))) +(def-edebug-spec org-save-outline-visibility (form body)) (defmacro org-with-wide-buffer (&rest body) "Execute body while temporarily widening the buffer." @@ -343,6 +368,7 @@ point nowhere." (save-restriction (widen) ,@body))) +(def-edebug-spec org-with-wide-buffer (body)) (defmacro org-with-limited-levels (&rest body) "Execute BODY with limited number of outline levels." @@ -350,6 +376,7 @@ point nowhere." (outline-regexp org-outline-regexp) (org-outline-regexp-at-bol (concat "^" org-outline-regexp))) ,@body)) +(def-edebug-spec org-with-limited-levels (body)) (defvar org-outline-regexp) ; defined in org.el (defvar org-odd-levels-only) ; defined in org.el @@ -357,7 +384,7 @@ point nowhere." (defun org-get-limited-outline-regexp () "Return outline-regexp with limited number of levels. The number of levels is controlled by `org-inlinetask-min-level'" - (if (or (not (org-mode-p)) (not (featurep 'org-inlinetask))) + (if (or (not (eq major-mode 'org-mode)) (not (featurep 'org-inlinetask))) org-outline-regexp (let* ((limit-level (1- org-inlinetask-min-level)) (nstars (if org-odd-levels-only (1- (* limit-level 2)) limit-level))) @@ -369,8 +396,20 @@ The number of levels is controlled by `org-inlinetask-min-level'" (format-seconds string seconds) (format-time-string string (seconds-to-time seconds)))) -(provide 'org-macs) +(defmacro org-eval-in-environment (environment form) + `(eval (list 'let ,environment ',form))) +(def-edebug-spec org-eval-in-environment (form form)) +(put 'org-eval-in-environment 'lisp-indent-function 1) +(defun org-make-parameter-alist (flat) + "Return alist based on FLAT. +FLAT is a list with alternating symbol names and values. The +returned alist is a list of lists with the symbol name in car and +the value in cdr." + (when flat + (cons (list (car flat) (cadr flat)) + (org-make-parameter-alist (cddr flat))))) +(provide 'org-macs) ;;; org-macs.el ends here diff --git a/lisp/org/org-mew.el b/lisp/org/org-mew.el index 97cad1ae316..8d6f1414150 100644 --- a/lisp/org/org-mew.el +++ b/lisp/org/org-mew.el @@ -5,7 +5,6 @@ ;; Author: Tokuya Kameshima ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; This file is part of GNU Emacs. @@ -135,6 +134,4 @@ (provide 'org-mew) - - ;;; org-mew.el ends here diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el index 7075018894f..6832a9b9122 100644 --- a/lisp/org/org-mhe.el +++ b/lisp/org/org-mhe.el @@ -1,11 +1,10 @@ ;;; org-mhe.el --- Support for links to MH-E messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -225,6 +224,4 @@ folders." (provide 'org-mhe) - - ;;; org-mhe.el ends here diff --git a/lisp/org/org-mks.el b/lisp/org/org-mks.el index 5f3ebbb6c81..55140419734 100644 --- a/lisp/org/org-mks.el +++ b/lisp/org/org-mks.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -132,6 +131,4 @@ only the bare key is returned." (provide 'org-mks) - - ;;; org-mks.el ends here diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index f270419877e..541ccc8f040 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el @@ -4,7 +4,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -38,6 +37,9 @@ (eval-when-compile (require 'cl)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) + (defgroup org-mobile nil "Options concerning support for a viewer/editor on a mobile device." :tag "Org Mobile" @@ -909,7 +911,7 @@ If BEG and END are given, only do this in that region." (buffer-file-name (current-buffer)))))) (error (setq org-mobile-error msg)))) (when org-mobile-error - (switch-to-buffer (marker-buffer marker)) + (org-pop-to-buffer-same-window (marker-buffer marker)) (goto-char marker) (incf cnt-error) (insert (if (stringp (nth 1 org-mobile-error)) @@ -1096,7 +1098,5 @@ A and B must be strings or nil." (provide 'org-mobile) - - ;;; org-mobile.el ends here diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 8f1e7735693..3a667deee9e 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -4,7 +4,7 @@ ;; ;; Author: Piotr Zielinski ;; Maintainer: Carsten Dominik -;; Version: 7.7 + ;; ;; This file is part of GNU Emacs. ;; @@ -70,8 +70,7 @@ ;; ;; Since version 5.10: Changes are listed in the general org-mode docs. ;; -;; Version 5.09 -;; + Version number synchronization with Org-mode. +;; Version 5.09;; + Version number synchronization with Org-mode. ;; ;; Version 0.25 ;; + made compatible with org-mode 4.70 (thanks to Carsten for the patch) @@ -329,7 +328,6 @@ nor a function, elements of KEYWORDS are used directly." (goto-char (match-end (or subexp 0))) (just-one-space))) - (defun org-mouse-keyword-replace-menu (keywords &optional group itemformat nosurround) "A helper function. @@ -395,15 +393,6 @@ DEFAULT is returned if no priority is given in the headline." (match-string 1) (when default (char-to-string org-default-priority))))) -;; (defun org-mouse-at-link () -;; (and (eq (get-text-property (point) 'face) 'org-link) -;; (save-excursion -;; (goto-char (previous-single-property-change (point) 'face)) -;; (or (looking-at org-bracket-link-regexp) -;; (looking-at org-angle-link-re) -;; (looking-at org-plain-link-re))))) - - (defun org-mouse-delete-timestamp () "Deletes the current timestamp as well as the preceding keyword. SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" @@ -454,7 +443,6 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" ["Align Tags in Buffer" (org-set-tags t t) t] ["Set Tags ..." (org-set-tags) t]))) - (defun org-mouse-set-tags (tags) (save-excursion ;; remove existing tags first @@ -485,7 +473,6 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" ('occur-tree "Occur tree: ") (t "Agenda command ???"))) - (defun org-mouse-list-options-menu (alloptions &optional function) (let ((options (save-match-data (split-string (match-string-no-properties 1))))) @@ -571,7 +558,6 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" ["Plain List to Outline" org-mouse-transform-to-outline :visible (org-at-item-p)]))) - (defun org-mouse-get-context (contextlist context) (let ((contextdata (assq context contextlist))) (when contextdata @@ -599,29 +585,26 @@ This means, between the beginning of line and the point." (open-line 1) (org-indent-to-column (- (match-end 0) (match-beginning 0))) (insert "+ ")) - (:middle ; insert after (end-of-line) (newline t) (indent-relative) (insert "+ ")) - (:end ; insert text here (skip-chars-backward " \t") (kill-region (point) (point-at-eol)) (unless (org-looking-back org-mouse-punctuation) (insert (concat org-mouse-punctuation " "))))) - (insert text) (beginning-of-line)) (defadvice dnd-insert-text (around org-mouse-dnd-insert-text activate) - (if (org-mode-p) + (if (eq major-mode 'org-mode) (org-mouse-insert-item text) ad-do-it)) (defadvice dnd-open-file (around org-mouse-dnd-open-file activate) - (if (org-mode-p) + (if (eq major-mode 'org-mode) (org-mouse-insert-item uri) ad-do-it)) @@ -632,13 +615,6 @@ This means, between the beginning of line and the point." (set-match-data ',match) (apply ',function rest))))) -(defun org-mouse-match-todo-keyword () - (save-excursion - (org-back-to-heading) - (if (looking-at org-outline-regexp) (goto-char (match-end 0))) - (or (looking-at (concat " +" org-todo-regexp " *")) - (looking-at " \\( *\\)")))) - (defun org-mouse-yank-link (click) (interactive "e") ;; Give temporary modes such as isearch a chance to turn off. @@ -668,7 +644,6 @@ This means, between the beginning of line and the point." (progn (save-excursion (goto-char (region-beginning)) (insert "[[")) (save-excursion (goto-char (region-end)) (insert "]]")))] ["Insert Link Here" (org-mouse-yank-link ',event)])))) - ((save-excursion (beginning-of-line) (looking-at "#\\+STARTUP: \\(.*\\)")) (popup-menu `(nil @@ -879,18 +854,6 @@ This means, between the beginning of line and the point." (t (org-mouse-popup-global-menu)))))) -;; (defun org-mouse-at-regexp (regexp) -;; (save-excursion -;; (let ((point (point)) -;; (bol (progn (beginning-of-line) (point))) -;; (eol (progn (end-of-line) (point)))) -;; (goto-char point) -;; (re-search-backward regexp bol 1) -;; (and (not (eolp)) -;; (progn (forward-char) -;; (re-search-forward regexp eol t)) -;; (<= (match-beginning 0) point))))) - (defun org-mouse-mark-active () (and mark-active transient-mark-mode)) @@ -1146,6 +1109,4 @@ This means, between the beginning of line and the point." (provide 'org-mouse) - - ;;; org-mouse.el ends here diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el new file mode 100644 index 00000000000..838a327b0c2 --- /dev/null +++ b/lisp/org/org-odt.el @@ -0,0 +1,2626 @@ +;;; org-odt.el --- OpenDocumentText export for Org-mode + +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. + +;; Author: Jambunathan K +;; Keywords: outlines, hypermedia, calendar, wp +;; Homepage: http://orgmode.org +;; +;; This file is not (yet) part of GNU Emacs. +;; However, it is distributed under the same license. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: + +;;; Code: +(eval-when-compile + (require 'cl)) +(require 'org-lparse) + +(defgroup org-export-odt nil + "Options specific for ODT export of Org-mode files." + :tag "Org Export ODT" + :group 'org-export) + +(defun org-odt-end-export () + (org-odt-fixup-label-references) + + ;; remove empty paragraphs + (goto-char (point-min)) + (while (re-search-forward + "[ \r\n\t]*" + nil t) + (replace-match "")) + (goto-char (point-min)) + + ;; Convert whitespace place holders + (goto-char (point-min)) + (let (beg end n) + (while (setq beg (next-single-property-change (point) 'org-whitespace)) + (setq n (get-text-property beg 'org-whitespace) + end (next-single-property-change beg 'org-whitespace)) + (goto-char beg) + (delete-region beg end) + (insert (format "%s" + (make-string n ?x))))) + + ;; Remove empty lines at the beginning of the file. + (goto-char (point-min)) + (when (looking-at "\\s-+\n") (replace-match "")) + + ;; Remove display properties + (remove-text-properties (point-min) (point-max) '(display t))) + +(defvar org-odt-suppress-xref nil) +(defconst org-export-odt-special-string-regexps + '(("\\\\-" . "­\\1") ; shy + ("---\\([^-]\\)" . "—\\1") ; mdash + ("--\\([^-]\\)" . "–\\1") ; ndash + ("\\.\\.\\." . "…")) ; hellip + "Regular expressions for special string conversion.") + +(defconst org-odt-lib-dir (file-name-directory load-file-name) + "Location of ODT exporter. +Use this to infer values of `org-odt-styles-dir' and +`org-export-odt-schema-dir'.") + +(defvar org-odt-data-dir nil + "Data directory for ODT exporter. +Use this to infer values of `org-odt-styles-dir' and +`org-export-odt-schema-dir'.") + +(defconst org-odt-schema-dir-list + (list + (and org-odt-data-dir + (expand-file-name "./schema/" org-odt-data-dir)) ; bail out + (eval-when-compile + (and (boundp 'org-odt-data-dir) org-odt-data-dir ; see make install + (expand-file-name "./schema/" org-odt-data-dir))) + (expand-file-name "../contrib/odt/etc/schema/" org-odt-lib-dir) ; git + ) + "List of directories to search for OpenDocument schema files. +Use this list to set the default value of +`org-export-odt-schema-dir'. The entries in this list are +populated heuristically based on the values of `org-odt-lib-dir' +and `org-odt-data-dir'.") + +(defcustom org-export-odt-schema-dir + (let* ((schema-dir + (catch 'schema-dir + (message "Debug (org-odt): Searching for OpenDocument schema files...") + (mapc + (lambda (schema-dir) + (when schema-dir + (message "Debug (org-odt): Trying %s..." schema-dir) + (when (and (file-readable-p + (expand-file-name "od-manifest-schema-v1.2-cs01.rnc" + schema-dir)) + (file-readable-p + (expand-file-name "od-schema-v1.2-cs01.rnc" + schema-dir)) + (file-readable-p + (expand-file-name "schemas.xml" schema-dir))) + (message "Debug (org-odt): Using schema files under %s" + schema-dir) + (throw 'schema-dir schema-dir)))) + org-odt-schema-dir-list) + (message "Debug (org-odt): No OpenDocument schema files installed") + nil))) + schema-dir) + "Directory that contains OpenDocument schema files. + +This directory contains: +1. rnc files for OpenDocument schema +2. a \"schemas.xml\" file that specifies locating rules needed + for auto validation of OpenDocument XML files. + +Use the customize interface to set this variable. This ensures +that `rng-schema-locating-files' is updated and auto-validation +of OpenDocument XML takes place based on the value +`rng-nxml-auto-validate-flag'. + +The default value of this variable varies depending on the +version of org in use and is initialized from +`org-odt-schema-dir-list'. The OASIS schema files are available +only in the org's private git repository. It is *not* bundled +with GNU ELPA tar or standard Emacs distribution." + :type '(choice + (const :tag "Not set" nil) + (directory :tag "Schema directory")) + :group 'org-export-odt + :set + (lambda (var value) + "Set `org-export-odt-schema-dir'. +Also add it to `rng-schema-locating-files'." + (let ((schema-dir value)) + (set var + (if (and + (file-readable-p + (expand-file-name "od-manifest-schema-v1.2-cs01.rnc" schema-dir)) + (file-readable-p + (expand-file-name "od-schema-v1.2-cs01.rnc" schema-dir)) + (file-readable-p + (expand-file-name "schemas.xml" schema-dir))) + schema-dir + (when value + (message "Error (org-odt): %s has no OpenDocument schema files" + value)) + nil))) + (when org-export-odt-schema-dir + (eval-after-load 'rng-loc + '(add-to-list 'rng-schema-locating-files + (expand-file-name "schemas.xml" + org-export-odt-schema-dir)))))) + +(defconst org-odt-styles-dir-list + (list + (and org-odt-data-dir + (expand-file-name "./styles/" org-odt-data-dir)) ; bail out + (eval-when-compile + (and (boundp 'org-odt-data-dir) org-odt-data-dir ; see make install + (expand-file-name "./styles/" org-odt-data-dir))) + (expand-file-name "../etc/styles/" org-odt-lib-dir) ; git + (expand-file-name "./etc/styles/" org-odt-lib-dir) ; elpa + (expand-file-name "./org/" data-directory) ; system + ) + "List of directories to search for OpenDocument styles files. +See `org-odt-styles-dir'. The entries in this list are populated +heuristically based on the values of `org-odt-lib-dir' and +`org-odt-data-dir'.") + +(defconst org-odt-styles-dir + (let* ((styles-dir + (catch 'styles-dir + (message "Debug (org-odt): Searching for OpenDocument styles files...") + (mapc (lambda (styles-dir) + (when styles-dir + (message "Debug (org-odt): Trying %s..." styles-dir) + (when (and (file-readable-p + (expand-file-name + "OrgOdtContentTemplate.xml" styles-dir)) + (file-readable-p + (expand-file-name + "OrgOdtStyles.xml" styles-dir))) + (message "Debug (org-odt): Using styles under %s" + styles-dir) + (throw 'styles-dir styles-dir)))) + org-odt-styles-dir-list) + nil))) + (unless styles-dir + (error "Error (org-odt): Cannot find factory styles files. Aborting.")) + styles-dir) + "Directory that holds auxiliary XML files used by the ODT exporter. + +This directory contains the following XML files - + \"OrgOdtStyles.xml\" and \"OrgOdtContentTemplate.xml\". These + XML files are used as the default values of + `org-export-odt-styles-file' and + `org-export-odt-content-template-file'. + +The default value of this variable varies depending on the +version of org in use and is initialized from +`org-odt-styles-dir-list'. Note that the user could be using org +from one of: org's own private git repository, GNU ELPA tar or +standard Emacs.") + +(defvar org-odt-file-extensions + '(("odt" . "OpenDocument Text") + ("ott" . "OpenDocument Text Template") + ("odm" . "OpenDocument Master Document") + ("ods" . "OpenDocument Spreadsheet") + ("ots" . "OpenDocument Spreadsheet Template") + ("odg" . "OpenDocument Drawing (Graphics)") + ("otg" . "OpenDocument Drawing Template") + ("odp" . "OpenDocument Presentation") + ("otp" . "OpenDocument Presentation Template") + ("odi" . "OpenDocument Image") + ("odf" . "OpenDocument Formula") + ("odc" . "OpenDocument Chart"))) + +(mapc + (lambda (desc) + ;; Let Org open all OpenDocument files using system-registered app + (add-to-list 'org-file-apps + (cons (concat "\\." (car desc) "\\'") 'system)) + ;; Let Emacs open all OpenDocument files in archive mode + (add-to-list 'auto-mode-alist + (cons (concat "\\." (car desc) "\\'") 'archive-mode))) + org-odt-file-extensions) + +;; register the odt exporter with the pre-processor +(add-to-list 'org-export-backends 'odt) + +;; register the odt exporter with org-lparse library +(org-lparse-register-backend 'odt) + +(defun org-odt-unload-function () + (org-lparse-unregister-backend 'odt) + (remove-hook 'org-export-preprocess-after-blockquote-hook + 'org-export-odt-preprocess-latex-fragments) + nil) + +(defcustom org-export-odt-content-template-file nil + "Template file for \"content.xml\". +The exporter embeds the exported content just before +\"\" element. + +If unspecified, the file named \"OrgOdtContentTemplate.xml\" +under `org-odt-styles-dir' is used." + :type 'file + :group 'org-export-odt) + +(defcustom org-export-odt-styles-file nil + "Default styles file for use with ODT export. +Valid values are one of: +1. nil +2. path to a styles.xml file +3. path to a *.odt or a *.ott file +4. list of the form (ODT-OR-OTT-FILE (FILE-MEMBER-1 FILE-MEMBER-2 +...)) + +In case of option 1, an in-built styles.xml is used. See +`org-odt-styles-dir' for more information. + +In case of option 3, the specified file is unzipped and the +styles.xml embedded therein is used. + +In case of option 4, the specified ODT-OR-OTT-FILE is unzipped +and FILE-MEMBER-1, FILE-MEMBER-2 etc are copied in to the +generated odt file. Use relative path for specifying the +FILE-MEMBERS. styles.xml must be specified as one of the +FILE-MEMBERS. + +Use options 1, 2 or 3 only if styles.xml alone suffices for +achieving the desired formatting. Use option 4, if the styles.xml +references additional files like header and footer images for +achieving the desired formattting. + +Use \"#+ODT_STYLES_FILE: ...\" directive to set this variable on +a per-file basis. For example, + +#+ODT_STYLES_FILE: \"/path/to/styles.xml\" or +#+ODT_STYLES_FILE: (\"/path/to/file.ott\" (\"styles.xml\" \"image/hdr.png\"))." + :group 'org-export-odt + :type + '(choice + (const :tag "Factory settings" nil) + (file :must-match t :tag "styles.xml") + (file :must-match t :tag "ODT or OTT file") + (list :tag "ODT or OTT file + Members" + (file :must-match t :tag "ODF Text or Text Template file") + (cons :tag "Members" + (file :tag " Member" "styles.xml") + (repeat (file :tag "Member")))))) + +(eval-after-load 'org-exp + '(add-to-list 'org-export-inbuffer-options-extra + '("ODT_STYLES_FILE" :odt-styles-file))) + +(defconst org-export-odt-tmpdir-prefix "%s-") +(defconst org-export-odt-bookmark-prefix "OrgXref.") + +(defvar org-export-odt-embed-images t + "Should the images be copied in to the odt file or just linked?") + +(defvar org-export-odt-inline-images 'maybe) ; counterpart of + ; `org-export-html-inline-images' + +(defcustom org-export-odt-inline-image-extensions + '("png" "jpeg" "jpg" "gif") + "Extensions of image files that can be inlined into HTML." + :type '(repeat (string :tag "Extension")) + :group 'org-export-odt) + +(defcustom org-export-odt-pixels-per-inch display-pixels-per-inch + ;; FIXME add docstring + "" + :type 'float + :group 'org-export-odt) + +(defcustom org-export-odt-create-custom-styles-for-srcblocks t + "Whether custom styles for colorized source blocks be automatically created. +When this option is turned on, the exporter creates custom styles +for source blocks based on the advice of `htmlfontify'. Creation +of custom styles happen as part of `org-odt-hfy-face-to-css'. + +When this option is turned off exporter does not create such +styles. + +Use the latter option if you do not want the custom styles to be +based on your current display settings. It is necessary that the +styles.xml already contains needed styles for colorizing to work. + +This variable is effective only if +`org-export-odt-fontify-srcblocks' is turned on." + :group 'org-export-odt + :type 'boolean) + +(defvar org-export-odt-default-org-styles-alist + '((paragraph . ((default . "Text_20_body") + (fixedwidth . "OrgFixedWidthBlock") + (verse . "OrgVerse") + (quote . "Quotations") + (blockquote . "Quotations") + (center . "OrgCenter") + (left . "OrgLeft") + (right . "OrgRight") + (title . "OrgTitle") + (subtitle . "OrgSubtitle") + (footnote . "Footnote") + (src . "OrgSrcBlock") + (illustration . "Illustration") + (table . "Table") + (definition-term . "Text_20_body_20_bold") + (horizontal-line . "Horizontal_20_Line"))) + (character . ((bold . "Bold") + (emphasis . "Emphasis") + (code . "OrgCode") + (verbatim . "OrgCode") + (strike . "Strikethrough") + (underline . "Underline") + (subscript . "OrgSubscript") + (superscript . "OrgSuperscript"))) + (list . ((ordered . "OrgNumberedList") + (unordered . "OrgBulletedList") + (description . "OrgDescriptionList")))) + "Default styles for various entities.") + +(defvar org-export-odt-org-styles-alist org-export-odt-default-org-styles-alist) +(defun org-odt-get-style-name-for-entity (category &optional entity) + (let ((entity (or entity 'default))) + (or + (cdr (assoc entity (cdr (assoc category + org-export-odt-org-styles-alist)))) + (cdr (assoc entity (cdr (assoc category + org-export-odt-default-org-styles-alist)))) + (error "Cannot determine style name for entity %s of type %s" + entity category)))) + +(defcustom org-export-odt-preferred-output-format nil + "Automatically post-process to this format after exporting to \"odt\". +Interactive commands `org-export-as-odt' and +`org-export-as-odt-and-open' export first to \"odt\" format and +then use `org-export-odt-convert-process' to convert the +resulting document to this format. During customization of this +variable, the list of valid values are populated based on +`org-export-odt-convert-capabilities'." + :group 'org-export-odt + :type '(choice :convert-widget + (lambda (w) + (apply 'widget-convert (widget-type w) + (eval (car (widget-get w :args))))) + `((const :tag "None" nil) + ,@(mapcar (lambda (c) + `(const :tag ,c ,c)) + (org-lparse-reachable-formats "odt"))))) + +;;;###autoload +(defun org-export-as-odt-and-open (arg) + "Export the outline as ODT and immediately open it with a browser. +If there is an active region, export only the region. +The prefix ARG specifies how many levels of the outline should become +headlines. The default is 3. Lower levels will become bulleted lists." + (interactive "P") + (org-lparse-and-open + (or org-export-odt-preferred-output-format "odt") "odt" arg)) + +;;;###autoload +(defun org-export-as-odt-batch () + "Call the function `org-lparse-batch'. +This function can be used in batch processing as: +emacs --batch + --load=$HOME/lib/emacs/org.el + --eval \"(setq org-export-headline-levels 2)\" + --visit=MyFile --funcall org-export-as-odt-batch" + (org-lparse-batch "odt")) + +;;;###autoload +(defun org-export-as-odt-to-buffer (arg) + "Call `org-lparse-odt` with output to a temporary buffer. +No file is created. The prefix ARG is passed through to `org-lparse-to-buffer'." + (interactive "P") + (org-lparse-to-buffer "odt" arg)) + +;;;###autoload +(defun org-replace-region-by-odt (beg end) + "Assume the current region has org-mode syntax, and convert it to ODT. +This can be used in any buffer. For example, you could write an +itemized list in org-mode syntax in an ODT buffer and then use this +command to convert it." + (interactive "r") + (org-replace-region-by "odt" beg end)) + +;;;###autoload +(defun org-export-region-as-odt (beg end &optional body-only buffer) + "Convert region from BEG to END in org-mode buffer to ODT. +If prefix arg BODY-ONLY is set, omit file header, footer, and table of +contents, and only produce the region of converted text, useful for +cut-and-paste operations. +If BUFFER is a buffer or a string, use/create that buffer as a target +of the converted ODT. If BUFFER is the symbol `string', return the +produced ODT as a string and leave not buffer behind. For example, +a Lisp program could call this function in the following way: + + (setq odt (org-export-region-as-odt beg end t 'string)) + +When called interactively, the output buffer is selected, and shown +in a window. A non-interactive call will only return the buffer." + (interactive "r\nP") + (org-lparse-region "odt" beg end body-only buffer)) + +;;; org-export-as-odt +;;;###autoload +(defun org-export-as-odt (arg &optional hidden ext-plist + to-buffer body-only pub-dir) + "Export the outline as a OpenDocumentText file. +If there is an active region, export only the region. The prefix +ARG specifies how many levels of the outline should become +headlines. The default is 3. Lower levels will become bulleted +lists. HIDDEN is obsolete and does nothing. +EXT-PLIST is a property list with external parameters overriding +org-mode's default settings, but still inferior to file-local +settings. When TO-BUFFER is non-nil, create a buffer with that +name and export to that buffer. If TO-BUFFER is the symbol +`string', don't leave any buffer behind but just return the +resulting XML as a string. When BODY-ONLY is set, don't produce +the file header and footer, simply return the content of +..., without even the body tags themselves. When +PUB-DIR is set, use this as the publishing directory." + (interactive "P") + (org-lparse (or org-export-odt-preferred-output-format "odt") + "odt" arg hidden ext-plist to-buffer body-only pub-dir)) + +(defvar org-odt-entity-control-callbacks-alist + `((EXPORT + . (org-odt-begin-export org-odt-end-export)) + (DOCUMENT-CONTENT + . (org-odt-begin-document-content org-odt-end-document-content)) + (DOCUMENT-BODY + . (org-odt-begin-document-body org-odt-end-document-body)) + (TOC + . (org-odt-begin-toc org-odt-end-toc)) + (ENVIRONMENT + . (org-odt-begin-environment org-odt-end-environment)) + (FOOTNOTE-DEFINITION + . (org-odt-begin-footnote-definition org-odt-end-footnote-definition)) + (TABLE + . (org-odt-begin-table org-odt-end-table)) + (TABLE-ROWGROUP + . (org-odt-begin-table-rowgroup org-odt-end-table-rowgroup)) + (LIST + . (org-odt-begin-list org-odt-end-list)) + (LIST-ITEM + . (org-odt-begin-list-item org-odt-end-list-item)) + (OUTLINE + . (org-odt-begin-outline org-odt-end-outline)) + (OUTLINE-TEXT + . (org-odt-begin-outline-text org-odt-end-outline-text)) + (PARAGRAPH + . (org-odt-begin-paragraph org-odt-end-paragraph))) + "") + +(defvar org-odt-entity-format-callbacks-alist + `((EXTRA-TARGETS . org-lparse-format-extra-targets) + (ORG-TAGS . org-lparse-format-org-tags) + (SECTION-NUMBER . org-lparse-format-section-number) + (HEADLINE . org-odt-format-headline) + (TOC-ENTRY . org-odt-format-toc-entry) + (TOC-ITEM . org-odt-format-toc-item) + (TAGS . org-odt-format-tags) + (SPACES . org-odt-format-spaces) + (TABS . org-odt-format-tabs) + (LINE-BREAK . org-odt-format-line-break) + (FONTIFY . org-odt-format-fontify) + (TODO . org-lparse-format-todo) + (LINK . org-odt-format-link) + (INLINE-IMAGE . org-odt-format-inline-image) + (ORG-LINK . org-odt-format-org-link) + (HEADING . org-odt-format-heading) + (ANCHOR . org-odt-format-anchor) + (TABLE . org-lparse-format-table) + (TABLE-ROW . org-odt-format-table-row) + (TABLE-CELL . org-odt-format-table-cell) + (FOOTNOTES-SECTION . ignore) + (FOOTNOTE-REFERENCE . org-odt-format-footnote-reference) + (HORIZONTAL-LINE . org-odt-format-horizontal-line) + (COMMENT . org-odt-format-comment) + (LINE . org-odt-format-line) + (ORG-ENTITY . org-odt-format-org-entity)) + "") + +;;;_. callbacks +;;;_. control callbacks +;;;_ , document body +(defun org-odt-begin-office-body () + ;; automatic styles + (insert-file-contents + (or org-export-odt-content-template-file + (expand-file-name "OrgOdtContentTemplate.xml" + org-odt-styles-dir))) + (goto-char (point-min)) + (re-search-forward "" nil nil) + (delete-region (match-beginning 0) (point-max))) + +;; Following variable is let bound when `org-do-lparse' is in +;; progress. See org-html.el. +(defvar org-lparse-toc) +(defun org-odt-format-toc () + (if (not org-lparse-toc) "" (concat "\n" org-lparse-toc "\n"))) + +(defun org-odt-format-preamble (opt-plist) + (let* ((title (plist-get opt-plist :title)) + (author (plist-get opt-plist :author)) + (date (plist-get opt-plist :date)) + (iso-date (org-odt-format-date date)) + (date (org-odt-format-date date "%d %b %Y")) + (email (plist-get opt-plist :email)) + ;; switch on or off above vars based on user settings + (author (and (plist-get opt-plist :author-info) (or author email))) + (email (and (plist-get opt-plist :email-info) email)) + (date (and (plist-get opt-plist :time-stamp-file) date))) + (concat + ;; title + (when title + (concat + (org-odt-format-stylized-paragraph + 'title (org-odt-format-tags + '("" . "") title)) + ;; separator + "")) + (cond + ((and author (not email)) + ;; author only + (concat + (org-odt-format-stylized-paragraph + 'subtitle + (org-odt-format-tags + '("" . "") + author)) + ;; separator + "")) + ((and author email) + ;; author and email + (concat + (org-odt-format-stylized-paragraph + 'subtitle + (org-odt-format-link + (org-odt-format-tags + '("" . "") + author) (concat "mailto:" email))) + ;; separator + ""))) + ;; date + (when date + (concat + (org-odt-format-stylized-paragraph + 'subtitle + (org-odt-format-tags + '("" + . "") date "N75" iso-date)) + ;; separator + "")) + ;; toc + (org-odt-format-toc)))) + +(defun org-odt-begin-document-body (opt-plist) + (org-odt-begin-office-body) + (insert (org-odt-format-preamble opt-plist))) + +(defvar org-lparse-body-only) ; let bound during org-do-lparse +(defvar org-lparse-to-buffer) ; let bound during org-do-lparse +(defun org-odt-end-document-body (opt-plist) + (unless org-lparse-body-only + (org-lparse-insert-tag "") + (org-lparse-insert-tag ""))) + +(defun org-odt-begin-document-content (opt-plist) + (ignore)) + +(defun org-odt-end-document-content () + (org-lparse-insert-tag "")) + +(defun org-odt-begin-outline (level1 snumber title tags + target extra-targets class) + (org-lparse-insert + 'HEADING (org-lparse-format + 'HEADLINE title extra-targets tags snumber level1) + level1 target)) + +(defun org-odt-end-outline () + (ignore)) + +(defun org-odt-begin-outline-text (level1 snumber class) + (ignore)) + +(defun org-odt-end-outline-text () + (ignore)) + +(defun org-odt-begin-paragraph (&optional style) + (org-lparse-insert-tag + "" (org-odt-get-extra-attrs-for-paragraph-style style))) + +(defun org-odt-end-paragraph () + (org-lparse-insert-tag "")) + +(defun org-odt-get-extra-attrs-for-paragraph-style (style) + (let (style-name) + (setq style-name + (cond + ((stringp style) style) + ((symbolp style) (org-odt-get-style-name-for-entity + 'paragraph style)))) + (unless style-name + (error "Don't know how to handle paragraph style %s" style)) + (format " text:style-name=\"%s\"" style-name))) + +(defun org-odt-format-stylized-paragraph (style text) + (org-odt-format-tags + '("" . "") text + (org-odt-get-extra-attrs-for-paragraph-style style))) + +(defvar org-lparse-opt-plist) ; bound during org-do-lparse +(defun org-odt-format-author (&optional author) + (when (setq author (or author (plist-get org-lparse-opt-plist :author))) + (org-odt-format-tags '("" . "") author))) + +(defun org-odt-format-date (&optional org-ts fmt) + (save-match-data + (let* ((time + (and (stringp org-ts) + (string-match org-ts-regexp0 org-ts) + (apply 'encode-time + (org-fix-decoded-time + (org-parse-time-string (match-string 0 org-ts) t))))) + date) + (cond + (fmt (format-time-string fmt time)) + (t (setq date (format-time-string "%Y-%m-%dT%H:%M:%S%z" time)) + (format "%s:%s" (substring date 0 -2) (substring date -2))))))) + +(defun org-odt-begin-annotation (&optional author date) + (org-lparse-insert-tag "") + (when (setq author (org-odt-format-author author)) + (insert author)) + (insert (org-odt-format-tags + '("" . "") + (org-odt-format-date + (or date (plist-get org-lparse-opt-plist :date))))) + (org-lparse-begin-paragraph)) + +(defun org-odt-end-annotation () + (org-lparse-insert-tag "")) + +(defun org-odt-begin-environment (style env-options-plist) + (case style + (annotation + (org-lparse-stash-save-paragraph-state) + (org-odt-begin-annotation (plist-get env-options-plist 'author) + (plist-get env-options-plist 'date))) + ((blockquote verse center quote) + (org-lparse-begin-paragraph style) + (list)) + ((fixedwidth native) + (org-lparse-end-paragraph) + (list)) + (t (error "Unknown environment %s" style)))) + +(defun org-odt-end-environment (style env-options-plist) + (case style + (annotation + (org-lparse-end-paragraph) + (org-odt-end-annotation) + (org-lparse-stash-pop-paragraph-state)) + ((blockquote verse center quote) + (org-lparse-end-paragraph) + (list)) + ((fixedwidth native) + (org-lparse-begin-paragraph) + (list)) + (t (error "Unknown environment %s" style)))) + +(defvar org-lparse-list-level) ; dynamically bound in org-do-lparse +(defun org-odt-begin-list (ltype) + (setq ltype (or (org-lparse-html-list-type-to-canonical-list-type ltype) + ltype)) + (let* ((style-name (org-odt-get-style-name-for-entity 'list ltype)) + (extra (concat (when (= org-lparse-list-level 1) + " text:continue-numbering=\"false\"") + (when style-name + (format " text:style-name=\"%s\"" style-name))))) + (case ltype + ((ordered unordered description) + (org-lparse-end-paragraph) + (org-lparse-insert-tag "" extra)) + (t (error "Unknown list type: %s" ltype))))) + +(defun org-odt-end-list (ltype) + (setq ltype (or (org-lparse-html-list-type-to-canonical-list-type ltype) + ltype)) + (if ltype + (org-lparse-insert-tag "") + (error "Unknown list type: %s" ltype))) + +(defun org-odt-begin-list-item (ltype &optional arg headline) + (setq ltype (or (org-lparse-html-list-type-to-canonical-list-type ltype) + ltype)) + (case ltype + (ordered + (assert (not headline) t) + (let* ((counter arg) (extra "")) + (org-lparse-insert-tag "") + (org-lparse-begin-paragraph))) + (unordered + (let* ((id arg) (extra "")) + (org-lparse-insert-tag "") + (org-lparse-begin-paragraph) + (insert (if headline (org-odt-format-target headline id) + (org-odt-format-bookmark "" id))))) + (description + (assert (not headline) t) + (let ((term (or arg "(no term)"))) + (insert + (org-odt-format-tags + '("" . "") + (org-odt-format-stylized-paragraph 'definition-term term))) + (org-lparse-begin-list-item 'unordered) + (org-lparse-begin-list 'description) + (org-lparse-begin-list-item 'unordered))) + (t (error "Unknown list type")))) + +(defun org-odt-end-list-item (ltype) + (setq ltype (or (org-lparse-html-list-type-to-canonical-list-type ltype) + ltype)) + (case ltype + ((ordered unordered) + (org-lparse-insert-tag "")) + (description + (org-lparse-end-list-item-1) + (org-lparse-end-list 'description) + (org-lparse-end-list-item-1)) + (t (error "Unknown list type")))) + +;; Following variables are let bound when table emission is in +;; progress. See org-lparse.el. +(defvar org-lparse-table-begin-marker) +(defvar org-lparse-table-ncols) +(defvar org-lparse-table-rowgrp-open) +(defvar org-lparse-table-rownum) +(defvar org-lparse-table-cur-rowgrp-is-hdr) +(defvar org-lparse-table-is-styled) +(defvar org-lparse-table-rowgrp-info) +(defvar org-lparse-table-colalign-vector) + +(defvar org-odt-table-style nil + "Table style specified by \"#+ATTR_ODT: \" line. +This is set during `org-odt-begin-table'.") + +(defvar org-odt-table-style-spec nil + "Entry for `org-odt-table-style' in `org-export-odt-table-styles'.") + +(defcustom org-export-odt-table-styles + '(("OrgEquation" "OrgEquation" + ((use-first-column-styles . t) + (use-last-column-styles . t)))) + "Specify how Table Styles should be derived from a Table Template. +This is a list where each element is of the +form (TABLE-STYLE-NAME TABLE-TEMPLATE-NAME TABLE-CELL-OPTIONS). + +TABLE-STYLE-NAME is the style associated with the table through +`org-odt-table-style'. + +TABLE-TEMPLATE-NAME is a set of - upto 9 - automatic +TABLE-CELL-STYLE-NAMEs and PARAGRAPH-STYLE-NAMEs (as defined +below) that is included in +`org-export-odt-content-template-file'. + +TABLE-CELL-STYLE-NAME := TABLE-TEMPLATE-NAME + TABLE-CELL-TYPE + + \"TableCell\" +PARAGRAPH-STYLE-NAME := TABLE-TEMPLATE-NAME + TABLE-CELL-TYPE + + \"TableParagraph\" +TABLE-CELL-TYPE := \"FirstRow\" | \"LastColumn\" | + \"FirstRow\" | \"LastRow\" | + \"EvenRow\" | \"OddRow\" | + \"EvenColumn\" | \"OddColumn\" | \"\" +where \"+\" above denotes string concatenation. + +TABLE-CELL-OPTIONS is an alist where each element is of the +form (TABLE-CELL-STYLE-SELECTOR . ON-OR-OFF). +TABLE-CELL-STYLE-SELECTOR := `use-first-row-styles' | + `use-last-row-styles' | + `use-first-column-styles' | + `use-last-column-styles' | + `use-banding-rows-styles' | + `use-banding-columns-styles' | + `use-first-row-styles' +ON-OR-OFF := `t' | `nil' + +For example, with the following configuration + +\(setq org-export-odt-table-styles + '\(\(\"TableWithHeaderRowsAndColumns\" \"Custom\" + \(\(use-first-row-styles . t\) + \(use-first-column-styles . t\)\)\) + \(\"TableWithHeaderColumns\" \"Custom\" + \(\(use-first-column-styles . t\)\)\)\)\) + +1. A table associated with \"TableWithHeaderRowsAndColumns\" + style will use the following table-cell styles - + \"CustomFirstRowTableCell\", \"CustomFirstColumnTableCell\", + \"CustomTableCell\" and the following paragraph styles + \"CustomFirstRowTableParagraph\", + \"CustomFirstColumnTableParagraph\", \"CustomTableParagraph\" + as appropriate. + +2. A table associated with \"TableWithHeaderColumns\" style will + use the following table-cell styles - + \"CustomFirstColumnTableCell\", \"CustomTableCell\" and the + following paragraph styles + \"CustomFirstColumnTableParagraph\", \"CustomTableParagraph\" + as appropriate.. + +Note that TABLE-TEMPLATE-NAME corresponds to the +\"\" elements contained within +\"\". The entries (TABLE-STYLE-NAME +TABLE-TEMPLATE-NAME TABLE-CELL-OPTIONS) correspond to +\"table:template-name\" and \"table:use-first-row-styles\" etc +attributes of \"\" element. Refer ODF-1.2 +specification for more information. Also consult the +implementation filed under `org-odt-get-table-cell-styles'. + +The TABLE-STYLE-NAME \"OrgEquation\" is used internally for +formatting of numbered display equations. Do not delete this +style from the list." + :group 'org-export-odt + :type '(choice + (const :tag "None" nil) + (repeat :tag "Table Styles" + (list :tag "Table Style Specification" + (string :tag "Table Style Name") + (string :tag "Table Template Name") + (alist :options (use-first-row-styles + use-last-row-styles + use-first-column-styles + use-last-column-styles + use-banding-rows-styles + use-banding-columns-styles) + :key-type symbol + :value-type (const :tag "True" t)))))) + +(defun org-odt-begin-table (caption label attributes) + (setq org-odt-table-style attributes) + (setq org-odt-table-style-spec + (assoc org-odt-table-style org-export-odt-table-styles)) + (when label + (insert + (org-odt-format-stylized-paragraph + 'table (org-odt-format-entity-caption label caption "__Table__")))) + (org-lparse-insert-tag + "" + (or label "") (or (nth 1 org-odt-table-style-spec) "OrgTable")) + (setq org-lparse-table-begin-marker (point))) + +(defvar org-lparse-table-colalign-info) +(defun org-odt-end-table () + (goto-char org-lparse-table-begin-marker) + (loop for level from 0 below org-lparse-table-ncols + do (let* ((col-cookie (and org-lparse-table-is-styled + (cdr (assoc (1+ level) + org-lparse-table-colalign-info)))) + (extra-columns (or (nth 1 col-cookie) 0))) + (dotimes (i (1+ extra-columns)) + (insert + (org-odt-format-tags + "" + "" (or (nth 1 org-odt-table-style-spec) "OrgTable")))) + (insert "\n"))) + ;; fill style attributes for table cells + (when org-lparse-table-is-styled + (while (re-search-forward "@@\\(table-cell:p\\|table-cell:style-name\\)@@\\([0-9]+\\)@@\\([0-9]+\\)@@" nil t) + (let* ((spec (match-string 1)) + (r (string-to-number (match-string 2))) + (c (string-to-number (match-string 3))) + (cell-styles (org-odt-get-table-cell-styles + r c org-odt-table-style-spec)) + (table-cell-style (car cell-styles)) + (table-cell-paragraph-style (cdr cell-styles))) + (cond + ((equal spec "table-cell:p") + (replace-match table-cell-paragraph-style t t)) + ((equal spec "table-cell:style-name") + (replace-match table-cell-style t t)))))) + (goto-char (point-max)) + (org-lparse-insert-tag "")) + +(defun org-odt-begin-table-rowgroup (&optional is-header-row) + (when org-lparse-table-rowgrp-open + (org-lparse-end 'TABLE-ROWGROUP)) + (org-lparse-insert-tag (if is-header-row + "" + "")) + (setq org-lparse-table-rowgrp-open t) + (setq org-lparse-table-cur-rowgrp-is-hdr is-header-row)) + +(defun org-odt-end-table-rowgroup () + (when org-lparse-table-rowgrp-open + (setq org-lparse-table-rowgrp-open nil) + (org-lparse-insert-tag + (if org-lparse-table-cur-rowgrp-is-hdr + "" "")))) + +(defun org-odt-format-table-row (row) + (org-odt-format-tags + '("" . "") row)) + +(defun org-odt-get-table-cell-styles (r c &optional style-spec) + "Retrieve styles applicable to a table cell. +R and C are (zero-based) row and column numbers of the table +cell. STYLE-SPEC is an entry in `org-export-odt-table-styles' +applicable to the current table. It is `nil' if the table is not +associated with any style attributes. + +Return a cons of (TABLE-CELL-STYLE-NAME . PARAGRAPH-STYLE-NAME). + +When STYLE-SPEC is nil, style the table cell the conventional way +- choose cell borders based on row and column groupings and +choose paragraph alignment based on `org-col-cookies' text +property. See also +`org-odt-get-paragraph-style-cookie-for-table-cell'. + +When STYLE-SPEC is non-nil, ignore the above cookie and return +styles congruent with the ODF-1.2 specification." + (cond + (style-spec + + ;; LibreOffice - particularly the Writer - honors neither table + ;; templates nor custom table-cell styles. Inorder to retain + ;; inter-operability with LibreOffice, only automatic styles are + ;; used for styling of table-cells. The current implementation is + ;; congruent with ODF-1.2 specification and hence is + ;; future-compatible. + + ;; Additional Note: LibreOffice's AutoFormat facility for tables - + ;; which recognizes as many as 16 different cell types - is much + ;; richer. Unfortunately it is NOT amenable to easy configuration + ;; by hand. + + (let* ((template-name (nth 1 style-spec)) + (cell-style-selectors (nth 2 style-spec)) + (cell-type + (cond + ((and (cdr (assoc 'use-first-column-styles cell-style-selectors)) + (= c 0)) "FirstColumn") + ((and (cdr (assoc 'use-last-column-styles cell-style-selectors)) + (= c (1- org-lparse-table-ncols))) "LastColumn") + ((and (cdr (assoc 'use-first-row-styles cell-style-selectors)) + (= r 0)) "FirstRow") + ((and (cdr (assoc 'use-last-row-styles cell-style-selectors)) + (= r org-lparse-table-rownum)) + "LastRow") + ((and (cdr (assoc 'use-banding-rows-styles cell-style-selectors)) + (= (% r 2) 1)) "EvenRow") + ((and (cdr (assoc 'use-banding-rows-styles cell-style-selectors)) + (= (% r 2) 0)) "OddRow") + ((and (cdr (assoc 'use-banding-columns-styles cell-style-selectors)) + (= (% c 2) 1)) "EvenColumn") + ((and (cdr (assoc 'use-banding-columns-styles cell-style-selectors)) + (= (% c 2) 0)) "OddColumn") + (t "")))) + (cons + (concat template-name cell-type "TableCell") + (concat template-name cell-type "TableParagraph")))) + (t + (cons + (concat + "OrgTblCell" + (cond + ((= r 0) "T") + ((eq (cdr (assoc r org-lparse-table-rowgrp-info)) :start) "T") + (t "")) + (when (= r org-lparse-table-rownum) "B") + (cond + ((= c 0) "") + ((or (memq (nth c org-table-colgroup-info) '(:start :startend)) + (memq (nth (1- c) org-table-colgroup-info) '(:end :startend))) "L") + (t ""))) + (capitalize (aref org-lparse-table-colalign-vector c)))))) + +(defun org-odt-get-paragraph-style-cookie-for-table-cell (r c) + (concat + (and (not org-odt-table-style-spec) + (cond + (org-lparse-table-cur-rowgrp-is-hdr "OrgTableHeading") + ((and (= c 0) (org-lparse-get 'TABLE-FIRST-COLUMN-AS-LABELS)) + "OrgTableHeading") + (t "OrgTableContents"))) + (and org-lparse-table-is-styled + (format "@@table-cell:p@@%03d@@%03d@@" r c)))) + +(defun org-odt-get-style-name-cookie-for-table-cell (r c) + (when org-lparse-table-is-styled + (format "@@table-cell:style-name@@%03d@@%03d@@" r c))) + +(defun org-odt-format-table-cell (data r c horiz-span) + (concat + (let* ((paragraph-style-cookie + (org-odt-get-paragraph-style-cookie-for-table-cell r c)) + (style-name-cookie + (org-odt-get-style-name-cookie-for-table-cell r c)) + (extra (and style-name-cookie + (format " table:style-name=\"%s\"" style-name-cookie))) + (extra (concat extra + (and (> horiz-span 0) + (format " table:number-columns-spanned=\"%d\"" + (1+ horiz-span)))))) + (org-odt-format-tags + '("" . "") + (if org-lparse-list-table-p data + (org-odt-format-stylized-paragraph paragraph-style-cookie data)) extra)) + (let (s) + (dotimes (i horiz-span) + (setq s (concat s "\n"))) s) + "\n")) + +(defun org-odt-begin-footnote-definition (n) + (org-lparse-begin-paragraph 'footnote)) + +(defun org-odt-end-footnote-definition (n) + (org-lparse-end-paragraph)) + +(defun org-odt-begin-toc (lang-specific-heading max-level) + (insert + (format " + + + %s +" max-level lang-specific-heading)) + (loop for level from 1 upto 10 + do (insert (format + " + + + + + + +" level level))) + + (insert + (format " + + + + + %s + +" lang-specific-heading))) + +(defun org-odt-end-toc () + (insert " + + +")) + +(defun org-odt-format-toc-entry (snumber todo headline tags href) + (setq headline (concat + (and org-export-with-section-numbers + (concat snumber ". ")) + headline + (and tags + (concat + (org-lparse-format 'SPACES 3) + (org-lparse-format 'FONTIFY tags "tag"))))) + (when todo + (setq headline (org-lparse-format 'FONTIFY headline "todo"))) + + (let ((org-odt-suppress-xref t)) + (org-odt-format-link headline (concat "#" href)))) + +(defun org-odt-format-toc-item (toc-entry level org-last-level) + (let ((style (format "Contents_20_%d" + (+ level (or (org-lparse-get 'TOPLEVEL-HLEVEL) 1) -1)))) + (insert "\n" (org-odt-format-stylized-paragraph style toc-entry) "\n"))) + +;; Following variable is let bound during 'ORG-LINK callback. See +;; org-html.el +(defvar org-lparse-link-description-is-image nil) +(defun org-odt-format-link (desc href &optional attr) + (cond + ((and (= (string-to-char href) ?#) (not org-odt-suppress-xref)) + (setq href (concat org-export-odt-bookmark-prefix (substring href 1))) + (let ((xref-format "text")) + (when (numberp desc) + (setq desc (format "%d" desc) xref-format "number")) + (org-odt-format-tags + '("" . + "") + desc xref-format href))) + (org-lparse-link-description-is-image + (org-odt-format-tags + '("" . "") + desc href (or attr ""))) + (t + (org-odt-format-tags + '("" . "") + desc href (or attr ""))))) + +(defun org-odt-format-spaces (n) + (cond + ((= n 1) " ") + ((> n 1) (concat + " " (org-odt-format-tags "" "" (1- n)))) + (t ""))) + +(defun org-odt-format-tabs (&optional n) + (let ((tab "") + (n (or n 1))) + (insert tab))) + +(defun org-odt-format-line-break () + (org-odt-format-tags "" "")) + +(defun org-odt-format-horizontal-line () + (org-odt-format-stylized-paragraph 'horizontal-line "")) + +(defun org-odt-encode-plain-text (line &optional no-whitespace-filling) + (setq line (org-xml-encode-plain-text line)) + (if no-whitespace-filling line + (org-odt-fill-tabs-and-spaces line))) + +(defun org-odt-format-line (line) + (case org-lparse-dyn-current-environment + (fixedwidth (concat + (org-odt-format-stylized-paragraph + 'fixedwidth (org-odt-encode-plain-text line)) "\n")) + (t (concat line "\n")))) + +(defun org-odt-format-comment (fmt &rest args) + (let ((comment (apply 'format fmt args))) + (format "\n\n" comment))) + +(defun org-odt-format-org-entity (wd) + (org-entity-get-representation wd 'utf8)) + +(defun org-odt-fill-tabs-and-spaces (line) + (replace-regexp-in-string + "\\([\t]\\|\\([ ]+\\)\\)" (lambda (s) + (cond + ((string= s "\t") (org-odt-format-tabs)) + (t (org-odt-format-spaces (length s))))) line)) + +(defcustom org-export-odt-fontify-srcblocks t + "Specify whether or not source blocks need to be fontified. +Turn this option on if you want to colorize the source code +blocks in the exported file. For colorization to work, you need +to make available an enhanced version of `htmlfontify' library." + :type 'boolean + :group 'org-export-odt) + +(defun org-odt-format-source-line-with-line-number-and-label + (line rpllbl num fontifier par-style) + + (let ((keep-label (not (numberp rpllbl))) + (ref (org-find-text-property-in-string 'org-coderef line))) + (setq line (concat line (and keep-label ref (format "(%s)" ref)))) + (setq line (funcall fontifier line)) + (when ref + (setq line (org-odt-format-target line (concat "coderef-" ref)))) + (setq line (org-odt-format-stylized-paragraph par-style line)) + (if (not num) line + (org-odt-format-tags '("" . "") line)))) + +(defun org-odt-format-source-code-or-example-plain + (lines lang caption textareap cols rows num cont rpllbl fmt) + "Format source or example blocks much like fixedwidth blocks. +Use this when `org-export-odt-fontify-srcblocks' option is turned +off." + (let* ((lines (org-split-string lines "[\r\n]")) + (line-count (length lines)) + (i 0)) + (mapconcat + (lambda (line) + (incf i) + (org-odt-format-source-line-with-line-number-and-label + line rpllbl num 'org-odt-encode-plain-text + (if (= i line-count) "OrgFixedWidthBlockLastLine" + "OrgFixedWidthBlock"))) + lines "\n"))) + +(defvar org-src-block-paragraph-format + " + + + + + " + "Custom paragraph style for colorized source and example blocks. +This style is much the same as that of \"OrgFixedWidthBlock\" +except that the foreground and background colors are set +according to the default face identified by the `htmlfontify'.") + +(defvar hfy-optimisations) +(declare-function hfy-face-to-style "htmlfontify" (fn)) +(declare-function hfy-face-or-def-to-name "htmlfontify" (fn)) + +(defun org-odt-hfy-face-to-css (fn) + "Create custom style for face FN. +When FN is the default face, use it's foreground and background +properties to create \"OrgSrcBlock\" paragraph style. Otherwise +use it's color attribute to create a character style whose name +is obtained from FN. Currently all attributes of FN other than +color are ignored. + +The style name for a face FN is derived using the following +operations on the face name in that order - de-dash, CamelCase +and prefix with \"OrgSrc\". For example, +`font-lock-function-name-face' is associated with +\"OrgSrcFontLockFunctionNameFace\"." + (let* ((css-list (hfy-face-to-style fn)) + (style-name ((lambda (fn) + (concat "OrgSrc" + (mapconcat + 'capitalize (split-string + (hfy-face-or-def-to-name fn) "-") + ""))) fn)) + (color-val (cdr (assoc "color" css-list))) + (background-color-val (cdr (assoc "background" css-list))) + (style (and org-export-odt-create-custom-styles-for-srcblocks + (cond + ((eq fn 'default) + (format org-src-block-paragraph-format + background-color-val color-val)) + (t + (format + " + + + " style-name color-val)))))) + (cons style-name style))) + +(defun org-odt-insert-custom-styles-for-srcblocks (styles) + "Save STYLES used for colorizing of source blocks. +Update styles.xml with styles that were collected as part of +`org-odt-hfy-face-to-css' callbacks." + (when styles + (with-current-buffer + (find-file-noselect (expand-file-name "styles.xml") t) + (goto-char (point-min)) + (when (re-search-forward "" nil t) + (goto-char (match-beginning 0)) + (insert "\n\n" styles "\n"))))) + +(defun org-odt-format-source-code-or-example-colored + (lines lang caption textareap cols rows num cont rpllbl fmt) + "Format source or example blocks using `htmlfontify-string'. +Use this routine when `org-export-odt-fontify-srcblocks' option +is turned on." + (let* ((lang-m (and lang (or (cdr (assoc lang org-src-lang-modes)) lang))) + (mode (and lang-m (intern (concat (if (symbolp lang-m) + (symbol-name lang-m) + lang-m) "-mode")))) + (org-inhibit-startup t) + (org-startup-folded nil) + (lines (with-temp-buffer + (insert lines) + (if (functionp mode) (funcall mode) (fundamental-mode)) + (font-lock-fontify-buffer) + (buffer-string))) + (hfy-html-quote-regex "\\([<\"&> ]\\)") + (hfy-html-quote-map '(("\"" """) + ("<" "<") + ("&" "&") + (">" ">") + (" " "") + (" " ""))) + (hfy-face-to-css 'org-odt-hfy-face-to-css) + (hfy-optimisations-1 (copy-seq hfy-optimisations)) + (hfy-optimisations (add-to-list 'hfy-optimisations-1 + 'body-text-only)) + (hfy-begin-span-handler + (lambda (style text-block text-id text-begins-block-p) + (insert (format "" style)))) + (hfy-end-span-handler (lambda nil (insert "")))) + (when (fboundp 'htmlfontify-string) + (let* ((lines (org-split-string lines "[\r\n]")) + (line-count (length lines)) + (i 0)) + (mapconcat + (lambda (line) + (incf i) + (org-odt-format-source-line-with-line-number-and-label + line rpllbl num 'htmlfontify-string + (if (= i line-count) "OrgSrcBlockLastLine" "OrgSrcBlock"))) + lines "\n"))))) + +(defun org-odt-format-source-code-or-example (lines lang caption textareap + cols rows num cont + rpllbl fmt) + "Format source or example blocks for export. +Use `org-odt-format-source-code-or-example-plain' or +`org-odt-format-source-code-or-example-colored' depending on the +value of `org-export-odt-fontify-srcblocks." + (setq lines (org-export-number-lines + lines 0 0 num cont rpllbl fmt 'preprocess) + lines (funcall + (or (and org-export-odt-fontify-srcblocks + (or (featurep 'htmlfontify) + ;; htmlfontify.el was introduced in Emacs 23.2 + ;; So load it with some caution + (require 'htmlfontify nil t)) + (fboundp 'htmlfontify-string) + 'org-odt-format-source-code-or-example-colored) + 'org-odt-format-source-code-or-example-plain) + lines lang caption textareap cols rows num cont rpllbl fmt)) + (if (not num) lines + (let ((extra (format " text:continue-numbering=\"%s\"" + (if cont "true" "false")))) + (org-odt-format-tags + '("" + . "") lines extra)))) + +(defun org-odt-remap-stylenames (style-name) + (or + (cdr (assoc style-name '(("timestamp-wrapper" . "OrgTimestampWrapper") + ("timestamp" . "OrgTimestamp") + ("timestamp-kwd" . "OrgTimestampKeyword") + ("tag" . "OrgTag") + ("todo" . "OrgTodo") + ("done" . "OrgDone") + ("target" . "OrgTarget")))) + style-name)) + +(defun org-odt-format-fontify (text style &optional id) + (let* ((style-name + (cond + ((stringp style) + (org-odt-remap-stylenames style)) + ((symbolp style) + (org-odt-get-style-name-for-entity 'character style)) + ((listp style) + (assert (< 1 (length style))) + (let ((parent-style (pop style))) + (mapconcat (lambda (s) + ;; (assert (stringp s) t) + (org-odt-remap-stylenames s)) style "") + (org-odt-remap-stylenames parent-style))) + (t (error "Don't how to handle style %s" style))))) + (org-odt-format-tags + '("" . "") + text style-name))) + +(defun org-odt-relocate-relative-path (path dir) + (if (file-name-absolute-p path) path + (file-relative-name (expand-file-name path dir) + (expand-file-name "eyecandy" dir)))) + +(defun org-odt-format-inline-image (thefile) + (let* ((thelink (if (file-name-absolute-p thefile) thefile + (org-xml-format-href + (org-odt-relocate-relative-path + thefile org-current-export-file)))) + (href + (org-odt-format-tags + "" "" + (if org-export-odt-embed-images + (org-odt-copy-image-file thefile) thelink)))) + (org-export-odt-format-image thefile href))) + +(defun org-export-odt-format-formula (src href &optional embed-as) + "Create image tag with source and attributes." + (save-match-data + (let* ((caption (org-find-text-property-in-string 'org-caption src)) + (caption (and caption (org-xml-format-desc caption))) + (label (org-find-text-property-in-string 'org-label src)) + (latex-frag (org-find-text-property-in-string 'org-latex-src src)) + (embed-as (or embed-as + (and latex-frag + (org-find-text-property-in-string + 'org-latex-src-embed-type src)) + (if (or caption label) 'paragraph 'character))) + width height) + (when latex-frag + (setq href (org-propertize href :title "LaTeX Fragment" + :description latex-frag))) + (cond + ((eq embed-as 'character) + (org-odt-format-entity "InlineFormula" href width height)) + (t + (org-lparse-end-paragraph) + (org-lparse-insert-list-table + `((,(org-odt-format-entity + (if caption "CaptionedDisplayFormula" "DisplayFormula") + href width height :caption caption :label nil) + ,(if (not label) "" + (org-odt-format-entity-caption label nil "__MathFormula__")))) + nil nil nil "OrgEquation" nil '((1 "c" 8) (2 "c" 1))) + (throw 'nextline nil)))))) + +(defvar org-odt-embedded-formulas-count 0) +(defun org-odt-copy-formula-file (path) + "Returns the internal name of the file" + (let* ((src-file (expand-file-name + path (file-name-directory org-current-export-file))) + (target-dir (format "Formula-%04d/" + (incf org-odt-embedded-formulas-count))) + (target-file (concat target-dir "content.xml"))) + (when (not org-lparse-to-buffer) + (message "Embedding %s as %s ..." + (substring-no-properties path) target-file) + + (make-directory target-dir) + (org-odt-create-manifest-file-entry + "application/vnd.oasis.opendocument.formula" target-dir "1.2") + + (case (org-odt-is-formula-link-p src-file) + (mathml + (copy-file src-file target-file 'overwrite)) + (odf + (org-odt-zip-extract-one src-file "content.xml" target-dir)) + (t + (error "%s is not a formula file" src-file))) + + (org-odt-create-manifest-file-entry "text/xml" target-file)) + target-file)) + +(defun org-odt-format-inline-formula (thefile) + (let* ((thelink (if (file-name-absolute-p thefile) thefile + (org-xml-format-href + (org-odt-relocate-relative-path + thefile org-current-export-file)))) + (href + (org-odt-format-tags + "" "" + (file-name-directory (org-odt-copy-formula-file thefile))))) + (org-export-odt-format-formula thefile href))) + +(defun org-odt-is-formula-link-p (file) + (let ((case-fold-search nil)) + (cond + ((string-match "\\.\\(mathml\\|mml\\)\\'" file) + 'mathml) + ((string-match "\\.odf\\'" file) + 'odf)))) + +(defun org-odt-format-org-link (opt-plist type-1 path fragment desc attr + descp) + "Make a OpenDocument link. +OPT-PLIST is an options list. +TYPE-1 is the device-type of the link (THIS://foo.html). +PATH is the path of the link (http://THIS#location). +FRAGMENT is the fragment part of the link, if any (foo.html#THIS). +DESC is the link description, if any. +ATTR is a string of other attributes of the a element." + (declare (special org-lparse-par-open)) + (save-match-data + (let* ((may-inline-p + (and (member type-1 '("http" "https" "file")) + (org-lparse-should-inline-p path descp) + (not fragment))) + (type (if (equal type-1 "id") "file" type-1)) + (filename path) + (thefile path)) + (cond + ;; check for inlined images + ((and (member type '("file")) + (not fragment) + (org-file-image-p + filename org-export-odt-inline-image-extensions) + (or (eq t org-export-odt-inline-images) + (and org-export-odt-inline-images (not descp)))) + (org-odt-format-inline-image thefile)) + ;; check for embedded formulas + ((and (member type '("file")) + (not fragment) + (org-odt-is-formula-link-p filename) + (or (not descp))) + (org-odt-format-inline-formula thefile)) + ((string= type "coderef") + (let* ((ref fragment) + (lineno-or-ref (cdr (assoc ref org-export-code-refs))) + (desc (and descp desc)) + (org-odt-suppress-xref nil) + (href (org-xml-format-href (concat "#coderef-" ref)))) + (cond + ((and (numberp lineno-or-ref) (not desc)) + (org-odt-format-link lineno-or-ref href)) + ((and (numberp lineno-or-ref) desc + (string-match (regexp-quote (concat "(" ref ")")) desc)) + (format (replace-match "%s" t t desc) + (org-odt-format-link lineno-or-ref href))) + (t + (setq desc (format + (if (and desc (string-match + (regexp-quote (concat "(" ref ")")) + desc)) + (replace-match "%s" t t desc) + (or desc "%s")) + lineno-or-ref)) + (org-odt-format-link (org-xml-format-desc desc) href))))) + (t + (when (string= type "file") + (setq thefile + (cond + ((file-name-absolute-p path) + (concat "file://" (expand-file-name path))) + (t (org-odt-relocate-relative-path + thefile org-current-export-file))))) + + (when (and (member type '("" "http" "https" "file")) fragment) + (setq thefile (concat thefile "#" fragment))) + + (setq thefile (org-xml-format-href thefile)) + + (when (not (member type '("" "file"))) + (setq thefile (concat type ":" thefile))) + + (let ((org-odt-suppress-xref nil)) + (org-odt-format-link + (org-xml-format-desc desc) thefile attr))))))) + +(defun org-odt-format-heading (text level &optional id) + (let* ((text (if id (org-odt-format-target text id) text))) + (org-odt-format-tags + '("" . + "") text level level))) + +(defun org-odt-format-headline (title extra-targets tags + &optional snumber level) + (concat + (org-lparse-format 'EXTRA-TARGETS extra-targets) + + ;; No need to generate section numbers. They are auto-generated by + ;; the application + + ;; (concat (org-lparse-format 'SECTION-NUMBER snumber level) " ") + title + (and tags (concat (org-lparse-format 'SPACES 3) + (org-lparse-format 'ORG-TAGS tags))))) + +(defun org-odt-format-anchor (text name &optional class) + (org-odt-format-target text name)) + +(defun org-odt-format-bookmark (text id) + (if id + (org-odt-format-tags "" text id) + text)) + +(defun org-odt-format-target (text id) + (let ((name (concat org-export-odt-bookmark-prefix id))) + (concat + (and id (org-odt-format-tags + "" "" name)) + (org-odt-format-bookmark text id) + (and id (org-odt-format-tags + "" "" name))))) + +(defun org-odt-format-footnote (n def) + (let ((id (concat "fn" n)) + (note-class "footnote") + (par-style "Footnote")) + (org-odt-format-tags + '("" . + "") + (concat + (org-odt-format-tags + '("" . "") + n) + (org-odt-format-tags + '("" . "") + def)) + id note-class))) + +(defun org-odt-format-footnote-reference (n def refcnt) + (if (= refcnt 1) + (org-odt-format-footnote n def) + (org-odt-format-footnote-ref n))) + +(defun org-odt-format-footnote-ref (n) + (let ((note-class "footnote") + (ref-format "text") + (ref-name (concat "fn" n))) + (org-odt-format-tags + '("" . "") + (org-odt-format-tags + '("" . "") + n note-class ref-format ref-name) + "OrgSuperscript"))) + +(defun org-odt-get-image-name (file-name) + (require 'sha1) + (file-relative-name + (expand-file-name + (concat (sha1 file-name) "." (file-name-extension file-name)) "Pictures"))) + +(defun org-export-odt-format-image (src href) + "Create image tag with source and attributes." + (save-match-data + (let* ((caption (org-find-text-property-in-string 'org-caption src)) + (caption (and caption (org-xml-format-desc caption))) + (attr (org-find-text-property-in-string 'org-attributes src)) + (label (org-find-text-property-in-string 'org-label src)) + (latex-frag (org-find-text-property-in-string + 'org-latex-src src)) + (category (and latex-frag "__DvipngImage__")) + (attr-plist (org-lparse-get-block-params attr)) + (user-frame-anchor + (car (assoc-string (plist-get attr-plist :anchor) + (if (or caption label) + '(("paragraph") ("page")) + '(("character") ("paragraph") ("page"))) t))) + (user-frame-style + (and user-frame-anchor (plist-get attr-plist :style))) + (user-frame-attrs + (and user-frame-anchor (plist-get attr-plist :attributes))) + (user-frame-params + (list user-frame-style user-frame-attrs user-frame-anchor)) + (embed-as (cond + (latex-frag + (symbol-name + (or (org-find-text-property-in-string + 'org-latex-src-embed-type src) 'character))) + (user-frame-anchor) + (t "paragraph"))) + (size (org-odt-image-size-from-file + src (plist-get attr-plist :width) + (plist-get attr-plist :height) + (plist-get attr-plist :scale) nil embed-as)) + (width (car size)) (height (cdr size))) + (when latex-frag + (setq href (org-propertize href :title "LaTeX Fragment" + :description latex-frag))) + (let ((frame-style-handle (concat (and (or caption label) "Captioned") + embed-as "Image"))) + (org-odt-format-entity + frame-style-handle href width height + :caption caption :label label :category category + :user-frame-params user-frame-params))))) + +(defun org-odt-format-object-description (title description) + (concat (and title (org-odt-format-tags + '("" . "") + (org-odt-encode-plain-text title t))) + (and description (org-odt-format-tags + '("" . "") + (org-odt-encode-plain-text description t))))) + +(defun org-odt-format-frame (text width height style &optional + extra anchor-type) + (let ((frame-attrs + (concat + (if width (format " svg:width=\"%0.2fcm\"" width) "") + (if height (format " svg:height=\"%0.2fcm\"" height) "") + extra + (format " text:anchor-type=\"%s\"" (or anchor-type "paragraph"))))) + (org-odt-format-tags + '("" . "") + (concat text (org-odt-format-object-description + (get-text-property 0 :title text) + (get-text-property 0 :description text))) + style frame-attrs))) + +(defun org-odt-format-textbox (text width height style &optional + extra anchor-type) + (org-odt-format-frame + (org-odt-format-tags + '("" . "") + text (concat (format " fo:min-height=\"%0.2fcm\"" (or height .2)) + (format " fo:min-width=\"%0.2fcm\"" (or width .2)))) + width nil style extra anchor-type)) + +(defun org-odt-format-inlinetask (heading content + &optional todo priority tags) + (org-odt-format-stylized-paragraph + nil (org-odt-format-textbox + (concat (org-odt-format-stylized-paragraph + "OrgInlineTaskHeading" + (org-lparse-format + 'HEADLINE (concat (org-lparse-format-todo todo) " " heading) + nil tags)) + content) nil nil "OrgInlineTaskFrame" " style:rel-width=\"100%\""))) + +(defvar org-odt-entity-frame-styles + '(("CharacterImage" "__Figure__" ("OrgInlineImage" nil "as-char")) + ("ParagraphImage" "__Figure__" ("OrgDisplayImage" nil "paragraph")) + ("PageImage" "__Figure__" ("OrgPageImage" nil "page")) + ("CaptionedParagraphImage" "__Figure__" + ("OrgCaptionedImage" + " style:rel-width=\"100%\" style:rel-height=\"scale\"" "paragraph") + ("OrgImageCaptionFrame" nil "paragraph")) + ("CaptionedPageImage" "__Figure__" + ("OrgCaptionedImage" + " style:rel-width=\"100%\" style:rel-height=\"scale\"" "paragraph") + ("OrgPageImageCaptionFrame" nil "page")) + ("InlineFormula" "__MathFormula__" ("OrgInlineFormula" nil "as-char")) + ("DisplayFormula" "__MathFormula__" ("OrgDisplayFormula" nil "as-char")) + ("CaptionedDisplayFormula" "__MathFormula__" + ("OrgCaptionedFormula" nil "paragraph") + ("OrgFormulaCaptionFrame" nil "as-char")))) + +(defun org-odt-merge-frame-params(default-frame-params user-frame-params) + (if (not user-frame-params) default-frame-params + (assert (= (length default-frame-params) 3)) + (assert (= (length user-frame-params) 3)) + (loop for user-frame-param in user-frame-params + for default-frame-param in default-frame-params + collect (or user-frame-param default-frame-param)))) + +(defun* org-odt-format-entity (entity href width height + &key caption label category + user-frame-params) + (let* ((entity-style (assoc-string entity org-odt-entity-frame-styles t)) + default-frame-params frame-params) + (cond + ((not (or caption label)) + (setq default-frame-params (nth 2 entity-style)) + (setq frame-params (org-odt-merge-frame-params + default-frame-params user-frame-params)) + (apply 'org-odt-format-frame href width height frame-params)) + (t + (setq default-frame-params (nth 3 entity-style)) + (setq frame-params (org-odt-merge-frame-params + default-frame-params user-frame-params)) + (apply 'org-odt-format-textbox + (org-odt-format-stylized-paragraph + 'illustration + (concat + (apply 'org-odt-format-frame href width height + (nth 2 entity-style)) + (org-odt-format-entity-caption + label caption (or category (nth 1 entity-style))))) + width height frame-params))))) + +(defvar org-odt-embedded-images-count 0) +(defun org-odt-copy-image-file (path) + "Returns the internal name of the file" + (let* ((image-type (file-name-extension path)) + (media-type (format "image/%s" image-type)) + (src-file (expand-file-name + path (file-name-directory org-current-export-file))) + (target-dir "Images/") + (target-file + (format "%s%04d.%s" target-dir + (incf org-odt-embedded-images-count) image-type))) + (when (not org-lparse-to-buffer) + (message "Embedding %s as %s ..." + (substring-no-properties path) target-file) + + (when (= 1 org-odt-embedded-images-count) + (make-directory target-dir) + (org-odt-create-manifest-file-entry "" target-dir)) + + (copy-file src-file target-file 'overwrite) + (org-odt-create-manifest-file-entry media-type target-file)) + target-file)) + +(defvar org-export-odt-image-size-probe-method + '(emacs imagemagick force) + "Ordered list of methods by for determining size of an embedded + image.") + +(defvar org-export-odt-default-image-sizes-alist + '(("character" . (5 . 0.4)) + ("paragraph" . (5 . 5))) + "Hardcoded image dimensions one for each of the anchor + methods.") + +;; A4 page size is 21.0 by 29.7 cms +;; The default page settings has 2cm margin on each of the sides. So +;; the effective text area is 17.0 by 25.7 cm +(defvar org-export-odt-max-image-size '(17.0 . 20.0) + "Limiting dimensions for an embedded image.") + +(defun org-odt-do-image-size (probe-method file &optional dpi anchor-type) + (setq dpi (or dpi org-export-odt-pixels-per-inch)) + (setq anchor-type (or anchor-type "paragraph")) + (flet ((size-in-cms (size-in-pixels) + (flet ((pixels-to-cms (pixels) + (let* ((cms-per-inch 2.54) + (inches (/ pixels dpi))) + (* cms-per-inch inches)))) + (and size-in-pixels + (cons (pixels-to-cms (car size-in-pixels)) + (pixels-to-cms (cdr size-in-pixels))))))) + (case probe-method + (emacs + (size-in-cms (ignore-errors (image-size (create-image file) 'pixels)))) + (imagemagick + (size-in-cms + (let ((dim (shell-command-to-string + (format "identify -format \"%%w:%%h\" \"%s\"" file)))) + (when (string-match "\\([0-9]+\\):\\([0-9]+\\)" dim) + (cons (string-to-number (match-string 1 dim)) + (string-to-number (match-string 2 dim))))))) + (t + (cdr (assoc-string anchor-type + org-export-odt-default-image-sizes-alist)))))) + +(defun org-odt-image-size-from-file (file &optional user-width + user-height scale dpi embed-as) + (unless (file-name-absolute-p file) + (setq file (expand-file-name + file (file-name-directory org-current-export-file)))) + (let* (size width height) + (unless (and user-height user-width) + (loop for probe-method in org-export-odt-image-size-probe-method + until size + do (setq size (org-odt-do-image-size + probe-method file dpi embed-as))) + (or size (error "Cannot determine Image size. Aborting ...")) + (setq width (car size) height (cdr size))) + (cond + (scale + (setq width (* width scale) height (* height scale))) + ((and user-height user-width) + (setq width user-width height user-height)) + (user-height + (setq width (* user-height (/ width height)) height user-height)) + (user-width + (setq height (* user-width (/ height width)) width user-width)) + (t (ignore))) + ;; ensure that an embedded image fits comfortably within a page + (let ((max-width (car org-export-odt-max-image-size)) + (max-height (cdr org-export-odt-max-image-size))) + (when (or (> width max-width) (> height max-height)) + (let* ((scale1 (/ max-width width)) + (scale2 (/ max-height height)) + (scale (min scale1 scale2))) + (setq width (* scale width) height (* scale height))))) + (cons width height))) + +(defvar org-odt-entity-labels-alist nil + "Associate Labels with the Labelled entities. +Each element of the alist is of the form (LABEL-NAME +CATEGORY-NAME SEQNO LABEL-STYLE-NAME). LABEL-NAME is same as +that specified by \"#+LABEL: ...\" line. CATEGORY-NAME is the +type of the entity that LABEL-NAME is attached to. CATEGORY-NAME +can be one of \"Table\", \"Figure\" or \"Equation\". SEQNO is +the unique number assigned to the referenced entity on a +per-CATEGORY basis. It is generated sequentially and is 1-based. +LABEL-STYLE-NAME is a key `org-odt-label-styles'. + +See `org-odt-add-label-definition' and +`org-odt-fixup-label-references'.") + +(defvar org-odt-entity-counts-plist nil + "Plist of running counters of SEQNOs for each of the CATEGORY-NAMEs. +See `org-odt-entity-labels-alist' for known CATEGORY-NAMEs.") + +(defvar org-odt-label-styles + '(("text" "(%n)" "text" "(%n)") + ("category-and-value" "%e %n%c" "category-and-value" "%e %n")) + "Specify how labels are applied and referenced. +This is an alist where each element is of the +form (LABEL-STYLE-NAME LABEL-ATTACH-FMT LABEL-REF-MODE +LABEL-REF-FMT). + +LABEL-ATTACH-FMT controls how labels and captions are attached to +an entity. It may contain following specifiers - %e, %n and %c. +%e is replaced with the CATEGORY-NAME. %n is replaced with +\" SEQNO \". %c is replaced +with CAPTION. See `org-odt-format-label-definition'. + +LABEL-REF-MODE and LABEL-REF-FMT controls how label references +are generated. The following XML is generated for a label +reference - \" LABEL-REF-FMT +\". LABEL-REF-FMT may contain following +specifiers - %e and %n. %e is replaced with the CATEGORY-NAME. +%n is replaced with SEQNO. See +`org-odt-format-label-reference'.") + +(defvar org-odt-category-map-alist + '(("__Table__" "Table" "category-and-value") + ("__Figure__" "Figure" "category-and-value") + ("__MathFormula__" "Equation" "text") + ("__DvipngImage__" "Equation" "category-and-value")) + "Map a CATEGORY-HANDLE to CATEGORY-NAME and LABEL-STYLE. +This is an alist where each element is of the form +\\(CATEGORY-HANDLE CATEGORY-NAME LABEL-STYLE\\). CATEGORY_HANDLE +could either be one of the internal handles (as seen above) or be +derived from the \"#+LABEL:\" specification. See +`org-export-odt-get-category-from-label'. CATEGORY-NAME and +LABEL-STYLE are used for generating ODT labels. See +`org-odt-label-styles'.") + +(defvar org-export-odt-user-categories + '("Illustration" "Table" "Text" "Drawing" "Equation" "Figure")) + +(defvar org-export-odt-get-category-from-label nil + "Should category of label be inferred from label itself. +When this option is non-nil, a label is parsed in to two +component parts delimited by a \":\" (colon) as shown here - +#+LABEL:[CATEGORY-HANDLE:]EXTRA. The CATEGORY-HANDLE is mapped +to a CATEGORY-NAME and LABEL-STYLE using +`org-odt-category-map-alist'. (If no such map is provided and +CATEGORY-NAME is set to CATEGORY-HANDLE and LABEL-STYLE is set to +\"category-and-value\"). If CATEGORY-NAME so obtained is listed +under `org-export-odt-user-categories' then the user specified +styles are used. Otherwise styles as determined by the internal +CATEGORY-HANDLE is used. See +`org-odt-get-label-category-and-style' for details.") + +(defun org-odt-get-label-category-and-style (label default-category) + "See `org-export-odt-get-category-from-label'." + (let ((default-category-map + (assoc default-category org-odt-category-map-alist)) + user-category user-category-map category) + (cond + ((not org-export-odt-get-category-from-label) + default-category-map) + ((not (setq user-category + (save-match-data + (and (string-match "\\`\\(.*\\):.+" label) + (match-string 1 label))))) + default-category-map) + (t + (setq user-category-map + (or (assoc user-category org-odt-category-map-alist) + (list nil user-category "category-and-value")) + category (nth 1 user-category-map)) + (if (member category org-export-odt-user-categories) + user-category-map + default-category-map))))) + +(defun org-odt-add-label-definition (label default-category) + "Create an entry in `org-odt-entity-labels-alist' and return it." + (setq label (substring-no-properties label)) + (let* ((label-props (org-odt-get-label-category-and-style + label default-category)) + (category (nth 1 label-props)) + (counter category) + (label-style (nth 2 label-props)) + (sequence-var (intern (mapconcat + 'downcase + (org-split-string counter) "-"))) + (seqno (1+ (or (plist-get org-odt-entity-counts-plist sequence-var) + 0))) + (label-props (list label category seqno label-style))) + (setq org-odt-entity-counts-plist + (plist-put org-odt-entity-counts-plist sequence-var seqno)) + (push label-props org-odt-entity-labels-alist) + label-props)) + +(defun org-odt-format-label-definition (caption label category seqno label-style) + (assert label) + (format-spec + (cadr (assoc-string label-style org-odt-label-styles t)) + `((?e . ,category) + (?n . ,(org-odt-format-tags + '("" . "") + (format "%d" seqno) label category category)) + (?c . ,(or (and caption (concat ": " caption)) ""))))) + +(defun org-odt-format-label-reference (label category seqno label-style) + (assert label) + (save-match-data + (let* ((fmt (cddr (assoc-string label-style org-odt-label-styles t))) + (fmt1 (car fmt)) + (fmt2 (cadr fmt))) + (org-odt-format-tags + '("" + . "") + (format-spec fmt2 `((?e . ,category) + (?n . ,(format "%d" seqno)))) fmt1 label)))) + +(defun org-odt-fixup-label-references () + (goto-char (point-min)) + (while (re-search-forward + "[ \t\n]*" + nil t) + (let* ((label (match-string 1)) + (label-def (assoc label org-odt-entity-labels-alist)) + (rpl (and label-def + (apply 'org-odt-format-label-reference label-def)))) + (if rpl (replace-match rpl t t) + (org-lparse-warn + (format "Unable to resolve reference to label \"%s\"" label)))))) + +(defun org-odt-format-entity-caption (label caption category) + (or (and label + (apply 'org-odt-format-label-definition + caption (org-odt-add-label-definition label category))) + caption "")) + +(defun org-odt-format-tags (tag text &rest args) + (let ((prefix (when org-lparse-encode-pending "@")) + (suffix (when org-lparse-encode-pending "@"))) + (apply 'org-lparse-format-tags tag text prefix suffix args))) + +(defvar org-odt-manifest-file-entries nil) +(defun org-odt-init-outfile (filename) + (unless (executable-find "zip") + ;; Not at all OSes ship with zip by default + (error "Executable \"zip\" needed for creating OpenDocument files")) + + (let* ((outdir (make-temp-file + (format org-export-odt-tmpdir-prefix org-lparse-backend) t)) + (content-file (expand-file-name "content.xml" outdir))) + + ;; init conten.xml + (with-current-buffer (find-file-noselect content-file t)) + + ;; reset variables + (setq org-odt-manifest-file-entries nil + org-odt-embedded-images-count 0 + org-odt-embedded-formulas-count 0 + org-odt-entity-labels-alist nil + org-odt-entity-counts-plist nil) + content-file)) + +(defcustom org-export-odt-prettify-xml nil + "Specify whether or not the xml output should be prettified. +When this option is turned on, `indent-region' is run on all +component xml buffers before they are saved. Turn this off for +regular use. Turn this on if you need to examine the xml +visually." + :group 'org-export-odt + :type 'boolean) + +(defvar hfy-user-sheet-assoc) ; bound during org-do-lparse +(defun org-odt-save-as-outfile (target opt-plist) + ;; write meta file + (org-odt-update-meta-file opt-plist) + + ;; write styles file + (when (equal org-lparse-backend 'odt) + (org-odt-update-styles-file opt-plist)) + + ;; create mimetype file + (let ((mimetype (org-odt-write-mimetype-file org-lparse-backend))) + (org-odt-create-manifest-file-entry mimetype "/" "1.2")) + + ;; create a manifest entry for content.xml + (org-odt-create-manifest-file-entry "text/xml" "content.xml") + + ;; write out the manifest entries before zipping + (org-odt-write-manifest-file) + + (let ((xml-files '("mimetype" "META-INF/manifest.xml" "content.xml" + "meta.xml")) + (zipdir default-directory)) + (when (equal org-lparse-backend 'odt) + (push "styles.xml" xml-files)) + (message "Switching to directory %s" (expand-file-name zipdir)) + + ;; save all xml files + (mapc (lambda (file) + (with-current-buffer + (find-file-noselect (expand-file-name file) t) + ;; prettify output if needed + (when org-export-odt-prettify-xml + (indent-region (point-min) (point-max))) + (save-buffer 0))) + xml-files) + + (let* ((target-name (file-name-nondirectory target)) + (target-dir (file-name-directory target)) + (cmds `(("zip" "-mX0" ,target-name "mimetype") + ("zip" "-rmTq" ,target-name ".")))) + (when (file-exists-p target) + ;; FIXME: If the file is locked this throws a cryptic error + (delete-file target)) + + (let ((coding-system-for-write 'no-conversion) exitcode err-string) + (message "Creating odt file...") + (mapc + (lambda (cmd) + (message "Running %s" (mapconcat 'identity cmd " ")) + (setq err-string + (with-output-to-string + (setq exitcode + (apply 'call-process (car cmd) + nil standard-output nil (cdr cmd))))) + (or (zerop exitcode) + (ignore (message "%s" err-string)) + (error "Unable to create odt file (%S)" exitcode))) + cmds)) + + ;; move the file from outdir to target-dir + (rename-file target-name target-dir) + + ;; kill all xml buffers + (mapc (lambda (file) + (kill-buffer + (find-file-noselect (expand-file-name file zipdir) t))) + xml-files) + + (delete-directory zipdir))) + (message "Created %s" target) + (set-buffer (find-file-noselect target t))) + +(defconst org-odt-manifest-file-entry-tag + " +") + +(defun org-odt-create-manifest-file-entry (&rest args) + (push args org-odt-manifest-file-entries)) + +(defun org-odt-write-manifest-file () + (make-directory "META-INF") + (let ((manifest-file (expand-file-name "META-INF/manifest.xml"))) + (with-current-buffer + (find-file-noselect manifest-file t) + (insert + " + \n") + (mapc + (lambda (file-entry) + (let* ((version (nth 2 file-entry)) + (extra (if version + (format " manifest:version=\"%s\"" version) + ""))) + (insert + (format org-odt-manifest-file-entry-tag + (nth 0 file-entry) (nth 1 file-entry) extra)))) + org-odt-manifest-file-entries) + (insert "\n")))) + +(defun org-odt-update-meta-file (opt-plist) + (let ((date (org-odt-format-date (plist-get opt-plist :date))) + (author (or (plist-get opt-plist :author) "")) + (email (plist-get opt-plist :email)) + (keywords (plist-get opt-plist :keywords)) + (description (plist-get opt-plist :description)) + (title (plist-get opt-plist :title))) + (write-region + (concat + " + + " "\n" + (org-odt-format-author) + (org-odt-format-tags + '("\n" . "") author) + (org-odt-format-tags '("\n" . "") date) + (org-odt-format-tags + '("\n" . "") date) + (org-odt-format-tags '("\n" . "") + (when org-export-creator-info + (format "Org-%s/Emacs-%s" + org-version emacs-version))) + (org-odt-format-tags '("\n" . "") keywords) + (org-odt-format-tags '("\n" . "") description) + (org-odt-format-tags '("\n" . "") title) + "\n" + " " "") + nil (expand-file-name "meta.xml"))) + + ;; create a manifest entry for meta.xml + (org-odt-create-manifest-file-entry "text/xml" "meta.xml")) + +(defun org-odt-update-styles-file (opt-plist) + ;; write styles file + (let ((styles-file (plist-get opt-plist :odt-styles-file))) + (org-odt-copy-styles-file (and styles-file + (read (org-trim styles-file))))) + + ;; Update styles.xml - take care of outline numbering + (with-current-buffer + (find-file-noselect (expand-file-name "styles.xml") t) + ;; Don't make automatic backup of styles.xml file. This setting + ;; prevents the backedup styles.xml file from being zipped in to + ;; odt file. This is more of a hackish fix. Better alternative + ;; would be to fix the zip command so that the output odt file + ;; includes only the needed files and excludes any auto-generated + ;; extra files like backups and auto-saves etc etc. Note that + ;; currently the zip command zips up the entire temp directory so + ;; that any auto-generated files created under the hood ends up in + ;; the resulting odt file. + (set (make-local-variable 'backup-inhibited) t) + + ;; Import local setting of `org-export-with-section-numbers' + (org-lparse-bind-local-variables opt-plist) + (org-odt-configure-outline-numbering + (if org-export-with-section-numbers org-export-headline-levels 0))) + + ;; Write custom stlyes for source blocks + (org-odt-insert-custom-styles-for-srcblocks + (mapconcat + (lambda (style) + (format " %s\n" (cddr style))) + hfy-user-sheet-assoc ""))) + +(defun org-odt-write-mimetype-file (format) + ;; create mimetype file + (let ((mimetype + (case format + (odt "application/vnd.oasis.opendocument.text") + (odf "application/vnd.oasis.opendocument.formula") + (t (error "Unknown OpenDocument backend %S" org-lparse-backend))))) + (write-region mimetype nil (expand-file-name "mimetype")) + mimetype)) + +(defun org-odt-finalize-outfile () + (org-odt-delete-empty-paragraphs)) + +(defun org-odt-delete-empty-paragraphs () + (goto-char (point-min)) + (let ((open "]*>") + (close "")) + (while (re-search-forward (format "%s[ \r\n\t]*%s" open close) nil t) + (replace-match "")))) + +(defcustom org-export-odt-convert-processes + '(("BasicODConverter" + ("soffice" "-norestore" "-invisible" "-headless" + "\"macro:///BasicODConverter.Main.Convert(%I,%f,%O)\"")) + ("unoconv" + ("unoconv" "-f" "%f" "-o" "%d" "%i"))) + "Specify a list of document converters and their usage. +The converters in this list are offered as choices while +customizing `org-export-odt-convert-process'. + +This variable is an alist where each element is of the +form (CONVERTER-NAME CONVERTER-PROCESS). CONVERTER-NAME is name +of the converter. CONVERTER-PROCESS specifies the command-line +syntax of the converter and is of the form (CONVERTER-PROGRAM +ARG1 ARG2 ...). CONVERTER-PROGRAM is the name of the executable. +ARG1, ARG2 etc are command line options that are passed to +CONVERTER-PROGRAM. Format specifiers can be used in the ARGs and +they are interpreted as below: + +%i input file name in full +%I input file name as a URL +%f format of the output file +%o output file name in full +%O output file name as a URL +%d output dir in full +%D output dir as a URL." + :group 'org-export-odt + :type + '(choice + (const :tag "None" nil) + (alist :tag "Converters" + :key-type (string :tag "Converter Name") + :value-type (group (cons (string :tag "Executable") + (repeat (string :tag "Command line args"))))))) + +(defcustom org-export-odt-convert-process nil + "Use this converter to convert from \"odt\" format to other formats. +During customization, the list of converter names are populated +from `org-export-odt-convert-processes'." + :group 'org-export-odt + :type '(choice :convert-widget + (lambda (w) + (apply 'widget-convert (widget-type w) + (eval (car (widget-get w :args))))) + `((const :tag "None" nil) + ,@(mapcar (lambda (c) + `(const :tag ,(car c) ,(car c))) + org-export-odt-convert-processes)))) + +(defcustom org-export-odt-convert-capabilities + '(("Text" + ("odt" "ott" "doc" "rtf") + (("pdf" "pdf") ("odt" "odt") ("xhtml" "html") ("rtf" "rtf") + ("ott" "ott") ("doc" "doc") ("ooxml" "xml") ("html" "html"))) + ("Web" + ("html" "xhtml") (("pdf" "pdf") ("odt" "txt") ("html" "html"))) + ("Spreadsheet" + ("ods" "ots" "xls" "csv") + (("pdf" "pdf") ("ots" "ots") ("html" "html") ("csv" "csv") + ("ods" "ods") ("xls" "xls") ("xhtml" "xhtml") ("ooxml" "xml"))) + ("Presentation" + ("odp" "otp" "ppt") + (("pdf" "pdf") ("swf" "swf") ("odp" "odp") ("xhtml" "xml") + ("otp" "otp") ("ppt" "ppt") ("odg" "odg") ("html" "html")))) + "Specify input and output formats of `org-export-odt-convert-process'. +More correctly, specify the set of input and output formats that +the user is actually interested in. + +This variable is an alist where each element is of the +form (DOCUMENT-CLASS INPUT-FMT-LIST OUTPUT-FMT-ALIST). +INPUT-FMT-LIST is a list of INPUT-FMTs. OUTPUT-FMT-ALIST is an +alist where each element is of the form (OUTPUT-FMT +OUTPUT-FILE-EXTENSION). + +The variable is interpreted as follows: +`org-export-odt-convert-process' can take any document that is in +INPUT-FMT-LIST and produce any document that is in the +OUTPUT-FMT-LIST. A document converted to OUTPUT-FMT will have +OUTPUT-FILE-EXTENSION as the file name extension. OUTPUT-FMT +serves dual purposes: +- It is used for populating completion candidates during + `org-export-odt-convert' commands. +- It is used as the value of \"%f\" specifier in + `org-export-odt-convert-process'. + +DOCUMENT-CLASS is used to group a set of file formats in +INPUT-FMT-LIST in to a single class. + +Note that this variable inherently captures how LibreOffice based +converters work. LibreOffice maps documents of various formats +to classes like Text, Web, Spreadsheet, Presentation etc and +allow document of a given class (irrespective of it's source +format) to be converted to any of the export formats associated +with that class. + +See default setting of this variable for an typical +configuration." + :group 'org-export-odt + :type + '(choice + (const :tag "None" nil) + (alist :key-type (string :tag "Document Class") + :value-type + (group (repeat :tag "Input formats" (string :tag "Input format")) + (alist :tag "Output formats" + :key-type (string :tag "Output format") + :value-type + (group (string :tag "Output file extension"))))))) + +(declare-function org-create-math-formula "org" + (latex-frag &optional mathml-file)) + +;;;###autoload +(defun org-export-odt-convert (&optional in-file out-fmt prefix-arg) + "Convert IN-FILE to format OUT-FMT using a command line converter. +IN-FILE is the file to be converted. If unspecified, it defaults +to variable `buffer-file-name'. OUT-FMT is the desired output +format. Use `org-export-odt-convert-process' as the converter. +If PREFIX-ARG is non-nil then the newly converted file is opened +using `org-open-file'." + (interactive + (append (org-lparse-convert-read-params) current-prefix-arg)) + (org-lparse-do-convert in-file out-fmt prefix-arg)) + +(defun org-odt-get (what &optional opt-plist) + (case what + (BACKEND 'odt) + (EXPORT-DIR (org-export-directory :html opt-plist)) + (FILE-NAME-EXTENSION "odt") + (EXPORT-BUFFER-NAME "*Org ODT Export*") + (ENTITY-CONTROL org-odt-entity-control-callbacks-alist) + (ENTITY-FORMAT org-odt-entity-format-callbacks-alist) + (INIT-METHOD 'org-odt-init-outfile) + (FINAL-METHOD 'org-odt-finalize-outfile) + (SAVE-METHOD 'org-odt-save-as-outfile) + (CONVERT-METHOD + (and org-export-odt-convert-process + (cadr (assoc-string org-export-odt-convert-process + org-export-odt-convert-processes t)))) + (CONVERT-CAPABILITIES + (and org-export-odt-convert-process + (cadr (assoc-string org-export-odt-convert-process + org-export-odt-convert-processes t)) + org-export-odt-convert-capabilities)) + (TOPLEVEL-HLEVEL 1) + (SPECIAL-STRING-REGEXPS org-export-odt-special-string-regexps) + (INLINE-IMAGES 'maybe) + (INLINE-IMAGE-EXTENSIONS '("png" "jpeg" "jpg" "gif" "svg")) + (PLAIN-TEXT-MAP '(("&" . "&") ("<" . "<") (">" . ">"))) + (TABLE-FIRST-COLUMN-AS-LABELS nil) + (FOOTNOTE-SEPARATOR (org-lparse-format 'FONTIFY "," 'superscript)) + (CODING-SYSTEM-FOR-WRITE 'utf-8) + (CODING-SYSTEM-FOR-SAVE 'utf-8) + (t (error "Unknown property: %s" what)))) + +(defvar org-lparse-latex-fragment-fallback) ; set by org-do-lparse +(defun org-export-odt-do-preprocess-latex-fragments () + "Convert LaTeX fragments to images." + (let* ((latex-frag-opt (plist-get org-lparse-opt-plist :LaTeX-fragments)) + (latex-frag-opt ; massage the options + (or (and (member latex-frag-opt '(mathjax t)) + (not (and (fboundp 'org-format-latex-mathml-available-p) + (org-format-latex-mathml-available-p))) + (prog1 org-lparse-latex-fragment-fallback + (org-lparse-warn + (concat + "LaTeX to MathML converter not available. " + (format "Using %S instead." + org-lparse-latex-fragment-fallback))))) + latex-frag-opt)) + cache-dir display-msg) + (cond + ((eq latex-frag-opt 'dvipng) + (setq cache-dir "ltxpng/") + (setq display-msg "Creating LaTeX image %s")) + ((member latex-frag-opt '(mathjax t)) + (setq latex-frag-opt 'mathml) + (setq cache-dir "ltxmathml/") + (setq display-msg "Creating MathML formula %s"))) + (when (and org-current-export-file) + (org-format-latex + (concat cache-dir (file-name-sans-extension + (file-name-nondirectory org-current-export-file))) + org-current-export-dir nil display-msg + nil nil latex-frag-opt)))) + +(defadvice org-format-latex-as-mathml + (after org-odt-protect-latex-fragment activate) + "Encode LaTeX fragment as XML. +Do this when translation to MathML fails." + (when (or (not (> (length ad-return-value) 0)) + (get-text-property 0 'org-protected ad-return-value)) + (setq ad-return-value + (org-propertize (org-odt-encode-plain-text (ad-get-arg 0)) + 'org-protected t)))) + +(defun org-export-odt-preprocess-latex-fragments () + (when (equal org-export-current-backend 'odt) + (org-export-odt-do-preprocess-latex-fragments))) + +(defun org-export-odt-preprocess-label-references () + (goto-char (point-min)) + (let (label label-components category value pretty-label) + (while (re-search-forward "\\\\ref{\\([^{}\n]+\\)}" nil t) + (org-if-unprotected-at (match-beginning 1) + (replace-match + (let ((org-lparse-encode-pending t) + (label (match-string 1))) + ;; markup generated below is mostly an eye-candy. At + ;; pre-processing stage, there is no information on which + ;; entity a label reference points to. The actual markup + ;; is generated as part of `org-odt-fixup-label-references' + ;; which gets called at the fag end of export. By this + ;; time we would have seen and collected all the label + ;; definitions in `org-odt-entity-labels-alist'. + (org-odt-format-tags + '("" . + "") + "" (org-add-props label '(org-protected t)))) t t))))) + +;; process latex fragments as part of +;; `org-export-preprocess-after-blockquote-hook'. Note that this hook +;; is the one that is closest and well before the call to +;; `org-export-attach-captions-and-attributes' in +;; `org-export-preprocess-stirng'. The above arrangement permits +;; captions, labels and attributes to be attached to png images +;; generated out of latex equations. +(add-hook 'org-export-preprocess-after-blockquote-hook + 'org-export-odt-preprocess-latex-fragments) + +(defun org-export-odt-preprocess (parameters) + (org-export-odt-preprocess-label-references)) + +(declare-function archive-zip-extract "arc-mode.el" (archive name)) +(defun org-odt-zip-extract-one (archive member &optional target) + (require 'arc-mode) + (let* ((target (or target default-directory)) + (archive (expand-file-name archive)) + (archive-zip-extract + (list "unzip" "-qq" "-o" "-d" target)) + exit-code command-output) + (setq command-output + (with-temp-buffer + (setq exit-code (archive-zip-extract archive member)) + (buffer-string))) + (unless (zerop exit-code) + (message command-output) + (error "Extraction failed")))) + +(defun org-odt-zip-extract (archive members &optional target) + (when (atom members) (setq members (list members))) + (mapc (lambda (member) + (org-odt-zip-extract-one archive member target)) + members)) + +(defun org-odt-copy-styles-file (&optional styles-file) + ;; Non-availability of styles.xml is not a critical error. For now + ;; throw an error purely for aesthetic reasons. + (setq styles-file (or styles-file + org-export-odt-styles-file + (expand-file-name "OrgOdtStyles.xml" + org-odt-styles-dir) + (error "org-odt: Missing styles file?"))) + (cond + ((listp styles-file) + (let ((archive (nth 0 styles-file)) + (members (nth 1 styles-file))) + (org-odt-zip-extract archive members) + (mapc + (lambda (member) + (when (org-file-image-p member) + (let* ((image-type (file-name-extension member)) + (media-type (format "image/%s" image-type))) + (org-odt-create-manifest-file-entry media-type member)))) + members))) + ((and (stringp styles-file) (file-exists-p styles-file)) + (let ((styles-file-type (file-name-extension styles-file))) + (cond + ((string= styles-file-type "xml") + (copy-file styles-file "styles.xml" t)) + ((member styles-file-type '("odt" "ott")) + (org-odt-zip-extract styles-file "styles.xml"))))) + (t + (error (format "Invalid specification of styles.xml file: %S" + org-export-odt-styles-file)))) + + ;; create a manifest entry for styles.xml + (org-odt-create-manifest-file-entry "text/xml" "styles.xml")) + +(defvar org-export-odt-factory-settings + "d4328fb9d1b6cb211d4320ff546829f26700dc5e" + "SHA1 hash of OrgOdtStyles.xml.") + +(defun org-odt-configure-outline-numbering (level) + "Outline numbering is retained only upto LEVEL. +To disable outline numbering pass a LEVEL of 0." + (goto-char (point-min)) + (let ((regex + "]*\\)text:level=\"\\([^\"]*\\)\"\\([^>]*\\)>") + (replacement + "")) + (while (re-search-forward regex nil t) + (when (> (string-to-number (match-string 2)) level) + (replace-match replacement t nil)))) + (save-buffer 0)) + +;;;###autoload +(defun org-export-as-odf (latex-frag &optional odf-file) + "Export LATEX-FRAG as OpenDocument formula file ODF-FILE. +Use `org-create-math-formula' to convert LATEX-FRAG first to +MathML. When invoked as an interactive command, use +`org-latex-regexps' to infer LATEX-FRAG from currently active +region. If no LaTeX fragments are found, prompt for it. Push +MathML source to kill ring, if `org-export-copy-to-kill-ring' is +non-nil." + (interactive + `(,(let (frag) + (setq frag (and (setq frag (and (region-active-p) + (buffer-substring (region-beginning) + (region-end)))) + (loop for e in org-latex-regexps + thereis (when (string-match (nth 1 e) frag) + (match-string (nth 2 e) frag))))) + (read-string "LaTeX Fragment: " frag nil frag)) + ,(let ((odf-filename (expand-file-name + (concat + (file-name-sans-extension + (or (file-name-nondirectory buffer-file-name))) + "." "odf") + (file-name-directory buffer-file-name)))) + (message "default val is %s" odf-filename) + (read-file-name "ODF filename: " nil odf-filename nil + (file-name-nondirectory odf-filename))))) + (let* ((org-lparse-backend 'odf) + org-lparse-opt-plist + (filename (or odf-file + (expand-file-name + (concat + (file-name-sans-extension + (or (file-name-nondirectory buffer-file-name))) + "." "odf") + (file-name-directory buffer-file-name)))) + (buffer (find-file-noselect (org-odt-init-outfile filename))) + (coding-system-for-write 'utf-8) + (save-buffer-coding-system 'utf-8)) + (set-buffer buffer) + (set-buffer-file-coding-system coding-system-for-write) + (let ((mathml (org-create-math-formula latex-frag))) + (unless mathml (error "No Math formula created")) + (insert mathml) + (or (org-export-push-to-kill-ring + (upcase (symbol-name org-lparse-backend))) + (message "Exporting... done"))) + (org-odt-save-as-outfile filename nil))) + +;;;###autoload +(defun org-export-as-odf-and-open () + "Export LaTeX fragment as OpenDocument formula and immediately open it. +Use `org-export-as-odf' to read LaTeX fragment and OpenDocument +formula file." + (interactive) + (org-lparse-and-open + nil nil nil (call-interactively 'org-export-as-odf))) + +(provide 'org-odt) + +;;; org-odt.el ends here diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index cede736d929..44c51f95a5a 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -6,7 +6,6 @@ ;; John Wiegley ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -276,6 +275,4 @@ Complete a language in the first field, the header arguments and switches." (provide 'org-pcomplete) - - ;;; org-pcomplete.el ends here diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 419467226c9..6238d49c3c6 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -5,7 +5,6 @@ ;; Author: Eric Schulte ;; Keywords: tables, plotting ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -136,7 +135,7 @@ Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE." "Export the data in TABLE to DATA-FILE for gnuplot. This means in a format appropriate for grid plotting by gnuplot. PARAMS specifies which columns of TABLE should be plotted as independent -and dependent variables." +and dependant variables." (interactive) (let* ((ind (- (plist-get params :ind) 1)) (deps (if (plist-member params :deps) @@ -350,5 +349,4 @@ line directly before or after the table." (provide 'org-plot) - ;;; org-plot.el ends here diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index bbb93b07fc9..8bda9556ab5 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -1,14 +1,14 @@ ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions. ;; -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 +;; Free Software Foundation, Inc. ;; -;; Author: Bastien Guerry +;; Author: Bastien Guerry ;; Author: Daniel M German ;; Author: Sebastian Rose ;; Author: Ross Patterson ;; Maintainer: Sebastian Rose ;; Keywords: org, emacsclient, wp -;; Version: 7.7 ;; This file is part of GNU Emacs. ;; @@ -145,8 +145,8 @@ (defgroup org-protocol nil "Intercept calls from emacsclient to trigger custom actions. -This is done by advising `server-visit-files' to scan the list of filenames -for `org-protocol-the-protocol' and sub-protocols defined in +This is done by advising `server-visit-files' to scann the list of filenames +for `org-protocol-the-protocol' and sub-procols defined in `org-protocol-protocol-alist' and `org-protocol-protocol-alist-default'." :version "22.1" :group 'convenience @@ -644,5 +644,4 @@ project-plist is the CDR of an element in `org-publish-project-alist', reuse (provide 'org-protocol) - ;;; org-protocol.el ends here diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index 7a0d7b56e22..228666b9724 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el @@ -1,10 +1,9 @@ ;;; org-publish.el --- publish related org-mode files as a website -;; Copyright (C) 2006-2011 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: David O'Toole ;; Maintainer: Carsten Dominik ;; Keywords: hypermedia, outlines, wp -;; Version: 7.7 ;; This file is part of GNU Emacs. ;; @@ -191,7 +190,7 @@ sitemap of files or summary page for a given project. display folders first or last, respectively. Any other value will mix files and folders. :sitemap-sort-files The site map is normally sorted alphabetically. - You can change this behavior setting this to + You can change this behaviour setting this to `chronologically', `anti-chronologically' or nil. :sitemap-ignore-case Should sorting be case-sensitive? Default nil. @@ -278,12 +277,12 @@ in the sitemap." :type 'string) (defcustom org-publish-sitemap-file-entry-format "%t" - "How a sitemap file entry is formatted. + "How a sitemap file entry is formated. You could use brackets to delimit on what part the link will be. %t is the title. %a is the author. -%d is the date formatted using `org-publish-sitemap-date-format'." +%d is the date formated using `org-publish-sitemap-date-format'." :group 'org-publish :type 'string) @@ -369,6 +368,8 @@ This is a compatibility function for Emacsen without `delete-dups'." (declare-function org-publish-delete-dups "org-publish" (list)) (declare-function find-lisp-find-files "find-lisp" (directory regexp)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Getting project information out of org-publish-project-alist @@ -559,7 +560,7 @@ PUB-DIR is the publishing directory." (make-directory pub-dir t)) (let ((visiting (find-buffer-visiting filename))) (save-excursion - (switch-to-buffer (or visiting (find-file filename))) + (org-pop-to-buffer-same-window (or visiting (find-file filename))) (let* ((plist (cons :buffer-will-be-killed (cons t plist))) (init-buf (current-buffer)) (init-point (point)) @@ -599,6 +600,7 @@ PUB-DIR is the publishing directory." org-export-preprocess-after-headline-targets-hook) org-export-preprocess-after-headline-targets-hook))) ,@body)) +(def-edebug-spec org-publish-with-aux-preprocess-maybe (body)) (defvar project-plist) (defun org-publish-org-to-latex (plist filename pub-dir) @@ -682,7 +684,7 @@ See `org-publish-projects'." (pub-dir (file-name-as-directory (file-truename - (or (plist-get project-plist :publishing-directory) + (or (eval (plist-get project-plist :publishing-directory)) (error "Project %s does not have :publishing-directory defined" (car project)))))) tmp-pub-dir) @@ -860,7 +862,7 @@ system's modification time. It returns time in `current-time' format." (let ((visiting (find-buffer-visiting file))) (save-excursion - (switch-to-buffer (or visiting (find-file-noselect file nil t))) + (org-pop-to-buffer-same-window (or visiting (find-file-noselect file nil t))) (let* ((plist (org-infile-export-plist)) (date (plist-get plist :date))) (unless visiting @@ -982,7 +984,9 @@ the project." main last-main letter last-letter file sub link tgext) ;; `files' contains the list of relative file names (dolist (file files) - (setq origfile (substring file 1 -1)) + (setq origfile + (concat (file-name-directory file) + (substring (file-name-nondirectory file) 1 -1))) (setq buf (find-file-noselect file)) (with-current-buffer buf (goto-char (point-min)) @@ -993,7 +997,7 @@ the project." (kill-buffer buf)) (setq index (sort index (lambda (a b) (string< (downcase (car a)) (downcase (car b)))))) - (setq ibuffer (find-file-noselect (expand-file-name "theindex.org" directory))) + (setq ibuffer (find-file-noselect (expand-file-name "theindex.inc" directory))) (with-current-buffer ibuffer (erase-buffer) (insert "* Index\n") @@ -1020,7 +1024,16 @@ the project." (insert " - " link "\n") (insert " - " link "\n"))) (save-buffer)) - (kill-buffer ibuffer))) + (kill-buffer ibuffer) + ;; Create theindex.org if it doesn't exist already + (let ((index-file (expand-file-name "theindex.org" directory))) + (unless (file-exists-p index-file) + (setq ibuffer (find-file-noselect index-file)) + (with-current-buffer ibuffer + (erase-buffer) + (insert "\n\n#+include: \"theindex.inc\"\n\n") + (save-buffer)) + (kill-buffer ibuffer))))) ;; Caching functions: @@ -1103,7 +1116,7 @@ so that the file including them will be republished as well." (setq buf (find-file (expand-file-name filename))) (with-current-buffer buf (goto-char (point-min)) - (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\"]*\\)\"?[ \t]*.*$" nil t) + (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\n\r\"]*\\)\"?[ \t]*.*$" nil t) (let* ((included-file (expand-file-name (match-string 1)))) (add-to-list 'included-files-ctime (org-publish-cache-ctime-of-src included-file) t)))) @@ -1114,7 +1127,7 @@ so that the file including them will be republished as well." (let ((ctime (org-publish-cache-ctime-of-src filename))) (or (< pstamp ctime) (when included-files-ctime - (not (null (delq nil (mapcar (lambda(ct) (< ctime ct)) + (not (null (delq nil (mapcar (lambda(ct) (< ctime ct)) included-files-ctime)))))))))) (defun org-publish-cache-set-file-property (filename property value &optional project-name) @@ -1180,6 +1193,4 @@ Returns value on success, else nil." (provide 'org-publish) - - ;;; org-publish.el ends here diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index 8819f416f1d..f56b0723dbf 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el @@ -1,11 +1,10 @@ ;;; org-remember.el --- Fast note taking in Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -40,6 +39,8 @@ (declare-function remember "remember" (&optional initial)) (declare-function remember-buffer-desc "remember" ()) (declare-function remember-finalize "remember" ()) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) (defvar remember-save-after-remembering) (defvar remember-register) @@ -63,7 +64,7 @@ and `org-remember-default-headline'. To force prompting anyway, use \\[universal-argument] \\[org-remember-finalize] to file the note. When this variable is nil, \\[org-remember-finalize] gives you the prompts, and -\\[universal-argument] \\[org-remember-finalize] triggers the fast track." +\\[universal-argument] \\[org-remember-finalize] triggers the fasttrack." :group 'org-remember :type 'boolean) @@ -786,7 +787,7 @@ The user is queried for the template." (setq heading org-remember-default-headline)) (setq visiting (org-find-base-buffer-visiting file)) (if (not visiting) (find-file-noselect file)) - (switch-to-buffer (or visiting (get-file-buffer file))) + (org-pop-to-buffer-same-window (or visiting (get-file-buffer file))) (widen) (goto-char (point-min)) (if (re-search-forward @@ -942,7 +943,7 @@ See also the variable `org-reverse-note-order'." (throw 'quit t)) ;; Find the file (with-current-buffer (or visiting (find-file-noselect file)) - (unless (or (org-mode-p) (member heading '(top bottom))) + (unless (or (eq major-mode 'org-mode) (member heading '(top bottom))) (error "Target files for notes must be in Org-mode if not filing to top/bottom")) (save-excursion (save-restriction @@ -952,7 +953,7 @@ See also the variable `org-reverse-note-order'." ;; Find the default location (when heading (cond - ((not (org-mode-p)) + ((not (eq major-mode 'org-mode)) (if (eq heading 'top) (goto-char (point-min)) (goto-char (point-max)) @@ -1013,7 +1014,7 @@ See also the variable `org-reverse-note-order'." ; not handle this note (and visitp (run-with-idle-timer 0.01 nil 'org-remember-visit-immediately)) (goto-char spos) - (cond ((org-on-heading-p t) + (cond ((org-at-heading-p t) (org-back-to-heading t) (setq level (funcall outline-level)) (cond @@ -1122,7 +1123,7 @@ See also the variable `org-reverse-note-order'." (condition-case nil (require 'remember) (error - ;; Let's install our own micro version of remember + ;; Lets install our own micro version of remember (defvar remember-register ?R) (defvar remember-mode-hook nil) (defvar remember-handler-functions nil) @@ -1150,6 +1151,5 @@ See also the variable `org-reverse-note-order'." (provide 'org-remember) - - ;;; org-remember.el ends here + diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el index 1169c206981..0437ce32ff1 100644 --- a/lisp/org/org-rmail.el +++ b/lisp/org/org-rmail.el @@ -1,11 +1,10 @@ ;;; org-rmail.el --- Support for links to Rmail messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -114,6 +113,4 @@ (provide 'org-rmail) - - ;;; org-rmail.el ends here diff --git a/lisp/org/org-special-blocks.el b/lisp/org/org-special-blocks.el index c09b27de895..86caa4d4f09 100644 --- a/lisp/org/org-special-blocks.el +++ b/lisp/org/org-special-blocks.el @@ -1,6 +1,4 @@ -;;; org-special-blocks.el --- Turn blocks into LaTeX envs and HTML divs - -;; Copyright (C) 2009, 2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Chris Gray @@ -38,8 +36,12 @@ ;; user to add this class to his or her stylesheet if this div is to ;; mean anything. +(require 'org-html) (require 'org-compat) +(declare-function org-open-par "org-html" ()) +(declare-function org-close-par-maybe "org-html" ()) + (defvar org-special-blocks-ignore-regexp "^\\(LaTeX\\|HTML\\)$" "A regexp indicating the names of blocks that should be ignored by org-special-blocks. These blocks will presumably be @@ -82,11 +84,15 @@ seen. This is run after a few special cases are taken care of." "Converts the special cookies into div blocks." ;; Uses the dynamically-bound variable `line'. (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line) -; (org-close-par-maybe) (message "%s" (match-string 1)) - (if (equal (match-string 2 line) "START") - (insert "
    \n") - (insert "
    \n")) + (when (equal (match-string 2 line) "START") + (org-close-par-maybe) + (insert "\n
    ") + (org-open-par)) + (when (equal (match-string 2 line) "END") + (org-close-par-maybe) + (insert "\n
    ") + (org-open-par)) (throw 'nextline nil))) (add-hook 'org-export-html-after-blockquotes-hook diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 5de55fa455f..d605fb75251 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -1,13 +1,12 @@ ;;; org-src.el --- Source code examples in Org ;; -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik -;; Bastien Guerry +;; Bastien Guerry ;; Dan Davison ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -42,6 +41,8 @@ (declare-function org-at-table.el-p "org" ()) (declare-function org-get-indentation "org" (&optional line)) (declare-function org-switch-to-buffer-other-window "org" (&rest args)) +(declare-function org-pop-to-buffer-same-window + "org-compat" (&optional buffer-or-name norecord label)) (defcustom org-edit-src-region-extra nil "Additional regexps to identify regions for editing with `org-edit-src-code'. @@ -152,7 +153,7 @@ but which mess up the display of a snippet in Org exported files.") (defcustom org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) - ("calc" . fundamental) ("C" . c)) + ("calc" . fundamental) ("C" . c) ("cpp" . c++)) "Alist mapping languages to their major mode. The key is the language name, the value is the string that should be inserted as the name of the major mode. For many languages this is @@ -214,7 +215,7 @@ buffer." (case-fold-search t) (info (org-edit-src-find-region-and-lang)) (full-info (org-babel-get-src-block-info)) - (org-mode-p (or (org-mode-p) (derived-mode-p 'org-mode))) + (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive (beg (make-marker)) (end (make-marker)) (allow-write-back-p (null code)) @@ -305,7 +306,7 @@ buffer." (error "Language mode `%s' fails with: %S" lang-f (nth 1 e))))) (dolist (pair transmitted-variables) (org-set-local (car pair) (cadr pair))) - (when org-mode-p + (when (eq major-mode 'org-mode) (goto-char (point-min)) (while (re-search-forward "^," nil t) (if (eq (org-current-line) line) (setq total-nindent (1+ total-nindent))) @@ -339,7 +340,7 @@ buffer." (defun org-src-switch-to-buffer (buffer context) (case org-src-window-setup ('current-window - (switch-to-buffer buffer)) + (org-pop-to-buffer-same-window buffer)) ('other-window (switch-to-buffer-other-window buffer)) ('other-frame @@ -350,7 +351,7 @@ buffer." (delete-frame frame))) ('save (kill-buffer (current-buffer)) - (switch-to-buffer buffer)) + (org-pop-to-buffer-same-window buffer)) (t (switch-to-buffer-other-frame buffer)))) ('reorganize-frame @@ -362,7 +363,7 @@ buffer." (t (message "Invalid value %s for org-src-window-setup" (symbol-name org-src-window-setup)) - (switch-to-buffer buffer)))) + (org-pop-to-buffer-same-window buffer)))) (defun org-src-construct-edit-buffer-name (org-buffer-name lang) "Construct the buffer name for a source editing buffer." @@ -397,7 +398,7 @@ the fragment in the Org-mode buffer." (case-fold-search t) (msg (substitute-command-keys "Edit, then exit with C-c ' (C-c and single quote)")) - (org-mode-p (org-mode-p)) + (org-mode-p (eq major-mode 'org-mode)) (beg (make-marker)) (end (make-marker)) (preserve-indentation org-src-preserve-indentation) @@ -422,7 +423,7 @@ the fragment in the Org-mode buffer." begline (save-excursion (goto-char beg) (org-current-line))) (if (and (setq buffer (org-edit-src-find-buffer beg end)) (y-or-n-p "Return to existing edit buffer? [n] will revert changes: ")) - (switch-to-buffer buffer) + (org-pop-to-buffer-same-window buffer) (when buffer (with-current-buffer buffer (if (boundp 'org-edit-src-overlay) @@ -442,7 +443,7 @@ the fragment in the Org-mode buffer." (define-key map [mouse-1] 'org-edit-src-continue) map)) (overlay-put ovl :read-only "Leave me alone") - (switch-to-buffer buffer) + (org-pop-to-buffer-same-window buffer) (insert code) (remove-text-properties (point-min) (point-max) '(display nil invisible nil intangible nil)) @@ -616,7 +617,7 @@ the language, a switch telling if the content should be in a single line." (when (org-bound-and-true-p org-edit-src-from-org-mode) (goto-char (point-min)) (while (re-search-forward - (if (org-mode-p) "^\\(.\\)" "^\\([*]\\|[ \t]*#\\+\\)") nil t) + (if (eq major-mode 'org-mode) "^\\(.\\)" "^\\([*]\\|[ \t]*#\\+\\)") nil t) (if (eq (org-current-line) line) (setq delta (1+ delta))) (replace-match ",\\1"))) (when (org-bound-and-true-p org-edit-src-picture) @@ -715,6 +716,7 @@ the language, a switch telling if the content should be in a single line." (with-current-buffer (marker-buffer beg-marker) (goto-char (marker-position beg-marker)) ,@body)))) +(def-edebug-spec org-src-do-at-code-block (body)) (defun org-src-do-key-sequence-at-code-block (&optional key) "Execute key sequence at code block in the source Org buffer. @@ -811,5 +813,4 @@ LANG is a string, and the returned major mode is a symbol." (provide 'org-src) - ;;; org-src.el ends here diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index cf28a5e80ae..3bb645bbd2b 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -1,11 +1,10 @@ ;;; org-table.el --- The table editor for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -51,7 +50,7 @@ (defvar orgtbl-after-send-table-hook nil "Hook for functions attaching to `C-c C-c', if the table is sent. This can be used to add additional functionality after the table is sent -to the receiver position, otherwise, if table is not sent, the functions +to the receiver position, othewise, if table is not sent, the functions are not run.") (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) @@ -242,6 +241,14 @@ days." (symbol :tag "Hours " 'hours) (symbol :tag "Days " 'days))) +(defcustom org-table-formula-field-format "%s" + "Format for fields which contain the result of a formula. +For example, using \"~%s~\" will display the result within tilde +characters. Beware that modifying the display can prevent the +field from being used in another formula." + :group 'org-table-settings + :type 'string) + (defcustom org-table-formula-evaluate-inline t "Non-nil means TAB and RET evaluate a formula in current table field. If the current field starts with an equal sign, it is assumed to be a formula @@ -816,23 +823,13 @@ When nil, simply write \"#ERROR\" in corrupted fields.") (append (pop fields) emptystrings)) hfmt)) lines "")) - (if (equal (char-before) ?\n) - ;; This hack is for org-indent, to force redisplay of the - ;; line prefix of the first line. Apparently the redisplay - ;; is tied to the newline, which is, I think, a bug. - ;; To force this redisplay, we remove and re-insert the - ;; newline, so that the redisplay engine thinks it belongs - ;; to the changed text. - (progn - (backward-delete-char 1) - (insert "\n"))) (move-marker org-table-aligned-begin-marker (point)) (insert new) ;; Replace the old one (delete-region (point) end) (move-marker end nil) (move-marker org-table-aligned-end-marker (point)) - (when (and orgtbl-mode (not (org-mode-p))) + (when (and orgtbl-mode (not (eq major-mode 'org-mode))) (goto-char org-table-aligned-begin-marker) (while (org-hide-wide-columns org-table-aligned-end-marker))) ;; Try to move to the old location @@ -1302,7 +1299,7 @@ However, when FORCE is non-nil, create new columns if necessary." (defun org-table-line-to-dline (line &optional above) "Turn a buffer line number into a data line number. If there is no data line in this line, return nil. -If there is no matching dline (most likely the reference was a hline), the +If there is no matchin dline (most likely te refrence was a hline), the first dline below it is used. When ABOVE is non-nil, the one above is used." (catch 'exit (let ((ll (length org-table-dlines)) @@ -1729,6 +1726,34 @@ blindly applies a recipe that works for simple tables." (replace-match "-+")) (goto-char beg))))) +(defun org-table-transpose-table-at-point () + "Transpose orgmode table at point and eliminate hlines. +So a table like + +| 1 | 2 | 4 | 5 | +|---+---+---+---| +| a | b | c | d | +| e | f | g | h | + +will be transposed as + +| 1 | a | e | +| 2 | b | f | +| 4 | c | g | +| 5 | d | h | + +Note that horizontal lines disappeared." + (interactive) + (let ((contents + (apply #'mapcar* #'list + ;; remove 'hline from list + (delq nil (mapcar (lambda (x) (when (listp x) x)) + (org-table-to-lisp)))))) + (delete-region (org-table-begin) (org-table-end)) + (insert (mapconcat (lambda(x) (concat "| " (mapconcat 'identity x " | " ) " |\n" )) + contents "")) + (org-table-align))) + (defun org-table-wrap-region (arg) "Wrap several fields in a column like a paragraph. This is useful if you'd like to spread the contents of a field over several @@ -2147,7 +2172,10 @@ For all numbers larger than LIMIT, shift them by DELTA." (when remove (while (re-search-forward re2 (point-at-eol) t) (unless (save-match-data (org-in-regexp "remote([^)]+?)")) - (replace-match "")))) + (if (equal (char-before (match-beginning 0)) ?.) + (error "Change makes TBLFM term %s invalid. Use undo to recover." + (match-string 0)) + (replace-match ""))))) (while (re-search-forward re (point-at-eol) t) (unless (save-match-data (org-in-regexp "remote([^)]+?)")) (setq s (match-string 1) n (string-to-number s)) @@ -2177,7 +2205,7 @@ For all numbers larger than LIMIT, shift them by DELTA." cnt 1) (while (setq name (pop names)) (setq cnt (1+ cnt)) - (if (string-match "^[a-zA-Z][a-zA-Z0-9]*$" name) + (if (string-match "^[a-zA-Z][_a-zA-Z0-9]*$" name) (push (cons name (int-to-string cnt)) org-table-column-names)))) (setq org-table-column-names (nreverse org-table-column-names)) (setq org-table-column-name-regexp @@ -2201,10 +2229,10 @@ For all numbers larger than LIMIT, shift them by DELTA." (while (and fields1 (setq field (pop fields))) (setq v (pop fields1) col (1+ col)) (when (and (stringp field) (stringp v) - (string-match "^[a-zA-Z][a-zA-Z0-9]*$" field)) + (string-match "^[a-zA-Z][_a-zA-Z0-9]*$" field)) (push (cons field v) org-table-local-parameters) (push (list field line col) org-table-named-field-locations)))) - ;; Analyze the line types + ;; Analyse the line types (goto-char beg) (setq org-table-current-begin-line (org-current-line) org-table-current-begin-pos (point) @@ -2408,7 +2436,8 @@ not overwrite the stored one." (modes (copy-sequence org-calc-default-modes)) (numbers nil) ; was a variable, now fixed default (keep-empty nil) - n form form0 formrpl formrg bw fmt x ev orig c lispp literal duration) + n form form0 formrpl formrg bw fmt x ev orig c lispp literal + duration duration-output-format) ;; Parse the format string. Since we have a lot of modes, this is ;; a lot of work. However, I think calc still uses most of the time. (if (string-match ";" formula) @@ -2432,7 +2461,7 @@ not overwrite the stored one." duration-output-format nil fmt (replace-match "" t t fmt))) (if (string-match "t" fmt) - (setq duration t + (setq duration t duration-output-format org-table-duration-custom-format numbers t fmt (replace-match "" t t fmt))) @@ -2500,7 +2529,7 @@ not overwrite the stored one." ;; Insert complex ranges (while (and (string-match org-table-range-regexp form) (> (length (match-string 0 form)) 1)) - (setq formrg (save-match-data + (setq formrg (save-match-data (org-table-get-range (match-string 0 form) nil n0))) (setq formrpl (save-match-data @@ -2579,7 +2608,8 @@ $1-> %s\n" orig formula form0 form)) (message ""))) (if (listp ev) (setq fmt nil ev "#ERROR")) (org-table-justify-field-maybe - (if fmt (format fmt (string-to-number ev)) ev)) + (format org-table-formula-field-format + (if fmt (format fmt (string-to-number ev)) ev))) (if (and down (> ndown 0) (looking-at ".*\n[ \t]*|[^-]")) (call-interactively 'org-return) (setq ndown 0))) @@ -2641,7 +2671,7 @@ in the buffer and column1 and column2 are table column numbers." (prog1 (org-trim (org-table-get-field c1)) (if highlight (org-table-highlight-rectangle (point) (point))))) ;; A range, return a vector - ;; First sort the numbers to get a regular rectangle + ;; First sort the numbers to get a regular ractangle (if (< r2 r1) (setq tmp r1 r1 r2 r2 tmp)) (if (< c2 c1) (setq tmp c1 c1 c2 c2 tmp)) (if corners-only @@ -2901,7 +2931,7 @@ known that the table will be realigned a little later anyway." (defun org-table-iterate (&optional arg) "Recalculate the table until it does not change anymore. -The maximum number of iterations is 10, but you can chose a different value +The maximun number of iterations is 10, but you can chose a different value with the prefix ARG." (interactive "P") (let ((imax (if arg (prefix-numeric-value arg) 10)) @@ -2962,7 +2992,7 @@ them to individual field equations for each field." ((string-match "^@-?[-+I0-9]+\\$-?[0-9]+$" lhs) ;; This just refers to one fixed field (push e res)) - ((string-match "^[a-zA-Z][a-zA-Z0-9]*$" lhs) + ((string-match "^[a-zA-Z][_a-zA-Z0-9]*$" lhs) ;; This just refers to one fixed named field (push e res)) ((string-match "^@[0-9]+$" lhs) @@ -2993,20 +3023,24 @@ when a line/row is swapped out of that privileged position. So for formulas that use a range of rows or columns, it may often be better to anchor the formula with \"I\" row markers, or to offset from the borders of the table using the @< @> $< $> makers." - (let (n nmax len char) - (while (string-match "\\([@$]\\)\\(<+\\|>+\\)" s) - (setq nmax (if (equal (match-string 1 s) "@") - (1- (length org-table-dlines)) - org-table-current-ncol) - len (- (match-end 2) (match-beginning 2)) - char (string-to-char (match-string 2 s)) - n (if (= char ?<) - len - (- nmax len -1))) - (if (or (< n 1) (> n nmax)) - (error "Reference \"%s\" in expression \"%s\" points outside table" - (match-string 0 s) s)) - (setq s (replace-match (format "%s%d" (match-string 1 s) n) t t s)))) + (let (n nmax len char (start 0)) + (while (string-match "\\([@$]\\)\\(<+\\|>+\\)\\|\\(remote([^\)]+)\\)" + s start) + (if (match-end 3) + (setq start (match-end 3)) + (setq nmax (if (equal (match-string 1 s) "@") + (1- (length org-table-dlines)) + org-table-current-ncol) + len (- (match-end 2) (match-beginning 2)) + char (string-to-char (match-string 2 s)) + n (if (= char ?<) + len + (- nmax len -1))) + (if (or (< n 1) (> n nmax)) + (error "Reference \"%s\" in expression \"%s\" points outside table" + (match-string 0 s) s)) + (setq start (match-beginning 0)) + (setq s (replace-match (format "%s%d" (match-string 1 s) n) t t s))))) s) (defun org-table-formula-substitute-names (f) @@ -3241,7 +3275,7 @@ For example: 28 -> AB." "Convert a time string into numerical duration in seconds. S can be a string matching either -?HH:MM:SS or -?HH:MM. If S is a string representing a number, keep this number." - (let (hour min sec res) + (let (hour minus min sec res) (cond ((and (string-match "\\(-?\\)\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\)" s)) (setq minus (< 0 (length (match-string 1 s))) @@ -3806,7 +3840,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line." :lighter " OrgTbl" :keymap orgtbl-mode-map (org-load-modules-maybe) (cond - ((org-mode-p) + ((eq major-mode 'org-mode) ;; Exit without error, in case some hook functions calls this ;; by accident in org-mode. (message "Orgtbl-mode is not useful in org-mode, command ignored")) @@ -3901,6 +3935,7 @@ to execute outside of tables." ("\C-c\C-w" org-table-cut-region) ("\C-c\M-w" org-table-copy-region) ("\C-c\C-y" org-table-paste-rectangle) + ("\C-c\C-w" org-table-wrap-region) ("\C-c-" org-table-insert-hline) ("\C-c}" org-table-toggle-coordinate-overlays) ("\C-c{" org-table-toggle-formula-debugger) @@ -4675,6 +4710,8 @@ The return value is either a single string for a single field, or a list of the fields in the rectangle ." (save-match-data (let ((id-loc nil) + ;; Protect a bunch of variables from being overwritten + ;; by the context of the remote table org-table-column-names org-table-column-name-regexp org-table-local-parameters org-table-named-field-locations org-table-current-line-types org-table-current-begin-line @@ -4711,7 +4748,8 @@ list of the fields in the rectangle ." (error "Cannot find a table at NAME or ID %s" name-or-id)) (setq tbeg (point-at-bol)) (org-table-get-specials) - (setq form (org-table-formula-substitute-names form)) + (setq form (org-table-formula-substitute-names + (org-table-formula-handle-first/last-rc form))) (if (and (string-match org-table-range-regexp form) (> (length (match-string 0 form)) 1)) (save-match-data @@ -4720,6 +4758,5 @@ list of the fields in the rectangle ." (provide 'org-table) - - ;;; org-table.el ends here + diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el index 45b16aecf12..78b38be57ab 100644 --- a/lisp/org/org-taskjuggler.el +++ b/lisp/org/org-taskjuggler.el @@ -4,7 +4,6 @@ ;; ;; Emacs Lisp Archive Entry ;; Filename: org-taskjuggler.el -;; Version: 7.7 ;; Author: Christian Egli ;; Maintainer: Christian Egli ;; Keywords: org, taskjuggler, project planning @@ -70,7 +69,7 @@ ;; "taskjuggler_project" (or whatever you customized ;; `org-export-taskjuggler-project-tag' to). You are now ready to ;; export the project plan with `org-export-as-taskjuggler-and-open' -;; which will export the project plan and open a Gantt chart in +;; which will export the project plan and open a gant chart in ;; TaskJugglerUI. ;; ;; * Resources @@ -278,6 +277,7 @@ defined in `org-export-taskjuggler-default-reports'." (file-name-nondirectory buffer-file-name)) org-export-taskjuggler-extension))) (buffer (find-file-noselect filename)) + (old-buffer (current-buffer)) (org-export-taskjuggler-old-level 0) task resource) (unless tasks @@ -305,6 +305,7 @@ defined in `org-export-taskjuggler-default-reports'." (setcar tasks (push (cons "version" version) task)))) (with-current-buffer buffer (erase-buffer) + (org-clone-local-variables old-buffer "^org-") (org-taskjuggler-open-project (car tasks)) (insert org-export-taskjuggler-default-global-properties) (insert "\n") @@ -354,8 +355,8 @@ information, all the properties, etc." (let* ((props (org-entry-properties)) (components (org-heading-components)) (level (nth 1 components)) - (headline - (replace-regexp-in-string + (headline + (replace-regexp-in-string "\"" "\\\"" (nth 4 components) t t)) ; quote double quotes in headlines (parent-ordered (org-taskjuggler-parent-is-ordered-p))) (push (cons "level" level) props) @@ -405,10 +406,10 @@ deeper), then it's not a leaf." (successor (car (cdr tasks)))) (cond ;; if a task has no successors it is a leaf - ((null successor) + ((null successor) (push (cons (cons "leaf-node" t) task) new-list)) ;; if the successor has a lower level than task it is a leaf - ((<= (cdr (assoc "level" successor)) (cdr (assoc "level" task))) + ((<= (cdr (assoc "level" successor)) (cdr (assoc "level" task))) (push (cons (cons "leaf-node" t) task) new-list)) ;; otherwise examine the rest of the tasks (t (push task new-list)))) @@ -571,7 +572,7 @@ with separator \"\n\"." (and filtered-items (mapconcat 'identity filtered-items "\n")))) (defun org-taskjuggler-get-attributes (item attributes) - "Return all attributes as a single formatted string. ITEM is an + "Return all attribute as a single formated string. ITEM is an alist representing either a resource or a task. ATTRIBUTES is a list of symbols. Only entries from ITEM are considered that are listed in ATTRIBUTES." diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index b8fbc4ff388..ef5dba68afe 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -5,7 +5,6 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -373,7 +372,7 @@ replace any running timer." (org-show-entry) (or (ignore-errors (org-get-heading)) (concat "File:" (file-name-nondirectory (buffer-file-name))))))) - ((org-mode-p) + ((eq major-mode 'org-mode) (or (ignore-errors (org-get-heading)) (concat "File:" (file-name-nondirectory (buffer-file-name))))) (t (error "Not in an Org buffer")))) @@ -403,6 +402,4 @@ replace any running timer." (provide 'org-timer) - - ;;; org-timer.el ends here diff --git a/lisp/org/org-vm.el b/lisp/org/org-vm.el index d0991b81116..42870e9ebf8 100644 --- a/lisp/org/org-vm.el +++ b/lisp/org/org-vm.el @@ -1,11 +1,10 @@ ;;; org-vm.el --- Support for links to VM messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -139,6 +138,4 @@ (provide 'org-vm) - - ;;; org-vm.el ends here diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index bce90092e6e..89128dd217a 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el @@ -5,7 +5,6 @@ ;; Author: Andy Stewart ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -168,6 +167,4 @@ Return t if there is no previous link; otherwise, return nil." (provide 'org-w3m) - - ;;; org-w3m.el ends here diff --git a/lisp/org/org-wl.el b/lisp/org/org-wl.el index 9bc49c8b91a..7457cfe855b 100644 --- a/lisp/org/org-wl.el +++ b/lisp/org/org-wl.el @@ -1,12 +1,11 @@ ;;; org-wl.el --- Support for links to Wanderlust messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Tokuya Kameshima ;; David Maus ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -309,6 +308,4 @@ for namazu index." (provide 'org-wl) - - ;;; org-wl.el ends here diff --git a/lisp/org/org-xoxo.el b/lisp/org/org-xoxo.el index 02f351fe724..4cb3840d32b 100644 --- a/lisp/org/org-xoxo.el +++ b/lisp/org/org-xoxo.el @@ -1,11 +1,10 @@ ;;; org-xoxo.el --- XOXO export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 ;; ;; This file is part of GNU Emacs. ;; @@ -123,5 +122,4 @@ The XOXO buffer is named *xoxo-*" (provide 'org-xoxo) - ;;; org-xoxo.el ends here diff --git a/lisp/org/org.el b/lisp/org/org.el index 8aca74e69cc..7163e8f03fc 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -1,11 +1,12 @@ ;;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik +;; Maintainer: Bastien Guerry ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.7 +;; Version: 7.8.02 ;; ;; This file is part of GNU Emacs. ;; @@ -105,6 +106,7 @@ (declare-function org-inlinetask-at-task-p "org-inlinetask" ()) (declare-function org-inlinetask-outline-regexp "org-inlinetask" ()) (declare-function org-inlinetask-toggle-visibility "org-inlinetask" ()) +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (declare-function org-at-clock-log-p "org-clock" ()) (declare-function org-clock-timestamps-up "org-clock" ()) (declare-function org-clock-timestamps-down "org-clock" ()) @@ -162,6 +164,7 @@ requirements) is loaded." (const :tag "Ditaa" ditaa) (const :tag "Dot" dot) (const :tag "Emacs Lisp" emacs-lisp) + (const :tag "Fortran" fortran) (const :tag "Gnuplot" gnuplot) (const :tag "Haskell" haskell) (const :tag "Java" java) @@ -176,6 +179,7 @@ requirements) is loaded." (const :tag "Octave" octave) (const :tag "Org" org) (const :tag "Perl" perl) + (const :tag "Pico Lisp" picolisp) (const :tag "PlantUML" plantuml) (const :tag "Python" python) (const :tag "Ruby" ruby) @@ -183,6 +187,7 @@ requirements) is loaded." (const :tag "Scheme" scheme) (const :tag "Screen" screen) (const :tag "Shell Script" sh) + (const :tag "Shen" shen) (const :tag "Sql" sql) (const :tag "Sqlite" sqlite)) :value-type (boolean :tag "Activate" :value t))) @@ -198,7 +203,7 @@ identifier." ;;; Version -(defconst org-version "7.7" +(defconst org-version "7.8.02" "The version number of the file org.el.") (defun org-version (&optional here) @@ -249,6 +254,11 @@ With prefix arg HERE, insert it at point." :group 'org :type 'hook) +(defcustom org-log-buffer-setup-hook nil + "Hook that is run after an Org log buffer is created." + :group 'org + :type 'hook) + (defvar org-modules) ; defined below (defvar org-modules-loaded nil "Have the modules been loaded already?") @@ -338,7 +348,6 @@ to add the symbol `xyz', and the package must have a call to (const :tag "C mac-link-grabber Grab links and URLs from various Mac applications" org-mac-link-grabber) (const :tag "C man: Support for links to manpages in Org-mode" org-man) (const :tag "C mtags: Support for muse-like tags" org-mtags) - (const :tag "C odt: OpenDocumentText exporter for Org-mode" org-odt) (const :tag "C panel: Simple routines for us with bad memory" org-panel) (const :tag "C registry: A registry for Org-mode links" org-registry) (const :tag "C org2rem: Convert org appointments into reminders" org2rem) @@ -354,12 +363,12 @@ to add the symbol `xyz', and the package must have a call to (defcustom org-support-shift-select nil "Non-nil means make shift-cursor commands select text when possible. -In Emacs 23, when `shift-select-mode' is on, shifted cursor keys start -selecting a region, or enlarge regions started in this way. -In Org-mode, in special contexts, these same keys are used for other -purposes, important enough to compete with shift selection. Org tries -to balance these needs by supporting `shift-select-mode' outside these -special contexts, under control of this variable. +In Emacs 23, when `shift-select-mode' is on, shifted cursor keys +start selecting a region, or enlarge regions started in this way. +In Org-mode, in special contexts, these same keys are used for +other purposes, important enough to compete with shift selection. +Org tries to balance these needs by supporting `shift-select-mode' +outside these special contexts, under control of this variable. The default of this variable is nil, to avoid confusing behavior. Shifted cursor keys will then execute Org commands in the following contexts: @@ -370,30 +379,56 @@ cursor keys will then execute Org commands in the following contexts: - in the BEGIN line of a clock table (changing the time block). Outside these contexts, the commands will throw an error. -When this variable is t and the cursor is not in a special context, -Org-mode will support shift-selection for making and enlarging regions. -To make this more effective, the bullet cycling will no longer happen -anywhere in an item line, but only if the cursor is exactly on the bullet. +When this variable is t and the cursor is not in a special +context, Org-mode will support shift-selection for making and +enlarging regions. To make this more effective, the bullet +cycling will no longer happen anywhere in an item line, but only +if the cursor is exactly on the bullet. If you set this variable to the symbol `always', then the keys -will not be special in headlines, property lines, and item lines, to make -shift selection work there as well. If this is what you want, you can -use the following alternative commands: `C-c C-t' and `C-c ,' to -change TODO state and priority, `C-u C-u C-c C-t' can be used to switch -TODO sets, `C-c -' to cycle item bullet types, and properties can be -edited by hand or in column view. +will not be special in headlines, property lines, and item lines, +to make shift selection work there as well. If this is what you +want, you can use the following alternative commands: `C-c C-t' +and `C-c ,' to change TODO state and priority, `C-u C-u C-c C-t' +can be used to switch TODO sets, `C-c -' to cycle item bullet +types, and properties can be edited by hand or in column view. However, when the cursor is on a timestamp, shift-cursor commands will still edit the time stamp - this is just too good to give up. -XEmacs user should have this variable set to nil, because shift-select-mode -is Emacs 23 only." +XEmacs user should have this variable set to nil, because +`shift-select-mode' is in Emacs 23 or later only." :group 'org :type '(choice (const :tag "Never" nil) (const :tag "When outside special context" t) (const :tag "Everywhere except timestamps" always))) +(defcustom org-loop-over-headlines-in-active-region nil + "Shall some commands act upon headlines in the active region? + +When set to `t', some commands will be performed in all headlines +within the active region. + +When set to `start-level', some commands will be performed in all +headlines within the active region, provided that these headlines +are of the same level than the first one. + +When set to a string, those commands will be performed on the +matching headlines within the active region. Such string must be +a tags/property/todo match as it is used in the agenda tags view. + +The list of commands is: `org-schedule', `org-deadline', +`org-todo', `org-archive-subtree', `org-archive-set-tag' and +`org-archive-to-archive-sibling'. The archiving commands skip +already archived entries." + :type '(choice (const :tag "Don't loop" nil) + (const :tag "All headlines in active region" t) + (const :tag "In active region, headlines at the same level than the first one" 'start-level) + (string :tag "Tags/Property/Todo matcher")) + :group 'org-todo + :group 'org-archive) + (defgroup org-startup nil "Options concerning startup of Org-mode." :tag "Org Startup" @@ -817,7 +852,7 @@ than its value." (const :tag "No limit" nil) (integer :tag "Maximum level"))) -(defcustom org-drawers '("PROPERTIES" "CLOCK" "LOGBOOK") +(defcustom org-drawers '("PROPERTIES" "CLOCK" "LOGBOOK" "RESULTS") "Names of drawers. Drawers are not opened by cycling on the headline above. Drawers only open with a TAB on the drawer line itself. A drawer looks like this: @@ -1037,6 +1072,28 @@ OK to kill that hidden subtree. When nil, kill without remorse." (const :tag "Protect hidden subtrees with a security query" t) (const :tag "Never kill a hidden subtree with C-k" error))) +(defcustom org-catch-invisible-edits nil + "Check if in invisible region before inserting or deleting a character. +Valid values are: + +nil Do not check, so just do invisible edits. +error Throw an error and do nothing. +show Make point visible, and do the requested edit. +show-and-error Make point visible, then throw an error and abort the edit. +smart Make point visible, and do insertion/deletion if it is + adjacent to visible text and the change feels predictable. + Never delete a previously invisible character or add in the + middle or right after an invisible region. Basically, this + allows insertion and backward-delete right before ellipses. + FIXME: maybe in this case we should not even show?" + :group 'org-edit-structure + :type '(choice + (const :tag "Do not check" nil) + (const :tag "Throw error when trying to edit" error) + (const :tag "Unhide, but do not do the edit" show-and-error) + (const :tag "Show invisible part and do the edit" show) + (const :tag "Be smart and do the right thing" smart))) + (defcustom org-yank-folded-subtrees t "Non-nil means when yanking subtrees, fold them. If the kill is a single subtree, or a sequence of subtrees, i.e. if @@ -1260,10 +1317,14 @@ See the manual for examples." (function))))) (defcustom org-descriptive-links t - "Non-nil means hide link part and only show description of bracket links. -Bracket links are like [[link][description]]. This variable sets the initial -state in new org-mode buffers. The setting can then be toggled on a -per-buffer basis from the Org->Hyperlinks menu." + "Non-nil means Org will display descriptive links. +E.g. [[http://orgmode.org][Org website]] will be displayed as +\"Org Website\", hiding the link itself and just displaying its +description. When set to `nil', Org will display the full links +literally. + +You can interactively set the value of this variable by calling +`org-toggle-link-display' or from the menu Org>Hyperlinks menu." :group 'org-link :type 'boolean) @@ -1401,8 +1462,8 @@ nil Never use an ID to make a link, instead link using a text search for "Non-nil means file links from `org-store-link' contain context. A search string will be added to the file name with :: as separator and used to find the context when the link is activated by the command -`org-open-at-point'. When this option is t, the entire active region -will be placed in the search string of the file link. If set to a +`org-open-at-point'. When this option is t, the entire active region +will be placed in the search string of the file link. If set to a positive integer, only the first n lines of context will be stored. Using a prefix arg to the command \\[org-store-link] (`org-store-link') @@ -1852,7 +1913,7 @@ will temporarily be changed to `time'." (defcustom org-refile-targets nil "Targets for refiling entries with \\[org-refile]. -This is list of cons cells. Each cell contains: +This is a list of cons cells. Each cell contains: - a specification of the files to be considered, either a list of files, or a symbol whose function or variable value will be used to retrieve a file name or a list of file names. If you use `org-agenda-files' for @@ -1870,10 +1931,14 @@ This is list of cons cells. Each cell contains: - a cons cell (:level . N). Any headline of level N is considered a target. Note that, when `org-odd-levels-only' is set, level corresponds to order in hierarchy, not to the number of stars. - - a cons cell (:maxlevel . N). Any headline with level <= N is a target. + - a cons cell (:maxlevel . N). Any headline with level <= N is a target. Note that, when `org-odd-levels-only' is set, level corresponds to order in hierarchy, not to the number of stars. +Each element of this list generates a set of possible targets. +The union of these sets is presented (with completion) to +the user by `org-refile'. + You can set the variable `org-refile-target-verify-function' to a function to verify each headline found by the simple criteria above. @@ -1963,6 +2028,16 @@ heading." (const :tag "Always" t) (const :tag "Prompt for confirmation" confirm))) +(defcustom org-refile-active-region-within-subtree nil + "Non-nil means also refile active region within a subtree. + +By default `org-refile' doesn't allow refiling regions if they +don't contain a set of subtrees, but it might be convenient to +do so sometimes: in that case, the first line of the region is +converted to a headline before refiling." + :group 'org-refile + :type 'boolean) + (defgroup org-todo nil "Options concerning TODO items in Org-mode." :tag "Org TODO" @@ -2348,6 +2423,8 @@ context, and the cdr is the heading to be used. The heading may also be the empty string. %t in the heading will be replaced by a time stamp. %T will be an active time stamp instead the default inactive one +%d will be replaced by a short-format time stamp. +%D will be replaced by an active short-format time stamp. %s will be replaced by the new TODO state, in double quotes. %S will be replaced by the old TODO state, in double quotes. %u will be replaced by the user name. @@ -2444,7 +2521,7 @@ An auto-repeating task is immediately switched back to TODO when marked DONE. If you are not logging state changes (by adding \"@\" or \"!\" to the TODO keyword definition), or set `org-log-done' to record a closing note, there will be no record of the task moving -through DONE. This variable forces taking a note anyway. +through DONE. This variable forces taking a note anyway. nil Don't force a record time Record a time stamp @@ -2681,7 +2758,7 @@ When this variable is set to t, the date/time prompt will not let you specify dates outside the 1970-2037 range, so it is certain that these dates will work in whatever version of Emacs you are running, and also that you can move a file from one Emacs implementation -to another. Whenever Org is forcing the year for you, it will display +to another. WHenever Org is forcing the year for you, it will display a message and beep. When this variable is nil, Org will check if the date is @@ -2735,6 +2812,14 @@ be the favorite working time of John Wiegley :-)" :group 'org-time :type 'integer) +(defcustom org-use-effective-time nil + "If non-nil, consider `org-extend-today-until' when creating timestamps. +For example, if `org-extend-today-until' is 8, and it's 4am, then the +\"effective time\" of any timestamps between midnight and 8am will be +23:59 of the previous day." + :group 'boolean + :type 'integer) + (defcustom org-edit-timestamp-down-means-later nil "Non-nil means S-down will increase the time in a time stamp. When nil, S-up will increase." @@ -2849,7 +2934,9 @@ This is an undocumented feature, you should not rely on it.") "The column to which tags should be indented in a headline. If this number is positive, it specifies the column. If it is negative, it means that the tags should be flushright to that column. For example, --80 works well for a normal 80 character screen." +-80 works well for a normal 80 character screen. +When 0, place tags directly after headline text, with only one space in +between." :group 'org-tags :type 'integer) @@ -2924,7 +3011,7 @@ is better to limit inheritance to certain tags using the variables (const :tag "List them, indented with leading dots" indented))) (defcustom org-tags-sort-function nil - "When set, tags are sorted using this comparison function." + "When set, tags are sorted using this function as a comparator." :group 'org-tags :type '(choice (const :tag "No sorting" nil) @@ -2952,6 +3039,28 @@ lined-up with respect to each other." :group 'org-properties :type 'string) +(defcustom org-properties-postprocess-alist nil + "Alist of properties and functions to adjust inserted values. +Elements of this alist must be of the form + + ([string] [function]) + +where [string] must be a property name and [function] must be a +lambda expression: this lambda expression must take one argument, +the value to adjust, and return the new value as a string. + +For example, this element will allow the property \"Remaining\" +to be updated wrt the relation between the \"Effort\" property +and the clock summary: + + ((\"Remaining\" (lambda(value) + (let ((clocksum (org-clock-sum-current-item)) + (effort (org-duration-string-to-minutes + (org-entry-get (point) \"Effort\")))) + (org-minutes-to-hh:mm-string (- effort clocksum))))))" + :group 'org-properties + :type 'alist) + (defcustom org-use-property-inheritance nil "Non-nil means properties apply also for sublevels. @@ -3222,6 +3331,46 @@ This is a property list with the following properties: When nil, just push out a message." :group 'org-latex :type 'boolean) +(defcustom org-latex-to-mathml-jar-file nil + "Value of\"%j\" in `org-latex-to-mathml-convert-command'. +Use this to specify additional executable file say a jar file. + +When using MathToWeb as the converter, specify the full-path to +your mathtoweb.jar file." + :group 'org-latex + :type '(choice + (const :tag "None" nil) + (file :tag "JAR file" :must-match t))) + +(defcustom org-latex-to-mathml-convert-command nil + "Command to convert LaTeX fragments to MathML. +Replace format-specifiers in the command as noted below and use +`shell-command' to convert LaTeX to MathML. +%j: Executable file in fully expanded form as specified by + `org-latex-to-mathml-jar-file'. +%I: Input LaTeX file in fully expanded form +%o: Output MathML file +This command is used by `org-create-math-formula'. + +When using MathToWeb as the converter, set this to +\"java -jar %j -unicode -force -df %o %I\"." + :group 'org-latex + :type '(choice + (const :tag "None" nil) + (string :tag "\nShell command"))) + +(defun org-format-latex-mathml-available-p () + "Return t if `org-latex-to-mathml-convert-command' is usable." + (save-match-data + (when (and (boundp 'org-latex-to-mathml-convert-command) + org-latex-to-mathml-convert-command) + (let ((executable (car (split-string + org-latex-to-mathml-convert-command)))) + (when (executable-find executable) + (if (string-match + "%j" org-latex-to-mathml-convert-command) + (file-readable-p org-latex-to-mathml-jar-file) + t)))))) (defcustom org-format-latex-header "\\documentclass{article} \\usepackage[usenames]{color} @@ -3609,6 +3758,7 @@ Normal means, no org-mode-specific context." (defvar calc-embedded-close-formula) (defvar calc-embedded-open-formula) (declare-function cdlatex-tab "ext:cdlatex" ()) +(declare-function cdlatex-compute-tables "ext:cdlatex" ()) (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) (defvar font-lock-unfontify-region-function) (declare-function iswitchb-read-buffer "iswitchb" @@ -3618,7 +3768,7 @@ Normal means, no org-mode-specific context." (defvar org-agenda-tags-todo-honor-ignore-options) (declare-function org-agenda-skip "org-agenda" ()) (declare-function - org-format-agenda-item "org-agenda" + org-agenda-format-item "org-agenda" (extra txt &optional category tags dotime noprefix remove-re habitp)) (declare-function org-agenda-new-marker "org-agenda" (&optional pos)) (declare-function org-agenda-change-all-lines "org-agenda" @@ -3986,7 +4136,7 @@ Here are a few examples: \"~/org/archive.org::\" Archive in file ~/org/archive.org (absolute path), as top-level trees. -\"~/org/archive.org::From %s\" +\"~/org/archive.org::* From %s\" Archive in file ~/org/archive.org (absolute path), under headlines \"From FILENAME\" where file name is the current file name. @@ -4074,7 +4224,7 @@ collapsed state." (let* ((re (concat ":" org-archive-tag ":"))) (goto-char beg) (while (re-search-forward re end t) - (when (org-on-heading-p) + (when (org-at-heading-p) (org-flag-subtree t) (org-end-of-subtree t)))))) @@ -4150,20 +4300,14 @@ group 5: Tags") (make-variable-buffer-local 'org-complex-heading-regexp) (defvar org-complex-heading-regexp-format nil "Printf format to make regexp to match an exact headline. -This regexp will match the headline of any node which hase the exact -headline text that is put into the format, but may have any TODO state, -priority and tags.") +This regexp will match the headline of any node which has the +exact headline text that is put into the format, but may have any +TODO state, priority and tags.") (make-variable-buffer-local 'org-complex-heading-regexp-format) (defvar org-todo-line-tags-regexp nil "Matches a headline and puts TODO state into group 2 if present. Also put tags into group 4 if tags are present.") (make-variable-buffer-local 'org-todo-line-tags-regexp) -(defvar org-nl-done-regexp nil - "Matches newline followed by a headline with the DONE keyword.") -(make-variable-buffer-local 'org-nl-done-regexp) -(defvar org-looking-at-done-regexp nil - "Matches the DONE keyword a point.") -(make-variable-buffer-local 'org-looking-at-done-regexp) (defvar org-ds-keyword-length 12 "Maximum length of the Deadline and SCHEDULED keywords.") (make-variable-buffer-local 'org-ds-keyword-length) @@ -4300,9 +4444,34 @@ in the #+STARTUP line, the corresponding variable, and the value to set this variable to if the option is found. An optional forth element PUSH means to push this value onto the list in the variable.") +(defun org-update-property-plist (key val props) + "Update PROPS with KEY and VAL." + (if (string= "+" (substring key (- (length key) 1))) + (let* ((key (substring key 0 (- (length key) 1))) + (previous (cdr (assoc key props)))) + (cons (cons key (concat previous " " val)) + (org-remove-if (lambda (p) (string= (car p) key)) props))) + (cons (cons key val) props))) + +(defconst org-block-regexp + "^[ \t]*#\\+begin_?\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_?\\1[ \t]*$" + "Regular expression for hiding blocks.") +(defconst org-heading-keyword-regexp-format + "^\\(\\*+\\)\\(?: +%s\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" + "Printf format for a regexp matching an headline with some keyword. +This regexp will match the headline of any node which has the +exact keyword that is put into the format. The keyword isn't in +any group by default, but the stars and the body are.") +(defconst org-heading-keyword-maybe-regexp-format + "^\\(\\*+\\)\\(?: +%s\\)?\\(?: +\\(.*?\\)\\)?[ \t]*$" + "Printf format for a regexp matching an headline, possibly with some keyword. +This regexp can match any headline with the specified keyword, or +without a keyword. The keyword isn't in any group by default, +but the stars and the body are.") + (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." - (when (org-mode-p) + (when (eq major-mode 'org-mode) (org-set-local 'org-todo-kwd-alist nil) (org-set-local 'org-todo-key-alist nil) (org-set-local 'org-todo-key-trigger nil) @@ -4361,8 +4530,9 @@ means to push this value onto the list in the variable.") (setq prio (org-split-string value " +"))) ((equal key "PROPERTY") (when (string-match "\\(\\S-+\\)\\s-+\\(.*\\)" value) - (push (cons (match-string 1 value) (match-string 2 value)) - props))) + (setq props (org-update-property-plist (match-string 1 value) + (match-string 2 value) + props)))) ((equal key "FILETAGS") (when (string-match "\\S-" value) (setq ftags @@ -4406,8 +4576,17 @@ means to push this value onto the list in the variable.") (setq ext-setup-or-nil (concat (substring ext-setup-or-nil 0 start) "\n" setup-contents "\n" - (substring ext-setup-or-nil start))))) - )))) + (substring ext-setup-or-nil start))))))) + ;; search for property blocks + (goto-char (point-min)) + (while (re-search-forward org-block-regexp nil t) + (when (equal "PROPERTY" (upcase (match-string 1))) + (setq value (replace-regexp-in-string + "[\n\r]" " " (match-string 4))) + (when (string-match "\\(\\S-+\\)\\s-+\\(.*\\)" value) + (setq props (org-update-property-plist (match-string 1 value) + (match-string 2 value) + props))))))) (org-set-local 'org-use-sub-superscripts scripts) (when cat (org-set-local 'org-category (intern cat)) @@ -4498,7 +4677,9 @@ means to push this value onto the list in the variable.") (assoc (car e) org-tag-alist)) (push e org-tag-alist))))) - ;; Compute the regular expressions and other local variables + ;; Compute the regular expressions and other local variables. + ;; Using `org-outline-regexp-bol' would complicate them much, + ;; because of the fixed white space at the end of that string. (if (not org-done-keywords) (setq org-done-keywords (and org-todo-keywords-1 (list (org-last org-todo-keywords-1))))) @@ -4513,47 +4694,42 @@ means to push this value onto the list in the variable.") org-not-done-keywords (org-delete-all org-done-keywords (copy-sequence org-todo-keywords-1)) org-todo-regexp - (concat "\\<\\(" (mapconcat 'regexp-quote org-todo-keywords-1 - "\\|") "\\)\\>") + (concat "\\(" + (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") + "\\)") org-not-done-regexp - (concat "\\<\\(" + (concat "\\(" (mapconcat 'regexp-quote org-not-done-keywords "\\|") - "\\)\\>") + "\\)") org-not-done-heading-regexp - (concat "^\\(\\*+\\)[ \t]+\\(" - (mapconcat 'regexp-quote org-not-done-keywords "\\|") - "\\)\\>") + (format org-heading-keyword-regexp-format org-not-done-regexp) org-todo-line-regexp - (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" - (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - "\\)\\>\\)?[ \t]*\\(.*\\)") + (format org-heading-keyword-maybe-regexp-format org-todo-regexp) org-complex-heading-regexp - (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" - (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - "\\)\\>\\)?\\(?:[ \t]*\\(\\[#.\\]\\)\\)?[ \t]*\\(.*?\\)" - "\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \t]*$") + (concat "^\\(\\*+\\)" + "\\(?: +" org-todo-regexp "\\)?" + "\\(?: +\\(\\[#.\\]\\)\\)?" + "\\(?: +\\(.*?\\)\\)?" + (org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?") + "[ \t]*$") org-complex-heading-regexp-format - (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" - (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - "\\)\\>\\)?" - "\\(?:[ \t]*\\(\\[#.\\]\\)\\)?" - "\\(?:[ \t]*\\(?:\\[[0-9%%/]+\\]\\)\\)?" ;; stats cookie - "[ \t]*\\(%s\\)" - "\\(?:[ \t]*\\(?:\\[[0-9%%/]+\\]\\)\\)?" ;; stats cookie - "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?[ \t]*$") - org-nl-done-regexp - (concat "\n\\*+[ \t]+" - "\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|") - "\\)" "\\>") + (concat "^\\(\\*+\\)" + "\\(?: +" org-todo-regexp "\\)?" + "\\(?: +\\(\\[#.\\]\\)\\)?" + "\\(?: +" + ;; Stats cookies can be sticked to body. + "\\(?:\\[[0-9%%/]+\\] *\\)?" + "\\(%s\\)" + "\\(?: *\\[[0-9%%/]+\\]\\)?" + "\\)" + (org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?") + "[ \t]*$") org-todo-line-tags-regexp - (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" - (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - (org-re - "\\)\\>\\)? *\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\)")) - org-looking-at-done-regexp - (concat "^" "\\(?:" - (mapconcat 'regexp-quote org-done-keywords "\\|") "\\)" - "\\>") + (concat "^\\(\\*+\\)" + "\\(?: +" org-todo-regexp "\\)?" + "\\(?: +\\(.*?\\)\\)?" + (org-re "\\(?:[ \t]+\\(:[[:alnum:]:_@#%]+:\\)\\)?") + "[ \t]*$") org-deadline-regexp (concat "\\<" org-deadline-string) org-deadline-time-regexp (concat "\\<" org-deadline-string " *<\\([^>]+\\)>") @@ -4582,7 +4758,7 @@ means to push this value onto the list in the variable.") "\\|" org-deadline-string "\\|" org-closed-string "\\|" org-clock-string "\\)\\)?" - " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)") + " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)") org-planning-or-clock-line-re (concat "\\(?:^[ \t]*\\(" org-scheduled-string "\\|" org-deadline-string @@ -4698,10 +4874,23 @@ This variable is set by `org-before-change-function'. (defvar org-inhibit-blocking nil) ; Dynamically-scoped param. (defvar org-table-buffer-is-an nil) -;; org-outline-regexp ought to be a defconst but is let-binding -;; in some places -- e.g. see the macro org-with-limited-levels -(defvar org-outline-regexp "\\*+ ") -(defconst org-outline-regexp-bol "^\\*+ ") +;; `org-outline-regexp' ought to be a defconst but is let-binding in +;; some places -- e.g. see the macro org-with-limited-levels. +;; +;; In Org buffers, the value of `outline-regexp' is that of +;; `org-outline-regexp'. The only function still directly relying on +;; `outline-regexp' is `org-overview' so that `org-cycle' can do its +;; job when `orgstruct-mode' is active. +(defvar org-outline-regexp "\\*+ " + "Regexp to match Org headlines.") +(defconst org-outline-regexp-bol "^\\*+ " + "Regexp to match Org headlines. +This is similar to `org-outline-regexp' but additionally makes +sure that we are at the beginning of the line.") + +(defconst org-heading-regexp "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" + "Matches an headline, putting stars and text into groups. +Stars are put in group 1 and the trimmed body in group 2.") ;;;###autoload (define-derived-mode org-mode outline-mode "Org" @@ -4948,7 +5137,7 @@ stacked delimiters is N. Escaping delimiters is not possible." (defvar org-match-substring-regexp (concat - "\\([^\\]\\)\\([_^]\\)\\(" + "\\([^\\]\\|^\\)\\([_^]\\)\\(" "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)" "\\|" "\\(" (org-create-multibrace-regexp "(" ")" org-match-sexp-depth) "\\)" @@ -4958,7 +5147,7 @@ stacked delimiters is N. Escaping delimiters is not possible." (defvar org-match-substring-with-braces-regexp (concat - "\\([^\\]\\)\\([_^]\\)\\(" + "\\([^\\]\\|^\\)\\([_^]\\)\\(" "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)" "\\)") "The regular expression matching a sub- or superscript, forcing braces.") @@ -5022,15 +5211,15 @@ This should be called after the variable `org-link-types' has changed." (org-make-link-regexps) -(defconst org-ts-regexp "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^\r\n>]*?\\)>" +(defconst org-ts-regexp "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)>" "Regular expression for fast time stamp matching.") -(defconst org-ts-regexp-both "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]\r\n>]*?\\)[]>]" +(defconst org-ts-regexp-both "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?\\)[]>]" "Regular expression for fast time stamp matching.") -(defconst org-ts-regexp0 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" +(defconst org-ts-regexp0 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" "Regular expression matching time strings for analysis. This one does not require the space after the date, so it can be used on a string that terminates immediately after the date.") -(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) +\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" +(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" "Regular expression matching time strings for analysis.") (defconst org-ts-regexp2 (concat "<" org-ts-regexp1 "[^>\n]\\{0,16\\}>") "Regular expression matching time stamps, with groups.") @@ -5052,7 +5241,7 @@ The time stamps may be either active or inactive.") (defvar org-emph-face nil) (defun org-do-emphasis-faces (limit) - "Run through the buffer and add overlays to emphasized strings." + "Run through the buffer and add overlays to emphasised strings." (let (rtn a) (while (and (not rtn) (re-search-forward org-emph-re limit t)) (if (not (= (char-after (match-beginning 3)) @@ -5154,7 +5343,7 @@ will be prompted for." t))))) (defun org-activate-code (limit) - (if (re-search-forward "^[ \t]*\\(: .*\n?\\)" limit t) + (if (re-search-forward "^[ \t]*\\(:\\(?: .*\\|$\\)\n?\\)" limit t) (progn (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) @@ -5257,9 +5446,8 @@ will be prompted for." '(font-lock-fontified t face org-meta-line)) t) ((or (member dc1 '("begin:" "end:" "caption:" "label:" - "orgtbl:" "tblfm:" "tblname:" "result:" - "results:" "source:" "srcname:" "call:" - "data:" "header:" "headers:")) + "orgtbl:" "tblfm:" "tblname:" "results:" + "call:" "header:" "headers:" "name:")) (and (match-end 4) (equal dc3 "attr"))) (add-text-properties beg (match-end 0) @@ -5541,7 +5729,7 @@ Use `org-reduced-level' to remove the effect of `org-odd-levels'." (defvar org-font-lock-keywords nil) -(defconst org-property-re (org-re "^[ \t]*\\(:\\([-[:alnum:]_]+\\):\\)[ \t]*\\([^ \t\r\n].*\\)") +(defconst org-property-re (org-re "^[ \t]*\\(:\\([-[:alnum:]_]+\\+?\\):\\)[ \t]*\\([^ \t\r\n].*\\)") "Regular expression matching a property line.") (defvar org-font-lock-hook nil @@ -5549,7 +5737,7 @@ Use `org-reduced-level' to remove the effect of `org-odd-levels'." (defvar org-font-lock-set-keywords-hook nil "Functions that can manipulate `org-font-lock-extra-keywords'. -This is called after `org-font-lock-extra-keywords' is defined, but before +This is calles after `org-font-lock-extra-keywords' is defined, but before it is installed to be used by font lock. This can be useful if something needs to be inserted at a specific position in the font-lock sequence.") @@ -5595,14 +5783,17 @@ needs to be inserted at a specific position in the font-lock sequence.") (if (memq 'footnote lk) '(org-activate-footnote-links)) '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t)) '(org-hide-wide-columns (0 nil append)) - ;; TODO lines - (list (concat "^\\*+[ \t]+" org-todo-regexp "\\([ \t]\\|$\\)") - '(1 (org-get-todo-face 1) t)) + ;; TODO keyword + (list (format org-heading-keyword-regexp-format + org-todo-regexp) + '(2 (org-get-todo-face 2) t)) ;; DONE (if org-fontify-done-headline - (list (concat "^[*]+ +\\<\\(" - (mapconcat 'regexp-quote org-done-keywords "\\|") - "\\)\\(.*\\)") + (list (format org-heading-keyword-regexp-format + (concat + "\\(" + (mapconcat 'regexp-quote org-done-keywords "\\|") + "\\)")) '(2 'org-headline-done t)) nil) ;; Priorities @@ -5640,9 +5831,11 @@ needs to be inserted at a specific position in the font-lock sequence.") ;; Code '(org-activate-code (1 'org-code t)) ;; COMMENT - (list (concat "^\\*+[ \t]+\\<\\(" org-comment-string - "\\|" org-quote-string "\\)\\>") - '(1 'org-special-keyword t)) + (list (format org-heading-keyword-regexp-format + (concat "\\(" + org-comment-string "\\|" org-quote-string + "\\)")) + '(2 'org-special-keyword t)) '("^#.*" (0 'font-lock-comment-face t)) ;; Blocks and meta lines '(org-fontify-meta-lines-and-blocks) @@ -5661,7 +5854,7 @@ needs to be inserted at a specific position in the font-lock sequence.") (org-set-local 'org-pretty-entities (not org-pretty-entities)) (org-restart-font-lock) (if org-pretty-entities - (message "Entities are displayed as UTF8 characters") + (message "Entities are displayed as UTF8 characers") (save-restriction (widen) (org-decompose-region (point-min) (point-max)) @@ -5673,7 +5866,7 @@ needs to be inserted at a specific position in the font-lock sequence.") (when org-pretty-entities (catch 'match (while (re-search-forward - "\\\\\\([a-zA-Z][a-zA-Z0-9]*\\)\\($\\|[^[:alnum:]\n]\\)" + "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)" limit t) (if (and (not (org-in-indented-comment-line)) (setq ee (org-entity-get (match-string 1))) @@ -5768,17 +5961,10 @@ If KWD is a number, get the corresponding match group." (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename) (org-decompose-region beg end) - (remove-text-properties - beg end - (if org-indent-mode - ;; also remove line-prefix and wrap-prefix properties - '(mouse-face t keymap t org-linked-text t - invisible t intangible t - line-prefix t wrap-prefix t - org-no-flyspell t org-emphasis t) - '(mouse-face t keymap t org-linked-text t - invisible t intangible t - org-no-flyspell t org-emphasis t))) + (remove-text-properties beg end + '(mouse-face t keymap t org-linked-text t + invisible t intangible t + org-no-flyspell t org-emphasis t)) (org-remove-font-lock-display-properties beg end))) (defconst org-script-display '(((raise -0.3) (height 0.7)) @@ -5915,7 +6101,7 @@ in special contexts. (and limit-level (1- (* limit-level 2))) limit-level))) (org-outline-regexp - (if (not (org-mode-p)) + (if (not (eq major-mode 'org-mode)) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) @@ -5978,6 +6164,8 @@ in special contexts. (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol)))) (org-inlinetask-toggle-visibility)) + ((org-try-cdlatex-tab)) + ;; At an item/headline: delegate to `org-cycle-internal-local'. ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) @@ -5993,8 +6181,6 @@ in special contexts. ((org-try-structure-completion)) - ((org-try-cdlatex-tab)) - ((run-hook-with-args-until-success 'org-tab-before-tab-emulation-hook)) @@ -6154,7 +6340,7 @@ With \\[universal-argument] prefix arg, switch to startup visibility. With a numeric prefix, show all headlines up to that level." (interactive "P") (let ((org-cycle-include-plain-lists - (if (org-mode-p) org-cycle-include-plain-lists nil))) + (if (eq major-mode 'org-mode) org-cycle-include-plain-lists nil))) (cond ((integerp arg) (show-all) @@ -6213,6 +6399,9 @@ With a numeric prefix, show all headlines up to that level." (org-cycle-hide-drawers 'all) (org-cycle-show-empty-lines 'all))))) +;; This function uses outline-regexp instead of the more fundamental +;; org-outline-regexp so that org-cycle-global works outside of Org +;; buffers, where outline-regexp is needed. (defun org-overview () "Switch to overview mode, showing only top-level headlines. Really, this shows all headlines with level equal or greater than the level @@ -6222,7 +6411,7 @@ results." (interactive) (let ((level (save-excursion (goto-char (point-min)) - (if (re-search-forward org-outline-regexp-bol nil t) + (if (re-search-forward (concat "^" outline-regexp) nil t) (progn (goto-char (match-beginning 0)) (funcall outline-level)))))) @@ -6334,7 +6523,7 @@ are at least `org-cycle-separator-lines' empty lines before the headline." (org-back-over-empty-lines) (if (save-excursion (goto-char (max (point-min) (1- (point)))) - (org-on-heading-p)) + (org-at-heading-p)) (1- (point)) (point)))) (setq b (match-beginning 1))) @@ -6361,7 +6550,7 @@ open and agenda-wise Org files." (let ((files (mapcar 'expand-file-name (org-agenda-files)))) (dolist (buf (buffer-list)) (with-current-buffer buf - (if (and (org-mode-p) (buffer-file-name)) + (if (and (eq major-mode 'org-mode) (buffer-file-name)) (let ((file (expand-file-name (buffer-file-name)))) (unless (member file files) (push file files)))))) @@ -6377,7 +6566,7 @@ open and agenda-wise Org files." (defun org-cycle-hide-drawers (state) "Re-hide all drawers after a visibility state change." - (when (and (org-mode-p) + (when (and (eq major-mode 'org-mode) (not (memq state '(overview folded contents)))) (save-excursion (let* ((globalp (memq state '(contents all))) @@ -6447,16 +6636,11 @@ DATA should have been made by `org-outline-overlay-data'." (widen) (show-all) (mapc (lambda (c) - (setq o (make-overlay (car c) (cdr c))) - (overlay-put o 'invisible 'outline)) + (outline-flag-region (car c) (cdr c) t)) data))))) ;;; Folding of blocks -(defconst org-block-regexp - "^[ \t]*#\\+begin_?\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_?\\1[ \t]*$" - "Regular expression for hiding blocks.") - (defvar org-hide-block-overlays nil "Overlays hiding blocks.") (make-variable-buffer-local 'org-hide-block-overlays) @@ -6651,7 +6835,7 @@ or nil." (save-window-excursion (delete-other-windows) (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) - (switch-to-buffer + (org-pop-to-buffer-same-window (condition-case nil (make-indirect-buffer (current-buffer) "*org-goto*") (error (make-indirect-buffer (current-buffer) "*org-goto*")))) @@ -6716,7 +6900,7 @@ or nil." (defun org-goto-left () "Finish `org-goto' by going to the new location." (interactive) - (if (org-on-heading-p) + (if (org-at-heading-p) (progn (beginning-of-line 1) (setq org-goto-selected-point (point) @@ -6727,7 +6911,7 @@ or nil." (defun org-goto-right () "Finish `org-goto' by going to the new location." (interactive) - (if (org-on-heading-p) + (if (org-at-heading-p) (progn (setq org-goto-selected-point (point) org-goto-exit-command 'right) @@ -6776,7 +6960,7 @@ frame is not changed." (setq beg (point) heading (org-get-heading)) (org-end-of-subtree t t) - (if (org-on-heading-p) (backward-char 1)) + (if (org-at-heading-p) (backward-char 1)) (setq end (point))) (if (and (buffer-live-p org-last-indirect-buffer) (not (eq org-indirect-buffer-display 'new-frame)) @@ -6789,7 +6973,7 @@ frame is not changed." (and arg (eq org-indirect-buffer-display 'dedicated-frame))) (select-frame (make-frame)) (delete-other-windows) - (switch-to-buffer ibuf) + (org-pop-to-buffer-same-window ibuf) (org-set-frame-title heading)) ((eq org-indirect-buffer-display 'dedicated-frame) (raise-frame @@ -6798,10 +6982,10 @@ frame is not changed." org-indirect-dedicated-frame) (setq org-indirect-dedicated-frame (make-frame))))) (delete-other-windows) - (switch-to-buffer ibuf) + (org-pop-to-buffer-same-window ibuf) (org-set-frame-title (concat "Indirect: " heading))) ((eq org-indirect-buffer-display 'current-window) - (switch-to-buffer ibuf)) + (org-pop-to-buffer-same-window ibuf)) ((eq org-indirect-buffer-display 'other-window) (pop-to-buffer ibuf)) (t (error "Invalid value"))) @@ -6810,6 +6994,7 @@ frame is not changed." (narrow-to-region beg end) (show-all) (goto-char pos) + (run-hook-with-args 'org-cycle-hook 'all) (and (window-live-p cwin) (select-window cwin)))) (defun org-get-indirect-buffer (&optional buffer) @@ -6853,15 +7038,15 @@ This is important for non-interactive uses of the command." (if (or (= (buffer-size) 0) (and (not (save-excursion (and (ignore-errors (org-back-to-heading invisible-ok)) - (org-on-heading-p)))) - (not (org-in-item-p)))) + (org-at-heading-p)))) + (or force-heading (not (org-in-item-p))))) (progn (insert "\n* ") (run-hooks 'org-insert-heading-hook)) (when (or force-heading (not (org-insert-item))) (let* ((empty-line-p nil) (level nil) - (on-heading (org-on-heading-p)) + (on-heading (org-at-heading-p)) (head (save-excursion (condition-case nil (progn @@ -6874,7 +7059,7 @@ This is important for non-interactive uses of the command." ;; Find a heading level before the inline task (while (and (setq level (org-up-heading-safe)) (>= level org-inlinetask-min-level))) - (if (org-on-heading-p) + (if (org-at-heading-p) (org-back-to-heading invisible-ok) (error "This should not happen"))) (setq empty-line-p (org-previous-line-empty-p)) @@ -6884,7 +7069,7 @@ This is important for non-interactive uses of the command." (blank (if (eq blank-a 'auto) empty-line-p blank-a)) pos hide-previous previous-pos) (cond - ((and (org-on-heading-p) (bolp) + ((and (org-at-heading-p) (bolp) (or (bobp) (save-excursion (backward-char 1) (not (outline-invisible-p))))) ;; insert before the current line @@ -6909,6 +7094,7 @@ This is important for non-interactive uses of the command." (let ((p (point))) (goto-char (point-at-bol)) (and (looking-at org-complex-heading-regexp) + (match-beginning 4) (> p (match-beginning 4))))))) tags pos) (cond @@ -6924,7 +7110,7 @@ This is important for non-interactive uses of the command." (or (org-previous-line-empty-p) (and blank (newline))) (open-line 1)) - ((org-on-heading-p) + ((org-at-heading-p) (when hide-previous (show-children) (org-show-entry)) @@ -6969,14 +7155,15 @@ When NO-TODO is non-nil, don't include TODO keywords." (looking-at org-complex-heading-regexp) (match-string 4)) (no-tags - (looking-at "\\*+[ \t]+\\([^\n\r]*?\\)\\([ \t]+:[[:alnum:]:_@#%]+:[ \t]*\\)?$") + (looking-at (concat org-outline-regexp + "\\(.*?\\)" + "\\(?:[ \t]+:[[:alnum:]:_@#%]+:\\)?[ \t]*$")) (match-string 1)) (no-todo - (looking-at (concat "\\*+[ \t]+" org-todo-regexp " +" - "\\([^\n\r]*?[ \t]+:[[:alnum:]:_@#%]+:[ \t]*\\)?$")) - (match-string 2)) - (t (looking-at "\\*+[ \t]+\\([^\r\n]*\\)") - (match-string 1))))) + (looking-at org-todo-line-regexp) + (match-string 3)) + (t (looking-at org-heading-regexp) + (match-string 2))))) (defun org-heading-components () "Return the components of the current heading. @@ -7058,7 +7245,7 @@ Works for outline headings and for plain lists alike." (interactive "P") (org-insert-heading arg) (cond - ((org-on-heading-p) (org-do-demote)) + ((org-at-heading-p) (org-do-demote)) ((org-at-item-p) (org-indent-item)))) (defun org-insert-todo-subheading (arg) @@ -7067,7 +7254,7 @@ Works for outline headings and for plain lists alike." (interactive "P") (org-insert-todo-heading arg) (cond - ((org-on-heading-p) (org-do-demote)) + ((org-at-heading-p) (org-do-demote)) ((org-at-item-p) (org-indent-item)))) ;;; Promotion and Demotion @@ -7137,9 +7324,8 @@ in the region." The level is the number of stars at the beginning of the headline." (save-excursion (org-with-limited-levels - (ignore-errors - (org-back-to-heading t) - (funcall outline-level))))) + (if (ignore-errors (org-back-to-heading t)) + (funcall outline-level))))) (defun org-get-previous-line-level () "Return the outline depth of the last headline before the current line. @@ -7196,7 +7382,7 @@ in the region." after-change-functions)) (up-head (concat (make-string (org-get-valid-level level -1) ?*) " ")) (diff (abs (- level (length up-head) -1)))) - (if (= level 1) (error "Cannot promote to level 0. UNDO to recover if necessary")) + (if (= level 1) (error "Cannot promote to level 0. UNDO to recover if necessary")) (replace-match up-head nil t) ;; Fixup tag positioning (and org-auto-align-tags (org-set-tags nil t)) @@ -7282,6 +7468,7 @@ After top level, it switches back to sibling level." (not (eobp))) (funcall fun))))) +(defvar org-property-end-re) ; silence byte-compiler (defun org-fixup-indentation (diff) "Change the indentation in the current entry by DIFF. However, if any line in the current entry has no indentation, or if it @@ -7517,15 +7704,15 @@ the inserted text when done." (org-with-limited-levels (let* ((visp (not (outline-invisible-p))) (txt tree) - (^re_ (concat "\\(\\*+\\)[ \t]*")) ;FIXME: Why `concat'? + (^re_ "\\(\\*+\\)[ \t]*") (old-level (if (string-match org-outline-regexp-bol txt) (- (match-end 0) (match-beginning 0) 1) -1)) (force-level (cond (level (prefix-numeric-value level)) ((and (looking-at "[ \t]*$") (string-match - ^re_ (buffer-substring - (point-at-bol) (point)))) + "^\\*+$" (buffer-substring + (point-at-bol) (point)))) (- (match-end 1) (match-beginning 1))) ((and (bolp) (looking-at org-outline-regexp)) @@ -7535,7 +7722,7 @@ the inserted text when done." (condition-case nil (progn (outline-previous-visible-heading 1) - (if (looking-at re) ;FIXME: What's `re'? + (if (looking-at ^re_) (- (match-end 0) (match-beginning 0) 1) 1)) (error 1)))) @@ -7544,7 +7731,7 @@ the inserted text when done." (progn (or (looking-at org-outline-regexp) (outline-next-visible-heading 1)) - (if (looking-at re) ;FIXME: What's `re'? + (if (looking-at ^re_) (- (match-end 0) (match-beginning 0) 1) 1)) (error 1)))) @@ -7562,7 +7749,7 @@ the inserted text when done." (if force-level (delete-region (point-at-bol) (point))) ;; Paste - (beginning-of-line 1) + (beginning-of-line (if (bolp) 1 2)) (unless for-yank (org-back-over-empty-lines)) (setq beg (point)) (and (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt)) @@ -7663,23 +7850,17 @@ If yes, remember the marker and the distance to BEG." (narrow-to-region (progn (org-back-to-heading t) (point)) (progn (org-end-of-subtree t t) - (if (and (org-on-heading-p) (not (eobp))) (backward-char 1)) + (if (and (org-at-heading-p) (not (eobp))) (backward-char 1)) (point))))))) (defun org-narrow-to-block () "Narrow buffer to the current block." (interactive) - (let ((bstart "^[ \t]*#\\+begin") - (bend "[ \t]*#\\+end") - (case-fold-search t) ;; allow #+BEGIN - b_start b_end) - (if (org-in-regexps-block-p bstart bend) - (progn - (save-excursion (re-search-backward bstart nil t) - (setq b_start (match-beginning 0))) - (save-excursion (re-search-forward bend nil t) - (setq b_end (match-end 0))) - (narrow-to-region b_start b_end)) + (let* ((case-fold-search t) + (blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*" + "^[ \t]*#\\+end_.*"))) + (if blockp + (narrow-to-region (car blockp) (cdr blockp)) (error "Not in a block")))) (eval-when-compile @@ -7713,7 +7894,8 @@ I this way you can spell out a number of instances of a repeating task, and still retain the repeater to cover future instances of the task." (interactive "nNumber of clones to produce: \nsDate shift per clone (e.g. +1w, empty to copy unchanged): ") (let (beg end template task idprop - shift-n shift-what doshift nmin nmax (n-no-remove -1)) + shift-n shift-what doshift nmin nmax (n-no-remove -1) + (drawer-re org-drawer-regexp)) (if (not (and (integerp n) (> n 0))) (error "Invalid number of replications %s" n)) (if (and (setq doshift (and (stringp shift) (string-match "\\S-" shift))) @@ -7734,19 +7916,6 @@ and still retain the repeater to cover future instances of the task." (or (bolp) (insert "\n")) (setq end (point)) (setq template (buffer-substring beg end)) - ;; Remove clocks and empty drawers - (with-temp-buffer - (insert template) - (goto-char (point-min)) - (while (re-search-forward - "^[ \t]*CLOCK:.*$" (save-excursion (org-end-of-subtree t t)) t) - (replace-match "") - (kill-whole-line)) - (goto-char (point-min)) - (while (re-search-forward - (concat "^[ \t]*:" (regexp-opt org-drawers) ":[ \t]*$") nil t) - (mapc (lambda(d) (org-remove-empty-drawer-at d (point))) org-drawers)) - (setq template (buffer-substring (point-min) (point-max)))) (when (and doshift (string-match "<[^<>\n]+ \\+[0-9]+[dwmy][^<>\n]*>" template)) (delete-region beg end) @@ -7759,11 +7928,17 @@ and still retain the repeater to cover future instances of the task." (insert template) (org-mode) (goto-char (point-min)) + (org-show-subtree) (and idprop (if org-clone-delete-id (org-entry-delete nil "ID") (org-id-get-create t))) - (while (re-search-forward org-property-start-re nil t) - (org-remove-empty-drawer-at "PROPERTIES" (point))) + (unless (= n 0) + (while (re-search-forward "^[ \t]*CLOCK:.*$" nil t) + (kill-whole-line)) + (goto-char (point-min)) + (while (re-search-forward drawer-re nil t) + (mapc (lambda (d) + (org-remove-empty-drawer-at d (point))) org-drawers))) (goto-char (point-min)) (when doshift (while (re-search-forward org-ts-regexp-both nil t) @@ -7853,9 +8028,9 @@ WITH-CASE, the sorting considers case as well." (setq end (region-end) what "region") (goto-char (region-beginning)) - (if (not (org-on-heading-p)) (outline-next-heading)) + (if (not (org-at-heading-p)) (outline-next-heading)) (setq start (point))) - ((or (org-on-heading-p) + ((or (org-at-heading-p) (condition-case nil (progn (org-back-to-heading) t) (error nil))) ;; we will sort the children of the current headline (org-back-to-heading) @@ -7871,7 +8046,7 @@ WITH-CASE, the sorting considers case as well." (t ;; we will sort the top-level entries in this file (goto-char (point-min)) - (or (org-on-heading-p) (outline-next-heading)) + (or (org-at-heading-p) (outline-next-heading)) (setq start (point)) (goto-char (point-max)) (beginning-of-line 1) @@ -8335,6 +8510,7 @@ call CMD." (org-back-to-heading t) (setq beg (point) end (org-end-of-subtree t t))) (put-text-property beg end 'org-category cat) + (put-text-property beg end 'org-category-position beg) (goto-char pos))))))) @@ -8525,7 +8701,7 @@ For file links, arg negates `org-context-in-file-links'." (setq cpltxt (concat "file:" file) link (org-make-link cpltxt)))) - ((and (buffer-file-name (buffer-base-buffer)) (org-mode-p)) + ((and (buffer-file-name (buffer-base-buffer)) (eq major-mode 'org-mode)) (setq custom-id (org-entry-get nil "CUSTOM_ID")) (cond ((org-in-regexp "<<\\(.*?\\)>>") @@ -8563,7 +8739,7 @@ For file links, arg negates `org-context-in-file-links'." ;; Add a context search string (when (org-xor org-context-in-file-links arg) (setq txt (cond - ((org-on-heading-p) nil) + ((org-at-heading-p) nil) ((org-region-active-p) (buffer-substring (region-beginning) (region-end))) (t nil))) @@ -8853,7 +9029,7 @@ This command can be called in any mode to insert a link in Org-mode syntax." (org-load-modules-maybe) (org-run-like-in-org-mode 'org-insert-link)) -(defun org-insert-link (&optional complete-file link-location) +(defun org-insert-link (&optional complete-file link-location default-description) "Insert a link. At the prompt, enter the link. Completion can be used to insert any of the link protocol prefixes like @@ -8871,8 +9047,8 @@ be displayed in the buffer instead of the link. If there is already a link at point, this command will allow you to edit link and description parts. -With a \\[universal-argument] prefix, prompts for a file to link to. The file name can -be selected using completion. The path to the file will be relative to the +With a \\[universal-argument] prefix, prompts for a file to link to. The file name can +be selected using completion. The path to the file will be relative to the current directory if the file is in the current directory or a subdirectory. Otherwise, the link will be the absolute path as completed in the minibuffer \(i.e. normally ~/path/to/file). You can configure this behavior using the @@ -8889,7 +9065,10 @@ called with the link target, and the result will be the default link description. If the LINK-LOCATION parameter is non-nil, this value will be -used as the link location instead of reading one interactively." +used as the link location instead of reading one interactively. + +If the DEFAULT-DESCRIPTION parameter is non-nil, this value will +be used as the default description." (interactive "P") (let* ((wcf (current-window-configuration)) (region (if (org-region-active-p) @@ -8930,7 +9109,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (reverse org-stored-links) "\n")))) (let ((cw (selected-window))) (select-window (get-buffer-window "*Org Links*" 'visible)) - (with-current-buffer "*Org Links*" (setq truncate-lines) t) + (with-current-buffer "*Org Links*" (setq truncate-lines t)) (unless (pos-visible-in-window-p (point-max)) (org-fit-window-to-buffer)) (and (window-live-p cw) (select-window cw))) @@ -9017,7 +9196,8 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (setq desc path)))) (if org-make-link-description-function - (setq desc (funcall org-make-link-description-function link desc))) + (setq desc (funcall org-make-link-description-function link desc)) + (if default-description (setq desc default-description))) (setq desc (read-string "Description: " desc)) (unless (string-match "\\S-" desc) (setq desc nil)) @@ -9054,10 +9234,12 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (defun org-completing-read (&rest args) "Completing-read with SPACE being a normal character." - (let ((minibuffer-local-completion-map + (let ((enable-recursive-minibuffers t) + (minibuffer-local-completion-map (copy-keymap minibuffer-local-completion-map))) (org-defkey minibuffer-local-completion-map " " 'self-insert-command) (org-defkey minibuffer-local-completion-map "?" 'self-insert-command) + (org-defkey minibuffer-local-completion-map (kbd "C-c !") 'org-time-stamp-inactive) (apply 'org-icompleting-read args))) (defun org-completing-read-no-i (&rest args) @@ -9228,7 +9410,8 @@ This is still an experimental function, your mileage may vary." (org-open-at-point 'in-emacs)) (defun org-open-at-mouse (ev) - "Open file link or URL at mouse." + "Open file link or URL at mouse. +See the docstring of `org-open-file' for details." (interactive "e") (mouse-set-point ev) (if (eq major-mode 'org-agenda-mode) @@ -9289,7 +9472,7 @@ application the system uses for this file type." (setq org-window-config-before-follow-link (current-window-configuration)) (org-remove-occur-highlights nil nil t) (cond - ((and (org-on-heading-p) + ((and (org-at-heading-p) (not (org-in-regexp (concat org-plain-link-re "\\|" org-bracket-link-regexp "\\|" @@ -9337,7 +9520,8 @@ application the system uses for this file type." (save-excursion (when (or (org-in-regexp org-angle-link-re) (org-in-regexp org-plain-link-re)) - (setq type (match-string 1) path (match-string 2)) + (setq type (match-string 1) + path (org-link-unescape (match-string 2))) (throw 'match t))) (save-excursion (when (org-in-regexp (org-re "\\(:[[:alnum:]_@#%:]+\\):[ \t]*$")) @@ -9391,13 +9575,16 @@ application the system uses for this file type." (apply cmd (nreverse args1)))) ((member type '("http" "https" "ftp" "news")) - (browse-url (concat type ":" (org-link-escape - path org-link-escape-chars-browser)))) + (browse-url (concat type ":" (if (org-string-match-p "[[:nonascii:] ]" path) + (org-link-escape + path org-link-escape-chars-browser) + path)))) ((string= type "doi") - (browse-url (concat "http://dx.doi.org/" - (org-link-escape - path org-link-escape-chars-browser)))) + (browse-url (concat "http://dx.doi.org/" (if (org-string-match-p "[[:nonascii:] ]" path) + (org-link-escape + path org-link-escape-chars-browser) + path)))) ((member type '("message")) (browse-url (concat type ":" path))) @@ -9463,7 +9650,8 @@ application the system uses for this file type." ((equal arg '(16)) ''org-occur) (t nil)) ,pos))) - (condition-case nil (eval cmd) + (condition-case nil (let ((org-link-search-inhibit-query t)) + (eval cmd)) (error (progn (widen) (eval cmd)))))) (t @@ -9499,7 +9687,7 @@ there is one, offer it as link number zero." ((equal (length links) 1) (setq link (list (car links)))) ((and (integerp nth) (>= (length links) (if have-zero (1+ nth) nth))) - (setq link (nth (if have-zero nth (1- nth)) links))) + (setq link (list (nth (if have-zero nth (1- nth)) links)))) (t ; we have to select a link (save-excursion (save-window-excursion @@ -9607,13 +9795,18 @@ the window configuration before `org-open-at-point' was called using: (set-window-configuration org-window-config-before-follow-link)") (defvar org-link-search-inhibit-query nil) ;; dynamically scoped -(defun org-link-search (s &optional type avoid-pos) +(defun org-link-search (s &optional type avoid-pos stealth) "Search for a link search option. If S is surrounded by forward slashes, it is interpreted as a regular expression. In org-mode files, this will create an `org-occur' sparse tree. In ordinary files, `occur' will be used to list matches. If the current buffer is in `dired-mode', grep will be used to search -in all files. If AVOID-POS is given, ignore matches near that position." +in all files. If AVOID-POS is given, ignore matches near that position. + +When optional argument STEALTH is non-nil, do not modify +visibility around point, thus ignoring +`org-show-hierarchy-above', `org-show-following-heading' and +`org-show-siblings' variables." (let ((case-fold-search t) (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " ")) (markers (concat "\\(?:" (mapconcat (lambda (x) (regexp-quote (car x))) @@ -9664,12 +9857,12 @@ in all files. If AVOID-POS is given, ignore matches near that position." ((string-match "^/\\(.*\\)/$" s) ;; A regular expression (cond - ((org-mode-p) + ((eq major-mode 'org-mode) (org-occur (match-string 1 s))) ;;((eq major-mode 'dired-mode) ;; (grep (concat "grep -n -e '" (match-string 1 s) "' *"))) (t (org-do-occur (match-string 1 s))))) - ((and (org-mode-p) org-link-search-must-match-exact-headline) + ((and (eq major-mode 'org-mode) org-link-search-must-match-exact-headline) (and (equal (string-to-char s) ?*) (setq s (substring s 1))) (goto-char (point-min)) (cond @@ -9737,7 +9930,9 @@ in all files. If AVOID-POS is given, ignore matches near that position." (goto-char (match-beginning 1)) (goto-char pos) (error "No match")))))) - (and (org-mode-p) (org-show-context 'link-search)) + (and (eq major-mode 'org-mode) + (not stealth) + (org-show-context 'link-search)) type)) (defun org-search-not-self (group &rest args) @@ -9833,7 +10028,7 @@ onto the ring." (setq p org-mark-ring)) (setq org-mark-ring-last-goto p) (setq m (car p)) - (switch-to-buffer (marker-buffer m)) + (org-pop-to-buffer-same-window (marker-buffer m)) (goto-char m) (if (or (outline-invisible-p) (org-invisible-p2)) (org-show-context 'mark-goto)))) @@ -9891,6 +10086,10 @@ Optional LINE specifies a line to go to, optional SEARCH a string to search for. If LINE or SEARCH is given, the file will be opened in Emacs, unless an entry from org-file-apps that makes use of groups in a regexp matches. + +If you want to change the way frames are used when following a +link, please customize `org-link-frame-setup'. + If the file does not exist, an error is thrown." (let* ((file (if (equal path "") buffer-file-name @@ -9940,8 +10139,8 @@ If the file does not exist, an error is thrown." match) (progn (setq in-emacs (or in-emacs line search)) nil))) ; if we have no match in apps-dlink, - ; always open the file in emacs if line or search - ; is given (for backwards compatibility) + ; always open the file in emacs if line or search + ; is given (for backwards compatibility) (assoc-default dfile (org-apps-regexp-alist apps a-m-a-p) 'string-match) (cdr (assoc ext apps)) @@ -10002,7 +10201,7 @@ If the file does not exist, an error is thrown." (set-match-data link-match-data) (eval cmd)))) (t (funcall (cdr (assq 'file org-link-frame-setup)) file))) - (and (org-mode-p) (eq old-mode 'org-mode) + (and (eq major-mode 'org-mode) (eq old-mode 'org-mode) (or (not (equal old-buffer (current-buffer))) (not (equal old-pos (point)))) (org-mark-ring-push old-pos old-buffer)))) @@ -10215,7 +10414,8 @@ on the system \"/user@host:\"." (or (funcall org-refile-target-verify-function) (throw 'next t)))) (when (and (looking-at org-complex-heading-regexp) - (not (member (match-string 4) excluded-entries))) + (not (member (match-string 4) excluded-entries)) + (match-string 4)) (setq level (org-reduced-level (- (match-end 1) (match-beginning 1))) txt (org-link-display-format (match-string 4)) @@ -10325,7 +10525,7 @@ such as the file name." (interactive "P") (let* ((bfn (buffer-file-name (buffer-base-buffer))) (case-fold-search nil) - (path (and (org-mode-p) (org-get-outline-path)))) + (path (and (eq major-mode 'org-mode) (org-get-outline-path)))) (if current (setq path (append path (save-excursion (org-back-to-heading t) @@ -10391,8 +10591,10 @@ prefix argument (`C-u C-u C-u C-c C-w')." (goto-char region-start) (or (bolp) (goto-char (point-at-bol))) (setq region-start (point)) - (unless (org-kill-is-subtree-p - (buffer-substring region-start region-end)) + (unless (or (org-kill-is-subtree-p + (buffer-substring region-start region-end)) + (prog1 org-refile-active-region-within-subtree + (org-toggle-heading))) (error "The region is not a (sequence of) subtree(s)"))) (if (equal goto '(16)) (org-refile-goto-last-stored) @@ -10407,10 +10609,20 @@ prefix argument (`C-u C-u C-u C-c C-w')." (marker-position org-clock-hd-marker))) (setq goto nil))) (setq it (or rfloc - (save-excursion - (org-refile-get-location - (if goto "Goto" "Refile to") default-buffer - org-refile-allow-creating-parent-nodes))))) + (let (heading-text) + (save-excursion + (unless goto + (org-back-to-heading t) + (setq heading-text + (nth 4 (org-heading-components)))) + (org-refile-get-location + (cond (goto "Goto") + (regionp "Refile region to") + (t (concat "Refile subtree \"" + heading-text "\" to"))) + default-buffer + org-refile-allow-creating-parent-nodes + goto)))))) (setq file (nth 1 it) re (nth 2 it) pos (nth 3 it)) @@ -10429,7 +10641,7 @@ prefix argument (`C-u C-u C-u C-c C-w')." (find-file-noselect file))) (if goto (progn - (switch-to-buffer nbuf) + (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context 'org-goto)) (if regionp @@ -10489,16 +10701,20 @@ prefix argument (`C-u C-u C-u C-c C-w')." (bookmark-jump "org-refile-last-stored") (message "This is the location of the last refile")) -(defun org-refile-get-location (&optional prompt default-buffer new-nodes) +(defun org-refile-get-location (&optional prompt default-buffer new-nodes + no-exclude) "Prompt the user for a refile location, using PROMPT. PROMPT should not be suffixed with a colon and a space, because this function appends the default value from -`org-refile-history' automatically, if that is not empty." +`org-refile-history' automatically, if that is not empty. +When NO-EXCLUDE is set, do not exclude headlines in the current subtree, +this is used for the GOTO interface." (let ((org-refile-targets org-refile-targets) (org-refile-use-outline-path org-refile-use-outline-path) excluded-entries) (when (and (eq major-mode 'org-mode) - (not org-refile-use-cache)) + (not org-refile-use-cache) + (not no-exclude)) (org-map-tree (lambda() (setq excluded-entries @@ -10776,7 +10992,7 @@ Error if there is no such block at point." "Update all dynamic blocks in the buffer. This function can be used in a hook." (interactive) - (when (org-mode-p) + (when (eq major-mode 'org-mode) (org-map-dblocks 'org-update-dblock))) @@ -10795,10 +11011,8 @@ This function can be used in a hook." "BEGIN_CENTER" "END_CENTER" "BEGIN_SRC" "END_SRC" "BEGIN_RESULT" "END_RESULT" - "SOURCE:" "SRCNAME:" "FUNCTION:" - "RESULTS:" "DATA:" + "NAME:" "RESULTS:" "HEADER:" "HEADERS:" - "BABEL:" "CATEGORY:" "COLUMNS:" "PROPERTY:" "CAPTION:" "LABEL:" "SETUPFILE:" @@ -10897,13 +11111,16 @@ expands them." (save-excursion (org-back-to-heading) (let (case-fold-search) - (if (looking-at (concat org-outline-regexp - "\\( *\\<" org-comment-string "\\>[ \t]*\\)")) - (replace-match "" t t nil 1) - (if (looking-at org-outline-regexp) - (progn - (goto-char (match-end 0)) - (insert org-comment-string " "))))))) + (cond + ((looking-at (format org-heading-keyword-regexp-format + org-comment-string)) + (goto-char (match-end 1)) + (looking-at (concat " +" org-comment-string)) + (replace-match "" t t) + (when (eolp) (insert " "))) + ((looking-at org-outline-regexp) + (goto-char (match-end 0)) + (insert org-comment-string " ")))))) (defvar org-last-todo-state-is-todo nil "This is non-nil when the last TODO state change led to a TODO state. @@ -10929,26 +11146,21 @@ nil or a string to be used for the todo mark." ) (let* ((ct (org-current-time)) (dct (decode-time ct)) (ct1 - (if (< (nth 2 dct) org-extend-today-until) + (if (and org-use-effective-time + (< (nth 2 dct) org-extend-today-until)) (encode-time 0 59 23 (1- (nth 3 dct)) (nth 4 dct) (nth 5 dct)) ct))) ct1)) (defun org-todo-yesterday (&optional arg) - "Like `org-todo' but the time of change will be 23:59 of yesterday" + "Like `org-todo' but the time of change will be 23:59 of yesterday." (interactive "P") - (let* ((hour (third (decode-time - (org-current-time)))) - (org-extend-today-until (1+ hour))) - (org-todo arg))) - -(defun org-agenda-todo-yesterday (&optional arg) - "Like `org-agenda-todo' but the time of change will be 23:59 of yesterday" - (interactive "P") - (let* ((hour (third (decode-time - (org-current-time)))) - (org-extend-today-until (1+ hour))) - (org-agenda-todo arg))) + (if (eq major-mode 'org-agenda-mode) + (apply 'org-agenda-todo-yesterday arg) + (let* ((hour (third (decode-time + (org-current-time)))) + (org-extend-today-until (1+ hour))) + (org-todo arg)))) (defun org-todo (&optional arg) "Change the TODO state of an item. @@ -10969,6 +11181,7 @@ With numeric prefix arg, switch to that state. With a double \\[universal-argument] prefix, switch to the next set of TODO \ keywords (nextset). With a triple \\[universal-argument] prefix, circumvent any state blocking. +With a numeric prefix arg of 0, inhibit note taking for the change. For calling through lisp, arg is also interpreted in the following way: 'none -> empty state @@ -10979,191 +11192,202 @@ For calling through lisp, arg is also interpreted in the following way: \"WAITING\" -> switch to the specified keyword, but only if it really is a member of `org-todo-keywords'." (interactive "P") - (if (equal arg '(16)) (setq arg 'nextset)) - (let ((org-blocker-hook org-blocker-hook) - (case-fold-search nil)) - (when (equal arg '(64)) - (setq arg nil org-blocker-hook nil)) - (when (and org-blocker-hook - (or org-inhibit-blocking - (org-entry-get nil "NOBLOCKING"))) - (setq org-blocker-hook nil)) - (save-excursion - (catch 'exit - (org-back-to-heading t) - (if (looking-at org-outline-regexp) (goto-char (1- (match-end 0)))) - (or (looking-at (concat " +" org-todo-regexp "\\( +\\|$\\)")) - (looking-at " *")) - (let* ((match-data (match-data)) - (startpos (point-at-bol)) - (logging (save-match-data (org-entry-get nil "LOGGING" t t))) - (org-log-done org-log-done) - (org-log-repeat org-log-repeat) - (org-todo-log-states org-todo-log-states) - (this (match-string 1)) - (hl-pos (match-beginning 0)) - (head (org-get-todo-sequence-head this)) - (ass (assoc head org-todo-kwd-alist)) - (interpret (nth 1 ass)) - (done-word (nth 3 ass)) - (final-done-word (nth 4 ass)) - (last-state (or this "")) - (completion-ignore-case t) - (member (member this org-todo-keywords-1)) - (tail (cdr member)) - (state (cond - ((and org-todo-key-trigger - (or (and (equal arg '(4)) - (eq org-use-fast-todo-selection 'prefix)) - (and (not arg) org-use-fast-todo-selection - (not (eq org-use-fast-todo-selection - 'prefix))))) - ;; Use fast selection - (org-fast-todo-selection)) - ((and (equal arg '(4)) - (or (not org-use-fast-todo-selection) - (not org-todo-key-trigger))) - ;; Read a state with completion - (org-icompleting-read - "State: " (mapcar (lambda(x) (list x)) - org-todo-keywords-1) - nil t)) - ((eq arg 'right) - (if this - (if tail (car tail) nil) - (car org-todo-keywords-1))) - ((eq arg 'left) - (if (equal member org-todo-keywords-1) - nil + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + `(org-todo ,arg) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (if (equal arg '(16)) (setq arg 'nextset)) + (let ((org-blocker-hook org-blocker-hook) + (case-fold-search nil)) + (when (equal arg '(64)) + (setq arg nil org-blocker-hook nil)) + (when (and org-blocker-hook + (or org-inhibit-blocking + (org-entry-get nil "NOBLOCKING"))) + (setq org-blocker-hook nil)) + (save-excursion + (catch 'exit + (org-back-to-heading t) + (if (looking-at org-outline-regexp) (goto-char (1- (match-end 0)))) + (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[ \t]*$\\)")) + (looking-at "\\(?: *\\|[ \t]*$\\)")) + (let* ((match-data (match-data)) + (startpos (point-at-bol)) + (logging (save-match-data (org-entry-get nil "LOGGING" t t))) + (org-log-done org-log-done) + (org-log-repeat org-log-repeat) + (org-todo-log-states org-todo-log-states) + (org-inhibit-logging + (if (equal arg 0) + (progn (setq arg nil) 'note) org-inhibit-logging)) + (this (match-string 1)) + (hl-pos (match-beginning 0)) + (head (org-get-todo-sequence-head this)) + (ass (assoc head org-todo-kwd-alist)) + (interpret (nth 1 ass)) + (done-word (nth 3 ass)) + (final-done-word (nth 4 ass)) + (last-state (or this "")) + (completion-ignore-case t) + (member (member this org-todo-keywords-1)) + (tail (cdr member)) + (state (cond + ((and org-todo-key-trigger + (or (and (equal arg '(4)) + (eq org-use-fast-todo-selection 'prefix)) + (and (not arg) org-use-fast-todo-selection + (not (eq org-use-fast-todo-selection + 'prefix))))) + ;; Use fast selection + (org-fast-todo-selection)) + ((and (equal arg '(4)) + (or (not org-use-fast-todo-selection) + (not org-todo-key-trigger))) + ;; Read a state with completion + (org-icompleting-read + "State: " (mapcar (lambda(x) (list x)) + org-todo-keywords-1) + nil t)) + ((eq arg 'right) (if this - (nth (- (length org-todo-keywords-1) - (length tail) 2) - org-todo-keywords-1) - (org-last org-todo-keywords-1)))) - ((and (eq org-use-fast-todo-selection t) (equal arg '(4)) - (setq arg nil))) ; hack to fall back to cycling - (arg - ;; user or caller requests a specific state - (cond - ((equal arg "") nil) - ((eq arg 'none) nil) - ((eq arg 'done) (or done-word (car org-done-keywords))) - ((eq arg 'nextset) - (or (car (cdr (member head org-todo-heads))) - (car org-todo-heads))) - ((eq arg 'previousset) - (let ((org-todo-heads (reverse org-todo-heads))) + (if tail (car tail) nil) + (car org-todo-keywords-1))) + ((eq arg 'left) + (if (equal member org-todo-keywords-1) + nil + (if this + (nth (- (length org-todo-keywords-1) + (length tail) 2) + org-todo-keywords-1) + (org-last org-todo-keywords-1)))) + ((and (eq org-use-fast-todo-selection t) (equal arg '(4)) + (setq arg nil))) ; hack to fall back to cycling + (arg + ;; user or caller requests a specific state + (cond + ((equal arg "") nil) + ((eq arg 'none) nil) + ((eq arg 'done) (or done-word (car org-done-keywords))) + ((eq arg 'nextset) (or (car (cdr (member head org-todo-heads))) - (car org-todo-heads)))) - ((car (member arg org-todo-keywords-1))) - ((stringp arg) - (error "State `%s' not valid in this file" arg)) - ((nth (1- (prefix-numeric-value arg)) - org-todo-keywords-1)))) - ((null member) (or head (car org-todo-keywords-1))) - ((equal this final-done-word) nil) ;; -> make empty - ((null tail) nil) ;; -> first entry - ((memq interpret '(type priority)) - (if (eq this-command last-command) - (car tail) - (if (> (length tail) 0) - (or done-word (car org-done-keywords)) - nil))) - (t - (car tail)))) - (state (or - (run-hook-with-args-until-success - 'org-todo-get-default-hook state last-state) - state)) - (next (if state (concat " " state " ") " ")) - (change-plist (list :type 'todo-state-change :from this :to state - :position startpos)) - dolog now-done-p) - (when org-blocker-hook + (car org-todo-heads))) + ((eq arg 'previousset) + (let ((org-todo-heads (reverse org-todo-heads))) + (or (car (cdr (member head org-todo-heads))) + (car org-todo-heads)))) + ((car (member arg org-todo-keywords-1))) + ((stringp arg) + (error "State `%s' not valid in this file" arg)) + ((nth (1- (prefix-numeric-value arg)) + org-todo-keywords-1)))) + ((null member) (or head (car org-todo-keywords-1))) + ((equal this final-done-word) nil) ;; -> make empty + ((null tail) nil) ;; -> first entry + ((memq interpret '(type priority)) + (if (eq this-command last-command) + (car tail) + (if (> (length tail) 0) + (or done-word (car org-done-keywords)) + nil))) + (t + (car tail)))) + (state (or + (run-hook-with-args-until-success + 'org-todo-get-default-hook state last-state) + state)) + (next (if state (concat " " state " ") " ")) + (change-plist (list :type 'todo-state-change :from this :to state + :position startpos)) + dolog now-done-p) + (when org-blocker-hook + (setq org-last-todo-state-is-todo + (not (member this org-done-keywords))) + (unless (save-excursion + (save-match-data + (org-with-wide-buffer + (run-hook-with-args-until-failure + 'org-blocker-hook change-plist)))) + (if (org-called-interactively-p 'interactive) + (error "TODO state change from %s to %s blocked" this state) + ;; fail silently + (message "TODO state change from %s to %s blocked" this state) + (throw 'exit nil)))) + (store-match-data match-data) + (replace-match next t t) + (unless (pos-visible-in-window-p hl-pos) + (message "TODO state changed to %s" (org-trim next))) + (unless head + (setq head (org-get-todo-sequence-head state) + ass (assoc head org-todo-kwd-alist) + interpret (nth 1 ass) + done-word (nth 3 ass) + final-done-word (nth 4 ass))) + (when (memq arg '(nextset previousset)) + (message "Keyword-Set %d/%d: %s" + (- (length org-todo-sets) -1 + (length (memq (assoc state org-todo-sets) org-todo-sets))) + (length org-todo-sets) + (mapconcat 'identity (assoc state org-todo-sets) " "))) (setq org-last-todo-state-is-todo - (not (member this org-done-keywords))) - (unless (save-excursion - (save-match-data - (org-with-wide-buffer - (run-hook-with-args-until-failure - 'org-blocker-hook change-plist)))) - (if (org-called-interactively-p 'interactive) - (error "TODO state change from %s to %s blocked" this state) - ;; fail silently - (message "TODO state change from %s to %s blocked" this state) - (throw 'exit nil)))) - (store-match-data match-data) - (replace-match next t t) - (unless (pos-visible-in-window-p hl-pos) - (message "TODO state changed to %s" (org-trim next))) - (unless head - (setq head (org-get-todo-sequence-head state) - ass (assoc head org-todo-kwd-alist) - interpret (nth 1 ass) - done-word (nth 3 ass) - final-done-word (nth 4 ass))) - (when (memq arg '(nextset previousset)) - (message "Keyword-Set %d/%d: %s" - (- (length org-todo-sets) -1 - (length (memq (assoc state org-todo-sets) org-todo-sets))) - (length org-todo-sets) - (mapconcat 'identity (assoc state org-todo-sets) " "))) - (setq org-last-todo-state-is-todo - (not (member state org-done-keywords))) - (setq now-done-p (and (member state org-done-keywords) - (not (member this org-done-keywords)))) - (and logging (org-local-logging logging)) - (when (and (or org-todo-log-states org-log-done) - (not (eq org-inhibit-logging t)) - (not (memq arg '(nextset previousset)))) - ;; we need to look at recording a time and note - (setq dolog (or (nth 1 (assoc state org-todo-log-states)) - (nth 2 (assoc this org-todo-log-states)))) - (if (and (eq dolog 'note) (eq org-inhibit-logging 'note)) - (setq dolog 'time)) - (when (and state - (member state org-not-done-keywords) - (not (member this org-not-done-keywords))) - ;; This is now a todo state and was not one before - ;; If there was a CLOSED time stamp, get rid of it. - (org-add-planning-info nil nil 'closed)) - (when (and now-done-p org-log-done) - ;; It is now done, and it was not done before - (org-add-planning-info 'closed (org-current-effective-time)) - (if (and (not dolog) (eq 'note org-log-done)) - (org-add-log-setup 'done state this 'findpos 'note))) - (when (and state dolog) - ;; This is a non-nil state, and we need to log it - (org-add-log-setup 'state state this 'findpos dolog))) - ;; Fixup tag positioning - (org-todo-trigger-tag-changes state) - (and org-auto-align-tags (not org-setting-tags) (org-set-tags nil t)) - (when org-provide-todo-statistics - (org-update-parent-todo-statistics)) - (run-hooks 'org-after-todo-state-change-hook) - (if (and arg (not (member state org-done-keywords))) - (setq head (org-get-todo-sequence-head state))) - (put-text-property (point-at-bol) (point-at-eol) 'org-todo-head head) - ;; Do we need to trigger a repeat? - (when now-done-p - (when (boundp 'org-agenda-headline-snapshot-before-repeat) - ;; This is for the agenda, take a snapshot of the headline. - (save-match-data - (setq org-agenda-headline-snapshot-before-repeat - (org-get-heading)))) - (org-auto-repeat-maybe state)) - ;; Fixup cursor location if close to the keyword - (if (and (outline-on-heading-p) - (not (bolp)) - (save-excursion (beginning-of-line 1) - (looking-at org-todo-line-regexp)) - (< (point) (+ 2 (or (match-end 2) (match-end 1))))) - (progn - (goto-char (or (match-end 2) (match-end 1))) - (and (looking-at " ") (just-one-space)))) - (when org-trigger-hook - (save-excursion - (run-hook-with-args 'org-trigger-hook change-plist)))))))) + (not (member state org-done-keywords))) + (setq now-done-p (and (member state org-done-keywords) + (not (member this org-done-keywords)))) + (and logging (org-local-logging logging)) + (when (and (or org-todo-log-states org-log-done) + (not (eq org-inhibit-logging t)) + (not (memq arg '(nextset previousset)))) + ;; we need to look at recording a time and note + (setq dolog (or (nth 1 (assoc state org-todo-log-states)) + (nth 2 (assoc this org-todo-log-states)))) + (if (and (eq dolog 'note) (eq org-inhibit-logging 'note)) + (setq dolog 'time)) + (when (and state + (member state org-not-done-keywords) + (not (member this org-not-done-keywords))) + ;; This is now a todo state and was not one before + ;; If there was a CLOSED time stamp, get rid of it. + (org-add-planning-info nil nil 'closed)) + (when (and now-done-p org-log-done) + ;; It is now done, and it was not done before + (org-add-planning-info 'closed (org-current-effective-time)) + (if (and (not dolog) (eq 'note org-log-done)) + (org-add-log-setup 'done state this 'findpos 'note))) + (when (and state dolog) + ;; This is a non-nil state, and we need to log it + (org-add-log-setup 'state state this 'findpos dolog))) + ;; Fixup tag positioning + (org-todo-trigger-tag-changes state) + (and org-auto-align-tags (not org-setting-tags) (org-set-tags nil t)) + (when org-provide-todo-statistics + (org-update-parent-todo-statistics)) + (run-hooks 'org-after-todo-state-change-hook) + (if (and arg (not (member state org-done-keywords))) + (setq head (org-get-todo-sequence-head state))) + (put-text-property (point-at-bol) (point-at-eol) 'org-todo-head head) + ;; Do we need to trigger a repeat? + (when now-done-p + (when (boundp 'org-agenda-headline-snapshot-before-repeat) + ;; This is for the agenda, take a snapshot of the headline. + (save-match-data + (setq org-agenda-headline-snapshot-before-repeat + (org-get-heading)))) + (org-auto-repeat-maybe state)) + ;; Fixup cursor location if close to the keyword + (if (and (outline-on-heading-p) + (not (bolp)) + (save-excursion (beginning-of-line 1) + (looking-at org-todo-line-regexp)) + (< (point) (+ 2 (or (match-end 2) (match-end 1))))) + (progn + (goto-char (or (match-end 2) (match-end 1))) + (and (looking-at " ") (just-one-space)))) + (when org-trigger-hook + (save-excursion + (run-hook-with-args 'org-trigger-hook change-plist))))))))) (defun org-block-todo-from-children-or-siblings-or-parent (change-plist) "Block turning an entry into a TODO, using the hierarchy. @@ -11217,7 +11441,7 @@ changes. Such blocking occurs when: (forward-line 1) (re-search-forward org-not-done-heading-regexp pos t)) (throw 'dont-block nil)) ; block, there is an older sibling not done. - ;; Search further up the hierarchy, to see if an ancestor is blocked + ;; Search further up the hierarchy, to see if an anchestor is blocked (while t (goto-char parent-pos) (if (not (looking-at org-not-done-heading-regexp)) @@ -11291,8 +11515,11 @@ changes because there are unchecked boxes in this entry." (outline-next-heading) (setq end (point)) (goto-char beg) - (if (re-search-forward "^[ \t]*\\([-+*]\\|[0-9]+[.)]\\)[ \t]+\\[[- ]\\]" - end t) + (if (org-list-search-forward + (concat (org-item-beginning-re) + "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?" + "\\[[- ]\\]") + end t) (progn (if (boundp 'org-blocked-by-checkboxes) (setq org-blocked-by-checkboxes t)) @@ -11319,17 +11546,17 @@ This should be called with the cursor in a line with a statistics cookie." (progn (org-update-checkbox-count 'all) (org-map-entries 'org-update-parent-todo-statistics)) - (if (not (org-on-heading-p)) + (if (not (org-at-heading-p)) (org-update-checkbox-count) (let ((pos (move-marker (make-marker) (point))) end l1 l2) (ignore-errors (org-back-to-heading t)) - (if (not (org-on-heading-p)) + (if (not (org-at-heading-p)) (org-update-checkbox-count) (setq l1 (org-outline-level)) (setq end (save-excursion (outline-next-heading) - (if (org-on-heading-p) (setq l2 (org-outline-level))) + (if (org-at-heading-p) (setq l2 (org-outline-level))) (point))) (if (and (save-excursion (re-search-forward @@ -11724,39 +11951,47 @@ With argument REMOVE, remove any deadline from the item. With argument TIME, set the deadline at the corresponding date. TIME can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"." (interactive "P") - (let* ((old-date (org-entry-get nil "DEADLINE")) - (repeater (and old-date - (string-match - "\\([.+-]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?" - old-date) - (match-string 1 old-date)))) - (if remove - (progn - (when (and old-date org-log-redeadline) - (org-add-log-setup 'deldeadline nil old-date 'findpos - org-log-redeadline)) - (org-remove-timestamp-with-keyword org-deadline-string) - (message "Item no longer has a deadline.")) - (org-add-planning-info 'deadline time 'closed) - (when (and old-date org-log-redeadline - (not (equal old-date - (substring org-last-inserted-timestamp 1 -1)))) - (org-add-log-setup 'redeadline nil old-date 'findpos - org-log-redeadline)) - (when repeater - (save-excursion - (org-back-to-heading t) - (when (re-search-forward (concat org-deadline-string " " - org-last-inserted-timestamp) - (save-excursion - (outline-next-heading) (point)) t) - (goto-char (1- (match-end 0))) - (insert " " repeater) - (setq org-last-inserted-timestamp - (concat (substring org-last-inserted-timestamp 0 -1) - " " repeater - (substring org-last-inserted-timestamp -1)))))) - (message "Deadline on %s" org-last-inserted-timestamp)))) + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + `(org-deadline ',remove ,time) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (let* ((old-date (org-entry-get nil "DEADLINE")) + (repeater (and old-date + (string-match + "\\([.+-]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?" + old-date) + (match-string 1 old-date)))) + (if remove + (progn + (when (and old-date org-log-redeadline) + (org-add-log-setup 'deldeadline nil old-date 'findpos + org-log-redeadline)) + (org-remove-timestamp-with-keyword org-deadline-string) + (message "Item no longer has a deadline.")) + (org-add-planning-info 'deadline time 'closed) + (when (and old-date org-log-redeadline + (not (equal old-date + (substring org-last-inserted-timestamp 1 -1)))) + (org-add-log-setup 'redeadline nil old-date 'findpos + org-log-redeadline)) + (when repeater + (save-excursion + (org-back-to-heading t) + (when (re-search-forward (concat org-deadline-string " " + org-last-inserted-timestamp) + (save-excursion + (outline-next-heading) (point)) t) + (goto-char (1- (match-end 0))) + (insert " " repeater) + (setq org-last-inserted-timestamp + (concat (substring org-last-inserted-timestamp 0 -1) + " " repeater + (substring org-last-inserted-timestamp -1)))))) + (message "Deadline on %s" org-last-inserted-timestamp))))) (defun org-schedule (&optional remove time) "Insert the SCHEDULED: string with a timestamp to schedule a TODO item. @@ -11764,39 +11999,47 @@ With argument REMOVE, remove any scheduling date from the item. With argument TIME, scheduled at the corresponding date. TIME can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"." (interactive "P") - (let* ((old-date (org-entry-get nil "SCHEDULED")) - (repeater (and old-date - (string-match - "\\([.+-]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?" - old-date) - (match-string 1 old-date)))) - (if remove - (progn - (when (and old-date org-log-reschedule) - (org-add-log-setup 'delschedule nil old-date 'findpos - org-log-reschedule)) - (org-remove-timestamp-with-keyword org-scheduled-string) - (message "Item is no longer scheduled.")) - (org-add-planning-info 'scheduled time 'closed) - (when (and old-date org-log-reschedule - (not (equal old-date - (substring org-last-inserted-timestamp 1 -1)))) - (org-add-log-setup 'reschedule nil old-date 'findpos - org-log-reschedule)) - (when repeater - (save-excursion - (org-back-to-heading t) - (when (re-search-forward (concat org-scheduled-string " " - org-last-inserted-timestamp) - (save-excursion - (outline-next-heading) (point)) t) - (goto-char (1- (match-end 0))) - (insert " " repeater) - (setq org-last-inserted-timestamp - (concat (substring org-last-inserted-timestamp 0 -1) - " " repeater - (substring org-last-inserted-timestamp -1)))))) - (message "Scheduled to %s" org-last-inserted-timestamp)))) + (if (and (org-region-active-p) org-loop-over-headlines-in-active-region) + (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level) + 'region-start-level 'region)) + org-loop-over-headlines-in-active-region) + (org-map-entries + `(org-schedule ',remove ,time) + org-loop-over-headlines-in-active-region + cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) + (let* ((old-date (org-entry-get nil "SCHEDULED")) + (repeater (and old-date + (string-match + "\\([.+-]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?" + old-date) + (match-string 1 old-date)))) + (if remove + (progn + (when (and old-date org-log-reschedule) + (org-add-log-setup 'delschedule nil old-date 'findpos + org-log-reschedule)) + (org-remove-timestamp-with-keyword org-scheduled-string) + (message "Item is no longer scheduled.")) + (org-add-planning-info 'scheduled time 'closed) + (when (and old-date org-log-reschedule + (not (equal old-date + (substring org-last-inserted-timestamp 1 -1)))) + (org-add-log-setup 'reschedule nil old-date 'findpos + org-log-reschedule)) + (when repeater + (save-excursion + (org-back-to-heading t) + (when (re-search-forward (concat org-scheduled-string " " + org-last-inserted-timestamp) + (save-excursion + (outline-next-heading) (point)) t) + (goto-char (1- (match-end 0))) + (insert " " repeater) + (setq org-last-inserted-timestamp + (concat (substring org-last-inserted-timestamp 0 -1) + " " repeater + (substring org-last-inserted-timestamp -1)))))) + (message "Scheduled to %s" org-last-inserted-timestamp))))) (defun org-get-scheduled-time (pom &optional inherit) "Get the scheduled time as a time tuple, of a format suitable @@ -11861,9 +12104,8 @@ be removed." default-input (and ts (org-get-compact-tod ts)))))) (when what (setq time - (if (and (stringp time) - (string-match "^[-+]+[0-9]" time)) - ;; This is a relative time, set the proper date + (if (stringp time) + ;; This is a string (relative or absolute), set proper date (apply 'encode-time (org-read-date-analyze time default-time (decode-time default-time))) @@ -11914,7 +12156,7 @@ be removed." (re-search-forward org-closed-time-regexp nil t))) (replace-match "") (if (looking-at "--+<[^>]+>") (replace-match "")))) - (and (looking-at "^[ \t]+") (replace-match "")) + (and (looking-at "[ \t]+") (replace-match "")) (and org-adapt-indentation (bolp) (org-indent-to-column col)) (when what (insert @@ -12041,7 +12283,7 @@ EXTRA is additional text that will be inserted into the notes buffer." (setq org-log-note-window-configuration (current-window-configuration)) (delete-other-windows) (move-marker org-log-note-return-to (point)) - (switch-to-buffer (marker-buffer org-log-note-marker)) + (org-pop-to-buffer-same-window (marker-buffer org-log-note-marker)) (goto-char org-log-note-marker) (org-switch-to-buffer-other-window "*Org Note*") (erase-buffer) @@ -12071,7 +12313,8 @@ EXTRA is additional text that will be inserted into the notes buffer." "this entry") (t (error "This should not happen"))))) (if org-log-note-extra (insert org-log-note-extra)) - (org-set-local 'org-finish-function 'org-store-log-note))) + (org-set-local 'org-finish-function 'org-store-log-note) + (run-hooks 'org-log-buffer-setup-hook))) (defvar org-note-abort nil) ; dynamically scoped (defun org-store-log-note () @@ -12097,6 +12340,12 @@ EXTRA is additional text that will be inserted into the notes buffer." (cons "%T" (format-time-string (org-time-stamp-format 'long nil) org-log-note-effective-time)) + (cons "%d" (format-time-string + (org-time-stamp-format nil 'inactive) + org-log-note-effective-time)) + (cons "%D" (format-time-string + (org-time-stamp-format nil nil) + org-log-note-effective-time)) (cons "%s" (if org-log-note-state (concat "\"" org-log-note-state "\"") "")) @@ -12175,7 +12424,7 @@ b Show deadlines and scheduled items before a date. a Show deadlines and scheduled items after a date." (interactive "P") (let (ans kwd value) - (message "Sparse tree: [r]egexp [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty\n [d]eadlines [b]efore-date [a]fter-date") + (message "Sparse tree: [r]egexp [/]regexp [t]odo [T]odo-kwd [m]atch [p]roperty\n [d]eadlines [b]efore-date [a]fter-date [D]ates range") (setq ans (read-char-exclusive)) (cond ((equal ans ?d) @@ -12184,6 +12433,8 @@ a Show deadlines and scheduled items after a date." (call-interactively 'org-check-before-date)) ((equal ans ?a) (call-interactively 'org-check-after-date)) + ((equal ans ?D) + (call-interactively 'org-check-dates-range)) ((equal ans ?t) (org-show-todo-tree nil)) ((equal ans ?T) @@ -12286,9 +12537,9 @@ starting point when no match is found." (defun org-show-context (&optional key) "Make sure point and context are visible. How much context is shown depends upon the variables -`org-show-hierarchy-above', `org-show-following-heading'. and -`org-show-siblings'." - (let ((heading-p (org-on-heading-p t)) +`org-show-hierarchy-above', `org-show-following-heading', +`org-show-entry-below' and `org-show-siblings'." + (let ((heading-p (org-at-heading-p t)) (hierarchy-p (org-get-alist-option org-show-hierarchy-above key)) (following-p (org-get-alist-option org-show-following-heading key)) (entry-p (org-get-alist-option org-show-entry-below key)) @@ -12476,7 +12727,7 @@ ACTION can be `set', `up', `down', or a character." (defvar org-agenda-archives-mode) (defvar org-map-continue-from nil "Position from where mapping should continue. -Can be set by the action argument to `org-scan-tag's and `org-map-entries'.") +Can be set by the action argument to `org-scan-tags' and `org-map-entries'.") (defvar org-scanner-tags nil "The current tag list while the tags scanner is running.") @@ -12491,7 +12742,7 @@ obtain a list of properties. Building the tags list for each entry in such a file becomes an N^2 operation - but with this variable set, it scales as N.") -(defun org-scan-tags (action matcher &optional todo-only) +(defun org-scan-tags (action matcher &optional todo-only start-level) "Scan headline tags with inheritance and produce output ACTION. ACTION can be `sparse-tree' to produce a sparse tree in the current buffer, @@ -12501,9 +12752,17 @@ this case the return value is a list of all return values from these calls. MATCHER is a Lisp form to be evaluated, testing if a given set of tags qualifies a headline for inclusion. When TODO-ONLY is non-nil, -only lines with a TODO keyword are included in the output." +only lines with a TODO keyword are included in the output. + +START-LEVEL can be a string with asterisks, reducing the scope to +headlines matching this string." (require 'org-agenda) - (let* ((re (concat "^" org-outline-regexp " *\\(\\<\\(" + (let* ((re (concat "^" + (if start-level + ;; Get the correct level to match + (concat "\\*\\{" (number-to-string start-level) "\\} ") + org-outline-regexp) + " *\\(\\<\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") (org-re "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))) @@ -12513,6 +12772,7 @@ only lines with a TODO keyword are included in the output." 'mouse-face 'highlight 'org-not-done-regexp org-not-done-regexp 'org-todo-regexp org-todo-regexp + 'org-complex-heading-regexp org-complex-heading-regexp 'help-echo (format "mouse-2 or RET jump to org file %s" (abbreviate-file-name @@ -12532,6 +12792,7 @@ only lines with a TODO keyword are included in the output." (org-overview) (org-remove-occur-highlights)) (while (re-search-forward re nil t) + (setq org-map-continue-from nil) (catch :skip (setq todo (if (match-end 1) (org-match-string-no-properties 2)) tags (if (match-end 4) (org-match-string-no-properties 4))) @@ -12603,7 +12864,7 @@ only lines with a TODO keyword are included in the output." (match-beginning 0) (match-beginning 1))) (org-show-context 'tags-tree)) ((eq action 'agenda) - (setq txt (org-format-agenda-item + (setq txt (org-agenda-format-item "" (concat (if (eq org-tags-match-list-sublevels 'indented) @@ -12996,7 +13257,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state." (goto-char (match-beginning 1)) (insert " ") (delete-region (point) (1+ (match-beginning 2))) - (setq ncol (max (1+ (current-column)) + (setq ncol (max (current-column) (1+ col) (if (> to-col 0) to-col @@ -13011,7 +13272,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state." (defun org-set-tags-command (&optional arg just-align) "Call the set-tags command for the current entry." (interactive "P") - (if (org-on-heading-p) + (if (org-at-heading-p) (org-set-tags arg just-align) (save-excursion (org-back-to-heading t) @@ -13055,7 +13316,7 @@ If DATA is nil or the empty string, any tags will be removed." (save-excursion (or (ignore-errors (org-back-to-heading t)) (outline-next-heading)) - (if (org-on-heading-p) + (if (org-at-heading-p) (org-set-tags t) (message "No headings")))) @@ -13159,7 +13420,7 @@ This works in the agenda, and also in an org-mode buffer." (interactive (list (region-beginning) (region-end) (let ((org-last-tags-completion-table - (if (org-mode-p) + (if (eq major-mode 'org-mode) (org-get-buffer-tags) (org-global-tags-completion-table)))) (org-icompleting-read @@ -13178,7 +13439,7 @@ This works in the agenda, and also in an org-mode buffer." (loop for l from l1 to l2 do (org-goto-line l) (setq m (get-text-property (point) 'org-hd-marker)) - (when (or (and (org-mode-p) (org-on-heading-p)) + (when (or (and (eq major-mode 'org-mode) (org-at-heading-p)) (and agendap m)) (setq buf (if agendap (marker-buffer m) (current-buffer)) pos (if agendap m (point))) @@ -13439,7 +13700,7 @@ Returns the new tags string, or nil to not change the current settings." (defun org-get-tags-string () "Get the TAGS string in the current headline." - (unless (org-on-heading-p t) + (unless (org-at-heading-p t) (error "Not on a heading")) (save-excursion (beginning-of-line 1) @@ -13496,6 +13757,9 @@ SCOPE determines the scope of this command. It can be any of: nil The current buffer, respecting the restriction if any tree The subtree started with the entry at point region The entries within the active region, if any +region-start-level + The entries within the active region, but only those at + the same level than the first one. file The current buffer, without restriction file-with-archives The current buffer, and any archives associated with it @@ -13524,61 +13788,76 @@ with `org-get-tags-at'. If your function gets properties with to t around the call to `org-entry-properties' to get the same speedup. Note that if your function moves around to retrieve tags and properties at a *different* entry, you cannot use these techniques." - (let* ((org-agenda-archives-mode nil) ; just to make sure - (org-agenda-skip-archived-trees (memq 'archive skip)) - (org-agenda-skip-comment-trees (memq 'comment skip)) - (org-agenda-skip-function - (car (org-delete-all '(comment archive) skip))) - (org-tags-match-list-sublevels t) - matcher file res - org-todo-keywords-for-agenda - org-done-keywords-for-agenda - org-todo-keyword-alist-for-agenda - org-drawers-for-agenda - org-tag-alist-for-agenda) + (unless (and (or (eq scope 'region) (eq scope 'region-start-level)) + (not (org-region-active-p))) + (let* ((org-agenda-archives-mode nil) ; just to make sure + (org-agenda-skip-archived-trees (memq 'archive skip)) + (org-agenda-skip-comment-trees (memq 'comment skip)) + (org-agenda-skip-function + (car (org-delete-all '(comment archive) skip))) + (org-tags-match-list-sublevels t) + (start-level (eq scope 'region-start-level)) + matcher file res + org-todo-keywords-for-agenda + org-done-keywords-for-agenda + org-todo-keyword-alist-for-agenda + org-drawers-for-agenda + org-tag-alist-for-agenda) - (cond - ((eq match t) (setq matcher t)) - ((eq match nil) (setq matcher t)) - (t (setq matcher (if match (cdr (org-make-tags-matcher match)) t)))) + (cond + ((eq match t) (setq matcher t)) + ((eq match nil) (setq matcher t)) + (t (setq matcher (if match (cdr (org-make-tags-matcher match)) t)))) - (save-excursion - (save-restriction - (cond ((eq scope 'tree) - (org-back-to-heading t) - (org-narrow-to-subtree) - (setq scope nil)) - ((and (eq scope 'region) (org-region-active-p)) - (narrow-to-region (region-beginning) (region-end)) - (setq scope nil))) - - (if (not scope) - (progn - (org-prepare-agenda-buffers - (list (buffer-file-name (current-buffer)))) - (setq res (org-scan-tags func matcher))) - ;; Get the right scope - (cond - ((and scope (listp scope) (symbolp (car scope))) - (setq scope (eval scope))) - ((eq scope 'agenda) - (setq scope (org-agenda-files t))) - ((eq scope 'agenda-with-archives) - (setq scope (org-agenda-files t)) - (setq scope (org-add-archive-files scope))) - ((eq scope 'file) - (setq scope (list (buffer-file-name)))) - ((eq scope 'file-with-archives) - (setq scope (org-add-archive-files (list (buffer-file-name)))))) - (org-prepare-agenda-buffers scope) - (while (setq file (pop scope)) - (with-current-buffer (org-find-base-buffer-visiting file) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (setq res (append res (org-scan-tags func matcher)))))))))) - res)) + (save-excursion + (save-restriction + (cond ((eq scope 'tree) + (org-back-to-heading t) + (org-narrow-to-subtree) + (setq scope nil)) + ((and (or (eq scope 'region) (eq scope 'region-start-level)) + (org-region-active-p)) + ;; If needed, set start-level to a string like "2" + (when start-level + (save-excursion + (goto-char (region-beginning)) + (unless (org-at-heading-p) (outline-next-heading)) + (setq start-level (org-current-level)))) + (narrow-to-region (region-beginning) + (save-excursion + (goto-char (region-end)) + (unless (and (bolp) (org-at-heading-p)) + (outline-next-heading)) + (point))) + (setq scope nil))) + + (if (not scope) + (progn + (org-prepare-agenda-buffers + (list (buffer-file-name (current-buffer)))) + (setq res (org-scan-tags func matcher nil start-level))) + ;; Get the right scope + (cond + ((and scope (listp scope) (symbolp (car scope))) + (setq scope (eval scope))) + ((eq scope 'agenda) + (setq scope (org-agenda-files t))) + ((eq scope 'agenda-with-archives) + (setq scope (org-agenda-files t)) + (setq scope (org-add-archive-files scope))) + ((eq scope 'file) + (setq scope (list (buffer-file-name)))) + ((eq scope 'file-with-archives) + (setq scope (org-add-archive-files (list (buffer-file-name)))))) + (org-prepare-agenda-buffers scope) + (while (setq file (pop scope)) + (with-current-buffer (org-find-base-buffer-visiting file) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (setq res (append res (org-scan-tags func matcher)))))))))) + res))) ;;;; Properties @@ -13748,7 +14027,7 @@ things up because then unnecessary parsing is avoided." beg end range props sum-props key key1 value string clocksum) (save-excursion (when (condition-case nil - (and (org-mode-p) (org-back-to-heading t)) + (and (eq major-mode 'org-mode) (org-back-to-heading t)) (error nil)) (setq beg (point)) (setq sum-props (get-text-property (point) 'org-summaries)) @@ -13859,17 +14138,23 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy." (cdr (assoc property (org-entry-properties nil 'special property))) (let ((range (unless (org-before-first-heading-p) (org-get-property-block)))) - (if (and range - (goto-char (car range)) - (re-search-forward - (org-re-property property) - (cdr range) t)) - ;; Found the property, return it. - (if (match-end 1) - (if literal-nil - (org-match-string-no-properties 1) - (org-not-nil (org-match-string-no-properties 1))) - ""))))))) + (when (and range (goto-char (car range))) + ((lambda (val) (when val (if literal-nil val (org-not-nil val)))) + (cond + ((re-search-forward + (org-re-property property) (cdr range) t) + (if (match-end 1) (org-match-string-no-properties 1) "")) + ((re-search-forward + (org-re-property (concat property "+")) (cdr range) t) + (cdr (assoc + property + (org-update-property-plist + (concat property "+") + (if (match-end 1) (org-match-string-no-properties 1) "") + (list (or (assoc property org-file-properties) + (assoc property org-global-properties) + (assoc property org-global-properties-fixed) + )))))))))))))) (defun org-property-or-variable-value (var &optional inherit) "Check if there is a property fixing the value of VAR. @@ -14221,8 +14506,11 @@ xxx_ALL property) or on existing values in other instances of this property in the current file." (interactive (list nil nil)) (let* ((property (or property (org-read-property-name))) - (value (or value (org-read-property-value property)))) + (value (or value (org-read-property-value property))) + (fn (assoc property org-properties-postprocess-alist))) (setq org-last-set-property property) + ;; Possibly postprocess the inserted value: + (when fn (setq value (funcall (cadr fn) value))) (unless (equal (org-entry-get nil property) value) (org-entry-put nil property value)))) @@ -14387,7 +14675,7 @@ only headings." (goto-char found) (setq lmin (1+ flevel) lmax (+ lmin (if org-odd-levels-only 1 0))) (setq end (save-excursion (org-end-of-subtree t t)))) - (when (org-on-heading-p) + (when (org-at-heading-p) (move-marker (make-marker) (point)))))))) (defun org-find-exact-headline-in-buffer (heading &optional buffer pos-only) @@ -14567,7 +14855,7 @@ The prompt will suggest to enter an ISO date, but you can also enter anything which will at least partially be understood by `parse-time-string'. Unrecognized parts of the date will default to the current day, month, year, hour and minute. If this command is called to replace a timestamp at point, -of to enter the second timestamp of a range, the default time is taken +or to enter the second timestamp of a range, the default time is taken from the existing stamp. Furthermore, the command prefers the future, so if you are giving a date where the year is not given, and the day-month combination is already past in the current year, it will assume you @@ -14835,7 +15123,7 @@ user." (setq ans (replace-match (format "%04d-%02d-%02d\\5" year month day) t nil ans))) - ;; Help matching dotted european dates + ;; Help matching dottet european dates (when (string-match "^ *\\(3[01]\\|0?[1-9]\\|[12][0-9]\\)\\. ?\\(0?[1-9]\\|1[012]\\)\\. ?\\([1-9][0-9][0-9][0-9]\\)?" ans) (setq year (if (match-end 3) @@ -14996,6 +15284,7 @@ WHAT is \"d\", \"w\", \"m\", or \"y\" for day, week, month, year. N is the number of WHATs to shift. DEF-FLAG is t when a double ++ or -- indicates shift relative to the DEFAULT date rather than TODAY." + (require 'parse-time) (when (and (string-match (concat @@ -15259,6 +15548,27 @@ days. If the prefix is a raw \\[universal-argument] prefix, all deadlines are s (message "%d entries after %s" (org-occur regexp nil callback) date))) +(defun org-check-dates-range (start-date end-date) + "Check for deadlines/scheduled entries between START-DATE and END-DATE." + (interactive (list (org-read-date nil nil nil "Range starts") + (org-read-date nil nil nil "Range end"))) + (let ((case-fold-search nil) + (regexp (concat "\\<\\(" org-deadline-string + "\\|" org-scheduled-string + "\\) *<\\([^>]+\\)>")) + (callback + (lambda () + (let ((match (match-string 2))) + (and + (not (time-less-p + (org-time-string-to-time match) + (org-time-string-to-time start-date))) + (time-less-p + (org-time-string-to-time match) + (org-time-string-to-time end-date))))))) + (message "%d entries between %s and %s" + (org-occur regexp nil callback) start-date end-date))) + (defun org-evaluate-time-range (&optional to-buffer) "Evaluate a time range by computing the difference between start and end. Normally the result is just printed in the echo area, but with prefix arg @@ -15336,12 +15646,19 @@ days in order to avoid rounding problems." l (push m l))) (apply 'format fmt (nreverse l)))) -(defun org-time-string-to-time (s) - (apply 'encode-time (org-parse-time-string s))) +(defun org-time-string-to-time (s &optional buffer pos) + (condition-case errdata + (apply 'encode-time (org-parse-time-string s)) + (error (error "Bad timestamp `%s'%s\nError was: %s" + s (if (not (and buffer pos)) + "" + (format " at %d in buffer `%s'" pos buffer)) + (cdr errdata))))) + (defun org-time-string-to-seconds (s) (org-float-time (org-time-string-to-time s))) -(defun org-time-string-to-absolute (s &optional daynr prefer show-all) +(defun org-time-string-to-absolute (s &optional daynr prefer show-all buffer pos) "Convert a time stamp to an absolute day number. If there is a specifier for a cyclic time stamp, get the closest date to DAYNR. @@ -15356,7 +15673,14 @@ The variable date is bound by the calendar when this is called." (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) daynr (time-to-days (current-time))) (match-string 0 s) prefer show-all)) - (t (time-to-days (apply 'encode-time (org-parse-time-string s)))))) + (t (time-to-days + (condition-case errdata + (apply 'encode-time (org-parse-time-string s)) + (error (error "Bad timestamp `%s'%s\nError was: %s" + s (if (not (and buffer pos)) + "" + (format " at %d in buffer `%s'" pos buffer)) + (cdr errdata)))))))) (defun org-days-to-iso-week (days) "Return the iso week number." @@ -15552,7 +15876,7 @@ With prefix ARG, change by that many units." With prefix ARG, change that many days." (interactive "p") (if (and (not (org-at-timestamp-p t)) - (org-on-heading-p)) + (org-at-heading-p)) (org-todo 'up) (org-timestamp-change (prefix-numeric-value arg) 'day 'updown))) @@ -15561,7 +15885,7 @@ With prefix ARG, change that many days." With prefix ARG, change that many days." (interactive "p") (if (and (not (org-at-timestamp-p t)) - (org-on-heading-p)) + (org-at-heading-p)) (org-todo 'down) (org-timestamp-change (- (prefix-numeric-value arg)) 'day) 'updown)) @@ -15581,7 +15905,10 @@ With prefix ARG, change that many days." (setq org-ts-what (cond ((= pos (match-beginning 0)) 'bracket) - ((= pos (1- (match-end 0))) 'bracket) + ;; Point is considered to be "on the bracket" whether + ;; it's really on it or right after it. + ((or (= pos (1- (match-end 0))) + (= pos (match-end 0))) 'bracket) ((org-pos-in-match-range pos 2) 'year) ((org-pos-in-match-range pos 3) 'month) ((org-pos-in-match-range pos 7) 'hour) @@ -15857,7 +16184,7 @@ Entries containing a colon are interpreted as H:MM by "Save all Org-mode buffers without user confirmation." (interactive) (message "Saving all Org-mode buffers...") - (save-some-buffers t 'org-mode-p) + (save-some-buffers t (lambda () (eq major-mode 'org-mode))) (when (featurep 'org-id) (org-id-locations-save)) (message "Saving all Org-mode buffers... done")) @@ -15881,9 +16208,9 @@ changes from another. I believe the procedure must be like this: (save-window-excursion (mapc (lambda (b) - (when (and (with-current-buffer b (org-mode-p)) + (when (and (with-current-buffer b (eq major-mode 'org-mode)) (with-current-buffer b buffer-file-name)) - (switch-to-buffer b) + (org-pop-to-buffer-same-window b) (revert-buffer t 'no-confirm))) (buffer-list)) (when (and (featurep 'org-id) org-id-track-globally) @@ -15894,7 +16221,7 @@ changes from another. I believe the procedure must be like this: ;;;###autoload (defun org-switchb (&optional arg) "Switch between Org buffers. -With a prefix argument, restrict available to files. +With one prefix argument, restrict available buffers to files. With two prefix arguments, restrict available buffers to agenda files. Defaults to `iswitchb' for buffer name completion. @@ -15907,7 +16234,7 @@ Set `org-completion-use-ido' to make it use ido instead." (org-completion-use-ido org-completion-use-ido)) (unless (or org-completion-use-ido org-completion-use-iswitchb) (setq org-completion-use-iswitchb t)) - (switch-to-buffer + (org-pop-to-buffer-same-window (org-icompleting-read "Org buffer: " (mapcar 'list (mapcar 'buffer-name blist)) nil t)))) @@ -15933,17 +16260,17 @@ If EXCLUDE-TMP is non-nil, ignore temporary buffers." (filter (cond ((eq predicate 'files) - (lambda (b) (with-current-buffer b (org-mode-p)))) + (lambda (b) (with-current-buffer b (eq major-mode 'org-mode)))) ((eq predicate 'export) (lambda (b) (string-match "\*Org .*Export" (buffer-name b)))) ((eq predicate 'agenda) (lambda (b) (with-current-buffer b - (and (org-mode-p) + (and (eq major-mode 'org-mode) (setq bfn (buffer-file-name b)) (member (file-truename bfn) agenda-files))))) (t (lambda (b) (with-current-buffer b - (or (org-mode-p) + (or (eq major-mode 'org-mode) (string-match "\*Org .*Export" (buffer-name b))))))))) (delq nil @@ -16074,7 +16401,7 @@ If the current buffer does not, find the first agenda file." (find-file (car files)) (throw 'exit t)))) (find-file (car fs))) - (if (buffer-base-buffer) (switch-to-buffer (buffer-base-buffer))))) + (if (buffer-base-buffer) (org-pop-to-buffer-same-window (buffer-base-buffer))))) (defun org-agenda-file-to-front (&optional to-end) "Move/add the current file to the top of the agenda file list. @@ -16196,10 +16523,11 @@ When a buffer is unmodified, it is just killed. When modified, it is saved (when org-agenda-skip-archived-trees (goto-char (point-min)) (while (re-search-forward rea nil t) - (if (org-on-heading-p t) + (if (org-at-heading-p t) (add-text-properties (point-at-bol) (org-end-of-subtree t) pa)))) (goto-char (point-min)) - (setq re (concat org-outline-regexp-bol "+" org-comment-string "\\>")) + (setq re (format org-heading-keyword-regexp-format + org-comment-string)) (while (re-search-forward re nil t) (add-text-properties (match-beginning 0) (org-end-of-subtree t) pc))) @@ -16230,7 +16558,10 @@ This mode supports entering LaTeX environment and math in LaTeX fragments in Org-mode. \\{org-cdlatex-mode-map}" nil " OCDL" nil - (when org-cdlatex-mode (require 'cdlatex)) + (when org-cdlatex-mode + (require 'cdlatex) + (run-hooks 'cdlatex-mode-hook) + (cdlatex-compute-tables)) (unless org-cdlatex-texmathp-advice-is-done (setq org-cdlatex-texmathp-advice-is-done t) (defadvice texmathp (around org-math-always-on activate) @@ -16242,7 +16573,7 @@ an embedded LaTeX fragment, let texmathp do its job. (interactive) (let (p) (cond - ((not (org-mode-p)) ad-do-it) + ((not (eq major-mode 'org-mode)) ad-do-it) ((eq this-command 'cdlatex-math-symbol) (setq ad-return-value t texmathp-why '("cdlatex-math-symbol in org-mode" . 0))) @@ -16315,14 +16646,16 @@ It makes sense to do so if `org-cdlatex-mode' is active and if the cursor is insert a LaTeX environment." (when org-cdlatex-mode (cond + ;; Before any word on the line: No expansion possible. + ((save-excursion (skip-chars-backward " \t") (bolp)) nil) + ;; Just after first word on the line: Expand it. Make sure it + ;; cannot happen on headlines, though. ((save-excursion (skip-chars-backward "a-zA-Z0-9*") (skip-chars-backward " \t") - (bolp)) - (cdlatex-tab) t) - ((org-inside-LaTeX-fragment-p) + (and (bolp) (not (org-at-heading-p)))) (cdlatex-tab) t) - (t nil)))) + ((org-inside-LaTeX-fragment-p) (cdlatex-tab) t)))) (defun org-cdlatex-underscore-caret (&optional arg) "Execute `cdlatex-sub-superscript' in LaTeX fragments. @@ -16397,8 +16730,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." '(("begin" "^[ \t]*\\(\\\\begin{\\([a-zA-Z0-9\\*]+\\)[^\000]+?\\\\end{\\2}\\)" 1 t) ;; ("$" "\\([ (]\\|^\\)\\(\\(\\([$]\\)\\([^ \r\n,.$].*?\\(\n.*?\\)\\{0,5\\}[^ \r\n,.$]\\)\\4\\)\\)\\([ .,?;:'\")]\\|$\\)" 2 nil) ;; \000 in the following regex is needed for org-inside-LaTeX-fragment-p - ("$1" "\\([^$]\\)\\(\\$[^ \r\n,;.$]\\$\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) - ("$" "\\([^$]\\)\\(\\(\\$\\([^ \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^ \r\n,.$]\\)\\$\\)\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) + ("$1" "\\([^$]\\|^\\)\\(\\$[^ \r\n,;.$]\\$\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) + ("$" "\\([^$]\\|^\\)\\(\\(\\$\\([^ \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^ \r\n,.$]\\)\\$\\)\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) ("\\(" "\\\\([^\000]*?\\\\)" 0 nil) ("\\[" "\\\\\\[[^\000]*?\\\\\\]" 0 nil) ("$$" "\\$\\$[^\000]*?\\$\\$" 0 nil)) @@ -16421,11 +16754,11 @@ Some of the options can be changed using the variable (plist-get (org-infile-export-plist) :latex-header-extra)) (cnt 0) txt hash link beg end re e checkdir executables-checked string - m n block linkfile movefile ov) + m n block-type block linkfile movefile ov) ;; Check the different regular expressions (while (setq e (pop re-list)) - (setq m (car e) re (nth 1 e) n (nth 2 e) - block (if (nth 3 e) "\n\n" "")) + (setq m (car e) re (nth 1 e) n (nth 2 e) block-type (nth 3 e) + block (if block-type "\n\n" "")) (when (member m matchers) (goto-char (point-min)) (while (re-search-forward re nil t) @@ -16454,7 +16787,7 @@ Some of the options can be changed using the variable '(org-protected t)))) (add-text-properties (match-beginning n) (match-end n) '(org-protected t)))) - ((or (eq processing-type 'dvipng) t) + ((eq processing-type 'dvipng) ;; Process to an image (setq txt (match-string n) beg (match-beginning n) end (match-end n) @@ -16510,7 +16843,115 @@ Some of the options can be changed using the variable (insert (org-add-props link (list 'org-latex-src (replace-regexp-in-string - "\"" "" txt))))))))))))) + "\"" "" txt) + 'org-latex-src-embed-type + (if block-type 'paragraph 'character)))))) + ((eq processing-type 'mathml) + ;; Process to MathML + (unless executables-checked + (unless (save-match-data (org-format-latex-mathml-available-p)) + (error "LaTeX to MathML converter not configured")) + (setq executables-checked t)) + (setq txt (match-string n) + beg (match-beginning n) end (match-end n) + cnt (1+ cnt)) + (if msg (message msg cnt)) + (goto-char beg) + (delete-region beg end) + (insert (org-format-latex-as-mathml + txt block-type prefix dir))) + (t + (error "Unknown conversion type %s for latex fragments" + processing-type))))))))) + +(defun org-create-math-formula (latex-frag &optional mathml-file) + "Convert LATEX-FRAG to MathML and store it in MATHML-FILE. +Use `org-latex-to-mathml-convert-command'. If the conversion is +sucessful, return the portion between \" \" +elements otherwise return nil. When MATHML-FILE is specified, +write the results in to that file. When invoked as an +interactive command, prompt for LATEX-FRAG, with initial value +set to the current active region and echo the results for user +inspection." + (interactive (list (let ((frag (when (region-active-p) + (buffer-substring-no-properties + (region-beginning) (region-end))))) + (read-string "LaTeX Fragment: " frag nil frag)))) + (unless latex-frag (error "Invalid latex-frag")) + (let* ((tmp-in-file (file-relative-name + (make-temp-name (expand-file-name "ltxmathml-in")))) + (ignore (write-region latex-frag nil tmp-in-file)) + (tmp-out-file (file-relative-name + (make-temp-name (expand-file-name "ltxmathml-out")))) + (cmd (format-spec + org-latex-to-mathml-convert-command + `((?j . ,(shell-quote-argument + (expand-file-name org-latex-to-mathml-jar-file))) + (?I . ,(shell-quote-argument tmp-in-file)) + (?o . ,(shell-quote-argument tmp-out-file))))) + mathml shell-command-output) + (when (org-called-interactively-p 'any) + (unless (org-format-latex-mathml-available-p) + (error "LaTeX to MathML converter not configured"))) + (message "Running %s" cmd) + (setq shell-command-output (shell-command-to-string cmd)) + (setq mathml + (when (file-readable-p tmp-out-file) + (with-current-buffer (find-file-noselect tmp-out-file t) + (goto-char (point-min)) + (when (re-search-forward + (concat + (regexp-quote + "") + "\\(.\\|\n\\)*" + (regexp-quote "")) nil t) + (prog1 (match-string 0) (kill-buffer)))))) + (cond + (mathml + (setq mathml + (concat "\n" mathml)) + (when mathml-file + (write-region mathml nil mathml-file)) + (when (org-called-interactively-p 'any) + (message mathml))) + ((message "LaTeX to MathML conversion failed") + (message shell-command-output))) + (delete-file tmp-in-file) + (when (file-exists-p tmp-out-file) + (delete-file tmp-out-file)) + mathml)) + +(defun org-format-latex-as-mathml (latex-frag latex-frag-type + prefix &optional dir) + "Use `org-create-math-formula' but check local cache first." + (let* ((absprefix (expand-file-name prefix dir)) + (print-length nil) (print-level nil) + (formula-id (concat + "formula-" + (sha1 + (prin1-to-string + (list latex-frag + org-latex-to-mathml-convert-command))))) + (formula-cache (format "%s-%s.mathml" absprefix formula-id)) + (formula-cache-dir (file-name-directory formula-cache))) + + (unless (file-directory-p formula-cache-dir) + (make-directory formula-cache-dir t)) + + (unless (file-exists-p formula-cache) + (org-create-math-formula latex-frag formula-cache)) + + (if (file-exists-p formula-cache) + ;; Successful conversion. Return the link to MathML file. + (org-add-props + (format "[[file:%s]]" (file-relative-name formula-cache dir)) + (list 'org-latex-src (replace-regexp-in-string "\"" "" latex-frag) + 'org-latex-src-embed-type (if latex-frag-type + 'paragraph 'character))) + ;; Failed conversion. Return the LaTeX fragment verbatim + (add-text-properties + 0 (1- (length latex-frag)) '(org-protected t) latex-frag) + latex-frag))) ;; This function borrows from Ganesh Swami's latex2png.el (defun org-create-formula-image (string tofile options buffer) @@ -16718,6 +17159,44 @@ BEG and END default to the buffer boundaries." ;;;; Key bindings +;; Outline functions from `outline-mode-prefix-map' +;; that can be remapped in Org: +(define-key org-mode-map [remap outline-mark-subtree] 'org-mark-subtree) +(define-key org-mode-map [remap show-subtree] 'org-show-subtree) +(define-key org-mode-map [remap outline-forward-same-level] + 'org-forward-same-level) +(define-key org-mode-map [remap outline-backward-same-level] + 'org-backward-same-level) +(define-key org-mode-map [remap show-branches] + 'org-kill-note-or-show-branches) +(define-key org-mode-map [remap outline-promote] 'org-promote-subtree) +(define-key org-mode-map [remap outline-demote] 'org-demote-subtree) +(define-key org-mode-map [remap outline-insert-heading] 'org-ctrl-c-ret) + +;; Outline functions from `outline-mode-prefix-map' +;; that can not be remapped in Org: +;; - the column "key binding" shows whether the Outline function is still +;; available in Org mode on the same key that it has been bound to in +;; Outline mode: +;; - "overridden": key used for a different functionality in Org mode +;; - else: key still bound to the same Outline function in Org mode +;; | Outline function | key binding | Org replacement | +;; |------------------------------------+-------------+-----------------------| +;; | `outline-next-visible-heading' | `C-c C-n' | still same function | +;; | `outline-previous-visible-heading' | `C-c C-p' | still same function | +;; | `show-children' | `C-c C-i' | visibility cycling | +;; | `hide-subtree' | overridden | visibility cycling | +;; | `outline-up-heading' | `C-c C-u' | still same function | +;; | `hide-body' | overridden | no replacement | +;; | `show-all' | overridden | no replacement | +;; | `hide-entry' | overridden | visibility cycling | +;; | `show-entry' | overridden | no replacement | +;; | `hide-leaves' | overridden | no replacement | +;; | `hide-sublevels' | overridden | no replacement | +;; | `hide-other' | overridden | no replacement | +;; | `outline-move-subtree-up' | `C-c C-^' | better: org-shiftup | +;; | `outline-move-subtree-down' | overridden | better: org-shiftdown | + ;; Make `C-c C-x' a prefix key (org-defkey org-mode-map "\C-c\C-x" (make-sparse-keymap)) @@ -17011,7 +17490,7 @@ If not, return to the original position and throw an error." (interactive) (let ((pos (point))) (call-interactively cmd) - (unless (and (bolp) (org-on-heading-p)) + (unless (and (bolp) (org-at-heading-p)) (goto-char pos) (error "Boundary reached while executing %s" cmd)))) @@ -17022,8 +17501,8 @@ If not, return to the original position and throw an error." (defun org-speed-command-default-hook (keys) "Hook for activating single-letter speed commands. -`org-speed-commands-default' specifies a minimal command set. Use -`org-speed-commands-user' for further customization." +`org-speed-commands-default' specifies a minimal command set. +Use `org-speed-commands-user' for further customization." (when (or (and (bolp) (looking-at org-outline-regexp)) (and (functionp org-use-speed-commands) (funcall org-use-speed-commands))) @@ -17045,11 +17524,11 @@ Each hook takes a single argument, a user-pressed command key which is also a `self-insert-command' from the global map. Within the hook, examine the cursor position and the command key -and return nil or a valid handler as appropriate. Handler could +and return nil or a valid handler as appropriate. Handler could be one of an interactive command, a function, or a form. Set `org-use-speed-commands' to non-nil value to enable this -hook. The default setting is `org-speed-command-default-hook'." +hook. The default setting is `org-speed-command-default-hook'." :group 'org-structure :type 'hook) @@ -17058,6 +17537,7 @@ hook. The default setting is `org-speed-command-default-hook'." If the cursor is in a table looking at whitespace, the whitespace is overwritten, and the table is not marked as requiring realignment." (interactive "p") + (org-check-before-invisible-edit 'insert) (cond ((and org-use-speed-commands (setq org-speed-command @@ -17109,9 +17589,56 @@ overwritten, and the table is not marked as requiring realignment." (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))))))) +(defun org-check-before-invisible-edit (kind) + "Check is editing if kind KIND would be dangerous with invisible text around. +The detailed reaction depends on the user option `org-catch-invisible-edits'." + ;; First, try to get out of here as quickly as possible, to reduce overhead + (if (and org-catch-invisible-edits + (or (not (boundp 'visible-mode)) (not visible-mode)) + (or (get-char-property (point) 'invisible) + (get-char-property (max (point-min) (1- (point))) 'invisible))) + ;; OK, we need to take a closer look + (let* ((invisible-at-point (get-char-property (point) 'invisible)) + (invisible-before-point (if (bobp) nil (get-char-property + (1- (point)) 'invisible))) + (border-and-ok-direction + (or + ;; Check if we are acting predictably before invisible text + (and invisible-at-point (not invisible-before-point) + (memq kind '(insert delete-backward))) + ;; Check if we are acting predictably after invisible text + ;; This works not well, and I have turned it off. It seems + ;; better to always show and stop after invisible text. + ;; (and (not invisible-at-point) invisible-before-point + ;; (memq kind '(insert delete))) + ))) + + (when (or (memq invisible-at-point '(outline org-hide-block)) + (memq invisible-before-point '(outline org-hide-block))) + (if (eq org-catch-invisible-edits 'error) + (error "Editing in invisible areas is prohibited - make visible first")) + ;; Make the area visible + (save-excursion + (if invisible-before-point + (goto-char (previous-single-char-property-change + (point) 'invisible))) + (org-cycle)) + (cond + ((eq org-catch-invisible-edits 'show) + ;; That's it, we do the edit after showing + (message + "Unfolding invisible region around point before editing") + (sit-for 1)) + ((and (eq org-catch-invisible-edits 'smart) + border-and-ok-direction) + (message "Unfolding invisible region around point before editing")) + (t + ;; Don't do the edit, make the user repeat it in full visibility + (error "Edit in invisible region aborted, repeat to confirm with text visible"))))))) + (defun org-fix-tags-on-the-fly () (when (and (equal (char-after (point-at-bol)) ?*) - (org-on-heading-p)) + (org-at-heading-p)) (org-align-tags-here org-tags-column))) (defun org-delete-backward-char (N) @@ -17121,6 +17648,7 @@ front of the next \"|\" separator, to keep the table aligned. The table will still be marked for re-alignment if the field did fill the entire column, because, in this case the deletion might narrow the column." (interactive "p") + (org-check-before-invisible-edit 'delete-backward) (if (and (org-table-p) (eq N 1) (string-match "|" (buffer-substring (point-at-bol) (point))) @@ -17147,6 +17675,7 @@ front of the next \"|\" separator, to keep the table aligned. The table will still be marked for re-alignment if the field did fill the entire column, because, in this case the deletion might narrow the column." (interactive "p") + (org-check-before-invisible-edit 'delete) (if (and (org-table-p) (not (bolp)) (not (= (char-after) ?|)) @@ -17357,7 +17886,7 @@ See the individual commands for more information." (cond ((run-hook-with-args-until-success 'org-shiftmetaleft-hook)) ((org-at-table-p) (call-interactively 'org-table-delete-column)) - ((org-on-heading-p) (call-interactively 'org-promote-subtree)) + ((org-at-heading-p) (call-interactively 'org-promote-subtree)) ((org-at-item-p) (call-interactively 'org-outdent-item-tree)) (t (org-modifier-cursor-error)))) @@ -17370,7 +17899,7 @@ See the individual commands for more information." (cond ((run-hook-with-args-until-success 'org-shiftmetaright-hook)) ((org-at-table-p) (call-interactively 'org-table-insert-column)) - ((org-on-heading-p) (call-interactively 'org-demote-subtree)) + ((org-at-heading-p) (call-interactively 'org-demote-subtree)) ((org-at-item-p) (call-interactively 'org-indent-item-tree)) (t (org-modifier-cursor-error)))) @@ -17383,7 +17912,7 @@ for more information." (cond ((run-hook-with-args-until-success 'org-shiftmetaup-hook)) ((org-at-table-p) (call-interactively 'org-table-kill-row)) - ((org-on-heading-p) (call-interactively 'org-move-subtree-up)) + ((org-at-heading-p) (call-interactively 'org-move-subtree-up)) ((org-at-item-p) (call-interactively 'org-move-item-up)) (t (org-modifier-cursor-error)))) @@ -17396,7 +17925,7 @@ commands for more information." (cond ((run-hook-with-args-until-success 'org-shiftmetadown-hook)) ((org-at-table-p) (call-interactively 'org-table-insert-row)) - ((org-on-heading-p) (call-interactively 'org-move-subtree-down)) + ((org-at-heading-p) (call-interactively 'org-move-subtree-down)) ((org-at-item-p) (call-interactively 'org-move-item-down)) (t (org-modifier-cursor-error)))) @@ -17414,15 +17943,15 @@ See the individual commands for more information." ((run-hook-with-args-until-success 'org-metaleft-hook)) ((org-at-table-p) (org-call-with-arg 'org-table-move-column 'left)) ((org-with-limited-levels - (or (org-on-heading-p) + (or (org-at-heading-p) (and (org-region-active-p) (save-excursion (goto-char (region-beginning)) - (org-on-heading-p))))) + (org-at-heading-p))))) (when (org-check-for-hidden 'headlines) (org-hidden-tree-error)) (call-interactively 'org-do-promote)) ;; At an inline task. - ((org-on-heading-p) + ((org-at-heading-p) (call-interactively 'org-inlinetask-promote)) ((or (org-at-item-p) (and (org-region-active-p) @@ -17443,15 +17972,15 @@ See the individual commands for more information." ((run-hook-with-args-until-success 'org-metaright-hook)) ((org-at-table-p) (call-interactively 'org-table-move-column)) ((org-with-limited-levels - (or (org-on-heading-p) + (or (org-at-heading-p) (and (org-region-active-p) (save-excursion (goto-char (region-beginning)) - (org-on-heading-p))))) + (org-at-heading-p))))) (when (org-check-for-hidden 'headlines) (org-hidden-tree-error)) (call-interactively 'org-do-demote)) ;; At an inline task. - ((org-on-heading-p) + ((org-at-heading-p) (call-interactively 'org-inlinetask-demote)) ((or (org-at-item-p) (and (org-region-active-p) @@ -17498,7 +18027,7 @@ for more information." (cond ((run-hook-with-args-until-success 'org-metaup-hook)) ((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up)) - ((org-on-heading-p) (call-interactively 'org-move-subtree-up)) + ((org-at-heading-p) (call-interactively 'org-move-subtree-up)) ((org-at-item-p) (call-interactively 'org-move-item-up)) (t (transpose-lines 1) (beginning-of-line -1)))) @@ -17511,7 +18040,7 @@ commands for more information." (cond ((run-hook-with-args-until-success 'org-metadown-hook)) ((org-at-table-p) (call-interactively 'org-table-move-row)) - ((org-on-heading-p) (call-interactively 'org-move-subtree-down)) + ((org-at-heading-p) (call-interactively 'org-move-subtree-down)) ((org-at-item-p) (call-interactively 'org-move-item-down)) (t (beginning-of-line 2) (transpose-lines 1) (beginning-of-line 0)))) @@ -17529,7 +18058,7 @@ depending on context. See the individual commands for more information." 'org-timestamp-down 'org-timestamp-up))) ((and (not (eq org-support-shift-select 'always)) org-enable-priority-commands - (org-on-heading-p)) + (org-at-heading-p)) (call-interactively 'org-priority-up)) ((and (not org-support-shift-select) (org-at-item-p)) (call-interactively 'org-previous-item)) @@ -17553,7 +18082,7 @@ depending on context. See the individual commands for more information." 'org-timestamp-up 'org-timestamp-down))) ((and (not (eq org-support-shift-select 'always)) org-enable-priority-commands - (org-on-heading-p)) + (org-at-heading-p)) (call-interactively 'org-priority-down)) ((and (not org-support-shift-select) (org-at-item-p)) (call-interactively 'org-next-item)) @@ -17579,7 +18108,7 @@ Depending on context, this does one of the following: (org-call-for-shift-select 'forward-char)) ((org-at-timestamp-p t) (call-interactively 'org-timestamp-up-day)) ((and (not (eq org-support-shift-select 'always)) - (org-on-heading-p)) + (org-at-heading-p)) (let ((org-inhibit-logging (not org-treat-S-cursor-todo-selection-as-state-change)) (org-inhibit-blocking @@ -17615,7 +18144,7 @@ Depending on context, this does one of the following: (org-call-for-shift-select 'backward-char)) ((org-at-timestamp-p t) (call-interactively 'org-timestamp-down-day)) ((and (not (eq org-support-shift-select 'always)) - (org-on-heading-p)) + (org-at-heading-p)) (let ((org-inhibit-logging (not org-treat-S-cursor-todo-selection-as-state-change)) (org-inhibit-blocking @@ -17642,7 +18171,7 @@ Depending on context, this does one of the following: ((and org-support-shift-select (org-region-active-p)) (org-call-for-shift-select 'forward-word)) ((and (not (eq org-support-shift-select 'always)) - (org-on-heading-p)) + (org-at-heading-p)) (org-call-with-arg 'org-todo 'nextset)) (org-support-shift-select (org-call-for-shift-select 'forward-word)) @@ -17655,7 +18184,7 @@ Depending on context, this does one of the following: ((and org-support-shift-select (org-region-active-p)) (org-call-for-shift-select 'backward-word)) ((and (not (eq org-support-shift-select 'always)) - (org-on-heading-p)) + (org-at-heading-p)) (org-call-with-arg 'org-todo 'previousset)) (org-support-shift-select (org-call-for-shift-select 'backward-word)) @@ -17686,6 +18215,17 @@ Depending on context, this does one of the following: ((org-at-table-p) (call-interactively 'org-table-hline-and-move)) (t (call-interactively 'org-insert-heading)))) +(defun org-find-visible () + (let ((s (point))) + (while (and (not (= (point-max) (setq s (next-overlay-change s)))) + (get-char-property s 'invisible))) + s)) +(defun org-find-invisible () + (let ((s (point))) + (while (and (not (= (point-max) (setq s (next-overlay-change s)))) + (not (get-char-property s 'invisible)))) + s)) + (defun org-copy-visible (beg end) "Copy the visible parts of the region." (interactive "r") @@ -17757,6 +18297,7 @@ When in an #+include line, visit the include file. Otherwise call (call-interactively 'org-table-edit-formulas)) (t (call-interactively 'ffap)))) +(defvar org-table-coordinate-overlays) ; defined in org-table.el (defun org-ctrl-c-ctrl-c (&optional arg) "Set tags in headline, or update according to changed information at point. @@ -17815,14 +18356,16 @@ This command does many different things, depending on context: (fboundp org-finish-function)) (funcall org-finish-function)) ((run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-hook)) + ((org-in-regexp org-ts-regexp-both) + (org-timestamp-change 0 'day)) ((or (looking-at org-property-start-re) (org-at-property-p)) (call-interactively 'org-property-action)) - ((org-on-target-p) (call-interactively 'org-update-radio-target-regexp)) + ((org-at-target-p) (call-interactively 'org-update-radio-target-regexp)) ((and (org-in-regexp "\\[\\([0-9]*%\\|[0-9]*/[0-9]*\\)\\]") - (or (org-on-heading-p) (org-at-item-p))) + (or (org-at-heading-p) (org-at-item-p))) (call-interactively 'org-update-statistics-cookies)) - ((org-on-heading-p) (call-interactively 'org-set-tags)) + ((org-at-heading-p) (call-interactively 'org-set-tags)) ((org-at-table.el-p) (message "Use C-c ' to edit table.el tables")) ((org-at-table-p) @@ -17842,44 +18385,61 @@ This command does many different things, depending on context: (struct (org-list-struct)) (old-struct (copy-tree struct)) (parents (org-list-parents-alist struct)) - (prevs (org-list-prevs-alist struct)) (orderedp (org-entry-get nil "ORDERED")) (firstp (= (org-list-get-top-point struct) (point-at-bol))) block-item) ;; Use a light version of `org-toggle-checkbox' to avoid ;; computing list structure twice. - (org-list-set-checkbox (point-at-bol) struct - (cond - ((equal arg '(16)) "[-]") - ((equal arg '(4)) nil) - ((equal "[X]" cbox) "[ ]") - (t "[X]"))) - (org-list-struct-fix-ind struct parents) - (org-list-struct-fix-bul struct prevs) - (setq block-item - (org-list-struct-fix-box struct parents prevs orderedp)) + (let ((new-box (cond + ((equal arg '(16)) "[-]") + ((equal arg '(4)) nil) + ((equal "[X]" cbox) "[ ]") + (t "[X]")))) + (if (and firstp arg) + ;; If at first item of sub-list, remove check-box from + ;; every item at the same level. + (mapc + (lambda (pos) (org-list-set-checkbox pos struct new-box)) + (org-list-get-all-items + (point-at-bol) struct (org-list-prevs-alist struct))) + (org-list-set-checkbox (point-at-bol) struct new-box))) + ;; Replicate `org-list-write-struct', while grabbing a return + ;; value from `org-list-struct-fix-box'. + (org-list-struct-fix-ind struct parents 2) + (org-list-struct-fix-item-end struct) + (let ((prevs (org-list-prevs-alist struct))) + (org-list-struct-fix-bul struct prevs) + (org-list-struct-fix-ind struct parents) + (setq block-item + (org-list-struct-fix-box struct parents prevs orderedp))) + (org-list-struct-apply-struct struct old-struct) + (org-update-checkbox-count-maybe) (when block-item (message "Checkboxes were removed due to unchecked box at line %d" (org-current-line block-item))) - (org-list-struct-apply-struct struct old-struct) - (org-update-checkbox-count-maybe) (when firstp (org-list-send-list 'maybe)))) ((org-at-item-p) - ;; Cursor at an item: repair list. Do checkbox related actions - ;; only if function was called with an argument. Send list only + ;; Cursor at an item: repair list. Do checkbox related actions + ;; only if function was called with an argument. Send list only ;; if at top item. (let* ((struct (org-list-struct)) - (old-struct (copy-tree struct)) - (parents (org-list-parents-alist struct)) - (prevs (org-list-prevs-alist struct)) + (new-struct struct) (firstp (= (org-list-get-top-point struct) (point-at-bol)))) - (org-list-struct-fix-ind struct parents) - (org-list-struct-fix-bul struct prevs) (when arg - (org-list-set-checkbox (point-at-bol) struct "[ ]") - (org-list-struct-fix-box struct parents prevs)) - (org-list-struct-apply-struct struct old-struct) + (setq new-struct (copy-tree struct)) + (if firstp + ;; If at first item of sub-list, add check-box to every + ;; item at the same level. + (mapc + (lambda (pos) + (unless (org-list-get-checkbox pos new-struct) + (org-list-set-checkbox pos new-struct "[ ]"))) + (org-list-get-all-items + (point-at-bol) new-struct (org-list-prevs-alist new-struct))) + (org-list-set-checkbox (point-at-bol) new-struct "[ ]"))) + (org-list-write-struct + new-struct (org-list-parents-alist new-struct) struct) (when arg (org-update-checkbox-count-maybe)) (when firstp (org-list-send-list 'maybe)))) ((save-excursion (beginning-of-line 1) (looking-at org-dblock-start-re)) @@ -17900,6 +18460,9 @@ This command does many different things, depending on context: (t (let ((org-inhibit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) + (when (boundp 'org-table-coordinate-overlays) + (mapc 'delete-overlay org-table-coordinate-overlays) + (setq org-table-coordinate-overlays nil)) (org-save-outline-visibility 'use-markers (org-mode-restart))) (message "Local setup has been refreshed")))) ((org-clock-update-time-maybe)) @@ -17939,7 +18502,7 @@ See the individual commands for more information." ((and (org-in-item-p) indent) (if (and (org-at-item-p) (>= (point) (match-end 0))) (progn - (newline) + (save-match-data (newline)) (org-indent-line-to (length (match-string 0)))) (let ((ind (org-get-indentation))) (newline) @@ -17947,7 +18510,9 @@ See the individual commands for more information." (org-indent-line-function) (org-indent-line-to ind))))) ((and org-return-follows-link - (eq (get-text-property (point) 'face) 'org-link)) + (let ((tprop (get-text-property (point) 'face))) + (or (eq tprop 'org-link) + (and (listp tprop) (memq 'org-link tprop))))) (call-interactively 'org-open-at-point)) ((and (org-at-heading-p) (looking-at @@ -18001,7 +18566,7 @@ all headlines to items, shifting text accordingly. If it is an item, convert all items to normal lines. -If it is normal text, change region into an item. With a prefix +If it is normal text, change region into an item. With a prefix argument ARG, change each line in region into an item." (interactive "P") (let ((shift-text @@ -18055,7 +18620,7 @@ argument ARG, change each line in region into an item." (save-excursion (goto-char beg) (cond - ;; Case 1. Start at an item: de-itemize. Note that it only + ;; Case 1. Start at an item: de-itemize. Note that it only ;; happens when a region is active: `org-ctrl-c-minus' ;; would call `org-cycle-list-bullet' otherwise. ((org-at-item-p) @@ -18065,7 +18630,7 @@ argument ARG, change each line in region into an item." (delete-region (point) (match-end 0))) (forward-line))) ;; Case 2. Start at an heading: convert to items. - ((org-on-heading-p) + ((org-at-heading-p) (let* ((bul (org-list-bullet-string "-")) (bul-len (length bul)) ;; Indentation of the first heading. It should be @@ -18099,7 +18664,7 @@ argument ARG, change each line in region into an item." ;; an item. (arg (while (< (point) end) - (unless (or (org-on-heading-p) (org-at-item-p)) + (unless (or (org-at-heading-p) (org-at-item-p)) (if (looking-at "\\([ \t]*\\)\\(\\S-\\)") (replace-match (concat "\\1" (org-list-bullet-string "-") "\\2")))) @@ -18164,9 +18729,9 @@ stars to add." (goto-char beg) (cond ;; Case 1. Started at an heading: de-star headings. - ((org-on-heading-p) + ((org-at-heading-p) (while (< (point) end) - (when (org-on-heading-p t) + (when (org-at-heading-p t) (looking-at org-outline-regexp) (replace-match "")) (forward-line))) ;; Case 2. Started at an item: change items into headlines. @@ -18211,7 +18776,7 @@ stars to add." (t "*"))) ; inside heading, oddeven (rpl (concat stars add-stars " "))) (while (< (point) end) - (when (and (not (org-on-heading-p)) (not (org-at-item-p)) + (when (and (not (org-at-heading-p)) (not (org-at-item-p)) (looking-at "\\([ \t]*\\)\\(\\S-\\)")) (replace-match (concat rpl (match-string 2)))) (forward-line))))))))) @@ -18355,23 +18920,23 @@ See the individual commands for more information." ["Previous link" org-previous-link t] "--" ["Descriptive Links" - (progn (add-to-invisibility-spec '(org-link)) (org-restart-font-lock)) + org-toggle-link-display :style radio - :selected (member '(org-link) buffer-invisibility-spec)] + :selected org-descriptive-links + ] ["Literal Links" - (progn - (org-remove-from-invisibility-spec '(org-link)) (org-restart-font-lock)) + org-toggle-link-display :style radio - :selected (not (member '(org-link) buffer-invisibility-spec))]) + :selected (not org-descriptive-links)]) "--" ("TODO Lists" ["TODO/DONE/-" org-todo t] ("Select keyword" - ["Next keyword" org-shiftright (org-on-heading-p)] - ["Previous keyword" org-shiftleft (org-on-heading-p)] + ["Next keyword" org-shiftright (org-at-heading-p)] + ["Previous keyword" org-shiftleft (org-at-heading-p)] ["Complete Keyword" pcomplete (assq :todo-keyword (org-context))] - ["Next keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-on-heading-p))] - ["Previous keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-on-heading-p))]) + ["Next keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-at-heading-p))] + ["Previous keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-at-heading-p))]) ["Show TODO Tree" org-show-todo-tree :active t :keys "C-c / t"] ["Global TODO list" org-todo-list :active t :keys "C-c a t"] "--" @@ -18511,7 +19076,7 @@ information about your Org-mode version and configuration." (org-version) (let (list) (save-window-excursion - (switch-to-buffer (get-buffer-create "*Warn about privacy*")) + (org-pop-to-buffer-same-window (get-buffer-create "*Warn about privacy*")) (delete-other-windows) (erase-buffer) (insert "You are about to submit a bug report to the Org-mode mailing list. @@ -18557,8 +19122,8 @@ Your bug report will be posted to the Org-mode mailing list. (save-excursion (while bl (set-buffer (pop bl)) - (if (org-mode-p) (setq bl nil))) - (when (org-mode-p) + (if (eq major-mode 'org-mode) (setq bl nil))) + (when (eq major-mode 'org-mode) (easy-menu-change '("Org") "File List for Agenda" (append @@ -18708,7 +19273,7 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (if (and marker (marker-buffer marker) (buffer-live-p (marker-buffer marker))) (progn - (switch-to-buffer (marker-buffer marker)) + (org-pop-to-buffer-same-window (marker-buffer marker)) (if (or (> marker (point-max)) (< marker (point-min))) (widen)) (goto-char marker) @@ -18971,7 +19536,7 @@ and :keyword." (p (point)) clist o) ;; First the large context (cond - ((org-on-heading-p t) + ((org-at-heading-p t) (push (list :headline (point-at-bol) (point-at-eol)) clist) (when (progn (beginning-of-line 1) @@ -19014,7 +19579,7 @@ and :keyword." (push (list :keyword (previous-single-property-change p 'face) (next-single-property-change p 'face)) clist)) - ((org-on-target-p) + ((org-at-target-p) (push (org-point-in-group p 0 :target) clist) (goto-char (1- (match-beginning 0))) (if (looking-at org-radio-target-regexp) @@ -19066,37 +19631,58 @@ really on, so that the block visually is on the match." (throw 'exit t))) nil)))) -(defun org-in-regexps-block-p (start-re end-re &optional bound) - "Return t if the current point is between matches of START-RE and END-RE. -This will also return t if point is on one of the two matches or -in an unfinished block. END-RE can be a string or a form -returning a string. +(defun org-between-regexps-p (start-re end-re &optional lim-up lim-down) + "Non-nil when point is between matches of START-RE and END-RE. -An optional third argument bounds the search for START-RE. It -defaults to previous heading or `point-min'." - (let ((pos (point)) - (limit (or bound (save-excursion (outline-previous-heading))))) - (save-excursion - ;; we're on a block when point is on start-re... - (or (org-at-regexp-p start-re) - ;; ... or start-re can be found above... - (and (re-search-backward start-re limit t) - ;; ... but no end-re between start-re and point. - (not (re-search-forward (eval end-re) pos t))))))) +Also return a non-nil value when point is on one of the matches. + +Optional arguments LIM-UP and LIM-DOWN bound the search; they are +buffer positions. Default values are the positions of headlines +surrounding the point. + +The functions returns a cons cell whose car (resp. cdr) is the +position before START-RE (resp. after END-RE)." + (save-match-data + (let ((pos (point)) + (limit-up (or lim-up (save-excursion (outline-previous-heading)))) + (limit-down (or lim-down (save-excursion (outline-next-heading)))) + beg end) + (save-excursion + ;; Point is on a block when on START-RE or if START-RE can be + ;; found before it... + (and (or (org-at-regexp-p start-re) + (re-search-backward start-re limit-up t)) + (setq beg (match-beginning 0)) + ;; ... and END-RE after it... + (goto-char (match-end 0)) + (re-search-forward end-re limit-down t) + (> (setq end (match-end 0)) pos) + ;; ... without another START-RE in-between. + (goto-char (match-beginning 0)) + (not (re-search-backward start-re (1+ beg) t)) + ;; Return value. + (cons beg end)))))) (defun org-in-block-p (names) - "Is point inside any block whose name belongs to NAMES? + "Non-nil when point belongs to a block whose name belongs to NAMES. + +NAMES is a list of strings containing names of blocks. -NAMES is a list of strings containing names of blocks." +Return first block name matched, or nil. Beware that in case of +nested blocks, the returned name may not belong to the closest +block from point." (save-match-data (catch 'exit - (let ((case-fold-search t)) + (let ((case-fold-search t) + (lim-up (save-excursion (outline-previous-heading))) + (lim-down (save-excursion (outline-next-heading)))) (mapc (lambda (name) (let ((n (regexp-quote name))) - (when (org-in-regexps-block-p + (when (org-between-regexps-p (concat "^[ \t]*#\\+begin_" n) - (concat "^[ \t]*#\\+end_" n)) - (throw 'exit t)))) + (concat "^[ \t]*#\\+end_" n) + lim-up lim-down) + (throw 'exit n)))) names)) nil))) @@ -19127,18 +19713,18 @@ NAMES is a list of strings containing names of blocks." ;; Emacs 23 (add-hook 'occur-mode-find-occurrence-hook (lambda () - (when (org-mode-p) + (when (eq major-mode 'org-mode) (org-reveal)))) ;; Emacs 22 (defadvice occur-mode-goto-occurrence (after org-occur-reveal activate) - (and (org-mode-p) (org-reveal))) + (and (eq major-mode 'org-mode) (org-reveal))) (defadvice occur-mode-goto-occurrence-other-window (after org-occur-reveal activate) - (and (org-mode-p) (org-reveal))) + (and (eq major-mode 'org-mode) (org-reveal))) (defadvice occur-mode-display-occurrence (after org-occur-reveal activate) - (when (org-mode-p) + (when (eq major-mode 'org-mode) (let ((pos (occur-mode-find-occurrence))) (with-current-buffer (marker-buffer pos) (save-excursion @@ -19194,13 +19780,26 @@ Taken from `count' in cl-seq.el with all keyword arguments removed." (if (funcall predicate e) (push e res))) (nreverse res))) +(defun org-reduce (cl-func cl-seq &rest cl-keys) + "Reduce two-argument FUNCTION across SEQ. +Taken from `reduce' in cl-seq.el with all keyword arguments but +\":initial-value\" removed." + (let ((cl-accum (cond ((memq :initial-value cl-keys) + (cadr (memq :initial-value cl-keys))) + (cl-seq (pop cl-seq)) + (t (funcall cl-func))))) + (while cl-seq + (setq cl-accum (funcall cl-func cl-accum (pop cl-seq)))) + cl-accum)) + (defun org-back-over-empty-lines () "Move backwards over whitespace, to the beginning of the first empty line. Returns the number of empty lines passed." (let ((pos (point))) (if (cdr (assoc 'heading org-blank-before-new-entry)) (skip-chars-backward " \t\n\r") - (forward-line -1)) + (unless (eobp) + (forward-line -1))) (beginning-of-line 2) (goto-char (min (point) pos)) (count-lines (point) pos))) @@ -19416,7 +20015,7 @@ If point is in an inline task, mark that task instead." ;; Footnote definition ((looking-at org-footnote-definition-re) (setq column 0)) ;; Literal examples - ((looking-at "[ \t]*:[ \t]") + ((looking-at "[ \t]*:\\( \\|$\\)") (setq column (org-get-indentation))) ; do nothing ;; Lists ((ignore-errors (goto-char (org-in-item-p))) @@ -19437,14 +20036,18 @@ If point is in an inline task, mark that task instead." (concat "^[ \t]*#\\+begin_" (downcase (match-string 1))) nil t))) (setq column (org-get-indentation (match-string 0)))) ((and (not (looking-at "[ \t]*#\\+begin_")) - (org-in-regexps-block-p "^[ \t]*#\\+begin_" "[ \t]*#\\+end_")) + (org-between-regexps-p "^[ \t]*#\\+begin_" "[ \t]*#\\+end_")) (save-excursion (re-search-backward "^[ \t]*#\\+begin_\\([a-z]+\\)" nil t)) (setq column - (if (equal (downcase (match-string 1)) "src") - ;; src blocks: let `org-edit-src-exit' handle them - (org-get-indentation) - (org-get-indentation (match-string 0))))) + (cond ((equal (downcase (match-string 1)) "src") + ;; src blocks: let `org-edit-src-exit' handle them + (org-get-indentation)) + ((equal (downcase (match-string 1)) "example") + (max (org-get-indentation) + (org-get-indentation (match-string 0)))) + (t + (org-get-indentation (match-string 0)))))) ;; This line has nothing special, look at the previous relevant ;; line to compute indentation (t @@ -19543,10 +20146,11 @@ the functionality can be provided as a fall-back.") ;; through to `fill-paragraph' when appropriate. (org-set-local 'fill-paragraph-function 'org-fill-paragraph) ;; Prevent auto-fill from inserting unwanted new items. - (org-set-local 'fill-nobreak-predicate - (if (memq 'org-fill-item-nobreak-p fill-nobreak-predicate) - fill-nobreak-predicate - (cons 'org-fill-item-nobreak-p fill-nobreak-predicate))) + (if (boundp 'fill-nobreak-predicate) + (org-set-local 'fill-nobreak-predicate + (if (memq 'org-fill-item-nobreak-p fill-nobreak-predicate) + fill-nobreak-predicate + (cons 'org-fill-item-nobreak-p fill-nobreak-predicate)))) ;; Adaptive filling: To get full control, first make sure that ;; `adaptive-fill-regexp' never matches. Then install our own matcher. (unless (local-variable-p 'adaptive-fill-regexp (current-buffer)) @@ -19695,7 +20299,7 @@ this line is also exported in fixed-width font." (end (if regionp (region-end))) (nlines (or arg (if (and beg end) (count-lines beg end) 1))) (case-fold-search nil) - (re "[ \t]*\\(: \\)") + (re "[ \t]*\\(:\\(?: \\|$\\)\\)") off) (if regionp (save-excursion @@ -19717,13 +20321,16 @@ this line is also exported in fixed-width font." (forward-line 1))) (save-excursion (org-back-to-heading) - (if (looking-at (concat org-outline-regexp - "\\( *\\<" org-quote-string "\\>[ \t]*\\)")) - (replace-match "" t t nil 1) - (if (looking-at org-outline-regexp) - (progn - (goto-char (match-end 0)) - (insert org-quote-string " ")))))))) + (cond + ((looking-at (format org-heading-keyword-regexp-format + org-quote-string)) + (goto-char (match-end 1)) + (looking-at (concat " +" org-quote-string)) + (replace-match "" t t) + (when (eolp) (insert " "))) + ((looking-at org-outline-regexp) + (goto-char (match-end 0)) + (insert org-quote-string " "))))))) (defun org-reftex-citation () "Use reftex-citation to insert a citation into the buffer. @@ -19817,13 +20424,14 @@ beyond the end of the headline." (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e) org-special-ctrl-a/e))) - (if (or (not special) - (not (org-on-heading-p)) - arg) - (call-interactively - (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) - ((fboundp 'move-end-of-line) 'move-end-of-line) - (t 'end-of-line))) + (cond + ((or (not special) arg + (not (or (org-at-heading-p) (org-at-item-p) (org-at-drawer-p)))) + (call-interactively + (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) + ((fboundp 'move-end-of-line) 'move-end-of-line) + (t 'end-of-line)))) + ((org-at-heading-p) (let ((pos (point))) (beginning-of-line 1) (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")) @@ -19838,6 +20446,11 @@ beyond the end of the headline." (call-interactively (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))) + ((org-at-drawer-p) + (move-end-of-line 1) + (when (overlays-at (1- (point))) (backward-char 1))) + ;; At an item: Move before any hidden text. + (t (call-interactively 'end-of-line))) (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t))))) @@ -19871,7 +20484,7 @@ depending on context." (cond ((or (not org-special-ctrl-k) (bolp) - (not (org-on-heading-p))) + (not (org-at-heading-p))) (if (and (get-char-property (min (point-max) (point-at-eol)) 'invisible) org-ctrl-k-protect-subtree) (if (or (eq org-ctrl-k-protect-subtree 'error) @@ -19917,7 +20530,7 @@ plainly yank the text as it is. "Perform some yank-like command. This function implements the behavior described in the `org-yank' -documentation. However, it has been generalized to work for any +documentation. However, it has been generalized to work for any interactive command with similar behavior." ;; pretend to be command COMMAND @@ -20026,10 +20639,16 @@ This version does not only check the character property, but also (end-of-line) (null (re-search-backward org-outline-regexp-bol nil t)))) -(defun org-on-heading-p (&optional ignored) - (outline-on-heading-p t)) (defun org-at-heading-p (&optional ignored) (outline-on-heading-p t)) +;; Compatibility alias with Org versions < 7.8.03 +(defalias 'org-on-heading-p 'org-at-heading-p) + +(defun org-at-drawer-p nil + "Whether point is at a drawer." + (save-excursion + (move-beginning-of-line 1) + (looking-at org-drawer-regexp))) (defun org-point-at-end-of-empty-headline () "If point is at the end of an empty headline, return t, else nil. @@ -20039,14 +20658,17 @@ empty." (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) - (looking-at (concat "^\\(\\*+\\)[ \t]+\\(" org-todo-regexp - "\\)?[ \t]*$")))))) + (looking-at org-todo-line-regexp))) + (string= (match-string 3) ""))) + (defun org-at-heading-or-item-p () - (or (org-on-heading-p) (org-at-item-p))) + (or (org-at-heading-p) (org-at-item-p))) -(defun org-on-target-p () +(defun org-at-target-p () (or (org-in-regexp org-radio-target-regexp) (org-in-regexp org-target-regexp))) +;; Compatibility alias with Org versions < 7.8.03 +(defalias 'org-on-target-p 'org-at-target-p) (defun org-up-heading-all (arg) "Move to the heading line of which the present line is a subheading. @@ -20117,7 +20739,7 @@ move point." (defun org-goto-first-child () "Goto the first child, even if it is invisible. -Return t when a child was found. Otherwise don't move point and +Return t when a child was found. Otherwise don't move point and return nil." (let (level (pos (point)) (re org-outline-regexp-bol)) (when (condition-case nil (org-back-to-heading t) (error nil)) @@ -20185,7 +20807,7 @@ If there is no such heading, return nil." (org-back-to-heading invisible-OK) (let ((first t) (level (funcall outline-level))) - (if (and (org-mode-p) (< level 1000)) + (if (and (eq major-mode 'org-mode) (< level 1000)) ;; A true heading (not a plain list item), in Org-mode ;; This means we can easily find the end by looking ;; only for the right number of stars. Using a regexp to do @@ -20210,7 +20832,7 @@ If there is no such heading, return nil." (defadvice outline-end-of-subtree (around prefer-org-version activate compile) "Use Org version in org-mode, for dramatic speed-up." - (if (org-mode-p) + (if (eq major-mode 'org-mode) (progn (org-end-of-subtree nil t) (unless (eobp) (backward-char 1))) @@ -20242,7 +20864,7 @@ Normally this only looks at visible headings, but when INVISIBLE-OK is non-nil it wil also look at invisible ones." (interactive "p") (org-back-to-heading invisible-ok) - (org-on-heading-p) + (org-at-heading-p) (let* ((level (- (match-end 0) (match-beginning 0) 1)) (re (format "^\\*\\{1,%d\\} " level)) l) @@ -20262,7 +20884,7 @@ it wil also look at invisible ones." Stop at the first and last subheadings of a superior heading." (interactive "p") (org-back-to-heading) - (org-on-heading-p) + (org-at-heading-p) (let* ((level (- (match-end 0) (match-beginning 0) 1)) (re (format "^\\*\\{1,%d\\} " level)) l) @@ -20382,7 +21004,7 @@ Show the heading too, if it is currently invisible." '(progn (add-hook 'imenu-after-jump-hook (lambda () - (if (org-mode-p) + (if (eq major-mode 'org-mode) (org-show-context 'org-goto)))))) (defun org-link-display-format (link) @@ -20397,6 +21019,17 @@ if no description is present" nil t link) link))) +(defun org-toggle-link-display () + "Toggle the literal or descriptive display of links." + (interactive) + (if org-descriptive-links + (progn (org-remove-from-invisibility-spec '(org-link)) + (org-restart-font-lock) + (setq org-descriptive-links nil)) + (progn (add-to-invisibility-spec '(org-link)) + (org-restart-font-lock) + (setq org-descriptive-links t)))) + ;; Speedbar support (defvar org-speedbar-restriction-lock-overlay (make-overlay 1 1) @@ -20432,7 +21065,7 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." (with-current-buffer (find-file-noselect (let ((default-directory dir)) (expand-file-name txt))) - (unless (org-mode-p) + (unless (eq major-mode 'org-mode) (error "Cannot restrict to non-Org-mode file")) (org-agenda-set-restriction-lock 'file))) (t (error "Don't know how to restrict Org-mode's agenda"))) @@ -20449,7 +21082,7 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." (define-key speedbar-file-key-map ">" 'org-agenda-remove-restriction-lock) (define-key speedbar-file-key-map "\C-c\C-x>" 'org-agenda-remove-restriction-lock) (add-hook 'speedbar-visiting-tag-hook - (lambda () (and (org-mode-p) (org-show-context 'org-goto)))))) + (lambda () (and (eq major-mode 'org-mode) (org-show-context 'org-goto)))))) ;;; Fixes and Hacks for problems with other packages @@ -20492,12 +21125,12 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." (eval-after-load "ecb" '(defadvice ecb-method-clicked (after esf/org-show-context activate) "Make hierarchy visible when jumping into location from ECB tree buffer." - (if (org-mode-p) + (if (eq major-mode 'org-mode) (org-show-context)))) (defun org-bookmark-jump-unhide () "Unhide the current position, to show the bookmark location." - (and (org-mode-p) + (and (eq major-mode 'org-mode) (or (outline-invisible-p) (save-excursion (goto-char (max (point-min) (1- (point)))) (outline-invisible-p))) @@ -20536,6 +21169,4 @@ Still experimental, may disappear in the future." (run-hooks 'org-load-hook) - - ;;; org.el ends here -- cgit v1.2.1 From a1eacd1e034e922b14178bb6fb81b03a36ba5e02 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 3 Jan 2012 20:41:14 +0100 Subject: * mail/smtpmail.el (smtpmail-stream-type): Mention the `ssl' value. --- lisp/ChangeLog | 4 ++++ lisp/mail/smtpmail.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8679b2c4f59..c852bc00c74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-01-03 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-stream-type): Mention the `ssl' value. + 2012-01-03 Chong Yidong * shell.el (shell-dynamic-complete-functions): Put diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index bc38b10124e..4946b4e5cd3 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -103,12 +103,14 @@ don't define this value." "Connection type SMTP connections. This may be either nil (possibly upgraded to STARTTLS if possible), or `starttls' (refuse to send if STARTTLS isn't -available), or `plain' (never use STARTTLS).." +available), or `plain' (never use STARTTLS), or `ssl' (to use +TLS/SSL)." :version "24.1" :group 'smtpmail :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil) (const :tag "Always use STARTTLS" starttls) - (const :tag "Never use STARTTLS" plain))) + (const :tag "Never use STARTTLS" plain) + (const :tag "Use TLS/SSL" ssl))) (defcustom smtpmail-sendto-domain nil "Local domain name without a host name. -- cgit v1.2.1 From b900cf87161313a1ab11981a3a27367df80ca7cb Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 4 Jan 2012 14:39:31 +0800 Subject: Fix copyright headers for etc/org/ files. Rename etc/org/COPYRIGHT-AND-LICENSE to etc/org/README for consistency with other copyright files, and add a reference to it in the .xml files. --- etc/org/COPYRIGHT-AND-LICENSE | 36 ------------------------------------ etc/org/OrgOdtContentTemplate.xml | 1 + etc/org/OrgOdtStyles.xml | 1 + etc/org/README | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 36 deletions(-) delete mode 100644 etc/org/COPYRIGHT-AND-LICENSE create mode 100644 etc/org/README diff --git a/etc/org/COPYRIGHT-AND-LICENSE b/etc/org/COPYRIGHT-AND-LICENSE deleted file mode 100644 index e4438bb84a9..00000000000 --- a/etc/org/COPYRIGHT-AND-LICENSE +++ /dev/null @@ -1,36 +0,0 @@ -OrgOdtContentTemplate.xml --- Aux XML file (Org-mode's OpenDocument export) -OrgOdtStyles.xml --- Aux XML file (Org-mode's OpenDocument export) - -Copyright (C) 2010-2011 Free Software Foundation, Inc. - -Author: Jambunathan K -Keywords: outlines, hypermedia, calendar, wp -Homepage: http://orgmode.org - -These file are not (yet) part of GNU Emacs. -However, it is distributed under the same license. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . - -Commentary: - -Above files are part of Org-mode's OpenDocument export module. - -OrgOdtContentTemplate.xml provides a template within which the content -of an exported document is enclosed. This file contributes to -"content.xml" file within an exported document and acts as a -repository of automatic styles. - -OrgOdtStyles.xml contributes to "styles.xml" file within an exported -document and acts as a repository of custom styles. diff --git a/etc/org/OrgOdtContentTemplate.xml b/etc/org/OrgOdtContentTemplate.xml index f4982f6203b..f50588b2adb 100644 --- a/etc/org/OrgOdtContentTemplate.xml +++ b/etc/org/OrgOdtContentTemplate.xml @@ -1,4 +1,5 @@ + + diff --git a/etc/org/README b/etc/org/README new file mode 100644 index 00000000000..a14b0cb9af3 --- /dev/null +++ b/etc/org/README @@ -0,0 +1,36 @@ +The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the +following copyright information: + +Copyright (C) 2010-2011 Free Software Foundation, Inc. + +These file are part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . + + +Author: Jambunathan K +Keywords: outlines, hypermedia, calendar, wp +Homepage: http://orgmode.org + +Commentary: + +These files are part of Org-mode's OpenDocument export module. + +OrgOdtContentTemplate.xml provides a template within which the content +of an exported document is enclosed. This file contributes to +"content.xml" file within an exported document and acts as a +repository of automatic styles. + +OrgOdtStyles.xml contributes to "styles.xml" file within an exported +document and acts as a repository of custom styles. -- cgit v1.2.1 From 7e67562fca9c1ca1b6e565c4b440984213629809 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Wed, 4 Jan 2012 10:49:38 +0000 Subject: Merge changes made in Gnus trunk. 2012-01-04 Julien Danjou * nnimap.el (nnimap-update-info): Fix an error when all articles UIDs change. 2012-01-04 Lars Magne Ingebrigtsen * shr.el (shr-rescale-image): Add :ascent 100 to the rescaled picture, too. * nntp.el (nntp-retrieve-group-data-early): Use it. 2012-01-03 Lars Magne Ingebrigtsen * nntp.el (nntp-retrieval-in-progress): New variable. (nntp-make-process-buffer): Make it buffer-local. * gnus-demon.el (gnus-demon-time-to-step): Resurrect function lost in 2010. (gnus-demon-init): Use it to compute the time if time is on the form "04:23". * gnus-topic.el (gnus-topic-history): Define `gnus-topic-history'. * nnimap.el (nnimap-finish-retrieve-group-infos): Check the connection status in the correct buffer. 2012-01-03 Leo * gnus-topic.el (gnus-topic-goto-next-group): Don't move point around when opening topics (bug#10407). --- lisp/gnus/ChangeLog | 32 ++++++++++++++++++++++++++++ lisp/gnus/gnus-demon.el | 42 ++++++++++++++++++++++++++++++++++--- lisp/gnus/gnus-topic.el | 15 +++++++++---- lisp/gnus/nnimap.el | 14 +++++++------ lisp/gnus/nntp.el | 43 +++++++++++++++++++++++-------------- lisp/gnus/shr.el | 56 ++++++++++++++++++++++++------------------------- 6 files changed, 145 insertions(+), 57 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a6e88088ee4..34f914a8b0a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,35 @@ +2012-01-04 Julien Danjou + + * nnimap.el (nnimap-update-info): Fix an error when all articles UIDs + change. + +2012-01-04 Lars Magne Ingebrigtsen + + * shr.el (shr-rescale-image): Add :ascent 100 to the rescaled picture, + too. + + * nntp.el (nntp-retrieve-group-data-early): Use it. + +2012-01-03 Lars Magne Ingebrigtsen + + * nntp.el (nntp-retrieval-in-progress): New variable. + (nntp-make-process-buffer): Make it buffer-local. + + * gnus-demon.el (gnus-demon-time-to-step): Resurrect function lost in + 2010. + (gnus-demon-init): Use it to compute the time if time is on the form + "04:23". + + * gnus-topic.el (gnus-topic-history): Define `gnus-topic-history'. + + * nnimap.el (nnimap-finish-retrieve-group-infos): Check the connection + status in the correct buffer. + +2012-01-03 Leo + + * gnus-topic.el (gnus-topic-goto-next-group): Don't move point around + when opening topics (bug#10407). + 2011-12-28 Katsumi Yamaoka * mm-view.el (mm-display-inline-fontify): Add comment. diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index 419346b7191..2f9952241aa 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -1,6 +1,6 @@ ;;; gnus-demon.el --- daemonic Gnus behavior -;; Copyright (C) 1995-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -120,8 +120,12 @@ Emacs has been idle for IDLE `gnus-demon-timestep's." ;; If t, replace by 1 (time (cond ((eq time t) gnus-demon-timestep) - ((null time) nil) - (t (* time gnus-demon-timestep)))) + ((null time) + nil) + ((stringp time) + (gnus-demon-time-to-step time)) + (t + (* time gnus-demon-timestep)))) (timer (cond ;; (func number t) @@ -144,6 +148,38 @@ Emacs has been idle for IDLE `gnus-demon-timestep's." (when timer (add-to-list 'gnus-demon-timers timer))))) +(defun gnus-demon-time-to-step (time) + "Find out how many seconds to TIME, which is on the form \"17:43\"." + (let* ((now (current-time)) + ;; obtain NOW as discrete components -- make a vector for speed + (nowParts (decode-time now)) + ;; obtain THEN as discrete components + (thenParts (parse-time-string time)) + (thenHour (elt thenParts 2)) + (thenMin (elt thenParts 1)) + ;; convert time as elements into number of seconds since EPOCH. + (then (encode-time 0 + thenMin + thenHour + ;; If THEN is earlier than NOW, make it + ;; same time tomorrow. Doc for encode-time + ;; says that this is OK. + (+ (elt nowParts 3) + (if (or (< thenHour (elt nowParts 2)) + (and (= thenHour (elt nowParts 2)) + (<= thenMin (elt nowParts 1)))) + 1 0)) + (elt nowParts 4) + (elt nowParts 5) + (elt nowParts 6) + (elt nowParts 7) + (elt nowParts 8))) + ;; calculate number of seconds between NOW and THEN + (diff (+ (* 65536 (- (car then) (car now))) + (- (cadr then) (cadr now))))) + ;; return number of timesteps in the number of seconds + (round (/ diff gnus-demon-timestep)))) + (gnus-add-shutdown 'gnus-demon-cancel 'gnus) (defun gnus-demon-cancel () diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 87ca27adcf4..0c6c2d36f83 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -1,6 +1,6 @@ ;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -;; Copyright (C) 1995-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995-2012 Free Software Foundation, Inc. ;; Author: Ilja Weis ;; Lars Magne Ingebrigtsen @@ -969,12 +969,15 @@ articles in the topic and its subtopics." (if (not group) (if (not (memq 'gnus-topic props)) (goto-char (point-max)) - (gnus-topic-goto-topic (symbol-name (cadr (memq 'gnus-topic props))))) + (let ((topic (symbol-name (cadr (memq 'gnus-topic props))))) + (or (gnus-topic-goto-topic topic) + (gnus-topic-goto-topic (gnus-topic-next-topic topic))))) (if (gnus-group-goto-group group) t ;; The group is no longer visible. (let* ((list (assoc (gnus-group-topic group) gnus-topic-alist)) - (after (cdr (member group (cdr list))))) + (topic-visible (save-excursion (gnus-topic-goto-topic (car list)))) + (after (and topic-visible (cdr (member group (cdr list)))))) ;; First try to put point on a group after the current one. (while (and after (not (gnus-group-goto-group (car after)))) @@ -989,7 +992,9 @@ articles in the topic and its subtopics." (if (not (car list)) (goto-char (point-min)) (unless after - (gnus-topic-goto-topic (car list)) + (if topic-visible + (gnus-goto-char topic-visible) + (gnus-topic-goto-topic (gnus-topic-next-topic (car list)))) (setq after nil))) t)))) @@ -1297,6 +1302,8 @@ When used interactively, PARENT will be the topic under point." ;; 2. Can't process on several marked groups with a same name, ;; because gnus-group-marked only keeps one copy. +(defvar gnus-topic-history nil) + (defun gnus-topic-move-group (n topic &optional copyp) "Move the next N groups to TOPIC. If COPYP, copy the groups instead." diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index b4e6e31fae4..0b0fc918c87 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1,6 +1,6 @@ ;;; nnimap.el --- IMAP interface for Gnus -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Simon Josefsson @@ -1273,11 +1273,11 @@ textual parts.") (deffoo nnimap-finish-retrieve-group-infos (server infos sequences) (when (and sequences + (nnimap-possibly-change-group nil server) ;; Check that the process is still alive. (get-buffer-process (nnimap-buffer)) (memq (process-status (get-buffer-process (nnimap-buffer))) - '(open run)) - (nnimap-possibly-change-group nil server)) + '(open run))) (with-current-buffer (nnimap-buffer) ;; Wait for the final data to trickle in. (when (nnimap-wait-for-response (if (eq (cadar sequences) 'qresync) @@ -1332,7 +1332,8 @@ textual parts.") (cdr (assq 'uidvalidity (gnus-info-params info))))) (and old-uidvalidity (not (equal old-uidvalidity uidvalidity)) - (> start-article 1))) + (or (not start-article) + (> start-article 1)))) (gnus-group-remove-parameter info 'uidvalidity) (gnus-group-remove-parameter info 'modseq)) ;; We have the data needed to update. @@ -1620,8 +1621,9 @@ textual parts.") (nnimap-command "UID SEARCH %s" cmd)))) (when result (gnus-fetch-headers - (and (car result) (delete 0 (mapcar #'string-to-number - (cdr (assoc "SEARCH" (cdr result)))))) + (and (car result) + (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result)))))) nil t)))))) (defun nnimap-possibly-change-group (group server) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index f4b8ce66d16..e089dfbe106 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1,6 +1,6 @@ ;;; nntp.el --- nntp access for Gnus -;; Copyright (C) 1987-1990, 1992-1998, 2000-2011 +;; Copyright (C) 1987-1990, 1992-1998, 2000-2012 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -281,6 +281,7 @@ update their active files often, this can help.") ;;; Internal variables. +(defvoo nntp-retrieval-in-progress nil) (defvar nntp-record-commands nil "*If non-nil, nntp will record all commands in the \"*nntp-log*\" buffer.") @@ -770,21 +771,28 @@ command whose response triggered the error." (deffoo nntp-retrieve-group-data-early (server infos) "Retrieve group info on INFOS." (nntp-with-open-group nil server - (when (nntp-find-connection-buffer nntp-server-buffer) - ;; The first time this is run, this variable is `try'. So we - ;; try. - (when (eq nntp-server-list-active-group 'try) - (nntp-try-list-active - (gnus-group-real-name (gnus-info-group (car infos))))) - (with-current-buffer (nntp-find-connection-buffer nntp-server-buffer) - (erase-buffer) - (let ((nntp-inhibit-erase t) - (command (if nntp-server-list-active-group - "LIST ACTIVE" "GROUP"))) - (dolist (info infos) - (nntp-send-command - nil command (gnus-group-real-name (gnus-info-group info))))) - (length infos))))) + (let ((buffer (nntp-find-connection-buffer nntp-server-buffer))) + (when (and buffer + (with-current-buffer buffer + (not nntp-retrieval-in-progress))) + ;; The first time this is run, this variable is `try'. So we + ;; try. + (when (eq nntp-server-list-active-group 'try) + (nntp-try-list-active + (gnus-group-real-name (gnus-info-group (car infos))))) + (with-current-buffer buffer + (erase-buffer) + ;; Mark this buffer as "in use" in case we try to issue two + ;; retrievals from the same server. This shouldn't happen, + ;; so this is mostly a sanity check. + (setq nntp-retrieval-in-progress t) + (let ((nntp-inhibit-erase t) + (command (if nntp-server-list-active-group + "LIST ACTIVE" "GROUP"))) + (dolist (info infos) + (nntp-send-command + nil command (gnus-group-real-name (gnus-info-group info))))) + (length infos)))))) (deffoo nntp-finish-retrieve-group-infos (server infos count) (nntp-with-open-group nil server @@ -794,6 +802,8 @@ command whose response triggered the error." (car infos))) (received 0) (last-point 1)) + (with-current-buffer buf + (setq nntp-retrieval-in-progress nil)) (when (and buf count) (with-current-buffer buf @@ -1318,6 +1328,7 @@ password contained in '~/.nntp-authinfo'." (set (make-local-variable 'nntp-process-to-buffer) nil) (set (make-local-variable 'nntp-process-start-point) nil) (set (make-local-variable 'nntp-process-decode) nil) + (set (make-local-variable 'nntp-retrieval-in-progress) nil) (current-buffer))) (defun nntp-open-connection (buffer) diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index f2d8f843564..d4d8f7dd31e 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -1,6 +1,6 @@ ;;; shr.el --- Simple HTML Renderer -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: html @@ -534,33 +534,33 @@ the URL of the image to the kill buffer instead." (insert alt))) (defun shr-rescale-image (data) - (if (or (not (fboundp 'imagemagick-types)) - (not (get-buffer-window (current-buffer)))) - (create-image data nil t - :ascent 100) - (let* ((image (create-image data nil t :ascent 100)) - (size (image-size image t)) - (width (car size)) - (height (cdr size)) - (edges (window-inside-pixel-edges - (get-buffer-window (current-buffer)))) - (window-width (truncate (* shr-max-image-proportion - (- (nth 2 edges) (nth 0 edges))))) - (window-height (truncate (* shr-max-image-proportion - (- (nth 3 edges) (nth 1 edges))))) - scaled-image) - (when (> height window-height) - (setq image (or (create-image data 'imagemagick t - :height window-height) - image)) - (setq size (image-size image t))) - (when (> (car size) window-width) - (setq image (or - (create-image data 'imagemagick t - :width window-width - :ascent 100) - image))) - image))) + (let ((image (create-image data nil t :ascent 100))) + (if (or (not (fboundp 'imagemagick-types)) + (not (get-buffer-window (current-buffer)))) + image + (let* ((size (image-size image t)) + (width (car size)) + (height (cdr size)) + (edges (window-inside-pixel-edges + (get-buffer-window (current-buffer)))) + (window-width (truncate (* shr-max-image-proportion + (- (nth 2 edges) (nth 0 edges))))) + (window-height (truncate (* shr-max-image-proportion + (- (nth 3 edges) (nth 1 edges))))) + scaled-image) + (when (> height window-height) + (setq image (or (create-image data 'imagemagick t + :height window-height + :ascent 100) + image)) + (setq size (image-size image t))) + (when (> (car size) window-width) + (setq image (or + (create-image data 'imagemagick t + :width window-width + :ascent 100) + image))) + image)))) ;; url-cache-extract autoloads url-cache. (declare-function url-cache-create-filename "url-cache" (url)) -- cgit v1.2.1 From b73f1974f0cd3a7b719e371b536917ba80f5d062 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 4 Jan 2012 15:14:29 +0100 Subject: Fix copyright year for Org files. --- etc/org/README | 2 +- lisp/org/ob-R.el | 2 +- lisp/org/ob-asymptote.el | 2 +- lisp/org/ob-awk.el | 2 +- lisp/org/ob-clojure.el | 2 +- lisp/org/ob-comint.el | 2 +- lisp/org/ob-css.el | 2 +- lisp/org/ob-ditaa.el | 20 ++++++++++++++++---- lisp/org/ob-dot.el | 2 +- lisp/org/ob-emacs-lisp.el | 2 +- lisp/org/ob-eval.el | 2 +- lisp/org/ob-exp.el | 2 +- lisp/org/ob-fortran.el | 2 +- lisp/org/ob-gnuplot.el | 2 +- lisp/org/ob-haskell.el | 2 +- lisp/org/ob-java.el | 2 +- lisp/org/ob-js.el | 2 +- lisp/org/ob-keys.el | 2 +- lisp/org/ob-latex.el | 2 +- lisp/org/ob-lisp.el | 2 +- lisp/org/ob-lob.el | 2 +- lisp/org/ob-maxima.el | 2 +- lisp/org/ob-ocaml.el | 2 +- lisp/org/ob-org.el | 2 +- lisp/org/ob-perl.el | 2 +- lisp/org/ob-python.el | 2 +- lisp/org/ob-ref.el | 2 +- lisp/org/ob-ruby.el | 2 +- lisp/org/ob-sass.el | 2 +- lisp/org/ob-scheme.el | 2 +- lisp/org/ob-screen.el | 2 +- lisp/org/ob-sh.el | 2 +- lisp/org/ob-shen.el | 2 +- lisp/org/ob-sql.el | 2 +- lisp/org/ob-table.el | 2 +- lisp/org/ob-tangle.el | 2 +- lisp/org/ob.el | 5 ++--- lisp/org/org-agenda.el | 2 +- lisp/org/org-archive.el | 2 +- lisp/org/org-ascii.el | 2 +- lisp/org/org-attach.el | 2 +- lisp/org/org-bbdb.el | 2 +- lisp/org/org-beamer.el | 2 +- lisp/org/org-bibtex.el | 2 +- lisp/org/org-capture.el | 2 +- lisp/org/org-clock.el | 2 +- lisp/org/org-colview.el | 2 +- lisp/org/org-compat.el | 2 +- lisp/org/org-ctags.el | 2 +- lisp/org/org-datetree.el | 2 +- lisp/org/org-docbook.el | 2 +- lisp/org/org-docview.el | 2 +- lisp/org/org-entities.el | 2 +- lisp/org/org-eshell.el | 2 +- lisp/org/org-exp-blocks.el | 2 +- lisp/org/org-exp.el | 2 +- lisp/org/org-faces.el | 2 +- lisp/org/org-feed.el | 2 +- lisp/org/org-footnote.el | 2 +- lisp/org/org-freemind.el | 2 +- lisp/org/org-gnus.el | 2 +- lisp/org/org-habit.el | 2 +- lisp/org/org-html.el | 2 +- lisp/org/org-icalendar.el | 2 +- lisp/org/org-id.el | 2 +- lisp/org/org-indent.el | 2 +- lisp/org/org-info.el | 2 +- lisp/org/org-inlinetask.el | 2 +- lisp/org/org-irc.el | 2 +- lisp/org/org-jsinfo.el | 2 +- lisp/org/org-latex.el | 2 +- lisp/org/org-list.el | 2 +- lisp/org/org-lparse.el | 2 +- lisp/org/org-mac-message.el | 2 +- lisp/org/org-macs.el | 2 +- lisp/org/org-mew.el | 2 +- lisp/org/org-mhe.el | 2 +- lisp/org/org-mobile.el | 2 +- lisp/org/org-mouse.el | 2 +- lisp/org/org-odt.el | 2 +- lisp/org/org-pcomplete.el | 2 +- lisp/org/org-plot.el | 2 +- lisp/org/org-protocol.el | 2 +- lisp/org/org-publish.el | 2 +- lisp/org/org-remember.el | 2 +- lisp/org/org-rmail.el | 2 +- lisp/org/org-special-blocks.el | 2 +- lisp/org/org-src.el | 2 +- lisp/org/org-table.el | 2 +- lisp/org/org-taskjuggler.el | 2 +- lisp/org/org-timer.el | 2 +- lisp/org/org-vm.el | 2 +- lisp/org/org-w3m.el | 2 +- lisp/org/org-wl.el | 2 +- lisp/org/org-xoxo.el | 2 +- lisp/org/org.el | 6 +++--- 96 files changed, 114 insertions(+), 103 deletions(-) diff --git a/etc/org/README b/etc/org/README index a14b0cb9af3..65ac02ecde3 100644 --- a/etc/org/README +++ b/etc/org/README @@ -1,7 +1,7 @@ The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the following copyright information: -Copyright (C) 2010-2011 Free Software Foundation, Inc. +Copyright (C) 2010-2012 Free Software Foundation, Inc. These file are part of GNU Emacs. diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index d8c3d6bbf5e..e8400f494ad 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el @@ -1,6 +1,6 @@ ;;; ob-R.el --- org-babel functions for R code evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/org/ob-asymptote.el b/lisp/org/ob-asymptote.el index 5bd33f5086c..913c5230815 100644 --- a/lisp/org/ob-asymptote.el +++ b/lisp/org/ob-asymptote.el @@ -1,6 +1,6 @@ ;;; ob-asymptote.el --- org-babel functions for asymptote evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index 1ba0a356924..daba6070d1f 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -1,6 +1,6 @@ ;;; ob-awk.el --- org-babel functions for awk evaluation -;; Copyright (C) 2011 Free Software Foundation, Inc. +;; Copyright (C) 2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index 9ed13d69f56..1c0c37c1dd4 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el @@ -1,6 +1,6 @@ ;;; ob-clojure.el --- org-babel functions for clojure evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Joel Boehland ;; Eric Schulte diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el index 24af735746a..a0712b90f35 100644 --- a/lisp/org/ob-comint.el +++ b/lisp/org/ob-comint.el @@ -1,6 +1,6 @@ ;;; ob-comint.el --- org-babel functions for interaction with comint buffers -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint diff --git a/lisp/org/ob-css.el b/lisp/org/ob-css.el index a49595f05cd..a9ac1cfa20f 100644 --- a/lisp/org/ob-css.el +++ b/lisp/org/ob-css.el @@ -1,6 +1,6 @@ ;;; ob-css.el --- org-babel functions for css evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el index 0aba9a6e47e..17e9d5d0ccf 100644 --- a/lisp/org/ob-ditaa.el +++ b/lisp/org/ob-ditaa.el @@ -1,6 +1,6 @@ ;;; ob-ditaa.el --- org-babel functions for ditaa evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -39,10 +39,22 @@ (require 'ob) (defvar org-babel-default-header-args:ditaa - '((:results . "file") (:exports . "results") (:java . "-Dfile.encoding=UTF-8")) + '((:results . "file") + (:exports . "results") + (:java . "-Dfile.encoding=UTF-8")) "Default arguments for evaluating a ditaa source block.") -(defvar org-ditaa-jar-path) +(defcustom org-ditaa-jar-path nil + "Path for the ditaa jar file." + :group 'org-babel + :type 'string) + +(defcustom org-ditaa-jar-option "-jar" + "Option for the ditaa jar file. +Do not leave leading or trailing spaces in this string." + :group 'org-babel + :type 'string) + (defun org-babel-execute:ditaa (body params) "Execute a block of Ditaa code with org-babel. This function is called by `org-babel-execute-src-block'." @@ -55,7 +67,7 @@ This function is called by `org-babel-execute-src-block'." (cmdline (cdr (assoc :cmdline params))) (java (cdr (assoc :java params))) (in-file (org-babel-temp-file "ditaa-")) - (cmd (concat "java " java " -jar " + (cmd (concat "java " java " " org-ditaa-jar-option " " (shell-quote-argument (expand-file-name org-ditaa-jar-path)) " " cmdline diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el index 1b18ffd3617..1d4b7da7e18 100644 --- a/lisp/org/ob-dot.el +++ b/lisp/org/ob-dot.el @@ -1,6 +1,6 @@ ;;; ob-dot.el --- org-babel functions for dot evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index c6d9d59c25d..99149789003 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc +;; Copyright (C) 2009-2012 Free Software Foundation, Inc ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index 02738c17b88..0ac6ab004b7 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el @@ -1,6 +1,6 @@ ;;; ob-eval.el --- org-babel functions for external code evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index de3a4c85d88..bfb3aa85bca 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -1,6 +1,6 @@ ;;; ob-exp.el --- Exportation of org-babel source blocks -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/org/ob-fortran.el b/lisp/org/ob-fortran.el index b2c97909671..219d2fa1238 100644 --- a/lisp/org/ob-fortran.el +++ b/lisp/org/ob-fortran.el @@ -1,6 +1,6 @@ ;;; ob-fortran.el --- org-babel functions for fortran -;; Copyright (C) 2011 Sergey Litvinov, Eric Schulte +;; Copyright (C) 2012 Sergey Litvinov, Eric Schulte ;; Authors: Sergey Litvinov (based on ob-C.el by Eric Schulte), Eric Schulte ;; Keywords: literate programming, reproducible research, fortran diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index c1e533a95eb..0cdef4e1289 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -1,6 +1,6 @@ ;;; ob-gnuplot.el --- org-babel functions for gnuplot evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index 10fd363f135..b04c3b082b7 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el @@ -1,6 +1,6 @@ ;;; ob-haskell.el --- org-babel functions for haskell evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-java.el b/lisp/org/ob-java.el index bd02d30f0ab..f593e1a155f 100644 --- a/lisp/org/ob-java.el +++ b/lisp/org/ob-java.el @@ -1,6 +1,6 @@ ;;; ob-java.el --- org-babel functions for java evaluation -;; Copyright (C) 2011 Free Software Foundation, Inc. +;; Copyright (C) 2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index e4379a29acd..d71c0aba8d6 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el @@ -1,6 +1,6 @@ ;;; ob-js.el --- org-babel functions for Javascript -;; Copyright (C) 2010-2011 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js diff --git a/lisp/org/ob-keys.el b/lisp/org/ob-keys.el index 4f320a0afc0..759bef3905f 100644 --- a/lisp/org/ob-keys.el +++ b/lisp/org/ob-keys.el @@ -1,6 +1,6 @@ ;;; ob-keys.el --- key bindings for org-babel -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index afd8e5f3693..0db71992826 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -1,6 +1,6 @@ ;;; ob-latex.el --- org-babel functions for latex "evaluation" -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index 31656c6e113..2e457878b7f 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el @@ -1,6 +1,6 @@ ;;; ob-lisp.el --- org-babel functions for common lisp evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Joel Boehland ;; Eric Schulte diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 181eee22b31..0cd719293c2 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -1,6 +1,6 @@ ;;; ob-lob.el --- functions supporting the Library of Babel -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/org/ob-maxima.el b/lisp/org/ob-maxima.el index f14cf550a71..6955a778dd6 100644 --- a/lisp/org/ob-maxima.el +++ b/lisp/org/ob-maxima.el @@ -1,6 +1,6 @@ ;;; ob-maxima.el --- org-babel functions for maxima evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Eric Schulte diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index 22ccc3b7ad5..6b4c54d2b72 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el @@ -1,6 +1,6 @@ ;;; ob-ocaml.el --- org-babel functions for ocaml evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el index 32820e55fa3..d57f8b506d1 100644 --- a/lisp/org/ob-org.el +++ b/lisp/org/ob-org.el @@ -1,6 +1,6 @@ ;;; ob-org.el --- org-babel functions for org code block evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index 12e6c17a764..dbd40dfc7fe 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el @@ -1,6 +1,6 @@ ;;; ob-perl.el --- org-babel functions for perl evaluation -;; Copyright (C) 2009-2011 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation ;; Author: Dan Davison ;; Eric Schulte diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index c84b11d77f0..dee6b07dccd 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -1,6 +1,6 @@ ;;; ob-python.el --- org-babel functions for python evaluation -;; Copyright (C) 2009-2011 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 304e4783253..bd9e3890090 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -1,6 +1,6 @@ ;;; ob-ref.el --- org-babel functions for referencing external data -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index e48e372ebd0..65cc2bde757 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -1,6 +1,6 @@ ;;; ob-ruby.el --- org-babel functions for ruby evaluation -;; Copyright (C) 2009-2011 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el index b687eeb9fe2..c9606104311 100644 --- a/lisp/org/ob-sass.el +++ b/lisp/org/ob-sass.el @@ -1,6 +1,6 @@ ;;; ob-sass.el --- org-babel functions for the sass css generation language -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index 14198ba6a21..d0d03dd74ee 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -1,6 +1,6 @@ ;;; ob-scheme.el --- org-babel functions for Scheme -;; Copyright (C) 2010-2011 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, scheme diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 2b1b25d407c..5f11b14339f 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el @@ -1,6 +1,6 @@ ;;; ob-screen.el --- org-babel support for interactive terminal -;; Copyright (C) 2009-2011 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell diff --git a/lisp/org/ob-sh.el b/lisp/org/ob-sh.el index ac0cf94726c..6f4cb4ffdfc 100644 --- a/lisp/org/ob-sh.el +++ b/lisp/org/ob-sh.el @@ -1,6 +1,6 @@ ;;; ob-sh.el --- org-babel functions for shell evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-shen.el b/lisp/org/ob-shen.el index ccf3030b94c..7207cd9351b 100644 --- a/lisp/org/ob-shen.el +++ b/lisp/org/ob-shen.el @@ -1,6 +1,6 @@ ;;; ob-shen.el --- org-babel functions for Shen -;; Copyright (C) 2010-2011 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, shen diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 8e92635bc1f..645842a12a4 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -1,6 +1,6 @@ ;;; ob-sql.el --- org-babel functions for sql evaluation -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index 15ebff94fcb..7b4920e1ec4 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el @@ -1,6 +1,6 @@ ;;; ob-table.el --- support for calling org-babel functions from tables -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index f5dbb30631a..0b4eaf1fafa 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -1,6 +1,6 @@ ;;; ob-tangle.el --- extract source code from org-mode files -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob.el b/lisp/org/ob.el index 3eee92a906e..ff5a8bc1d01 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el @@ -1,6 +1,6 @@ ;;; ob.el --- working with code blocks in org-mode -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison @@ -1074,8 +1074,7 @@ ALTS is a cons of two character options where each option may be either the numeric code of a single character or a list of character alternatives. For example to split on balanced instances of \"[ \t]:\" set ALTS to '((32 9) . 58)." - (flet ((matches (ch spec) (or (and (numberp spec) (= spec ch)) - (member ch spec))) + (flet ((matches (ch spec) (if (listp spec) (member ch spec) (equal spec ch))) (matched (ch last) (if (consp alts) (and (matches ch (cdr alts)) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index f3024b171a6..70df5a15777 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1,6 +1,6 @@ ;;; org-agenda.el --- Dynamic task and appointment lists for Org -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index ffa7f1cabee..4137e2caf2b 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el @@ -1,6 +1,6 @@ ;;; org-archive.el --- Archiving for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index 15413324480..c652671b7fe 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el @@ -1,6 +1,6 @@ ;;; org-ascii.el --- ASCII export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index 0525bee6198..6f7476c6ba9 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el @@ -1,6 +1,6 @@ ;;; org-attach.el --- Manage file attachments to org-mode tasks -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Keywords: org data task diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index ddb7e4ab8c5..e587b6ac7c0 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el @@ -1,6 +1,6 @@ ;;; org-bbdb.el --- Support for links to BBDB entries from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik , ;; Thomas Baumann diff --git a/lisp/org/org-beamer.el b/lisp/org/org-beamer.el index d64ce2ddc5a..0a402ed4038 100644 --- a/lisp/org/org-beamer.el +++ b/lisp/org/org-beamer.el @@ -1,6 +1,6 @@ ;;; org-beamer.el --- Beamer-specific LaTeX export for org-mode ;; -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Maintainer: Carsten Dominik diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index 71a3bd07d80..17cdbc27f29 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el @@ -1,6 +1,6 @@ ;;; org-bibtex.el --- Org links to BibTeX entries ;; -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; ;; Author: Bastien Guerry ;; Carsten Dominik diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index e0c75b59e92..c23934c1900 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1,6 +1,6 @@ ;;; org-capture.el --- Fast note taking in Org-mode -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 411e3a4bc35..ad6d76e038a 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1,6 +1,6 @@ ;;; org-clock.el --- The time clocking code for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index c62c6835d3f..04d2b626f91 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -1,6 +1,6 @@ ;;; org-colview.el --- Column View in Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index c053758bdd9..425e8d816c7 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -1,6 +1,6 @@ ;;; org-compat.el --- Compatibility code for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 609c0941423..7cbd299782f 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -1,6 +1,6 @@ ;;; org-ctags.el - Integrate Emacs "tags" facility with org mode. ;; -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; Author: Paul Sexton diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index ae3d04a24fa..3042be782c9 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el @@ -1,6 +1,6 @@ ;;; org-datetree.el --- Create date entries in a tree -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index 6b103543a31..499ab5da7d9 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el @@ -1,6 +1,6 @@ ;;; org-docbook.el --- DocBook exporter for org-mode ;; -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; ;; Emacs Lisp Archive Entry ;; Filename: org-docbook.el diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index cf1801f2b53..cb490137155 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el @@ -1,6 +1,6 @@ ;;; org-docview.el --- support for links to doc-view-mode buffers -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Jan Böcker ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index eb6994e712f..fe3c52892a1 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el @@ -1,6 +1,6 @@ ;;; org-entities.el --- Support for special entities in Org-mode -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik , ;; Ulf Stegemann diff --git a/lisp/org/org-eshell.el b/lisp/org/org-eshell.el index 5486b1e0e9e..92dbc4bc25e 100644 --- a/lisp/org/org-eshell.el +++ b/lisp/org/org-eshell.el @@ -1,5 +1,5 @@ ;;; org-eshell.el - Support for links to working directories in eshell -;; Copyright (C) 2011 Free Software Foundation, Inc. +;; Copyright (C) 2012 Free Software Foundation, Inc. ;; ;; Author: Konrad Hinsen ;; Version: 0.1 diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el index 3396d5812a7..e5ff5c59eec 100644 --- a/lisp/org/org-exp-blocks.el +++ b/lisp/org/org-exp-blocks.el @@ -1,6 +1,6 @@ ;;; org-exp-blocks.el --- pre-process blocks when exporting org files -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 8a7ca622759..49da40f5f4f 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el @@ -1,6 +1,6 @@ ;;; org-exp.el --- ASCII, HTML, XOXO and iCalendar export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 3bf64df2d39..e71ce2322ae 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -1,6 +1,6 @@ ;;; org-faces.el --- Face definitions for Org-mode. -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 4e300de7b06..f5186aaacf3 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el @@ -1,6 +1,6 @@ ;;; org-feed.el --- Add RSS feed items to Org files ;; -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index a8125513db6..f9cf59c879c 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -1,6 +1,6 @@ ;;; org-footnote.el --- Footnote support in Org and elsewhere ;; -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index 7055bfade4e..8b774007206 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el @@ -1,6 +1,6 @@ ;;; org-freemind.el --- Export Org files to freemind -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Lennart Borgman (lennart O borgman A gmail O com) ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index c7bccc0d8a2..2a3f9461fd1 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el @@ -1,6 +1,6 @@ ;;; org-gnus.el --- Support for links to Gnus groups and messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Tassilo Horn diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el index f8bd12ae429..67f87797cb1 100644 --- a/lisp/org/org-habit.el +++ b/lisp/org/org-habit.el @@ -1,6 +1,6 @@ ;;; org-habit.el --- The habit tracking code for Org-mode -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index c6a19c8d8ba..82fdd507b03 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el @@ -1,6 +1,6 @@ ;;; org-html.el --- HTML export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index 969d895634a..29f6c74c529 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el @@ -1,6 +1,6 @@ ;;; org-icalendar.el --- iCalendar export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index a00297d6a60..0b829d60ba6 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -1,6 +1,6 @@ ;;; org-id.el --- Global identifiers for Org-mode entries ;; -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index 034b1630b0c..ae0c91eaedf 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -1,5 +1,5 @@ ;;; org-indent.el --- Dynamic indentation for Org-mode -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index a3e9cd1f9e7..b4e5c2244d5 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el @@ -1,6 +1,6 @@ ;;; org-info.el --- Support for links to Info nodes from within Org-Mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index a6331975f55..a14e4043e54 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el @@ -1,6 +1,6 @@ ;;; org-inlinetask.el --- Tasks independent of outline hierarchy -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index c4ad32146d7..0dd05124f3c 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el @@ -1,6 +1,6 @@ ;;; org-irc.el --- Store links to IRC sessions ;; -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; ;; Author: Philip Jackson ;; Keywords: erc, irc, link, org diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el index 22f5d4ecd6b..f4075d02981 100644 --- a/lisp/org/org-jsinfo.el +++ b/lisp/org/org-jsinfo.el @@ -1,6 +1,6 @@ ;;; org-jsinfo.el --- Support for org-info.js Javascript in Org HTML export -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 57cb5bac702..59dd60f0322 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el @@ -1,6 +1,6 @@ ;;; org-latex.el --- LaTeX exporter for org-mode ;; -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; ;; Emacs Lisp Archive Entry ;; Filename: org-latex.el diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index df14625bc61..b36167701b4 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -1,6 +1,6 @@ ;;; org-list.el --- Plain lists for Org-mode ;; -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Bastien Guerry diff --git a/lisp/org/org-lparse.el b/lisp/org/org-lparse.el index 8c98ea76732..682a6611d73 100644 --- a/lisp/org/org-lparse.el +++ b/lisp/org/org-lparse.el @@ -1,6 +1,6 @@ ;;; org-lparse.el --- Line-oriented parser-exporter for Org-mode -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Jambunathan K ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-mac-message.el b/lisp/org/org-mac-message.el index 8f63a196e88..b87d91f4cc2 100644 --- a/lisp/org/org-mac-message.el +++ b/lisp/org/org-mac-message.el @@ -1,6 +1,6 @@ ;;; org-mac-message.el --- Links to Apple Mail.app messages from within Org-mode -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Christopher Suckling diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 521f5fd8633..daeea715789 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -1,6 +1,6 @@ ;;; org-macs.el --- Top-level definitions for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-mew.el b/lisp/org/org-mew.el index 8d6f1414150..9cc767eaec4 100644 --- a/lisp/org/org-mew.el +++ b/lisp/org/org-mew.el @@ -1,6 +1,6 @@ ;;; org-mew.el --- Support for links to Mew messages from within Org-mode -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Author: Tokuya Kameshima ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el index 6832a9b9122..0c59d500735 100644 --- a/lisp/org/org-mhe.el +++ b/lisp/org/org-mhe.el @@ -1,6 +1,6 @@ ;;; org-mhe.el --- Support for links to MH-E messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index 541ccc8f040..cc935a3c5ad 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el @@ -1,5 +1,5 @@ ;;; org-mobile.el --- Code for asymmetric sync with a mobile device -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 3a667deee9e..65a21a92260 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -1,6 +1,6 @@ ;;; org-mouse.el --- Better mouse support for org-mode -;; Copyright (C) 2006-2011 Free Software Foundation +;; Copyright (C) 2006-2012 Free Software Foundation ;; ;; Author: Piotr Zielinski ;; Maintainer: Carsten Dominik diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el index 838a327b0c2..e53f396a310 100644 --- a/lisp/org/org-odt.el +++ b/lisp/org/org-odt.el @@ -1,6 +1,6 @@ ;;; org-odt.el --- OpenDocumentText export for Org-mode -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Jambunathan K ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index 44c51f95a5a..7538dac1ec6 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -1,6 +1,6 @@ ;;; org-pcomplete.el --- In-buffer completion code -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; John Wiegley diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 6238d49c3c6..f44694fa781 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -1,6 +1,6 @@ ;;; org-plot.el --- Support for plotting from Org-mode -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; ;; Author: Eric Schulte ;; Keywords: tables, plotting diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 8bda9556ab5..ccdbc314a53 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -1,6 +1,6 @@ ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions. ;; -;; Copyright (C) 2008-2011 +;; Copyright (C) 2008-2012 ;; Free Software Foundation, Inc. ;; ;; Author: Bastien Guerry diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index 228666b9724..5753eb08141 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el @@ -1,5 +1,5 @@ ;;; org-publish.el --- publish related org-mode files as a website -;; Copyright (C) 2006-2011 Free Software Foundation, Inc. +;; Copyright (C) 2006-2012 Free Software Foundation, Inc. ;; Author: David O'Toole ;; Maintainer: Carsten Dominik diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index f56b0723dbf..854562f752e 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el @@ -1,6 +1,6 @@ ;;; org-remember.el --- Fast note taking in Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el index 0437ce32ff1..3146ff32758 100644 --- a/lisp/org/org-rmail.el +++ b/lisp/org/org-rmail.el @@ -1,6 +1,6 @@ ;;; org-rmail.el --- Support for links to Rmail messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-special-blocks.el b/lisp/org/org-special-blocks.el index 86caa4d4f09..fca5dd6b3da 100644 --- a/lisp/org/org-special-blocks.el +++ b/lisp/org/org-special-blocks.el @@ -1,4 +1,4 @@ -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Chris Gray diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index d605fb75251..71554808b09 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -1,6 +1,6 @@ ;;; org-src.el --- Source code examples in Org ;; -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Bastien Guerry diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 3bb645bbd2b..33309f61e70 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -1,6 +1,6 @@ ;;; org-table.el --- The table editor for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el index 78b38be57ab..4cb7e32f386 100644 --- a/lisp/org/org-taskjuggler.el +++ b/lisp/org/org-taskjuggler.el @@ -1,6 +1,6 @@ ;;; org-taskjuggler.el --- TaskJuggler exporter for org-mode ;; -;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; ;; Emacs Lisp Archive Entry ;; Filename: org-taskjuggler.el diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index ef5dba68afe..44a53ad0f15 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -1,6 +1,6 @@ ;;; org-timer.el --- The relative timer code for Org-mode -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-vm.el b/lisp/org/org-vm.el index 42870e9ebf8..b6975ff1157 100644 --- a/lisp/org/org-vm.el +++ b/lisp/org/org-vm.el @@ -1,6 +1,6 @@ ;;; org-vm.el --- Support for links to VM messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index 89128dd217a..bad20036b82 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el @@ -1,6 +1,6 @@ ;;; org-w3m.el --- Support from copy and paste from w3m to Org-mode -;; Copyright (C) 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Author: Andy Stewart ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-wl.el b/lisp/org/org-wl.el index 7457cfe855b..6d2370671bd 100644 --- a/lisp/org/org-wl.el +++ b/lisp/org/org-wl.el @@ -1,6 +1,6 @@ ;;; org-wl.el --- Support for links to Wanderlust messages from within Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Tokuya Kameshima ;; David Maus diff --git a/lisp/org/org-xoxo.el b/lisp/org/org-xoxo.el index 4cb3840d32b..fc3a9732041 100644 --- a/lisp/org/org-xoxo.el +++ b/lisp/org/org-xoxo.el @@ -1,6 +1,6 @@ ;;; org-xoxo.el --- XOXO export for Org-mode -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org.el b/lisp/org/org.el index 7163e8f03fc..c5d5e545b9f 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -1,12 +1,12 @@ ;;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik ;; Maintainer: Bastien Guerry ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.8.02 +;; Version: 7.8.03 ;; ;; This file is part of GNU Emacs. ;; @@ -203,7 +203,7 @@ identifier." ;;; Version -(defconst org-version "7.8.02" +(defconst org-version "7.8.03" "The version number of the file org.el.") (defun org-version (&optional here) -- cgit v1.2.1 From b9db31c7b822bb37c8a040ca7e3a16300de0457f Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 4 Jan 2012 15:49:41 +0100 Subject: Fix more copyright year for Org files. --- lisp/org/ob-C.el | 2 +- lisp/org/ob-calc.el | 2 +- lisp/org/ob-ledger.el | 2 +- lisp/org/ob-lilypond.el | 2 +- lisp/org/ob-matlab.el | 2 +- lisp/org/ob-mscgen.el | 2 +- lisp/org/ob-octave.el | 2 +- lisp/org/ob-picolisp.el | 2 +- lisp/org/ob-plantuml.el | 2 +- lisp/org/ob-sqlite.el | 2 +- lisp/org/org-crypt.el | 2 +- lisp/org/org-mks.el | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index dccf6b2b0b3..4f33fc45310 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el @@ -1,6 +1,6 @@ ;;; ob-C.el --- org-babel functions for C and similar languages -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index 0b0cfd4b1ed..6686c2754bf 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el @@ -1,6 +1,6 @@ ;;; ob-calc.el --- org-babel functions for calc code evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc +;; Copyright (C) 2010-2012 Free Software Foundation, Inc ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-ledger.el b/lisp/org/ob-ledger.el index 7556ca19176..e9c142712eb 100644 --- a/lisp/org/ob-ledger.el +++ b/lisp/org/ob-ledger.el @@ -1,6 +1,6 @@ ;;; ob-ledger.el --- org-babel functions for ledger evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Keywords: literate programming, reproducible research, accounting diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index 1f817adb4ec..1f412fd9671 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el @@ -1,6 +1,6 @@ ;;; ob-lilypond.el --- org-babel functions for lilypond evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Martyn Jago ;; Keywords: babel language, literate programming diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el index 479100a80c4..717fc746dc6 100644 --- a/lisp/org/ob-matlab.el +++ b/lisp/org/ob-matlab.el @@ -1,6 +1,6 @@ ;;; ob-matlab.el --- org-babel support for matlab evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el index 5e894717ddd..b40f9a39cef 100644 --- a/lisp/org/ob-mscgen.el +++ b/lisp/org/ob-mscgen.el @@ -1,6 +1,6 @@ ;;; ob-msc.el --- org-babel functions for mscgen evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Juan Pechiar ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index 7de1455b820..9e8575768dc 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el @@ -1,6 +1,6 @@ ;;; ob-octave.el --- org-babel functions for octave and matlab evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el index 75e3ae03f3d..1b39e923e6a 100644 --- a/lisp/org/ob-picolisp.el +++ b/lisp/org/ob-picolisp.el @@ -1,6 +1,6 @@ ;;; ob-picolisp.el --- org-babel functions for picolisp evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Authors: Thorsten Jolitz and Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index 9f60f583bb0..da700527f71 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el @@ -1,6 +1,6 @@ ;;; ob-plantuml.el --- org-babel functions for plantuml evaluation -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Zhang Weize ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index edd230e78c0..d3a336a8af0 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el @@ -1,6 +1,6 @@ ;;; ob-sqlite.el --- org-babel functions for sqlite database interaction -;; Copyright (C) 2010-2011 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index f7644048f48..f3e63b0fb94 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el @@ -1,6 +1,6 @@ ;;; org-crypt.el --- Public key encryption for org-mode entries -;; Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Filename: org-crypt.el diff --git a/lisp/org/org-mks.el b/lisp/org/org-mks.el index 55140419734..71405deeb04 100644 --- a/lisp/org/org-mks.el +++ b/lisp/org/org-mks.el @@ -1,6 +1,6 @@ ;;; org-mks.el --- Multi-key-selection for Org-mode -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp -- cgit v1.2.1 From 0b41d90bd3ef6f1fb03d23cfbe064fcf865c82c3 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 4 Jan 2012 16:13:14 +0100 Subject: Fix even more copyright year for Org files. --- lisp/org/ob-awk.el | 2 +- lisp/org/ob-fortran.el | 2 +- lisp/org/ob-java.el | 2 +- lisp/org/org-eshell.el | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index daba6070d1f..ded8ee4f693 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -1,6 +1,6 @@ ;;; ob-awk.el --- org-babel functions for awk evaluation -;; Copyright (C) 2012 Free Software Foundation, Inc. +;; Copyright (C) 2011-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-fortran.el b/lisp/org/ob-fortran.el index 219d2fa1238..753f628d0ca 100644 --- a/lisp/org/ob-fortran.el +++ b/lisp/org/ob-fortran.el @@ -1,6 +1,6 @@ ;;; ob-fortran.el --- org-babel functions for fortran -;; Copyright (C) 2012 Sergey Litvinov, Eric Schulte +;; Copyright (C) 2011-2012 Sergey Litvinov, Eric Schulte ;; Authors: Sergey Litvinov (based on ob-C.el by Eric Schulte), Eric Schulte ;; Keywords: literate programming, reproducible research, fortran diff --git a/lisp/org/ob-java.el b/lisp/org/ob-java.el index f593e1a155f..75afda124d6 100644 --- a/lisp/org/ob-java.el +++ b/lisp/org/ob-java.el @@ -1,6 +1,6 @@ ;;; ob-java.el --- org-babel functions for java evaluation -;; Copyright (C) 2012 Free Software Foundation, Inc. +;; Copyright (C) 2011-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/org-eshell.el b/lisp/org/org-eshell.el index 92dbc4bc25e..8c229bc1431 100644 --- a/lisp/org/org-eshell.el +++ b/lisp/org/org-eshell.el @@ -1,5 +1,5 @@ ;;; org-eshell.el - Support for links to working directories in eshell -;; Copyright (C) 2012 Free Software Foundation, Inc. +;; Copyright (C) 2011-2012 Free Software Foundation, Inc. ;; ;; Author: Konrad Hinsen ;; Version: 0.1 -- cgit v1.2.1 From 14e1337f8462d1ca2e4af69de9fba58ddabd0274 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 4 Jan 2012 16:20:49 +0100 Subject: Fix trailing whitespaces in Org files. --- lisp/org/ob-awk.el | 4 ++-- lisp/org/ob-gnuplot.el | 2 +- lisp/org/ob-haskell.el | 2 +- lisp/org/ob-lilypond.el | 28 ++++++++++++++-------------- lisp/org/ob-lob.el | 4 ++-- lisp/org/ob-ocaml.el | 2 +- lisp/org/ob-picolisp.el | 8 ++++---- lisp/org/ob-ref.el | 2 +- lisp/org/ob-ruby.el | 4 ++-- lisp/org/ob-sql.el | 2 +- lisp/org/org-ascii.el | 2 +- lisp/org/org-capture.el | 2 +- lisp/org/org-clock.el | 5 ++--- lisp/org/org-crypt.el | 6 +++--- lisp/org/org-gnus.el | 2 +- lisp/org/org-id.el | 6 +----- lisp/org/org-irc.el | 2 +- lisp/org/org-latex.el | 6 +++--- lisp/org/org-mks.el | 2 +- lisp/org/org-mobile.el | 7 +++---- lisp/org/org-pcomplete.el | 2 +- lisp/org/org-publish.el | 4 ++-- lisp/org/org-remember.el | 3 +-- lisp/org/org-special-blocks.el | 2 +- lisp/org/org-src.el | 2 +- lisp/org/org-table.el | 7 +++---- lisp/org/org-taskjuggler.el | 8 ++++---- 27 files changed, 59 insertions(+), 67 deletions(-) diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index ded8ee4f693..682d802c11c 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -24,9 +24,9 @@ ;;; Commentary: ;; Babel's awk can use special header argument: -;; +;; ;; - :in-file takes a path to a file of data to be processed by awk -;; +;; ;; - :stdin takes an Org-mode data or code block reference, the value ;; of which will be passed to the awk process through STDIN diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 0cdef4e1289..5d07366e774 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -34,7 +34,7 @@ ;;; Requirements: ;; - gnuplot :: http://www.gnuplot.info/ -;; +;; ;; - gnuplot-mode :: http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html ;;; Code: diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index b04c3b082b7..53c55329752 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el @@ -79,7 +79,7 @@ (cdr (member org-babel-haskell-eoe (reverse (mapcar #'org-babel-trim raw))))))) (org-babel-reassemble-table - (cond + (cond ((equal result-type 'output) (mapconcat #'identity (reverse (cdr results)) "\n")) ((equal result-type 'value) diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index 1f412fd9671..0dde0de9e42 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el @@ -114,7 +114,7 @@ blocks") body)))) vars) body)) - + (defun org-babel-execute:lilypond (body params) "This function is called by `org-babel-execute-src-block'. Depending on whether we are in arrange mode either: @@ -138,7 +138,7 @@ specific arguments to =org-babel-tangle=" (defun ly-process-basic (body params) "Execute a lilypond block in basic mode" - + (let* ((result-params (cdr (assoc :result-params params))) (out-file (cdr (assoc :file params))) (cmdline (or (cdr (assoc :cmdline params)) @@ -147,7 +147,7 @@ specific arguments to =org-babel-tangle=" (with-temp-file in-file (insert (org-babel-expand-body:generic body params))) - + (org-babel-eval (concat (ly-determine-ly-path) @@ -177,7 +177,7 @@ If error in compilation, attempt to mark the error in lilypond org file" (ly-temp-file (ly-switch-extension (buffer-file-name) ".ly"))) (if (file-exists-p ly-tangled-file) - (progn + (progn (when (file-exists-p ly-temp-file) (delete-file ly-temp-file)) (rename-file ly-tangled-file @@ -243,7 +243,7 @@ FILE-NAME is full path to lilypond file" "Mark the erroneous lines in the lilypond org buffer. FILE-NAME is full path to lilypond file. LINE is the erroneous line" - + (switch-to-buffer-other-window (concat (file-name-nondirectory (ly-switch-extension file-name ".org")))) @@ -256,7 +256,7 @@ LINE is the erroneous line" (set-mark (point)) (goto-char (- (point) (length line)))) (goto-char temp)))) - + (defun ly-parse-line-num (&optional buffer) "Extract error line number." @@ -284,7 +284,7 @@ LINE is the erroneous line" "Extract the erroneous line from the tangled .ly file FILE-NAME is full path to lilypond file. LINENO is the number of the erroneous line" - + (with-temp-buffer (insert-file-contents (ly-switch-extension file-name ".ly") nil nil nil t) @@ -294,12 +294,12 @@ LINENO is the number of the erroneous line" (forward-line (- lineNo 1)) (buffer-substring (point) (point-at-eol))) nil))) - + (defun ly-attempt-to-open-pdf (file-name &optional test) "Attempt to display the generated pdf file FILE-NAME is full path to lilypond file If TEST is non-nil, the shell command is returned and is not run" - + (when ly-display-pdf-post-tangle (let ((pdf-file (ly-switch-extension file-name ".pdf"))) (if (file-exists-p pdf-file) @@ -340,7 +340,7 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" (defun ly-determine-pdf-path (&optional test) "Return correct path to pdf viewer depending on OS If TEST is non-nil, it contains a simulation of the OS for test purposes" - + (let ((sys-type (or test system-type))) (cond ((string= sys-type "darwin") @@ -352,7 +352,7 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" (defun ly-determine-midi-path (&optional test) "Return correct path to midi player depending on OS If TEST is non-nil, it contains a simulation of the OS for test purposes" - + (let ((sys-type (or test test system-type))) (cond ((string= sys-type "darwin") @@ -360,10 +360,10 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" ((string= sys-type "win32") ly-win32-midi-path) (t ly-nix-midi-path)))) - + (defun ly-toggle-midi-play () "Toggle whether midi will be played following a successful compilation" - + (interactive) (setq ly-play-midi-post-tangle (not ly-play-midi-post-tangle)) @@ -373,7 +373,7 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes" (defun ly-toggle-pdf-display () "Toggle whether pdf will be displayed following a successful compilation" - + (interactive) (setq ly-display-pdf-post-tangle (not ly-display-pdf-post-tangle)) diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 0cd719293c2..8976427ab7e 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -104,7 +104,7 @@ if so then run the appropriate source block from the Library." (beginning-of-line 1) (when (looking-at org-babel-lob-one-liner-regexp) (append - (mapcar #'org-babel-clean-text-properties + (mapcar #'org-babel-clean-text-properties (list (format "%s%s(%s)%s" (nonempty 3 12) @@ -115,7 +115,7 @@ if so then run the appropriate source block from the Library." (nonempty 9 18))) (list (length (if (= (length (match-string 12)) 0) (match-string 2) (match-string 11)))))))))) - + (defun org-babel-lob-execute (info) "Execute the lob call specified by INFO." (let ((params (org-babel-process-params diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index 6b4c54d2b72..8d61ff37e6e 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el @@ -98,7 +98,7 @@ (lambda (pair) (format "let %s = %s;;" (car pair) (org-babel-ocaml-elisp-to-ocaml (cdr pair)))) (mapcar #'cdr (org-babel-get-header params :var)))) - + (defun org-babel-ocaml-elisp-to-ocaml (val) "Return a string of ocaml code which evaluates to VAL." (if (listp val) diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el index 1b39e923e6a..20789340201 100644 --- a/lisp/org/ob-picolisp.el +++ b/lisp/org/ob-picolisp.el @@ -44,10 +44,10 @@ ;; PicoLisp _is_ an object-oriented database with a Prolog-based query ;; language implemented in PicoLisp (Pilog). Database objects are -;; first-class members of the language. +;; first-class members of the language. ;; PicoLisp is an extremely productive framework for the development -;; of interactive web-applications (on top of a database). +;; of interactive web-applications (on top of a database). ;;; Requirements: @@ -95,7 +95,7 @@ (defun org-babel-execute:picolisp (body params) "Execute a block of Picolisp code with org-babel. This function is - called by `org-babel-execute-src-block'" + called by `org-babel-execute-src-block'" (message "executing Picolisp source code block") (let* ( ;; name of the session or "none" @@ -118,7 +118,7 @@ ((member "value" result-params) (format "(out \"/dev/null\" %s)" full-body)) (t full-body)))) - + ((lambda (result) (if (or (member "verbatim" result-params) (member "scalar" result-params) diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index bd9e3890090..cde594e11b0 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -60,7 +60,7 @@ (declare-function org-narrow-to-subtree "org" ()) (declare-function org-id-find-id-in-file "org-id" (id file &optional markerp)) (declare-function org-show-context "org" (&optional key)) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defvar org-babel-ref-split-regexp diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 65cc2bde757..df8ae2cc4f1 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -28,10 +28,10 @@ ;;; Requirements: ;; - ruby and irb executables :: http://www.ruby-lang.org/ -;; +;; ;; - ruby-mode :: Can be installed through ELPA, or from ;; http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el -;; +;; ;; - inf-ruby mode :: Can be installed through ELPA, or from ;; http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 645842a12a4..3f7882c9919 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -39,7 +39,7 @@ ;; - add more useful header arguments (user, passwd, database, etc...) ;; - support for more engines (currently only supports mysql) ;; - what's a reasonable way to drop table data into SQL? -;; +;; ;;; Code: (require 'ob) diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index c652671b7fe..90f39fd3d8d 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el @@ -108,7 +108,7 @@ utf8 Use all UTF-8 characters") (defun org-export-as-utf8 (&rest args) "Like `org-export-as-ascii', use encoding for special symbols." (interactive) - (org-export-as-encoding 'org-export-as-ascii + (org-export-as-encoding 'org-export-as-ascii (org-called-interactively-p 'any) 'utf8 args)) diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index c23934c1900..46202f8adea 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -56,7 +56,7 @@ (date &optional keep-restriction)) (declare-function org-table-get-specials "org-table" ()) (declare-function org-table-goto-line "org-table" (N)) -(declare-function org-pop-to-buffer-same-window "org-compat" +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defvar org-remember-default-headline) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index ad6d76e038a..2784707e452 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -2000,7 +2000,7 @@ the currently selected interval size." (encode-time 0 0 0 (+ d n) m y)))) ((and wp (string-match "w\\|W" wp) mw (> (length wp) 0)) (require 'cal-iso) - (setq date (calendar-gregorian-from-absolute + (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (list (+ mw n) 1 y)))) (setq ins (format-time-string "%G-W%V" @@ -2017,7 +2017,7 @@ the currently selected interval size." (setq mw 5 y (- y 1)) ()) - (setq date (calendar-gregorian-from-absolute + (setq date (calendar-gregorian-from-absolute (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y)))) (setq ins (format-time-string (concatenate 'string (number-to-string y) "-Q" (number-to-string (+ mw n))) @@ -2642,4 +2642,3 @@ The details of what will be saved are regulated by the variable (provide 'org-clock) ;;; org-clock.el ends here - diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index f3e63b0fb94..a128b046038 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el @@ -76,21 +76,21 @@ (defgroup org-crypt nil "Org Crypt" - :tag "Org Crypt" + :tag "Org Crypt" :group 'org) (defcustom org-crypt-tag-matcher "crypt" "The tag matcher used to find headings whose contents should be encrypted. See the \"Match syntax\" section of the org manual for more details." - :type 'string + :type 'string :group 'org-crypt) (defcustom org-crypt-key "" "The default key to use when encrypting the contents of a heading. This setting can also be overridden in the CRYPTKEY property." - :type 'string + :type 'string :group 'org-crypt) (defcustom org-crypt-disable-auto-save 'ask diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index 2a3f9461fd1..f0c64a0d765 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el @@ -175,7 +175,7 @@ If `org-store-link' was called with a prefix arg the meaning of (setq to (or to (gnus-fetch-original-field "To")) newsgroups (gnus-fetch-original-field "Newsgroups") x-no-archive (gnus-fetch-original-field "x-no-archive"))) - (org-store-link-props :type "gnus" :from from :subject subject + (org-store-link-props :type "gnus" :from from :subject subject :message-id message-id :group group :to to) (when date (org-add-link-props :date date :date-timestamp date-ts diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 0b829d60ba6..55e826f3ae6 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -73,7 +73,7 @@ (require 'org) (declare-function message-make-fqdn "message" ()) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) ;;; Customization @@ -641,7 +641,3 @@ optional argument MARKERP, return the position as a new marker." (provide 'org-id) ;;; org-id.el ends here - - - - diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index 0dd05124f3c..107428366dc 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el @@ -59,7 +59,7 @@ (declare-function erc-server-buffer "erc" ()) (declare-function erc-get-server-nickname-list "erc" ()) (declare-function erc-cmd-JOIN "erc" (channel &optional key)) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defvar org-irc-client 'erc diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 59dd60f0322..ba7f8fd6259 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el @@ -302,8 +302,8 @@ markup defined, the first one in the association list will be used." (defcustom org-export-latex-href-format "\\href{%s}{%s}" "A printf format string to be applied to href links. -The format must contain either two %s instances or just one. -If it contains two %s instances, the first will be filled with +The format must contain either two %s instances or just one. +If it contains two %s instances, the first will be filled with the link, the second with the link description. If it contains only one, the %s will be filled with the link." :group 'org-export-latex @@ -2226,7 +2226,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." ;; a LaTeX issue, but we here implement a work-around anyway. (setq path (org-export-latex-protect-amp path) desc (org-export-latex-protect-amp desc))) - (insert + (insert (if (string-match "%s.*%s" org-export-latex-href-format) (format org-export-latex-href-format path desc) (format org-export-latex-href-format path)))) diff --git a/lisp/org/org-mks.el b/lisp/org/org-mks.el index 71405deeb04..95223ef848e 100644 --- a/lisp/org/org-mks.el +++ b/lisp/org/org-mks.el @@ -24,7 +24,7 @@ ;;; Commentary: -;; +;; ;;; Code: diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index cc935a3c5ad..b049f4ec5e0 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el @@ -37,7 +37,7 @@ (eval-when-compile (require 'cl)) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defgroup org-mobile nil @@ -272,7 +272,7 @@ Also exclude files matching `org-mobile-files-exclude-regexp'." (t nil))) org-mobile-files))) (files (delete - nil + nil (mapcar (lambda (f) (unless (and (not (string= org-mobile-files-exclude-regexp "")) (string-match org-mobile-files-exclude-regexp f)) @@ -499,7 +499,7 @@ agenda view showing the flagged items." org-mobile-directory)) (save-excursion (setq buf (find-file file)) - (when (and (= (point-min) (point-max))) + (when (and (= (point-min) (point-max))) (insert "\n") (save-buffer) (when org-mobile-use-encryption @@ -1099,4 +1099,3 @@ A and B must be strings or nil." (provide 'org-mobile) ;;; org-mobile.el ends here - diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index 7538dac1ec6..0ca8777878c 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -146,7 +146,7 @@ When completing for #+STARTUP, for example, this function returns (org-split-string (org-get-current-options) "\n")) org-additional-option-like-keywords))))) (substring pcomplete-stub 2))) - + (defvar org-startup-options) (defun pcomplete/org-mode/file-option/startup () "Complete arguments for the #+STARTUP file option." diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index 5753eb08141..dc794dd92c5 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el @@ -368,7 +368,7 @@ This is a compatibility function for Emacsen without `delete-dups'." (declare-function org-publish-delete-dups "org-publish" (list)) (declare-function find-lisp-find-files "find-lisp" (directory regexp)) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1127,7 +1127,7 @@ so that the file including them will be republished as well." (let ((ctime (org-publish-cache-ctime-of-src filename))) (or (< pstamp ctime) (when included-files-ctime - (not (null (delq nil (mapcar (lambda(ct) (< ctime ct)) + (not (null (delq nil (mapcar (lambda(ct) (< ctime ct)) included-files-ctime)))))))))) (defun org-publish-cache-set-file-property (filename property value &optional project-name) diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index 854562f752e..65e92bab016 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el @@ -39,7 +39,7 @@ (declare-function remember "remember" (&optional initial)) (declare-function remember-buffer-desc "remember" ()) (declare-function remember-finalize "remember" ()) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defvar remember-save-after-remembering) @@ -1152,4 +1152,3 @@ See also the variable `org-reverse-note-order'." (provide 'org-remember) ;;; org-remember.el ends here - diff --git a/lisp/org/org-special-blocks.el b/lisp/org/org-special-blocks.el index fca5dd6b3da..fc882a33396 100644 --- a/lisp/org/org-special-blocks.el +++ b/lisp/org/org-special-blocks.el @@ -51,7 +51,7 @@ interpreted by other mechanisms.") (defun org-special-blocks-make-special-cookies () "Adds special cookies when #+begin_foo and #+end_foo tokens are seen. This is run after a few special cases are taken care of." - (when (or (eq org-export-current-backend 'html) + (when (or (eq org-export-current-backend 'html) (eq org-export-current-backend 'latex)) (goto-char (point-min)) (while (re-search-forward "^[ \t]*#\\+\\(begin\\|end\\)_\\(.*\\)$" nil t) diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 71554808b09..ac574ed4dd2 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -41,7 +41,7 @@ (declare-function org-at-table.el-p "org" ()) (declare-function org-get-indentation "org" (&optional line)) (declare-function org-switch-to-buffer-other-window "org" (&rest args)) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defcustom org-edit-src-region-extra nil diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 33309f61e70..df93a9a7271 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -2436,7 +2436,7 @@ not overwrite the stored one." (modes (copy-sequence org-calc-default-modes)) (numbers nil) ; was a variable, now fixed default (keep-empty nil) - n form form0 formrpl formrg bw fmt x ev orig c lispp literal + n form form0 formrpl formrg bw fmt x ev orig c lispp literal duration duration-output-format) ;; Parse the format string. Since we have a lot of modes, this is ;; a lot of work. However, I think calc still uses most of the time. @@ -2461,7 +2461,7 @@ not overwrite the stored one." duration-output-format nil fmt (replace-match "" t t fmt))) (if (string-match "t" fmt) - (setq duration t + (setq duration t duration-output-format org-table-duration-custom-format numbers t fmt (replace-match "" t t fmt))) @@ -2529,7 +2529,7 @@ not overwrite the stored one." ;; Insert complex ranges (while (and (string-match org-table-range-regexp form) (> (length (match-string 0 form)) 1)) - (setq formrg (save-match-data + (setq formrg (save-match-data (org-table-get-range (match-string 0 form) nil n0))) (setq formrpl (save-match-data @@ -4759,4 +4759,3 @@ list of the fields in the rectangle ." (provide 'org-table) ;;; org-table.el ends here - diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el index 4cb7e32f386..68f64974ff3 100644 --- a/lisp/org/org-taskjuggler.el +++ b/lisp/org/org-taskjuggler.el @@ -355,8 +355,8 @@ information, all the properties, etc." (let* ((props (org-entry-properties)) (components (org-heading-components)) (level (nth 1 components)) - (headline - (replace-regexp-in-string + (headline + (replace-regexp-in-string "\"" "\\\"" (nth 4 components) t t)) ; quote double quotes in headlines (parent-ordered (org-taskjuggler-parent-is-ordered-p))) (push (cons "level" level) props) @@ -406,10 +406,10 @@ deeper), then it's not a leaf." (successor (car (cdr tasks)))) (cond ;; if a task has no successors it is a leaf - ((null successor) + ((null successor) (push (cons (cons "leaf-node" t) task) new-list)) ;; if the successor has a lower level than task it is a leaf - ((<= (cdr (assoc "level" successor)) (cdr (assoc "level" task))) + ((<= (cdr (assoc "level" successor)) (cdr (assoc "level" task))) (push (cons (cons "leaf-node" t) task) new-list)) ;; otherwise examine the rest of the tasks (t (push task new-list)))) -- cgit v1.2.1 From a7183d7c4625f88a8754061b02674d718e64f48f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 4 Jan 2012 20:51:47 +0200 Subject: Rmail: support citations with non-ASCII letters in names lisp/mail/rmail.el (rmail-font-lock-keywords): Accept non-ASCII letters in cite-prefix. --- lisp/ChangeLog | 5 +++++ lisp/mail/rmail.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c852bc00c74..1125097feb7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-01-04 Eli Zaretskii + + * mail/rmail.el (rmail-font-lock-keywords): Accept non-ASCII + letters in cite-prefix. + 2012-01-03 Lars Magne Ingebrigtsen * mail/smtpmail.el (smtpmail-stream-type): Mention the `ssl' value. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 2c94cfdf212..5f0eb2644ee 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -791,7 +791,7 @@ that knows the exact ordering of the \\( \\) subexpressions.") ;; These are all matched case-insensitively. (eval-when-compile (let* ((cite-chars "[>|}]") - (cite-prefix "a-z") + (cite-prefix "[:alpha:]") (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) (list '("^\\(From\\|Sender\\|Resent-From\\):" . 'rmail-header-name) -- cgit v1.2.1 From 9937bef4b8f3a820220d0309b340f25285808fae Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Wed, 4 Jan 2012 22:14:09 +0000 Subject: Merge changes made in Gnus trunk. 2012-01-04 Lars Magne Ingebrigtsen * gnus.texi (Group Parameters): Note precedence. 2012-01-04 Chris Gray (tiny change) * mm-decode.el (mm-shr): Check that `gnus-summary-buffer' really is a live buffer. 2012-01-04 Lars Magne Ingebrigtsen * nnir.el (nnir-retrieve-headers): Protect against the article not existing on the server (bug#10335). 2012-01-04 Wolfgang Jenkner (tiny change) * gnus-agent.el (gnus-agent-load-local): Recompute gnus-agent-article-local on changing method. 2012-01-04 Lars Magne Ingebrigtsen * gnus.el (gnus-parameters): Note precedence. 2012-01-04 Leo * nndraft.el (nndraft-update-unread-articles): Don't move point around in the group buffer. --- doc/misc/ChangeLog | 4 ++++ doc/misc/gnus.texi | 6 ++++-- lisp/gnus/ChangeLog | 24 ++++++++++++++++++++++++ lisp/gnus/gnus-agent.el | 5 ++++- lisp/gnus/gnus.el | 6 ++++-- lisp/gnus/mm-decode.el | 3 ++- lisp/gnus/nndraft.el | 15 ++++++++------- lisp/gnus/nnir.el | 5 +++-- 8 files changed, 53 insertions(+), 15 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 30c4b01d3fa..21aef5c5a9a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2012-01-04 Lars Magne Ingebrigtsen + + * gnus.texi (Group Parameters): Note precedence. + 2012-01-03 Eric Schulte * org.texi (Noweb reference syntax): Adding documentation of diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 76bfbc4bb52..6523dc9528c 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -3187,8 +3187,10 @@ For example: (broken-reply-to . t)))) @end lisp -String value of parameters will be subjected to regexp substitution, as -the @code{to-group} example shows. +The first clause that matches the group name will be used. + +Parameters that are strings will be subjected to regexp substitution, +as the @code{to-group} example shows. @vindex gnus-parameters-case-fold-search By default, whether comparing the group name and one of those regexps diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 34f914a8b0a..7b3cb1d53e9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,27 @@ +2012-01-04 Chris Gray (tiny change) + + * mm-decode.el (mm-shr): Check that `gnus-summary-buffer' really is a + live buffer. + +2012-01-04 Lars Magne Ingebrigtsen + + * nnir.el (nnir-retrieve-headers): Protect against the article not + existing on the server (bug#10335). + +2012-01-04 Wolfgang Jenkner (tiny change) + + * gnus-agent.el (gnus-agent-load-local): Recompute + gnus-agent-article-local on changing method. + +2012-01-04 Lars Magne Ingebrigtsen + + * gnus.el (gnus-parameters): Note precedence. + +2012-01-04 Leo + + * nndraft.el (nndraft-update-unread-articles): Don't move point around + in the group buffer. + 2012-01-04 Julien Danjou * nnimap.el (nnimap-update-info): Fix an error when all articles UIDs diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index d268dd7b0c1..56ba6a9fac7 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -2229,7 +2229,10 @@ doesn't exist, to valid the overview buffer." article counts for each of the method's subscribed groups." (let ((gnus-command-method (or method gnus-command-method))) (when (or (null gnus-agent-article-local-times) - (zerop gnus-agent-article-local-times)) + (zerop gnus-agent-article-local-times) + (not (gnus-methods-equal-p + gnus-command-method + (symbol-value (intern "+method" gnus-agent-article-local))))) (setq gnus-agent-article-local (gnus-cache-file-contents (gnus-agent-lib-file "local") diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index b1f0f60668e..459f4cc881f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1,6 +1,6 @@ ;;; gnus.el --- a newsreader for GNU Emacs -;; Copyright (C) 1987-1990, 1993-1998, 2000-2011 +;; Copyright (C) 1987-1990, 1993-1998, 2000-2012 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA @@ -1146,7 +1146,9 @@ For example: (display . all)) (\"mail\\\\.me\" (gnus-use-scoring t)) (\"list\\\\..*\" (total-expire . t) - (broken-reply-to . t)))" + (broken-reply-to . t))) + +The first clause that matches the group name will be used." :version "22.1" :group 'gnus-group-various :type '(repeat (cons regexp diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 7ea0902bdb5..ec8dd5bf8c5 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1,6 +1,6 @@ ;;; mm-decode.el --- Functions for decoding MIME things -;; Copyright (C) 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko @@ -1724,6 +1724,7 @@ If RECURSIVE, search recursively." (buffer-string)))))) shr-inhibit-images shr-blocked-images charset char) (if (and (boundp 'gnus-summary-buffer) + (bufferp gnus-summary-buffer) (buffer-name gnus-summary-buffer)) (with-current-buffer gnus-summary-buffer (setq shr-inhibit-images gnus-inhibit-images diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 0b47062a919..976e6e657e6 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -181,13 +181,14 @@ are generated if and only if they are also in `message-draft-headers'.") (gnus-get-new-news-hook nil) (inhibit-read-only t)) (gnus-group-get-new-news-this-group nil t) - (dolist (group groups) - (unless (and gnus-permanently-visible-groups - (string-match gnus-permanently-visible-groups - group)) - (gnus-group-goto-group group) - (when (zerop (gnus-group-group-unread)) - (gnus-delete-line))))))) + (save-excursion + (dolist (group groups) + (unless (and gnus-permanently-visible-groups + (string-match gnus-permanently-visible-groups + group)) + (gnus-group-goto-group group) + (when (zerop (gnus-group-group-unread)) + (gnus-delete-line)))))))) (deffoo nndraft-request-associate-buffer (group) "Associate the current buffer with some article in the draft group." diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index ceeaeda9309..1d4f1c25a09 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -1,6 +1,6 @@ ;;; nnir.el --- search mail with various search engines -*- coding: iso-8859-1 -*- -;; Copyright (C) 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Kai Großjohann ;; Swish-e and Swish++ backends by: @@ -670,7 +670,8 @@ Add an entry here when adding a new search engine.") (goto-char (point-min)) (while (not (eobp)) (let* ((novitem (funcall parsefunc)) - (artno (mail-header-number novitem)) + (artno (and novitem + (mail-header-number novitem))) (art (car (rassq artno articleids)))) (when art (mail-header-set-number novitem art) -- cgit v1.2.1 From bb5aa5d6c3a0138c36e2879a78d9cdb22e6f410e Mon Sep 17 00:00:00 2001 From: Michael Mauger Date: Wed, 4 Jan 2012 22:45:30 -0500 Subject: 2012-01-05 Michael R. Mauger * progmodes/sql.el (sql-login-hook): Add hook to respond to the first prompt in `sql-interacive-mode'. (sql-mode-oracle-font-lock-keywords): Add CONNECT_BY_* builtin keywords. (sql-mode-mysql-font-lock-keywords): Add ELSEIF keyword. (sql-product-interactive): Bug fix: Set `sql-buffer' in context of original buffer. Invoke `sql-login-hook'. --- lisp/ChangeLog | 10 ++++++++++ lisp/progmodes/sql.el | 23 ++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1125097feb7..ae03053db9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2012-01-05 Michael R. Mauger + + * progmodes/sql.el (sql-login-hook): Add hook to respond to the + first prompt in `sql-interacive-mode'. + (sql-mode-oracle-font-lock-keywords): Add CONNECT_BY_* builtin + keywords. + (sql-mode-mysql-font-lock-keywords): Add ELSEIF keyword. + (sql-product-interactive): Bug fix: Set `sql-buffer' in + context of original buffer. Invoke `sql-login-hook'. + 2012-01-04 Eli Zaretskii * mail/rmail.el (rmail-font-lock-keywords): Accept non-ASCII diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 60ba768a80e..2e59d8f8517 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -1,6 +1,6 @@ ;;; sql.el --- specialized comint.el for SQL interpreters -;; Copyright (C) 1998-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Alex Schroeder ;; Maintainer: Michael Mauger @@ -219,6 +219,8 @@ ;; Drew Adams -- Emacs 20 support ;; Harald Maier -- sql-send-string ;; Stefan Monnier -- font-lock corrections; code polish +;; Paul Sleigh -- MySQL keyword enhancement +;; Andrew Schein -- sql-port bug @@ -811,6 +813,14 @@ is changed." :type 'hook :group 'SQL) +(defcustom sql-login-hook '() + "Hook for interacting with a buffer in `sql-interactive-mode'. + +This hook is invoked in a buffer once it is ready to accept input +for the first time." + :type 'hook + :group 'SQL) + ;; Customization for ANSI (defcustom sql-ansi-statement-starters (regexp-opt '( @@ -1594,6 +1604,7 @@ to add functions and PL/SQL keywords.") "atan" "atan2" "avg" "bfilename" "bin_to_num" "bitand" "cardinality" "cast" "ceil" "chartorowid" "chr" "cluster_id" "cluster_probability" "cluster_set" "coalesce" "collect" "compose" "concat" "convert" "corr" +"connect_by_root" "connect_by_iscycle" "connect_by_isleaf" "corr_k" "corr_s" "cos" "cosh" "count" "covar_pop" "covar_samp" "cube_table" "cume_dist" "current_date" "current_timestamp" "cv" "dataobj_to_partition" "dbtimezone" "decode" "decompose" "deletexml" @@ -2279,7 +2290,7 @@ you define your own `sql-mode-solid-font-lock-keywords'.") "collation" "column" "columns" "comment" "committed" "concurrent" "constraint" "create" "cross" "data" "database" "default" "delay_key_write" "delayed" "delete" "desc" "directory" "disable" -"distinct" "distinctrow" "do" "drop" "dumpfile" "duplicate" "else" +"distinct" "distinctrow" "do" "drop" "dumpfile" "duplicate" "else" "elseif" "enable" "enclosed" "end" "escaped" "exists" "fields" "first" "for" "force" "foreign" "from" "full" "fulltext" "global" "group" "handler" "having" "heap" "high_priority" "if" "ignore" "in" "index" "infile" @@ -3423,7 +3434,7 @@ list of SQLi command strings." :prompt-regexp)) (start nil)) (with-current-buffer buf - (toggle-read-only -1) + (setq view-read-only nil) (unless save-prior (erase-buffer)) (goto-char (point-max)) @@ -3532,7 +3543,7 @@ buffer is popped into a view window. " (get-lru-window)))) (with-current-buffer outbuf (set-buffer-modified-p nil) - (toggle-read-only 1)) + (setq view-read-only t)) (view-buffer-other-window outbuf) (when one-win (shrink-window-if-larger-than-buffer))))) @@ -4097,7 +4108,8 @@ the call to \\[sql-product-interactive] with (setq new-sqli-buffer (current-buffer)) (when new-name (sql-rename-buffer new-name)) - (setq sql-buffer (buffer-name new-sqli-buffer)) + (set (make-local-variable 'sql-buffer) + (buffer-name new-sqli-buffer)) ;; Set `sql-buffer' in the start buffer (with-current-buffer start-buffer @@ -4107,6 +4119,7 @@ the call to \\[sql-product-interactive] with ;; All done. (message "Login...done") + (run-hooks 'sql-login-hook) (pop-to-buffer new-sqli-buffer))))) (message "No default SQL product defined. Set `sql-product'."))) -- cgit v1.2.1 From 1c6e5a3260fd774dbc8fac0c1e14b57165bcf6bd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 4 Jan 2012 23:45:28 -0800 Subject: Update short copyright year to 2012. * etc/refcards/calccard.tex, etc/refcards/cs-dired-ref.tex: * etc/refcards/cs-refcard.tex, etc/refcards/cs-survival.tex: * etc/refcards/de-refcard.tex, etc/refcards/dired-ref.tex: * etc/refcards/fr-dired-ref.tex, etc/refcards/fr-refcard.tex: * etc/refcards/fr-survival.tex, etc/refcards/orgcard.tex: * etc/refcards/pl-refcard.tex, etc/refcards/pt-br-refcard.tex: * etc/refcards/refcard.tex, etc/refcards/ru-refcard.tex: * etc/refcards/sk-dired-ref.tex, etc/refcards/sk-refcard.tex: * etc/refcards/sk-survival.tex, etc/refcards/survival.tex: * etc/refcards/vipcard.tex, etc/refcards/viperCard.tex: * lib-src/ebrowse.c (version) : * lib-src/etags.c (print_version) : * lib-src/rcs2log (Copyright): Update short copyright year to 2012. * nextstep/Cocoa/Emacs.base/Contents/Info.plist: * nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings: * nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist: * src/emacs.c (emacs_copyright): Update short copyright year to 2012. --- etc/ChangeLog | 14 ++++++++++++++ etc/refcards/calccard.tex | 2 +- etc/refcards/cs-dired-ref.tex | 2 +- etc/refcards/cs-refcard.tex | 2 +- etc/refcards/cs-survival.tex | 2 +- etc/refcards/de-refcard.tex | 2 +- etc/refcards/dired-ref.tex | 2 +- etc/refcards/fr-dired-ref.tex | 2 +- etc/refcards/fr-refcard.tex | 2 +- etc/refcards/fr-survival.tex | 2 +- etc/refcards/orgcard.tex | 2 +- etc/refcards/pl-refcard.tex | 2 +- etc/refcards/pt-br-refcard.tex | 2 +- etc/refcards/refcard.tex | 2 +- etc/refcards/ru-refcard.tex | 2 +- etc/refcards/sk-dired-ref.tex | 2 +- etc/refcards/sk-refcard.tex | 2 +- etc/refcards/sk-survival.tex | 2 +- etc/refcards/survival.tex | 2 +- etc/refcards/vipcard.tex | 2 +- etc/refcards/viperCard.tex | 2 +- lib-src/ChangeLog | 6 ++++++ lib-src/ebrowse.c | 2 +- lib-src/etags.c | 2 +- lib-src/rcs2log | 2 +- nextstep/ChangeLog | 7 +++++++ nextstep/Cocoa/Emacs.base/Contents/Info.plist | 2 +- .../Contents/Resources/English.lproj/InfoPlist.strings | 2 +- nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist | 2 +- src/ChangeLog | 4 ++++ src/emacs.c | 2 +- 31 files changed, 58 insertions(+), 27 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index f7c37b24654..6c45376b671 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,17 @@ +2012-01-05 Glenn Morris + + * refcards/calccard.tex, refcards/cs-dired-ref.tex: + * refcards/cs-refcard.tex, refcards/cs-survival.tex: + * refcards/de-refcard.tex, refcards/dired-ref.tex: + * refcards/fr-dired-ref.tex, refcards/fr-refcard.tex: + * refcards/fr-survival.tex, refcards/orgcard.tex: + * refcards/pl-refcard.tex, refcards/pt-br-refcard.tex: + * refcards/refcard.tex, refcards/ru-refcard.tex: + * refcards/sk-dired-ref.tex, refcards/sk-refcard.tex: + * refcards/sk-survival.tex, refcards/survival.tex: + * refcards/vipcard.tex, refcards/viperCard.tex: + Update short copyright year to 2012. + 2012-01-03 Bastien Guerry * org/COPYRIGHT-AND-LICENSE: New file. diff --git a/etc/refcards/calccard.tex b/etc/refcards/calccard.tex index f60be117ad5..1eb88a223fa 100644 --- a/etc/refcards/calccard.tex +++ b/etc/refcards/calccard.tex @@ -64,7 +64,7 @@ % Internet: gildea@stop.mail-abuse.org \def\emacsversionnumber{23} -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. diff --git a/etc/refcards/cs-dired-ref.tex b/etc/refcards/cs-dired-ref.tex index 63239b55c10..a2db40137bb 100644 --- a/etc/refcards/cs-dired-ref.tex +++ b/etc/refcards/cs-dired-ref.tex @@ -42,7 +42,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/cs-refcard.tex b/etc/refcards/cs-refcard.tex index 8b9456b4a63..b2867e66547 100644 --- a/etc/refcards/cs-refcard.tex +++ b/etc/refcards/cs-refcard.tex @@ -60,7 +60,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/cs-survival.tex b/etc/refcards/cs-survival.tex index d20d6a08364..76a28eb360e 100644 --- a/etc/refcards/cs-survival.tex +++ b/etc/refcards/cs-survival.tex @@ -55,7 +55,7 @@ \chyph \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/de-refcard.tex b/etc/refcards/de-refcard.tex index 58527be9d76..472cb1e431e 100644 --- a/etc/refcards/de-refcard.tex +++ b/etc/refcards/de-refcard.tex @@ -61,7 +61,7 @@ \mdqoff % deactivates the "-char \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed below this line. diff --git a/etc/refcards/dired-ref.tex b/etc/refcards/dired-ref.tex index f1fd6808cde..80ab686faef 100644 --- a/etc/refcards/dired-ref.tex +++ b/etc/refcards/dired-ref.tex @@ -44,7 +44,7 @@ \pdflayout=(1) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/fr-dired-ref.tex b/etc/refcards/fr-dired-ref.tex index 01afe76ff30..f0cabda8379 100644 --- a/etc/refcards/fr-dired-ref.tex +++ b/etc/refcards/fr-dired-ref.tex @@ -36,7 +36,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/fr-refcard.tex b/etc/refcards/fr-refcard.tex index 61caccbea8e..674b63becbc 100644 --- a/etc/refcards/fr-refcard.tex +++ b/etc/refcards/fr-refcard.tex @@ -57,7 +57,7 @@ \pdflayout=(0l) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed below this line. diff --git a/etc/refcards/fr-survival.tex b/etc/refcards/fr-survival.tex index b9c84ac680a..c6ad7c4f393 100644 --- a/etc/refcards/fr-survival.tex +++ b/etc/refcards/fr-survival.tex @@ -50,7 +50,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index d49cd1e6252..19165a4b4bf 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,7 +1,7 @@ % Reference Card for Org Mode \def\orgversionnumber{7.8.02} \def\versionyear{2011} % latest update -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year %**start of header \newcount\columnsperpage diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex index 23624116709..e57ea48cd6a 100644 --- a/etc/refcards/pl-refcard.tex +++ b/etc/refcards/pl-refcard.tex @@ -70,7 +70,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/pt-br-refcard.tex b/etc/refcards/pt-br-refcard.tex index 4091f59d1f6..0515cdb8267 100644 --- a/etc/refcards/pt-br-refcard.tex +++ b/etc/refcards/pt-br-refcard.tex @@ -63,7 +63,7 @@ \pdflayout=(0l) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed below this line. diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex index 7d4f9dbfa89..61b81de5cbf 100644 --- a/etc/refcards/refcard.tex +++ b/etc/refcards/refcard.tex @@ -64,7 +64,7 @@ % Nothing else needs to be changed below this line. \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % copyright year +\def\year{2012} % copyright year \def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. diff --git a/etc/refcards/ru-refcard.tex b/etc/refcards/ru-refcard.tex index f2b47acc809..cd6ff3383e8 100644 --- a/etc/refcards/ru-refcard.tex +++ b/etc/refcards/ru-refcard.tex @@ -22,7 +22,7 @@ \setlength{\ColThreeWidth}{25mm} \newcommand{\versionemacs}[0]{23} % version of Emacs this is for -\newcommand{\cyear}[0]{2011} % copyright year +\newcommand{\cyear}[0]{2012} % copyright year \newcommand\shortcopyrightnotice[0]{\vskip 1ex plus 2 fill \centerline{\footnotesize \copyright\ \cyear\ Free Software Foundation, Inc. diff --git a/etc/refcards/sk-dired-ref.tex b/etc/refcards/sk-dired-ref.tex index 12d66ce9554..1203bb1131d 100644 --- a/etc/refcards/sk-dired-ref.tex +++ b/etc/refcards/sk-dired-ref.tex @@ -43,7 +43,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/sk-refcard.tex b/etc/refcards/sk-refcard.tex index 789bbaea92f..9bd2cc71b71 100644 --- a/etc/refcards/sk-refcard.tex +++ b/etc/refcards/sk-refcard.tex @@ -61,7 +61,7 @@ \pdflayout=(0) \def\versionemacs{23} % version of Emacs this is for -\def\year{2010} % latest copyright year +\def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/sk-survival.tex b/etc/refcards/sk-survival.tex index f496ac1af0f..282dd3d389a 100644 --- a/etc/refcards/sk-survival.tex +++ b/etc/refcards/sk-survival.tex @@ -56,7 +56,7 @@ \shyph \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/survival.tex b/etc/refcards/survival.tex index 845bc38bc47..95ba48cb1ef 100644 --- a/etc/refcards/survival.tex +++ b/etc/refcards/survival.tex @@ -45,7 +45,7 @@ \pdflayout=(1) \def\versionemacs{23} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter diff --git a/etc/refcards/vipcard.tex b/etc/refcards/vipcard.tex index 47decbb9f74..07d2193e167 100644 --- a/etc/refcards/vipcard.tex +++ b/etc/refcards/vipcard.tex @@ -50,7 +50,7 @@ \pdflayout=(1) \def\versionemacs{18} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\versionvip{3.5} % Nothing else needs to be changed. diff --git a/etc/refcards/viperCard.tex b/etc/refcards/viperCard.tex index 594137744fe..4922713a91a 100644 --- a/etc/refcards/viperCard.tex +++ b/etc/refcards/viperCard.tex @@ -53,7 +53,7 @@ \pdflayout=(1) \def\versionemacs{21} % version of Emacs this is for -\def\year{2011} % latest copyright year +\def\year{2012} % latest copyright year \def\versionxemacs{20} % version of XEmacs this is for \def\versionviper{3.0} % version of Viper this is for diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e989473219c..f92824f6d7e 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2012-01-05 Glenn Morris + + * ebrowse.c (version) : + * etags.c (print_version) : + * rcs2log (Copyright): Update short copyright year to 2012. + 2011-12-25 Andreas Schwab * etags.c (C_entries): Properly skip over string and character diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 9af4f4faf41..8cdc7bd0e05 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -3526,7 +3526,7 @@ static void version (void) { /* Makes it easier to update automatically. */ - char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc."; + char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; printf ("ebrowse %s\n", VERSION); puts (emacs_copyright); diff --git a/lib-src/etags.c b/lib-src/etags.c index 8852c9faea4..4f829b84cc1 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -867,7 +867,7 @@ static void print_version (void) { /* Makes it easier to update automatically. */ - char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc."; + char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION); puts (emacs_copyright); diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 4e1dd306977..212fad88bf5 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -20,7 +20,7 @@ # along with this program. If not, see . -Copyright='Copyright (C) 2011 Free Software Foundation, Inc. +Copyright='Copyright (C) 2012 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog index 4e8fe399970..4f040cf555e 100644 --- a/nextstep/ChangeLog +++ b/nextstep/ChangeLog @@ -1,3 +1,10 @@ +2012-01-05 Glenn Morris + + * Cocoa/Emacs.base/Contents/Info.plist: + * Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings: + * GNUstep/Emacs.base/Resources/Info-gnustep.plist: + Update short copyright year to 2012. + 2011-10-19 Jan Djärv * INSTALL: Remove XCode part. diff --git a/nextstep/Cocoa/Emacs.base/Contents/Info.plist b/nextstep/Cocoa/Emacs.base/Contents/Info.plist index 61a8a28f3a9..8a9f97aed84 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist +++ b/nextstep/Cocoa/Emacs.base/Contents/Info.plist @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see . CFBundleExecutable Emacs CFBundleGetInfoString - Emacs 24.0.92 Copyright (C) 2011 Free Software Foundation, Inc. + Emacs 24.0.92 Copyright (C) 2012 Free Software Foundation, Inc. CFBundleIconFile Emacs.icns CFBundleIdentifier diff --git a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings index 438a6103f5e..681521784d2 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings +++ b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings @@ -3,4 +3,4 @@ CFBundleName = "Emacs"; CFBundleShortVersionString = "Version 24.0.92"; CFBundleGetInfoString = "Emacs version 24.0.92, NS Windowing"; -NSHumanReadableCopyright = "Copyright (C) 2011 Free Software Foundation, Inc."; +NSHumanReadableCopyright = "Copyright (C) 2012 Free Software Foundation, Inc."; diff --git a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist index 9747ed25a2a..5a98a76a344 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist +++ b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist @@ -11,7 +11,7 @@ "Carl Edman (NeXTstep)", "..see etc/NEXTSTEP" ); - Copyright = "Copyright (C) 2011 Free Software Foundation, Inc."; + Copyright = "Copyright (C) 2012 Free Software Foundation, Inc."; CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; FullVersionID = "Emacs 24.0.92, NS Windowing"; NSExecutable = Emacs; diff --git a/src/ChangeLog b/src/ChangeLog index 31d6ecaca43..9095c46488b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-01-05 Glenn Morris + + * emacs.c (emacs_copyright): Update short copyright year to 2012. + 2012-01-01 Eli Zaretskii * gnutls.c (init_gnutls_functions): Load gnutls_check_version. diff --git a/src/emacs.c b/src/emacs.c index f4fa0eb0b9e..235d2cfe3b7 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -98,7 +98,7 @@ along with GNU Emacs. If not, see . */ #endif static const char emacs_version[] = VERSION; -static const char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc."; +static const char emacs_copyright[] = "Copyright (C) 2012 Free Software Foundation, Inc."; /* Make these values available in GDB, which doesn't see macros. */ -- cgit v1.2.1 From 2057c0404ec830cb420494a00563e3f547f92bb2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 4 Jan 2012 23:49:56 -0800 Subject: ChangeLog fixes. --- etc/ChangeLog | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 6c45376b671..a40e203681b 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -12,13 +12,17 @@ * refcards/vipcard.tex, refcards/viperCard.tex: Update short copyright year to 2012. -2012-01-03 Bastien Guerry +2012-01-04 Chong Yidong - * org/COPYRIGHT-AND-LICENSE: New file. + * org/README: Rename from COPYRIGHT-AND-LICENSE. + +2012-01-03 Jambunathan K - * org/OrgOdtContentTemplate.xml: New file. + * org/OrgOdtContentTemplate.xml, org/OrgOdtStyles.xml: New files. - * org/OrgOdtStyles.xml: New file. +2012-01-03 Bastien Guerry + + * org/COPYRIGHT-AND-LICENSE: New file. * org/: New directory. -- cgit v1.2.1 From b12d695a8d60a5b4198b43eb245d61640b6c1e2e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 4 Jan 2012 23:51:27 -0800 Subject: Typo fix. --- etc/org/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/org/README b/etc/org/README index 65ac02ecde3..206f3a26b52 100644 --- a/etc/org/README +++ b/etc/org/README @@ -3,7 +3,7 @@ following copyright information: Copyright (C) 2010-2012 Free Software Foundation, Inc. -These file are part of GNU Emacs. +These files are part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- cgit v1.2.1 From c7e9ed79544f1715b288eb5795963d4b5d8f1ff0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 5 Jan 2012 00:00:08 -0800 Subject: Copyright, license, and header fixes for Org. --- lisp/org/ob-calc.el | 2 +- lisp/org/ob-emacs-lisp.el | 2 +- lisp/org/ob-fortran.el | 24 +++++++++++++----------- lisp/org/ob-js.el | 2 +- lisp/org/ob-perl.el | 2 +- lisp/org/ob-picolisp.el | 3 ++- lisp/org/ob-python.el | 2 +- lisp/org/ob-ruby.el | 2 +- lisp/org/ob-scheme.el | 2 +- lisp/org/ob-screen.el | 2 +- lisp/org/ob-shen.el | 2 +- lisp/org/ob-sqlite.el | 2 +- lisp/org/org-eshell.el | 22 ++++++++++++---------- lisp/org/org-lparse.el | 11 +++-------- lisp/org/org-mouse.el | 10 ++++------ lisp/org/org-odt.el | 8 +++----- 16 files changed, 47 insertions(+), 51 deletions(-) diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index 6686c2754bf..f8ad7e3374e 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el @@ -1,6 +1,6 @@ ;;; ob-calc.el --- org-babel functions for calc code evaluation -;; Copyright (C) 2010-2012 Free Software Foundation, Inc +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index 99149789003..afbc20d5fc5 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation -;; Copyright (C) 2009-2012 Free Software Foundation, Inc +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-fortran.el b/lisp/org/ob-fortran.el index 753f628d0ca..b6305c42769 100644 --- a/lisp/org/ob-fortran.el +++ b/lisp/org/ob-fortran.el @@ -1,30 +1,32 @@ ;;; ob-fortran.el --- org-babel functions for fortran -;; Copyright (C) 2011-2012 Sergey Litvinov, Eric Schulte +;; Copyright (C) 2011-2012 Free Software Foundation, Inc. -;; Authors: Sergey Litvinov (based on ob-C.el by Eric Schulte), Eric Schulte +;; Authors: Sergey Litvinov +;; Eric Schulte ;; Keywords: literate programming, reproducible research, fortran ;; Homepage: http://orgmode.org ;; Version: 7.8.02 -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Org-Babel support for evaluating fortran code. +;; Based on ob-C.el by Eric Schulte. ;;; Code: (require 'ob) diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index d71c0aba8d6..bbb7aa0855e 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el @@ -1,6 +1,6 @@ ;;; ob-js.el --- org-babel functions for Javascript -;; Copyright (C) 2010-2012 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index dbd40dfc7fe..916eb029dbe 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el @@ -1,6 +1,6 @@ ;;; ob-perl.el --- org-babel functions for perl evaluation -;; Copyright (C) 2009-2012 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Eric Schulte diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el index 20789340201..572b6590e8d 100644 --- a/lisp/org/ob-picolisp.el +++ b/lisp/org/ob-picolisp.el @@ -2,7 +2,8 @@ ;; Copyright (C) 2010-2012 Free Software Foundation, Inc. -;; Authors: Thorsten Jolitz and Eric Schulte +;; Authors: Thorsten Jolitz +;; Eric Schulte ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index dee6b07dccd..5e7a2f0e6b5 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -1,6 +1,6 @@ ;;; ob-python.el --- org-babel functions for python evaluation -;; Copyright (C) 2009-2012 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Dan Davison diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index df8ae2cc4f1..19cce58d820 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -1,6 +1,6 @@ ;;; ob-ruby.el --- org-babel functions for ruby evaluation -;; Copyright (C) 2009-2012 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index d0d03dd74ee..4bcde94235f 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -1,6 +1,6 @@ ;;; ob-scheme.el --- org-babel functions for Scheme -;; Copyright (C) 2010-2012 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, scheme diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 5f11b14339f..37cdb28690a 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el @@ -1,6 +1,6 @@ ;;; ob-screen.el --- org-babel support for interactive terminal -;; Copyright (C) 2009-2012 Free Software Foundation +;; Copyright (C) 2009-2012 Free Software Foundation, Inc. ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell diff --git a/lisp/org/ob-shen.el b/lisp/org/ob-shen.el index 7207cd9351b..8f4b13217c6 100644 --- a/lisp/org/ob-shen.el +++ b/lisp/org/ob-shen.el @@ -1,6 +1,6 @@ ;;; ob-shen.el --- org-babel functions for Shen -;; Copyright (C) 2010-2012 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, shen diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index d3a336a8af0..599113ca830 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el @@ -1,6 +1,6 @@ ;;; ob-sqlite.el --- org-babel functions for sqlite database interaction -;; Copyright (C) 2010-2012 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research diff --git a/lisp/org/org-eshell.el b/lisp/org/org-eshell.el index 8c229bc1431..c386af86b8f 100644 --- a/lisp/org/org-eshell.el +++ b/lisp/org/org-eshell.el @@ -1,15 +1,16 @@ ;;; org-eshell.el - Support for links to working directories in eshell + ;; Copyright (C) 2011-2012 Free Software Foundation, Inc. -;; + ;; Author: Konrad Hinsen ;; Version: 0.1 -;; + ;; This file is part of GNU Emacs. -;; -;; Emacs is free software; you can redistribute it and/or modify + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,10 +18,11 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: (require 'org) (require 'eshell) diff --git a/lisp/org/org-lparse.el b/lisp/org/org-lparse.el index 682a6611d73..b13dc86e5a6 100644 --- a/lisp/org/org-lparse.el +++ b/lisp/org/org-lparse.el @@ -5,9 +5,8 @@ ;; Author: Jambunathan K ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; -;; This file is not (yet) part of GNU Emacs. -;; However, it is distributed under the same license. + +;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -21,8 +20,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; + ;;; Commentary: ;; `org-lparse' is the entry point for the generic line-oriented @@ -45,9 +43,6 @@ ;; convert documents between various formats. Use this to command, ;; for example, to convert odt file to doc or pdf format. -;; See README.org file that comes with this library for answers to -;; FAQs and more information on using this library. - ;;; Code: (eval-when-compile (require 'cl)) diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 65a21a92260..b1d9f22a4e0 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -1,13 +1,12 @@ ;;; org-mouse.el --- Better mouse support for org-mode -;; Copyright (C) 2006-2012 Free Software Foundation -;; +;; Copyright (C) 2006-2012 Free Software Foundation, Inc. + ;; Author: Piotr Zielinski ;; Maintainer: Carsten Dominik -;; ;; This file is part of GNU Emacs. -;; + ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or @@ -20,8 +19,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; + ;;; Commentary: ;; ;; Org-mouse provides mouse support for org-mode. diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el index e53f396a310..886efa014f3 100644 --- a/lisp/org/org-odt.el +++ b/lisp/org/org-odt.el @@ -5,9 +5,8 @@ ;; Author: Jambunathan K ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; -;; This file is not (yet) part of GNU Emacs. -;; However, it is distributed under the same license. + +;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -21,8 +20,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; + ;;; Commentary: ;;; Code: -- cgit v1.2.1 From 220b19457b4e81e07f75f1f501c7f7ed352a3ff8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 5 Jan 2012 00:05:57 -0800 Subject: Update refcard Emacs version numbers. * refcards/calccard.tex, refcards/cs-dired-ref.tex: * refcards/cs-refcard.tex, refcards/cs-survival.tex: * refcards/de-refcard.tex, refcards/dired-ref.tex: * refcards/fr-dired-ref.tex, refcards/fr-refcard.tex: * refcards/fr-survival.tex, refcards/pl-refcard.tex: * refcards/pt-br-refcard.tex, refcards/refcard.tex: * refcards/ru-refcard.tex, refcards/sk-dired-ref.tex: * refcards/sk-refcard.tex, refcards/sk-survival.tex: * refcards/survival.tex: Bump version number to 24. --- etc/ChangeLog | 10 ++++++++++ etc/refcards/calccard.tex | 2 +- etc/refcards/cs-dired-ref.tex | 2 +- etc/refcards/cs-refcard.tex | 2 +- etc/refcards/cs-survival.tex | 2 +- etc/refcards/de-refcard.tex | 2 +- etc/refcards/dired-ref.tex | 2 +- etc/refcards/fr-dired-ref.tex | 2 +- etc/refcards/fr-refcard.tex | 2 +- etc/refcards/fr-survival.tex | 2 +- etc/refcards/pl-refcard.tex | 2 +- etc/refcards/pt-br-refcard.tex | 2 +- etc/refcards/refcard.tex | 2 +- etc/refcards/ru-refcard.tex | 2 +- etc/refcards/sk-dired-ref.tex | 2 +- etc/refcards/sk-refcard.tex | 2 +- etc/refcards/sk-survival.tex | 2 +- etc/refcards/survival.tex | 2 +- 18 files changed, 27 insertions(+), 17 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index a40e203681b..dc3249e5e30 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,5 +1,15 @@ 2012-01-05 Glenn Morris + * refcards/calccard.tex, refcards/cs-dired-ref.tex: + * refcards/cs-refcard.tex, refcards/cs-survival.tex: + * refcards/de-refcard.tex, refcards/dired-ref.tex: + * refcards/fr-dired-ref.tex, refcards/fr-refcard.tex: + * refcards/fr-survival.tex, refcards/pl-refcard.tex: + * refcards/pt-br-refcard.tex, refcards/refcard.tex: + * refcards/ru-refcard.tex, refcards/sk-dired-ref.tex: + * refcards/sk-refcard.tex, refcards/sk-survival.tex: + * refcards/survival.tex: Bump version number to 24. + * refcards/calccard.tex, refcards/cs-dired-ref.tex: * refcards/cs-refcard.tex, refcards/cs-survival.tex: * refcards/de-refcard.tex, refcards/dired-ref.tex: diff --git a/etc/refcards/calccard.tex b/etc/refcards/calccard.tex index 1eb88a223fa..ab935e5c3f9 100644 --- a/etc/refcards/calccard.tex +++ b/etc/refcards/calccard.tex @@ -63,7 +63,7 @@ % UUCP: mit-erl!gildea % Internet: gildea@stop.mail-abuse.org -\def\emacsversionnumber{23} +\def\emacsversionnumber{24} \def\year{2012} % latest copyright year \def\shortcopyrightnotice{\vskip 1ex plus 2 fill diff --git a/etc/refcards/cs-dired-ref.tex b/etc/refcards/cs-dired-ref.tex index a2db40137bb..36caa39fe41 100644 --- a/etc/refcards/cs-dired-ref.tex +++ b/etc/refcards/cs-dired-ref.tex @@ -41,7 +41,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/cs-refcard.tex b/etc/refcards/cs-refcard.tex index b2867e66547..3c2c2ed02aa 100644 --- a/etc/refcards/cs-refcard.tex +++ b/etc/refcards/cs-refcard.tex @@ -59,7 +59,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/cs-survival.tex b/etc/refcards/cs-survival.tex index 76a28eb360e..e6eb913756e 100644 --- a/etc/refcards/cs-survival.tex +++ b/etc/refcards/cs-survival.tex @@ -54,7 +54,7 @@ % Czech hyphenation rules applied \chyph -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill diff --git a/etc/refcards/de-refcard.tex b/etc/refcards/de-refcard.tex index 472cb1e431e..cdddef6c70e 100644 --- a/etc/refcards/de-refcard.tex +++ b/etc/refcards/de-refcard.tex @@ -60,7 +60,7 @@ \input german.sty \mdqoff % deactivates the "-char -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed below this line. diff --git a/etc/refcards/dired-ref.tex b/etc/refcards/dired-ref.tex index 80ab686faef..019c364409d 100644 --- a/etc/refcards/dired-ref.tex +++ b/etc/refcards/dired-ref.tex @@ -43,7 +43,7 @@ \input pdflayout.sty \pdflayout=(1) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/fr-dired-ref.tex b/etc/refcards/fr-dired-ref.tex index f0cabda8379..0e9983145ab 100644 --- a/etc/refcards/fr-dired-ref.tex +++ b/etc/refcards/fr-dired-ref.tex @@ -35,7 +35,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/fr-refcard.tex b/etc/refcards/fr-refcard.tex index 674b63becbc..594306114be 100644 --- a/etc/refcards/fr-refcard.tex +++ b/etc/refcards/fr-refcard.tex @@ -56,7 +56,7 @@ \input pdflayout.sty \pdflayout=(0l) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed below this line. diff --git a/etc/refcards/fr-survival.tex b/etc/refcards/fr-survival.tex index c6ad7c4f393..6ac86c1e316 100644 --- a/etc/refcards/fr-survival.tex +++ b/etc/refcards/fr-survival.tex @@ -49,7 +49,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex index e57ea48cd6a..d85a59eb0dc 100644 --- a/etc/refcards/pl-refcard.tex +++ b/etc/refcards/pl-refcard.tex @@ -69,7 +69,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/pt-br-refcard.tex b/etc/refcards/pt-br-refcard.tex index 0515cdb8267..32b835ff742 100644 --- a/etc/refcards/pt-br-refcard.tex +++ b/etc/refcards/pt-br-refcard.tex @@ -62,7 +62,7 @@ \input pdflayout.sty \pdflayout=(0l) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed below this line. diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex index 61b81de5cbf..46dc367d15c 100644 --- a/etc/refcards/refcard.tex +++ b/etc/refcards/refcard.tex @@ -63,7 +63,7 @@ % Nothing else needs to be changed below this line. -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % copyright year \def\shortcopyrightnotice{\vskip 1ex plus 2 fill diff --git a/etc/refcards/ru-refcard.tex b/etc/refcards/ru-refcard.tex index cd6ff3383e8..5c96e5de3f8 100644 --- a/etc/refcards/ru-refcard.tex +++ b/etc/refcards/ru-refcard.tex @@ -21,7 +21,7 @@ \newlength{\ColThreeWidth} \setlength{\ColThreeWidth}{25mm} -\newcommand{\versionemacs}[0]{23} % version of Emacs this is for +\newcommand{\versionemacs}[0]{24} % version of Emacs this is for \newcommand{\cyear}[0]{2012} % copyright year \newcommand\shortcopyrightnotice[0]{\vskip 1ex plus 2 fill diff --git a/etc/refcards/sk-dired-ref.tex b/etc/refcards/sk-dired-ref.tex index 1203bb1131d..95a8c2fcd9c 100644 --- a/etc/refcards/sk-dired-ref.tex +++ b/etc/refcards/sk-dired-ref.tex @@ -42,7 +42,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/sk-refcard.tex b/etc/refcards/sk-refcard.tex index 9bd2cc71b71..ebed603b338 100644 --- a/etc/refcards/sk-refcard.tex +++ b/etc/refcards/sk-refcard.tex @@ -60,7 +60,7 @@ \input pdflayout.sty \pdflayout=(0) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year % Nothing else needs to be changed. diff --git a/etc/refcards/sk-survival.tex b/etc/refcards/sk-survival.tex index 282dd3d389a..9bd22e87f00 100644 --- a/etc/refcards/sk-survival.tex +++ b/etc/refcards/sk-survival.tex @@ -55,7 +55,7 @@ % Slovak hyphenation rules applied \shyph -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill diff --git a/etc/refcards/survival.tex b/etc/refcards/survival.tex index 95ba48cb1ef..4e94b620323 100644 --- a/etc/refcards/survival.tex +++ b/etc/refcards/survival.tex @@ -44,7 +44,7 @@ \input pdflayout.sty \pdflayout=(1) -\def\versionemacs{23} % version of Emacs this is for +\def\versionemacs{24} % version of Emacs this is for \def\year{2012} % latest copyright year \def\copyrightnotice{\penalty-1\vfill -- cgit v1.2.1 From 7497ef13c916f39e297a83193d9163fb37a3b799 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 5 Jan 2012 01:44:36 -0800 Subject: Convert some consecutive FSF copyright years to ranges; add 2012. --- config.bat | 4 +--- doc/lispref/vol1.texi | 6 ++---- doc/lispref/vol2.texi | 6 ++---- doc/man/ebrowse.1 | 2 +- doc/man/emacs.1 | 4 +--- doc/man/etags.1 | 3 +-- doc/man/grep-changelog.1 | 2 +- doc/man/rcs-checkin.1 | 2 +- 8 files changed, 10 insertions(+), 19 deletions(-) diff --git a/config.bat b/config.bat index aa2a3a4f905..cb664533e12 100644 --- a/config.bat +++ b/config.bat @@ -1,9 +1,7 @@ @echo off rem ---------------------------------------------------------------------- rem Configuration script for MSDOS -rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 -rem 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -rem Inc. +rem Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. rem This file is part of GNU Emacs. diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index c89447fc139..95f9f7f4d29 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c This file is used for printing the GNU Emacs Lisp Reference Manual @c in two volumes. It is a modified version of elisp.texi. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c %**start of header @setfilename elisp @@ -67,9 +67,7 @@ This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* corresponding to Emacs version @value{EMACSVER}. -Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, -1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -Foundation, Inc. +Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index d45d23da365..08ea022f6a7 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c This file is used for printing the GNU Emacs Lisp Reference Manual @c in two volumes. It is a modified version of elisp.texi. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c %**start of header @setfilename elisp @@ -67,9 +67,7 @@ This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* corresponding to Emacs version @value{EMACSVER}. -Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, -1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -Foundation, Inc. +Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/man/ebrowse.1 b/doc/man/ebrowse.1 index 5afe59d6bc1..84f1ef1dd9b 100644 --- a/doc/man/ebrowse.1 +++ b/doc/man/ebrowse.1 @@ -85,7 +85,7 @@ was written by Gerd Moellmann. Copyright .if t \(co .if n (C) -2008, 2009, 2010, 2011 Free Software Foundation, Inc. +2008-2012 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index 1acdcf5ebd2..437d8cbad3b 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 @@ -642,9 +642,7 @@ For detailed credits and acknowledgements, see the GNU Emacs manual. Copyright .if t \(co .if n (C) -1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -2009, 2010, 2011 -Free Software Foundation, Inc. +1995, 1999-2012 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are diff --git a/doc/man/etags.1 b/doc/man/etags.1 index f7ffa112f3c..a1291829665 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 @@ -267,8 +267,7 @@ Stallman. Copyright .if t \(co .if n (C) -1992, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -2010, 2011 Free Software Foundation, Inc. +1992, 1999, 2001-2012 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are diff --git a/doc/man/grep-changelog.1 b/doc/man/grep-changelog.1 index 45a6abfd579..397e6493343 100644 --- a/doc/man/grep-changelog.1 +++ b/doc/man/grep-changelog.1 @@ -62,7 +62,7 @@ Display basic usage information. Copyright .if t \(co .if n (C) -2008, 2009, 2010, 2011 Free Software Foundation, Inc. +2008-2012 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are diff --git a/doc/man/rcs-checkin.1 b/doc/man/rcs-checkin.1 index 545b128b40d..a17c28a4d58 100644 --- a/doc/man/rcs-checkin.1 +++ b/doc/man/rcs-checkin.1 @@ -69,7 +69,7 @@ by Eric S. Raymond. Copyright .if t \(co .if n (C) -2008, 2009, 2010, 2011 Free Software Foundation, Inc. +2008-2012 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are -- cgit v1.2.1 From acaf905b1130aae80fa59d2c861ffd4c8eb75486 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 5 Jan 2012 01:46:05 -0800 Subject: Add 2012 to FSF copyright years for Emacs files --- ChangeLog | 2 +- GNUmakefile | 2 +- INSTALL | 2 +- INSTALL.BZR | 2 +- Makefile.in | 2 +- README | 2 +- admin/ChangeLog | 2 +- admin/README | 2 +- admin/admin.el | 2 +- admin/alloc-colors.c | 2 +- admin/build-configs | 2 +- admin/bzrmerge.el | 2 +- admin/charsets/mapfiles/README | 2 +- admin/cus-test.el | 2 +- admin/diff-tar-files | 2 +- admin/grammars/bovine-grammar.el | 2 +- admin/grammars/c.by | 2 +- admin/grammars/grammar.wy | 2 +- admin/grammars/java-tags.wy | 2 +- admin/grammars/js.wy | 2 +- admin/grammars/make.by | 2 +- admin/grammars/python.wy | 2 +- admin/grammars/scheme.by | 2 +- admin/grammars/srecode-template.wy | 2 +- admin/grammars/wisent-grammar.el | 2 +- admin/make-announcement | 2 +- admin/make-emacs | 2 +- admin/notes/copyright | 2 +- admin/notes/font-backend | 2 +- admin/notes/lel-TODO | 2 +- admin/notes/multi-tty | 2 +- admin/notes/unicode | 2 +- admin/nt/README-UNDUMP.W32 | 2 +- admin/nt/README-ftp-server | 2 +- admin/quick-install-emacs | 2 +- autogen.sh | 2 +- autogen/update_autogen | 2 +- configure.in | 4 ++-- doc/emacs/Makefile.in | 2 +- doc/emacs/abbrevs.texi | 2 +- doc/emacs/ack.texi | 2 +- doc/emacs/anti.texi | 2 +- doc/emacs/arevert-xtra.texi | 2 +- doc/emacs/basic.texi | 2 +- doc/emacs/buffers.texi | 2 +- doc/emacs/building.texi | 2 +- doc/emacs/cal-xtra.texi | 2 +- doc/emacs/calendar.texi | 2 +- doc/emacs/cmdargs.texi | 2 +- doc/emacs/commands.texi | 2 +- doc/emacs/custom.texi | 2 +- doc/emacs/dired-xtra.texi | 2 +- doc/emacs/dired.texi | 2 +- doc/emacs/display.texi | 2 +- doc/emacs/emacs-xtra.texi | 2 +- doc/emacs/emacs.texi | 2 +- doc/emacs/emerge-xtra.texi | 2 +- doc/emacs/entering.texi | 2 +- doc/emacs/files.texi | 2 +- doc/emacs/fixit.texi | 2 +- doc/emacs/fortran-xtra.texi | 2 +- doc/emacs/frames.texi | 2 +- doc/emacs/glossary.texi | 2 +- doc/emacs/gnu.texi | 2 +- doc/emacs/help.texi | 2 +- doc/emacs/indent.texi | 2 +- doc/emacs/killing.texi | 2 +- doc/emacs/kmacro.texi | 2 +- doc/emacs/m-x.texi | 2 +- doc/emacs/macos.texi | 2 +- doc/emacs/maintaining.texi | 2 +- doc/emacs/makefile.w32-in | 2 +- doc/emacs/mark.texi | 2 +- doc/emacs/mini.texi | 2 +- doc/emacs/misc.texi | 2 +- doc/emacs/modes.texi | 2 +- doc/emacs/msdog-xtra.texi | 2 +- doc/emacs/msdog.texi | 2 +- doc/emacs/mule.texi | 2 +- doc/emacs/package.texi | 2 +- doc/emacs/picture-xtra.texi | 2 +- doc/emacs/programs.texi | 2 +- doc/emacs/regs.texi | 2 +- doc/emacs/rmail.texi | 2 +- doc/emacs/screen.texi | 2 +- doc/emacs/search.texi | 2 +- doc/emacs/sending.texi | 2 +- doc/emacs/text.texi | 2 +- doc/emacs/trouble.texi | 2 +- doc/emacs/vc-xtra.texi | 2 +- doc/emacs/vc1-xtra.texi | 2 +- doc/emacs/windows.texi | 2 +- doc/emacs/xresources.texi | 2 +- doc/lispintro/ChangeLog | 2 +- doc/lispintro/Makefile.in | 2 +- doc/lispintro/README | 2 +- doc/lispintro/cons-1.eps | 2 +- doc/lispintro/cons-2.eps | 2 +- doc/lispintro/cons-2a.eps | 2 +- doc/lispintro/cons-3.eps | 2 +- doc/lispintro/cons-4.eps | 2 +- doc/lispintro/cons-5.eps | 2 +- doc/lispintro/drawers.eps | 2 +- doc/lispintro/emacs-lisp-intro.texi | 2 +- doc/lispintro/lambda-1.eps | 2 +- doc/lispintro/lambda-2.eps | 2 +- doc/lispintro/lambda-3.eps | 2 +- doc/lispintro/makefile.w32-in | 2 +- doc/lispref/ChangeLog | 2 +- doc/lispref/Makefile.in | 2 +- doc/lispref/README | 2 +- doc/lispref/abbrevs.texi | 2 +- doc/lispref/advice.texi | 2 +- doc/lispref/anti.texi | 2 +- doc/lispref/back.texi | 2 +- doc/lispref/backups.texi | 2 +- doc/lispref/buffers.texi | 2 +- doc/lispref/commands.texi | 2 +- doc/lispref/compile.texi | 2 +- doc/lispref/control.texi | 2 +- doc/lispref/customize.texi | 2 +- doc/lispref/debugging.texi | 2 +- doc/lispref/display.texi | 2 +- doc/lispref/edebug.texi | 2 +- doc/lispref/elisp-covers.texi | 2 +- doc/lispref/elisp.texi | 2 +- doc/lispref/errors.texi | 2 +- doc/lispref/eval.texi | 2 +- doc/lispref/files.texi | 2 +- doc/lispref/frames.texi | 2 +- doc/lispref/functions.texi | 2 +- doc/lispref/hash.texi | 2 +- doc/lispref/help.texi | 2 +- doc/lispref/hooks.texi | 2 +- doc/lispref/internals.texi | 2 +- doc/lispref/intro.texi | 2 +- doc/lispref/keymaps.texi | 2 +- doc/lispref/lay-flat.texi | 2 +- doc/lispref/lists.texi | 2 +- doc/lispref/loading.texi | 2 +- doc/lispref/locals.texi | 2 +- doc/lispref/macros.texi | 2 +- doc/lispref/makefile.w32-in | 2 +- doc/lispref/maps.texi | 2 +- doc/lispref/markers.texi | 2 +- doc/lispref/minibuf.texi | 2 +- doc/lispref/modes.texi | 2 +- doc/lispref/nonascii.texi | 2 +- doc/lispref/numbers.texi | 2 +- doc/lispref/objects.texi | 2 +- doc/lispref/os.texi | 2 +- doc/lispref/package.texi | 2 +- doc/lispref/positions.texi | 2 +- doc/lispref/processes.texi | 2 +- doc/lispref/searching.texi | 2 +- doc/lispref/sequences.texi | 2 +- doc/lispref/streams.texi | 2 +- doc/lispref/strings.texi | 2 +- doc/lispref/symbols.texi | 2 +- doc/lispref/syntax.texi | 2 +- doc/lispref/text.texi | 2 +- doc/lispref/tindex.pl | 2 +- doc/lispref/tips.texi | 2 +- doc/lispref/two-volume-cross-refs.txt | 2 +- doc/lispref/two-volume.make | 2 +- doc/lispref/two.el | 2 +- doc/lispref/variables.texi | 2 +- doc/lispref/windows.texi | 2 +- doc/man/ChangeLog | 2 +- doc/misc/ChangeLog | 2 +- doc/misc/Makefile.in | 2 +- doc/misc/ada-mode.texi | 2 +- doc/misc/auth.texi | 2 +- doc/misc/autotype.texi | 2 +- doc/misc/calc.texi | 2 +- doc/misc/cc-mode.texi | 2 +- doc/misc/cl.texi | 2 +- doc/misc/dbus.texi | 2 +- doc/misc/dired-x.texi | 2 +- doc/misc/ebrowse.texi | 2 +- doc/misc/ede.texi | 2 +- doc/misc/ediff.texi | 2 +- doc/misc/edt.texi | 2 +- doc/misc/eieio.texi | 2 +- doc/misc/emacs-mime.texi | 2 +- doc/misc/epa.texi | 2 +- doc/misc/erc.texi | 2 +- doc/misc/ert.texi | 2 +- doc/misc/eshell.texi | 2 +- doc/misc/eudc.texi | 2 +- doc/misc/faq.texi | 2 +- doc/misc/flymake.texi | 2 +- doc/misc/forms.texi | 2 +- doc/misc/gnus-coding.texi | 2 +- doc/misc/gnus-faq.texi | 2 +- doc/misc/gnus-news.el | 4 ++-- doc/misc/gnus-news.texi | 2 +- doc/misc/gnus.texi | 2 +- doc/misc/idlwave.texi | 2 +- doc/misc/info.texi | 2 +- doc/misc/mairix-el.texi | 2 +- doc/misc/makefile.w32-in | 2 +- doc/misc/message.texi | 2 +- doc/misc/mh-e.texi | 2 +- doc/misc/newsticker.texi | 2 +- doc/misc/nxml-mode.texi | 2 +- doc/misc/org.texi | 2 +- doc/misc/pcl-cvs.texi | 2 +- doc/misc/pgg.texi | 2 +- doc/misc/rcirc.texi | 2 +- doc/misc/reftex.texi | 2 +- doc/misc/remember.texi | 2 +- doc/misc/sasl.texi | 2 +- doc/misc/sc.texi | 2 +- doc/misc/sem-user.texi | 2 +- doc/misc/semantic.texi | 2 +- doc/misc/ses.texi | 2 +- doc/misc/sieve.texi | 2 +- doc/misc/smtpmail.texi | 2 +- doc/misc/speedbar.texi | 2 +- doc/misc/tramp.texi | 2 +- doc/misc/trampver.texi | 2 +- doc/misc/url.texi | 2 +- doc/misc/vip.texi | 2 +- doc/misc/viper.texi | 2 +- doc/misc/widget.texi | 2 +- doc/misc/woman.texi | 2 +- etc/CONTRIBUTE | 2 +- etc/ChangeLog | 2 +- etc/DEBUG | 2 +- etc/DISTRIB | 2 +- etc/ERC-NEWS | 2 +- etc/ETAGS.EBNF | 2 +- etc/ETAGS.README | 2 +- etc/GNU | 2 +- etc/GNUS-NEWS | 2 +- etc/HELLO | 2 +- etc/MACHINES | 2 +- etc/MAILINGLISTS | 2 +- etc/MH-E-NEWS | 2 +- etc/MORE.STUFF | 2 +- etc/NEWS | 2 +- etc/NEWS.1-17 | 2 +- etc/NEWS.18 | 2 +- etc/NEWS.19 | 2 +- etc/NEWS.20 | 2 +- etc/NEWS.21 | 2 +- etc/NEWS.22 | 2 +- etc/NEWS.23 | 2 +- etc/NEXTSTEP | 2 +- etc/PROBLEMS | 2 +- etc/README | 2 +- etc/TERMS | 2 +- etc/TODO | 2 +- etc/charsets/README | 3 ++- etc/compilation.txt | 2 +- etc/edt-user.el | 2 +- etc/emacs-buffer.gdb | 2 +- etc/emacs2.py | 2 +- etc/emacs3.py | 2 +- etc/enriched.doc | 2 +- etc/gnus-tut.txt | 2 +- etc/grep.txt | 2 +- etc/images/README | 8 ++++---- etc/images/checked.xpm | 2 +- etc/images/custom/README | 2 +- etc/images/ezimage/README | 2 +- etc/images/gnus/README | 6 +++--- etc/images/gnus/gnus.svg | 2 +- etc/images/gud/README | 6 +++--- etc/images/icons/README | 6 +++--- etc/images/icons/hicolor/scalable/apps/emacs.svg | 2 +- etc/images/icons/hicolor/scalable/mimetypes/emacs-document.svg | 2 +- etc/images/mh-logo.xpm | 2 +- etc/images/mpc/README | 2 +- etc/images/newsticker/README | 2 +- etc/images/smilies/README | 2 +- etc/images/smilies/grayscale/README | 2 +- etc/images/smilies/medium/README | 2 +- etc/images/splash.svg | 2 +- etc/images/splash.xpm | 2 +- etc/images/tree-widget/default/README | 2 +- etc/images/tree-widget/folder/README | 2 +- etc/images/unchecked.xpm | 2 +- etc/ps-prin0.ps | 2 +- etc/ps-prin1.ps | 2 +- etc/refcards/Makefile | 2 +- etc/refcards/README | 2 +- etc/refcards/calccard.tex | 2 +- etc/refcards/cs-dired-ref.tex | 2 +- etc/refcards/cs-refcard.tex | 2 +- etc/refcards/cs-survival.tex | 2 +- etc/refcards/de-refcard.tex | 2 +- etc/refcards/dired-ref.tex | 2 +- etc/refcards/fr-dired-ref.tex | 2 +- etc/refcards/fr-refcard.tex | 2 +- etc/refcards/fr-survival.tex | 2 +- etc/refcards/gnus-logo.eps | 2 +- etc/refcards/gnus-refcard.tex | 2 +- etc/refcards/orgcard.tex | 2 +- etc/refcards/pdflayout.sty | 2 +- etc/refcards/pl-refcard.tex | 2 +- etc/refcards/pt-br-refcard.tex | 2 +- etc/refcards/refcard.tex | 2 +- etc/refcards/ru-refcard.tex | 2 +- etc/refcards/sk-dired-ref.tex | 2 +- etc/refcards/sk-refcard.tex | 2 +- etc/refcards/sk-survival.tex | 2 +- etc/refcards/survival.tex | 2 +- etc/refcards/vipcard.tex | 2 +- etc/refcards/viperCard.tex | 2 +- etc/schema/locate.rnc | 2 +- etc/schema/relaxng.rnc | 2 +- etc/schema/schemas.xml | 2 +- etc/ses-example.ses | 2 +- etc/srecode/cpp.srt | 2 +- etc/srecode/default.srt | 2 +- etc/srecode/doc-cpp.srt | 2 +- etc/srecode/doc-default.srt | 2 +- etc/srecode/doc-java.srt | 2 +- etc/srecode/ede-make.srt | 2 +- etc/srecode/el.srt | 2 +- etc/srecode/getset-cpp.srt | 2 +- etc/srecode/java.srt | 2 +- etc/srecode/make.srt | 2 +- etc/srecode/template.srt | 2 +- etc/srecode/test.srt | 2 +- etc/srecode/texi.srt | 2 +- etc/srecode/wisent.srt | 2 +- etc/themes/adwaita-theme.el | 2 +- etc/themes/deeper-blue-theme.el | 2 +- etc/themes/dichromacy-theme.el | 2 +- etc/themes/light-blue-theme.el | 2 +- etc/themes/manoj-dark-theme.el | 2 +- etc/themes/misterioso-theme.el | 2 +- etc/themes/tango-dark-theme.el | 2 +- etc/themes/tango-theme.el | 2 +- etc/themes/tsdh-dark-theme.el | 2 +- etc/themes/tsdh-light-theme.el | 2 +- etc/themes/wheatgrass-theme.el | 2 +- etc/themes/whiteboard-theme.el | 2 +- etc/themes/wombat-theme.el | 2 +- etc/tutorials/TUTORIAL | 2 +- etc/tutorials/TUTORIAL.bg | 2 +- etc/tutorials/TUTORIAL.cn | 4 ++-- etc/tutorials/TUTORIAL.cs | 2 +- etc/tutorials/TUTORIAL.de | 2 +- etc/tutorials/TUTORIAL.eo | 2 +- etc/tutorials/TUTORIAL.es | 2 +- etc/tutorials/TUTORIAL.fr | 2 +- etc/tutorials/TUTORIAL.he | 2 +- etc/tutorials/TUTORIAL.it | 2 +- etc/tutorials/TUTORIAL.ja | 2 +- etc/tutorials/TUTORIAL.ko | 2 +- etc/tutorials/TUTORIAL.nl | 4 ++-- etc/tutorials/TUTORIAL.pl | 2 +- etc/tutorials/TUTORIAL.pt_BR | 2 +- etc/tutorials/TUTORIAL.ro | 2 +- etc/tutorials/TUTORIAL.ru | 2 +- etc/tutorials/TUTORIAL.sk | 2 +- etc/tutorials/TUTORIAL.sl | 2 +- etc/tutorials/TUTORIAL.sv | 2 +- etc/tutorials/TUTORIAL.th | 2 +- etc/tutorials/TUTORIAL.zh | 2 +- leim/ChangeLog | 2 +- leim/Makefile.in | 2 +- leim/README | 2 +- leim/leim-ext.el | 2 +- leim/makefile.w32-in | 2 +- leim/quail/arabic.el | 2 +- leim/quail/croatian.el | 2 +- leim/quail/cyril-jis.el | 2 +- leim/quail/cyrillic.el | 2 +- leim/quail/czech.el | 2 +- leim/quail/georgian.el | 2 +- leim/quail/greek.el | 2 +- leim/quail/hangul.el | 2 +- leim/quail/hanja.el | 2 +- leim/quail/hanja3.el | 2 +- leim/quail/indian.el | 2 +- leim/quail/ipa-praat.el | 2 +- leim/quail/ipa.el | 2 +- leim/quail/japanese.el | 2 +- leim/quail/latin-alt.el | 2 +- leim/quail/latin-ltx.el | 2 +- leim/quail/latin-post.el | 2 +- leim/quail/latin-pre.el | 2 +- leim/quail/lrt.el | 2 +- leim/quail/persian.el | 2 +- leim/quail/py-punct.el | 2 +- leim/quail/rfc1345.el | 2 +- leim/quail/sgml-input.el | 2 +- leim/quail/sisheng.el | 2 +- leim/quail/slovak.el | 2 +- leim/quail/symbol-ksc.el | 2 +- leim/quail/tibetan.el | 2 +- leim/quail/uni-input.el | 2 +- leim/quail/vntelex.el | 2 +- leim/quail/welsh.el | 2 +- lib-src/ChangeLog | 2 +- lib-src/Makefile.in | 2 +- lib-src/ebrowse.c | 2 +- lib-src/emacsclient.c | 2 +- lib-src/etags.c | 2 +- lib-src/grep-changelog | 2 +- lib-src/hexl.c | 2 +- lib-src/make-docfile.c | 2 +- lib-src/makefile.w32-in | 2 +- lib-src/movemail.c | 2 +- lib-src/ntlib.c | 2 +- lib-src/ntlib.h | 2 +- lib-src/pop.c | 2 +- lib-src/pop.h | 2 +- lib-src/profile.c | 2 +- lib-src/rcs-checkin | 2 +- lib-src/rcs2log | 2 +- lib-src/test-distrib.c | 2 +- lib-src/update-game-score.c | 2 +- lib-src/vcdiff | 2 +- lisp/ChangeLog | 2 +- lisp/ChangeLog.1 | 2 +- lisp/ChangeLog.10 | 2 +- lisp/ChangeLog.12 | 2 +- lisp/ChangeLog.13 | 2 +- lisp/ChangeLog.14 | 2 +- lisp/ChangeLog.15 | 2 +- lisp/ChangeLog.2 | 2 +- lisp/ChangeLog.3 | 2 +- lisp/ChangeLog.4 | 2 +- lisp/ChangeLog.5 | 2 +- lisp/ChangeLog.6 | 2 +- lisp/ChangeLog.7 | 2 +- lisp/ChangeLog.8 | 2 +- lisp/Makefile.in | 2 +- lisp/abbrev.el | 2 +- lisp/align.el | 2 +- lisp/allout-widgets.el | 2 +- lisp/allout.el | 2 +- lisp/ansi-color.el | 2 +- lisp/apropos.el | 2 +- lisp/arc-mode.el | 2 +- lisp/array.el | 2 +- lisp/autoarg.el | 2 +- lisp/autoinsert.el | 2 +- lisp/autorevert.el | 2 +- lisp/avoid.el | 2 +- lisp/battery.el | 2 +- lisp/bindings.el | 2 +- lisp/bookmark.el | 2 +- lisp/bs.el | 2 +- lisp/buff-menu.el | 2 +- lisp/button.el | 2 +- lisp/calc/README | 4 ++-- lisp/calc/README.prev | 2 +- lisp/calc/calc-aent.el | 2 +- lisp/calc/calc-alg.el | 2 +- lisp/calc/calc-arith.el | 2 +- lisp/calc/calc-bin.el | 2 +- lisp/calc/calc-comb.el | 2 +- lisp/calc/calc-cplx.el | 2 +- lisp/calc/calc-embed.el | 2 +- lisp/calc/calc-ext.el | 2 +- lisp/calc/calc-fin.el | 2 +- lisp/calc/calc-forms.el | 2 +- lisp/calc/calc-frac.el | 2 +- lisp/calc/calc-funcs.el | 2 +- lisp/calc/calc-graph.el | 2 +- lisp/calc/calc-help.el | 2 +- lisp/calc/calc-incom.el | 2 +- lisp/calc/calc-keypd.el | 2 +- lisp/calc/calc-lang.el | 2 +- lisp/calc/calc-macs.el | 2 +- lisp/calc/calc-map.el | 2 +- lisp/calc/calc-math.el | 2 +- lisp/calc/calc-menu.el | 2 +- lisp/calc/calc-misc.el | 2 +- lisp/calc/calc-mode.el | 2 +- lisp/calc/calc-mtx.el | 2 +- lisp/calc/calc-nlfit.el | 2 +- lisp/calc/calc-poly.el | 2 +- lisp/calc/calc-prog.el | 2 +- lisp/calc/calc-rewr.el | 2 +- lisp/calc/calc-rules.el | 2 +- lisp/calc/calc-sel.el | 2 +- lisp/calc/calc-stat.el | 2 +- lisp/calc/calc-store.el | 2 +- lisp/calc/calc-stuff.el | 2 +- lisp/calc/calc-trail.el | 2 +- lisp/calc/calc-undo.el | 2 +- lisp/calc/calc-units.el | 2 +- lisp/calc/calc-vec.el | 2 +- lisp/calc/calc-yank.el | 2 +- lisp/calc/calc.el | 2 +- lisp/calc/calcalg2.el | 2 +- lisp/calc/calcalg3.el | 2 +- lisp/calc/calccomp.el | 2 +- lisp/calc/calcsel2.el | 2 +- lisp/calculator.el | 2 +- lisp/calendar/appt.el | 2 +- lisp/calendar/cal-bahai.el | 2 +- lisp/calendar/cal-china.el | 2 +- lisp/calendar/cal-coptic.el | 2 +- lisp/calendar/cal-dst.el | 2 +- lisp/calendar/cal-french.el | 2 +- lisp/calendar/cal-hebrew.el | 2 +- lisp/calendar/cal-html.el | 2 +- lisp/calendar/cal-islam.el | 2 +- lisp/calendar/cal-iso.el | 2 +- lisp/calendar/cal-julian.el | 2 +- lisp/calendar/cal-mayan.el | 2 +- lisp/calendar/cal-menu.el | 2 +- lisp/calendar/cal-move.el | 2 +- lisp/calendar/cal-persia.el | 2 +- lisp/calendar/cal-tex.el | 2 +- lisp/calendar/cal-x.el | 2 +- lisp/calendar/calendar.el | 2 +- lisp/calendar/diary-lib.el | 2 +- lisp/calendar/holidays.el | 2 +- lisp/calendar/icalendar.el | 2 +- lisp/calendar/lunar.el | 2 +- lisp/calendar/parse-time.el | 2 +- lisp/calendar/solar.el | 2 +- lisp/calendar/time-date.el | 2 +- lisp/calendar/timeclock.el | 2 +- lisp/calendar/todo-mode.el | 2 +- lisp/case-table.el | 2 +- lisp/cdl.el | 2 +- lisp/cedet/ChangeLog | 2 +- lisp/cedet/cedet-cscope.el | 2 +- lisp/cedet/cedet-files.el | 2 +- lisp/cedet/cedet-global.el | 2 +- lisp/cedet/cedet-idutils.el | 2 +- lisp/cedet/cedet.el | 2 +- lisp/cedet/data-debug.el | 2 +- lisp/cedet/ede.el | 2 +- lisp/cedet/ede/auto.el | 2 +- lisp/cedet/ede/autoconf-edit.el | 2 +- lisp/cedet/ede/base.el | 2 +- lisp/cedet/ede/cpp-root.el | 2 +- lisp/cedet/ede/custom.el | 2 +- lisp/cedet/ede/dired.el | 2 +- lisp/cedet/ede/emacs.el | 2 +- lisp/cedet/ede/files.el | 2 +- lisp/cedet/ede/generic.el | 2 +- lisp/cedet/ede/linux.el | 2 +- lisp/cedet/ede/locate.el | 2 +- lisp/cedet/ede/make.el | 2 +- lisp/cedet/ede/makefile-edit.el | 2 +- lisp/cedet/ede/pconf.el | 2 +- lisp/cedet/ede/pmake.el | 2 +- lisp/cedet/ede/proj-archive.el | 2 +- lisp/cedet/ede/proj-aux.el | 2 +- lisp/cedet/ede/proj-comp.el | 2 +- lisp/cedet/ede/proj-elisp.el | 2 +- lisp/cedet/ede/proj-info.el | 2 +- lisp/cedet/ede/proj-misc.el | 2 +- lisp/cedet/ede/proj-obj.el | 2 +- lisp/cedet/ede/proj-prog.el | 2 +- lisp/cedet/ede/proj-scheme.el | 2 +- lisp/cedet/ede/proj-shared.el | 2 +- lisp/cedet/ede/proj.el | 2 +- lisp/cedet/ede/project-am.el | 2 +- lisp/cedet/ede/shell.el | 2 +- lisp/cedet/ede/simple.el | 2 +- lisp/cedet/ede/source.el | 2 +- lisp/cedet/ede/speedbar.el | 2 +- lisp/cedet/ede/srecode.el | 2 +- lisp/cedet/ede/system.el | 2 +- lisp/cedet/ede/util.el | 2 +- lisp/cedet/inversion.el | 2 +- lisp/cedet/mode-local.el | 2 +- lisp/cedet/pulse.el | 2 +- lisp/cedet/semantic.el | 2 +- lisp/cedet/semantic/analyze.el | 2 +- lisp/cedet/semantic/analyze/complete.el | 2 +- lisp/cedet/semantic/analyze/debug.el | 2 +- lisp/cedet/semantic/analyze/fcn.el | 2 +- lisp/cedet/semantic/analyze/refs.el | 2 +- lisp/cedet/semantic/bovine.el | 2 +- lisp/cedet/semantic/bovine/c-by.el | 2 +- lisp/cedet/semantic/bovine/c.el | 2 +- lisp/cedet/semantic/bovine/debug.el | 2 +- lisp/cedet/semantic/bovine/el.el | 2 +- lisp/cedet/semantic/bovine/gcc.el | 2 +- lisp/cedet/semantic/bovine/make-by.el | 2 +- lisp/cedet/semantic/bovine/make.el | 2 +- lisp/cedet/semantic/bovine/scm-by.el | 2 +- lisp/cedet/semantic/bovine/scm.el | 2 +- lisp/cedet/semantic/chart.el | 2 +- lisp/cedet/semantic/complete.el | 2 +- lisp/cedet/semantic/ctxt.el | 2 +- lisp/cedet/semantic/db-debug.el | 2 +- lisp/cedet/semantic/db-ebrowse.el | 2 +- lisp/cedet/semantic/db-el.el | 2 +- lisp/cedet/semantic/db-file.el | 2 +- lisp/cedet/semantic/db-find.el | 2 +- lisp/cedet/semantic/db-global.el | 2 +- lisp/cedet/semantic/db-javascript.el | 2 +- lisp/cedet/semantic/db-mode.el | 2 +- lisp/cedet/semantic/db-ref.el | 2 +- lisp/cedet/semantic/db-typecache.el | 2 +- lisp/cedet/semantic/db.el | 2 +- lisp/cedet/semantic/debug.el | 2 +- lisp/cedet/semantic/decorate.el | 2 +- lisp/cedet/semantic/decorate/include.el | 2 +- lisp/cedet/semantic/decorate/mode.el | 2 +- lisp/cedet/semantic/dep.el | 2 +- lisp/cedet/semantic/doc.el | 2 +- lisp/cedet/semantic/ede-grammar.el | 2 +- lisp/cedet/semantic/edit.el | 2 +- lisp/cedet/semantic/find.el | 2 +- lisp/cedet/semantic/format.el | 2 +- lisp/cedet/semantic/fw.el | 2 +- lisp/cedet/semantic/grammar-wy.el | 2 +- lisp/cedet/semantic/grammar.el | 2 +- lisp/cedet/semantic/html.el | 2 +- lisp/cedet/semantic/ia-sb.el | 2 +- lisp/cedet/semantic/ia.el | 2 +- lisp/cedet/semantic/idle.el | 2 +- lisp/cedet/semantic/imenu.el | 2 +- lisp/cedet/semantic/java.el | 2 +- lisp/cedet/semantic/lex-spp.el | 2 +- lisp/cedet/semantic/lex.el | 2 +- lisp/cedet/semantic/mru-bookmark.el | 2 +- lisp/cedet/semantic/sb.el | 2 +- lisp/cedet/semantic/scope.el | 2 +- lisp/cedet/semantic/senator.el | 2 +- lisp/cedet/semantic/sort.el | 2 +- lisp/cedet/semantic/symref.el | 2 +- lisp/cedet/semantic/symref/cscope.el | 2 +- lisp/cedet/semantic/symref/filter.el | 2 +- lisp/cedet/semantic/symref/global.el | 2 +- lisp/cedet/semantic/symref/grep.el | 2 +- lisp/cedet/semantic/symref/idutils.el | 2 +- lisp/cedet/semantic/symref/list.el | 2 +- lisp/cedet/semantic/tag-file.el | 2 +- lisp/cedet/semantic/tag-ls.el | 2 +- lisp/cedet/semantic/tag-write.el | 2 +- lisp/cedet/semantic/tag.el | 2 +- lisp/cedet/semantic/texi.el | 2 +- lisp/cedet/semantic/util-modes.el | 2 +- lisp/cedet/semantic/util.el | 2 +- lisp/cedet/semantic/wisent.el | 2 +- lisp/cedet/semantic/wisent/comp.el | 2 +- lisp/cedet/semantic/wisent/java-tags.el | 2 +- lisp/cedet/semantic/wisent/javascript.el | 2 +- lisp/cedet/semantic/wisent/javat-wy.el | 2 +- lisp/cedet/semantic/wisent/js-wy.el | 2 +- lisp/cedet/semantic/wisent/python-wy.el | 2 +- lisp/cedet/semantic/wisent/python.el | 2 +- lisp/cedet/semantic/wisent/wisent.el | 2 +- lisp/cedet/srecode.el | 2 +- lisp/cedet/srecode/args.el | 2 +- lisp/cedet/srecode/compile.el | 2 +- lisp/cedet/srecode/cpp.el | 2 +- lisp/cedet/srecode/ctxt.el | 2 +- lisp/cedet/srecode/dictionary.el | 2 +- lisp/cedet/srecode/document.el | 2 +- lisp/cedet/srecode/el.el | 2 +- lisp/cedet/srecode/expandproto.el | 2 +- lisp/cedet/srecode/extract.el | 2 +- lisp/cedet/srecode/fields.el | 2 +- lisp/cedet/srecode/filters.el | 2 +- lisp/cedet/srecode/find.el | 2 +- lisp/cedet/srecode/getset.el | 2 +- lisp/cedet/srecode/insert.el | 2 +- lisp/cedet/srecode/java.el | 2 +- lisp/cedet/srecode/map.el | 2 +- lisp/cedet/srecode/mode.el | 2 +- lisp/cedet/srecode/semantic.el | 2 +- lisp/cedet/srecode/srt-mode.el | 2 +- lisp/cedet/srecode/srt-wy.el | 2 +- lisp/cedet/srecode/srt.el | 2 +- lisp/cedet/srecode/table.el | 2 +- lisp/cedet/srecode/template.el | 2 +- lisp/cedet/srecode/texi.el | 2 +- lisp/chistory.el | 2 +- lisp/cmuscheme.el | 2 +- lisp/color.el | 2 +- lisp/comint.el | 2 +- lisp/completion.el | 2 +- lisp/cus-dep.el | 2 +- lisp/cus-edit.el | 2 +- lisp/cus-face.el | 2 +- lisp/cus-start.el | 2 +- lisp/cus-theme.el | 2 +- lisp/custom.el | 2 +- lisp/dabbrev.el | 2 +- lisp/delim-col.el | 2 +- lisp/delsel.el | 2 +- lisp/descr-text.el | 2 +- lisp/desktop.el | 2 +- lisp/dframe.el | 2 +- lisp/dired-aux.el | 2 +- lisp/dired-x.el | 2 +- lisp/dired.el | 2 +- lisp/dirtrack.el | 2 +- lisp/disp-table.el | 2 +- lisp/dnd.el | 2 +- lisp/doc-view.el | 2 +- lisp/dos-fns.el | 2 +- lisp/dos-vars.el | 2 +- lisp/dos-w32.el | 2 +- lisp/double.el | 2 +- lisp/dynamic-setting.el | 2 +- lisp/ebuff-menu.el | 2 +- lisp/echistory.el | 2 +- lisp/edmacro.el | 2 +- lisp/ehelp.el | 2 +- lisp/electric.el | 2 +- lisp/elide-head.el | 2 +- lisp/emacs-lisp/advice.el | 2 +- lisp/emacs-lisp/assoc.el | 2 +- lisp/emacs-lisp/authors.el | 2 +- lisp/emacs-lisp/autoload.el | 2 +- lisp/emacs-lisp/avl-tree.el | 2 +- lisp/emacs-lisp/backquote.el | 2 +- lisp/emacs-lisp/benchmark.el | 2 +- lisp/emacs-lisp/bindat.el | 2 +- lisp/emacs-lisp/byte-opt.el | 2 +- lisp/emacs-lisp/byte-run.el | 2 +- lisp/emacs-lisp/bytecomp.el | 2 +- lisp/emacs-lisp/cconv.el | 2 +- lisp/emacs-lisp/chart.el | 2 +- lisp/emacs-lisp/check-declare.el | 2 +- lisp/emacs-lisp/checkdoc.el | 2 +- lisp/emacs-lisp/cl-extra.el | 2 +- lisp/emacs-lisp/cl-indent.el | 2 +- lisp/emacs-lisp/cl-macs.el | 2 +- lisp/emacs-lisp/cl-seq.el | 2 +- lisp/emacs-lisp/cl-specs.el | 2 +- lisp/emacs-lisp/cl.el | 2 +- lisp/emacs-lisp/copyright.el | 2 +- lisp/emacs-lisp/crm.el | 2 +- lisp/emacs-lisp/cust-print.el | 2 +- lisp/emacs-lisp/debug.el | 2 +- lisp/emacs-lisp/derived.el | 2 +- lisp/emacs-lisp/disass.el | 2 +- lisp/emacs-lisp/easy-mmode.el | 2 +- lisp/emacs-lisp/easymenu.el | 2 +- lisp/emacs-lisp/edebug.el | 2 +- lisp/emacs-lisp/eieio-base.el | 2 +- lisp/emacs-lisp/eieio-custom.el | 2 +- lisp/emacs-lisp/eieio-datadebug.el | 2 +- lisp/emacs-lisp/eieio-opt.el | 2 +- lisp/emacs-lisp/eieio-speedbar.el | 2 +- lisp/emacs-lisp/eieio.el | 2 +- lisp/emacs-lisp/eldoc.el | 2 +- lisp/emacs-lisp/elint.el | 2 +- lisp/emacs-lisp/elp.el | 2 +- lisp/emacs-lisp/ert-x.el | 2 +- lisp/emacs-lisp/ert.el | 2 +- lisp/emacs-lisp/ewoc.el | 2 +- lisp/emacs-lisp/find-func.el | 2 +- lisp/emacs-lisp/find-gc.el | 2 +- lisp/emacs-lisp/float-sup.el | 2 +- lisp/emacs-lisp/generic.el | 2 +- lisp/emacs-lisp/gulp.el | 2 +- lisp/emacs-lisp/helper.el | 2 +- lisp/emacs-lisp/lisp-mnt.el | 2 +- lisp/emacs-lisp/lisp-mode.el | 2 +- lisp/emacs-lisp/lisp.el | 2 +- lisp/emacs-lisp/macroexp.el | 2 +- lisp/emacs-lisp/map-ynp.el | 2 +- lisp/emacs-lisp/package-x.el | 2 +- lisp/emacs-lisp/package.el | 2 +- lisp/emacs-lisp/pcase.el | 2 +- lisp/emacs-lisp/pp.el | 2 +- lisp/emacs-lisp/re-builder.el | 2 +- lisp/emacs-lisp/regexp-opt.el | 2 +- lisp/emacs-lisp/regi.el | 2 +- lisp/emacs-lisp/ring.el | 2 +- lisp/emacs-lisp/rx.el | 2 +- lisp/emacs-lisp/shadow.el | 2 +- lisp/emacs-lisp/smie.el | 2 +- lisp/emacs-lisp/syntax.el | 2 +- lisp/emacs-lisp/tabulated-list.el | 2 +- lisp/emacs-lisp/tcover-ses.el | 2 +- lisp/emacs-lisp/tcover-unsafep.el | 2 +- lisp/emacs-lisp/testcover.el | 2 +- lisp/emacs-lisp/timer.el | 2 +- lisp/emacs-lisp/tq.el | 2 +- lisp/emacs-lisp/trace.el | 2 +- lisp/emacs-lisp/unsafep.el | 2 +- lisp/emacs-lisp/warnings.el | 2 +- lisp/emacs-lock.el | 2 +- lisp/emulation/crisp.el | 2 +- lisp/emulation/cua-base.el | 2 +- lisp/emulation/cua-gmrk.el | 2 +- lisp/emulation/cua-rect.el | 2 +- lisp/emulation/edt-lk201.el | 2 +- lisp/emulation/edt-mapper.el | 2 +- lisp/emulation/edt-pc.el | 2 +- lisp/emulation/edt-vt100.el | 2 +- lisp/emulation/edt.el | 2 +- lisp/emulation/keypad.el | 2 +- lisp/emulation/tpu-edt.el | 2 +- lisp/emulation/tpu-extras.el | 2 +- lisp/emulation/tpu-mapper.el | 2 +- lisp/emulation/vip.el | 2 +- lisp/emulation/viper-cmd.el | 2 +- lisp/emulation/viper-ex.el | 2 +- lisp/emulation/viper-init.el | 2 +- lisp/emulation/viper-keym.el | 2 +- lisp/emulation/viper-macs.el | 2 +- lisp/emulation/viper-mous.el | 2 +- lisp/emulation/viper-util.el | 2 +- lisp/emulation/viper.el | 2 +- lisp/emulation/ws-mode.el | 2 +- lisp/env.el | 2 +- lisp/epa-dired.el | 2 +- lisp/epa-file.el | 2 +- lisp/epa-hook.el | 2 +- lisp/epa-mail.el | 2 +- lisp/epa.el | 2 +- lisp/epg-config.el | 2 +- lisp/epg.el | 2 +- lisp/erc/ChangeLog | 2 +- lisp/erc/ChangeLog.01 | 2 +- lisp/erc/ChangeLog.02 | 2 +- lisp/erc/ChangeLog.03 | 2 +- lisp/erc/ChangeLog.04 | 2 +- lisp/erc/ChangeLog.05 | 2 +- lisp/erc/ChangeLog.06 | 2 +- lisp/erc/ChangeLog.07 | 2 +- lisp/erc/ChangeLog.08 | 2 +- lisp/erc/erc-autoaway.el | 2 +- lisp/erc/erc-backend.el | 2 +- lisp/erc/erc-button.el | 2 +- lisp/erc/erc-capab.el | 2 +- lisp/erc/erc-compat.el | 2 +- lisp/erc/erc-dcc.el | 2 +- lisp/erc/erc-ezbounce.el | 2 +- lisp/erc/erc-fill.el | 2 +- lisp/erc/erc-goodies.el | 2 +- lisp/erc/erc-ibuffer.el | 2 +- lisp/erc/erc-identd.el | 2 +- lisp/erc/erc-imenu.el | 2 +- lisp/erc/erc-join.el | 2 +- lisp/erc/erc-lang.el | 2 +- lisp/erc/erc-list.el | 2 +- lisp/erc/erc-log.el | 2 +- lisp/erc/erc-match.el | 2 +- lisp/erc/erc-menu.el | 2 +- lisp/erc/erc-netsplit.el | 2 +- lisp/erc/erc-networks.el | 2 +- lisp/erc/erc-notify.el | 2 +- lisp/erc/erc-page.el | 2 +- lisp/erc/erc-pcomplete.el | 2 +- lisp/erc/erc-replace.el | 2 +- lisp/erc/erc-ring.el | 2 +- lisp/erc/erc-services.el | 2 +- lisp/erc/erc-sound.el | 2 +- lisp/erc/erc-speedbar.el | 2 +- lisp/erc/erc-spelling.el | 2 +- lisp/erc/erc-stamp.el | 2 +- lisp/erc/erc-track.el | 2 +- lisp/erc/erc-truncate.el | 2 +- lisp/erc/erc-xdcc.el | 2 +- lisp/erc/erc.el | 2 +- lisp/eshell/em-alias.el | 2 +- lisp/eshell/em-banner.el | 2 +- lisp/eshell/em-basic.el | 2 +- lisp/eshell/em-cmpl.el | 2 +- lisp/eshell/em-dirs.el | 2 +- lisp/eshell/em-glob.el | 2 +- lisp/eshell/em-hist.el | 2 +- lisp/eshell/em-ls.el | 2 +- lisp/eshell/em-pred.el | 2 +- lisp/eshell/em-prompt.el | 2 +- lisp/eshell/em-rebind.el | 2 +- lisp/eshell/em-script.el | 2 +- lisp/eshell/em-smart.el | 2 +- lisp/eshell/em-term.el | 2 +- lisp/eshell/em-unix.el | 2 +- lisp/eshell/em-xtra.el | 2 +- lisp/eshell/esh-arg.el | 2 +- lisp/eshell/esh-cmd.el | 2 +- lisp/eshell/esh-ext.el | 2 +- lisp/eshell/esh-io.el | 2 +- lisp/eshell/esh-mode.el | 2 +- lisp/eshell/esh-module.el | 2 +- lisp/eshell/esh-opt.el | 2 +- lisp/eshell/esh-proc.el | 2 +- lisp/eshell/esh-util.el | 2 +- lisp/eshell/esh-var.el | 2 +- lisp/eshell/eshell.el | 2 +- lisp/expand.el | 2 +- lisp/ezimage.el | 2 +- lisp/face-remap.el | 2 +- lisp/facemenu.el | 2 +- lisp/faces.el | 2 +- lisp/ffap.el | 2 +- lisp/filecache.el | 2 +- lisp/files-x.el | 2 +- lisp/files.el | 2 +- lisp/filesets.el | 2 +- lisp/find-cmd.el | 2 +- lisp/find-dired.el | 2 +- lisp/find-file.el | 2 +- lisp/find-lisp.el | 2 +- lisp/finder.el | 2 +- lisp/flow-ctrl.el | 2 +- lisp/foldout.el | 2 +- lisp/follow.el | 2 +- lisp/font-core.el | 2 +- lisp/font-lock.el | 2 +- lisp/format-spec.el | 2 +- lisp/format.el | 2 +- lisp/forms-d2.el | 2 +- lisp/forms.el | 2 +- lisp/frame.el | 2 +- lisp/fringe.el | 2 +- lisp/generic-x.el | 2 +- lisp/gnus/ChangeLog | 2 +- lisp/gnus/ChangeLog.1 | 2 +- lisp/gnus/ChangeLog.2 | 2 +- lisp/gnus/auth-source.el | 2 +- lisp/gnus/canlock.el | 2 +- lisp/gnus/compface.el | 2 +- lisp/gnus/deuglify.el | 2 +- lisp/gnus/ecomplete.el | 2 +- lisp/gnus/flow-fill.el | 2 +- lisp/gnus/gmm-utils.el | 2 +- lisp/gnus/gnus-agent.el | 2 +- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-async.el | 2 +- lisp/gnus/gnus-bcklg.el | 2 +- lisp/gnus/gnus-bookmark.el | 2 +- lisp/gnus/gnus-cache.el | 2 +- lisp/gnus/gnus-cite.el | 2 +- lisp/gnus/gnus-cus.el | 2 +- lisp/gnus/gnus-delay.el | 2 +- lisp/gnus/gnus-diary.el | 2 +- lisp/gnus/gnus-dired.el | 2 +- lisp/gnus/gnus-draft.el | 2 +- lisp/gnus/gnus-dup.el | 2 +- lisp/gnus/gnus-eform.el | 2 +- lisp/gnus/gnus-ems.el | 2 +- lisp/gnus/gnus-fun.el | 2 +- lisp/gnus/gnus-gravatar.el | 2 +- lisp/gnus/gnus-group.el | 2 +- lisp/gnus/gnus-html.el | 2 +- lisp/gnus/gnus-int.el | 2 +- lisp/gnus/gnus-kill.el | 2 +- lisp/gnus/gnus-logic.el | 2 +- lisp/gnus/gnus-mh.el | 2 +- lisp/gnus/gnus-ml.el | 2 +- lisp/gnus/gnus-mlspl.el | 2 +- lisp/gnus/gnus-msg.el | 2 +- lisp/gnus/gnus-picon.el | 2 +- lisp/gnus/gnus-range.el | 2 +- lisp/gnus/gnus-registry.el | 2 +- lisp/gnus/gnus-salt.el | 2 +- lisp/gnus/gnus-score.el | 2 +- lisp/gnus/gnus-setup.el | 2 +- lisp/gnus/gnus-sieve.el | 2 +- lisp/gnus/gnus-spec.el | 2 +- lisp/gnus/gnus-srvr.el | 2 +- lisp/gnus/gnus-start.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/gnus-sync.el | 2 +- lisp/gnus/gnus-undo.el | 2 +- lisp/gnus/gnus-util.el | 2 +- lisp/gnus/gnus-uu.el | 2 +- lisp/gnus/gnus-vm.el | 2 +- lisp/gnus/gnus-win.el | 2 +- lisp/gnus/gravatar.el | 2 +- lisp/gnus/gssapi.el | 2 +- lisp/gnus/html2text.el | 2 +- lisp/gnus/ietf-drums.el | 2 +- lisp/gnus/legacy-gnus-agent.el | 2 +- lisp/gnus/mail-parse.el | 2 +- lisp/gnus/mail-prsvr.el | 2 +- lisp/gnus/mail-source.el | 2 +- lisp/gnus/mailcap.el | 2 +- lisp/gnus/message.el | 2 +- lisp/gnus/messcompat.el | 2 +- lisp/gnus/mm-bodies.el | 2 +- lisp/gnus/mm-encode.el | 2 +- lisp/gnus/mm-extern.el | 2 +- lisp/gnus/mm-partial.el | 2 +- lisp/gnus/mm-url.el | 2 +- lisp/gnus/mm-util.el | 2 +- lisp/gnus/mm-uu.el | 2 +- lisp/gnus/mm-view.el | 2 +- lisp/gnus/mml-sec.el | 2 +- lisp/gnus/mml-smime.el | 2 +- lisp/gnus/mml.el | 2 +- lisp/gnus/mml1991.el | 2 +- lisp/gnus/mml2015.el | 2 +- lisp/gnus/nnagent.el | 2 +- lisp/gnus/nnbabyl.el | 2 +- lisp/gnus/nndiary.el | 2 +- lisp/gnus/nndir.el | 2 +- lisp/gnus/nndoc.el | 2 +- lisp/gnus/nndraft.el | 2 +- lisp/gnus/nneething.el | 2 +- lisp/gnus/nnfolder.el | 2 +- lisp/gnus/nngateway.el | 2 +- lisp/gnus/nnheader.el | 2 +- lisp/gnus/nnmail.el | 2 +- lisp/gnus/nnmairix.el | 2 +- lisp/gnus/nnmbox.el | 2 +- lisp/gnus/nnmh.el | 2 +- lisp/gnus/nnml.el | 2 +- lisp/gnus/nnoo.el | 2 +- lisp/gnus/nnregistry.el | 2 +- lisp/gnus/nnrss.el | 2 +- lisp/gnus/nnspool.el | 2 +- lisp/gnus/nnvirtual.el | 2 +- lisp/gnus/nnweb.el | 2 +- lisp/gnus/plstore.el | 2 +- lisp/gnus/pop3.el | 2 +- lisp/gnus/qp.el | 2 +- lisp/gnus/registry.el | 2 +- lisp/gnus/rfc1843.el | 2 +- lisp/gnus/rfc2045.el | 2 +- lisp/gnus/rfc2047.el | 2 +- lisp/gnus/rfc2104.el | 2 +- lisp/gnus/rfc2231.el | 2 +- lisp/gnus/rtree.el | 2 +- lisp/gnus/score-mode.el | 2 +- lisp/gnus/shr-color.el | 2 +- lisp/gnus/sieve-manage.el | 2 +- lisp/gnus/sieve-mode.el | 2 +- lisp/gnus/sieve.el | 2 +- lisp/gnus/smiley.el | 2 +- lisp/gnus/smime.el | 2 +- lisp/gnus/spam-report.el | 2 +- lisp/gnus/spam-stat.el | 2 +- lisp/gnus/spam-wash.el | 2 +- lisp/gnus/spam.el | 2 +- lisp/gnus/starttls.el | 2 +- lisp/gnus/utf7.el | 2 +- lisp/gnus/yenc.el | 2 +- lisp/gs.el | 2 +- lisp/help-at-pt.el | 2 +- lisp/help-fns.el | 2 +- lisp/help-macro.el | 2 +- lisp/help-mode.el | 2 +- lisp/help.el | 2 +- lisp/hex-util.el | 2 +- lisp/hexl.el | 2 +- lisp/hfy-cmap.el | 2 +- lisp/hi-lock.el | 2 +- lisp/hilit-chg.el | 2 +- lisp/hippie-exp.el | 2 +- lisp/hl-line.el | 2 +- lisp/htmlfontify.el | 2 +- lisp/ibuf-ext.el | 2 +- lisp/ibuf-macs.el | 2 +- lisp/ibuffer.el | 2 +- lisp/icomplete.el | 2 +- lisp/ido.el | 2 +- lisp/ielm.el | 2 +- lisp/iimage.el | 2 +- lisp/image-dired.el | 2 +- lisp/image-file.el | 2 +- lisp/image-mode.el | 2 +- lisp/image.el | 2 +- lisp/imenu.el | 2 +- lisp/indent.el | 2 +- lisp/info-look.el | 2 +- lisp/info-xref.el | 2 +- lisp/info.el | 2 +- lisp/informat.el | 2 +- lisp/international/ccl.el | 2 +- lisp/international/characters.el | 2 +- lisp/international/fontset.el | 2 +- lisp/international/isearch-x.el | 2 +- lisp/international/iso-ascii.el | 2 +- lisp/international/iso-cvt.el | 2 +- lisp/international/iso-transl.el | 2 +- lisp/international/kinsoku.el | 2 +- lisp/international/kkc.el | 2 +- lisp/international/latexenc.el | 2 +- lisp/international/latin1-disp.el | 2 +- lisp/international/mule-cmds.el | 2 +- lisp/international/mule-conf.el | 2 +- lisp/international/mule-diag.el | 2 +- lisp/international/mule-util.el | 2 +- lisp/international/mule.el | 2 +- lisp/international/ogonek.el | 2 +- lisp/international/quail.el | 2 +- lisp/international/titdic-cnv.el | 2 +- lisp/international/ucs-normalize.el | 2 +- lisp/international/utf-7.el | 2 +- lisp/isearch.el | 2 +- lisp/isearchb.el | 2 +- lisp/iswitchb.el | 2 +- lisp/jit-lock.el | 2 +- lisp/jka-cmpr-hook.el | 2 +- lisp/jka-compr.el | 2 +- lisp/json.el | 2 +- lisp/kermit.el | 2 +- lisp/kmacro.el | 2 +- lisp/language/china-util.el | 2 +- lisp/language/chinese.el | 2 +- lisp/language/cyril-util.el | 2 +- lisp/language/cyrillic.el | 2 +- lisp/language/czech.el | 2 +- lisp/language/english.el | 2 +- lisp/language/ethio-util.el | 2 +- lisp/language/ethiopic.el | 2 +- lisp/language/european.el | 2 +- lisp/language/georgian.el | 2 +- lisp/language/hanja-util.el | 2 +- lisp/language/hebrew.el | 2 +- lisp/language/ind-util.el | 2 +- lisp/language/indian.el | 2 +- lisp/language/japan-util.el | 2 +- lisp/language/japanese.el | 2 +- lisp/language/korea-util.el | 2 +- lisp/language/korean.el | 2 +- lisp/language/lao-util.el | 2 +- lisp/language/lao.el | 2 +- lisp/language/romanian.el | 2 +- lisp/language/slovak.el | 2 +- lisp/language/tai-viet.el | 2 +- lisp/language/thai-util.el | 2 +- lisp/language/thai.el | 2 +- lisp/language/tibet-util.el | 2 +- lisp/language/tibetan.el | 2 +- lisp/language/utf-8-lang.el | 2 +- lisp/language/viet-util.el | 2 +- lisp/language/vietnamese.el | 2 +- lisp/ledit.el | 2 +- lisp/linum.el | 2 +- lisp/loadhist.el | 2 +- lisp/loadup.el | 2 +- lisp/locate.el | 2 +- lisp/longlines.el | 2 +- lisp/lpr.el | 2 +- lisp/ls-lisp.el | 2 +- lisp/macros.el | 2 +- lisp/mail/binhex.el | 2 +- lisp/mail/blessmail.el | 2 +- lisp/mail/emacsbug.el | 2 +- lisp/mail/footnote.el | 2 +- lisp/mail/hashcash.el | 2 +- lisp/mail/mail-extr.el | 2 +- lisp/mail/mail-hist.el | 2 +- lisp/mail/mail-utils.el | 2 +- lisp/mail/mailabbrev.el | 2 +- lisp/mail/mailalias.el | 2 +- lisp/mail/mailclient.el | 2 +- lisp/mail/mailheader.el | 2 +- lisp/mail/metamail.el | 2 +- lisp/mail/mspools.el | 2 +- lisp/mail/reporter.el | 2 +- lisp/mail/rfc2368.el | 2 +- lisp/mail/rfc822.el | 2 +- lisp/mail/rmail-spam-filter.el | 2 +- lisp/mail/rmail.el | 2 +- lisp/mail/rmailedit.el | 2 +- lisp/mail/rmailkwd.el | 2 +- lisp/mail/rmailmm.el | 2 +- lisp/mail/rmailmsc.el | 2 +- lisp/mail/rmailout.el | 2 +- lisp/mail/rmailsort.el | 2 +- lisp/mail/rmailsum.el | 2 +- lisp/mail/sendmail.el | 2 +- lisp/mail/smtpmail.el | 2 +- lisp/mail/supercite.el | 2 +- lisp/mail/uce.el | 2 +- lisp/mail/undigest.el | 2 +- lisp/mail/unrmail.el | 2 +- lisp/mail/uudecode.el | 2 +- lisp/makefile.w32-in | 2 +- lisp/makesum.el | 2 +- lisp/man.el | 2 +- lisp/master.el | 2 +- lisp/mb-depth.el | 2 +- lisp/md4.el | 2 +- lisp/menu-bar.el | 2 +- lisp/mh-e/ChangeLog | 2 +- lisp/mh-e/ChangeLog.1 | 2 +- lisp/mh-e/mh-acros.el | 2 +- lisp/mh-e/mh-alias.el | 2 +- lisp/mh-e/mh-buffers.el | 2 +- lisp/mh-e/mh-comp.el | 2 +- lisp/mh-e/mh-compat.el | 2 +- lisp/mh-e/mh-e.el | 2 +- lisp/mh-e/mh-folder.el | 2 +- lisp/mh-e/mh-funcs.el | 2 +- lisp/mh-e/mh-gnus.el | 2 +- lisp/mh-e/mh-identity.el | 2 +- lisp/mh-e/mh-inc.el | 2 +- lisp/mh-e/mh-junk.el | 2 +- lisp/mh-e/mh-letter.el | 2 +- lisp/mh-e/mh-limit.el | 2 +- lisp/mh-e/mh-mime.el | 2 +- lisp/mh-e/mh-print.el | 2 +- lisp/mh-e/mh-scan.el | 2 +- lisp/mh-e/mh-search.el | 2 +- lisp/mh-e/mh-seq.el | 2 +- lisp/mh-e/mh-show.el | 2 +- lisp/mh-e/mh-speed.el | 2 +- lisp/mh-e/mh-thread.el | 2 +- lisp/mh-e/mh-tool-bar.el | 2 +- lisp/mh-e/mh-utils.el | 2 +- lisp/mh-e/mh-xface.el | 2 +- lisp/midnight.el | 2 +- lisp/minibuf-eldef.el | 2 +- lisp/minibuffer.el | 2 +- lisp/misc.el | 2 +- lisp/misearch.el | 2 +- lisp/mouse-copy.el | 2 +- lisp/mouse-drag.el | 2 +- lisp/mouse-sel.el | 2 +- lisp/mouse.el | 2 +- lisp/mpc.el | 2 +- lisp/msb.el | 2 +- lisp/mwheel.el | 2 +- lisp/net/ange-ftp.el | 2 +- lisp/net/browse-url.el | 2 +- lisp/net/dbus.el | 2 +- lisp/net/dig.el | 2 +- lisp/net/dns.el | 2 +- lisp/net/eudc-bob.el | 2 +- lisp/net/eudc-export.el | 2 +- lisp/net/eudc-hotlist.el | 2 +- lisp/net/eudc-vars.el | 2 +- lisp/net/eudc.el | 2 +- lisp/net/eudcb-bbdb.el | 2 +- lisp/net/eudcb-ldap.el | 2 +- lisp/net/eudcb-mab.el | 2 +- lisp/net/eudcb-ph.el | 2 +- lisp/net/gnutls.el | 2 +- lisp/net/goto-addr.el | 2 +- lisp/net/hmac-def.el | 2 +- lisp/net/hmac-md5.el | 2 +- lisp/net/imap.el | 2 +- lisp/net/ldap.el | 2 +- lisp/net/mairix.el | 2 +- lisp/net/net-utils.el | 2 +- lisp/net/netrc.el | 2 +- lisp/net/network-stream.el | 2 +- lisp/net/newst-backend.el | 2 +- lisp/net/newst-plainview.el | 2 +- lisp/net/newst-reader.el | 2 +- lisp/net/newst-ticker.el | 2 +- lisp/net/newst-treeview.el | 2 +- lisp/net/newsticker.el | 2 +- lisp/net/ntlm.el | 2 +- lisp/net/quickurl.el | 2 +- lisp/net/rcirc.el | 2 +- lisp/net/rcompile.el | 2 +- lisp/net/rlogin.el | 2 +- lisp/net/sasl-cram.el | 2 +- lisp/net/sasl-digest.el | 2 +- lisp/net/sasl-ntlm.el | 2 +- lisp/net/sasl.el | 2 +- lisp/net/secrets.el | 2 +- lisp/net/snmp-mode.el | 2 +- lisp/net/soap-client.el | 2 +- lisp/net/soap-inspect.el | 2 +- lisp/net/socks.el | 2 +- lisp/net/telnet.el | 2 +- lisp/net/tls.el | 2 +- lisp/net/tramp-cache.el | 2 +- lisp/net/tramp-cmds.el | 2 +- lisp/net/tramp-compat.el | 2 +- lisp/net/tramp-ftp.el | 2 +- lisp/net/tramp-gvfs.el | 2 +- lisp/net/tramp-gw.el | 2 +- lisp/net/tramp-sh.el | 6 +++--- lisp/net/tramp-smb.el | 2 +- lisp/net/tramp-uu.el | 2 +- lisp/net/tramp.el | 2 +- lisp/net/trampver.el | 2 +- lisp/net/webjump.el | 2 +- lisp/net/xesam.el | 2 +- lisp/net/zeroconf.el | 2 +- lisp/newcomment.el | 2 +- lisp/notifications.el | 2 +- lisp/novice.el | 2 +- lisp/nxml/nxml-enc.el | 2 +- lisp/nxml/nxml-glyph.el | 2 +- lisp/nxml/nxml-maint.el | 2 +- lisp/nxml/nxml-mode.el | 2 +- lisp/nxml/nxml-ns.el | 2 +- lisp/nxml/nxml-outln.el | 2 +- lisp/nxml/nxml-parse.el | 2 +- lisp/nxml/nxml-rap.el | 2 +- lisp/nxml/nxml-uchnm.el | 2 +- lisp/nxml/nxml-util.el | 2 +- lisp/nxml/rng-cmpct.el | 2 +- lisp/nxml/rng-dt.el | 2 +- lisp/nxml/rng-loc.el | 2 +- lisp/nxml/rng-maint.el | 2 +- lisp/nxml/rng-match.el | 2 +- lisp/nxml/rng-nxml.el | 2 +- lisp/nxml/rng-parse.el | 2 +- lisp/nxml/rng-pttrn.el | 2 +- lisp/nxml/rng-uri.el | 2 +- lisp/nxml/rng-util.el | 2 +- lisp/nxml/rng-valid.el | 2 +- lisp/nxml/rng-xsd.el | 2 +- lisp/nxml/xmltok.el | 2 +- lisp/nxml/xsd-regexp.el | 2 +- lisp/obsolete/abbrevlist.el | 2 +- lisp/obsolete/awk-mode.el | 2 +- lisp/obsolete/cl-compat.el | 2 +- lisp/obsolete/complete.el | 2 +- lisp/obsolete/erc-hecomplete.el | 2 +- lisp/obsolete/fast-lock.el | 2 +- lisp/obsolete/iso-acc.el | 2 +- lisp/obsolete/iso-insert.el | 2 +- lisp/obsolete/iso-swed.el | 2 +- lisp/obsolete/keyswap.el | 2 +- lisp/obsolete/lazy-lock.el | 2 +- lisp/obsolete/levents.el | 2 +- lisp/obsolete/lmenu.el | 2 +- lisp/obsolete/lucid.el | 2 +- lisp/obsolete/old-emacs-lock.el | 2 +- lisp/obsolete/old-whitespace.el | 2 +- lisp/obsolete/options.el | 2 +- lisp/obsolete/pc-mode.el | 2 +- lisp/obsolete/pc-select.el | 2 +- lisp/obsolete/pgg-def.el | 2 +- lisp/obsolete/pgg-gpg.el | 2 +- lisp/obsolete/pgg-parse.el | 2 +- lisp/obsolete/pgg-pgp.el | 2 +- lisp/obsolete/pgg-pgp5.el | 2 +- lisp/obsolete/pgg.el | 2 +- lisp/obsolete/resume.el | 2 +- lisp/obsolete/s-region.el | 2 +- lisp/obsolete/scribe.el | 2 +- lisp/obsolete/spell.el | 2 +- lisp/obsolete/sregex.el | 2 +- lisp/obsolete/swedish.el | 2 +- lisp/obsolete/sym-comp.el | 2 +- lisp/obsolete/vc-mcvs.el | 2 +- lisp/org/ChangeLog | 2 +- lisp/org/org-install.el | 2 +- lisp/outline.el | 2 +- lisp/paren.el | 2 +- lisp/password-cache.el | 2 +- lisp/paths.el | 2 +- lisp/pcmpl-cvs.el | 2 +- lisp/pcmpl-gnu.el | 2 +- lisp/pcmpl-linux.el | 2 +- lisp/pcmpl-rpm.el | 2 +- lisp/pcmpl-unix.el | 2 +- lisp/pcomplete.el | 2 +- lisp/play/5x5.el | 2 +- lisp/play/animate.el | 2 +- lisp/play/blackbox.el | 2 +- lisp/play/bruce.el | 2 +- lisp/play/bubbles.el | 2 +- lisp/play/cookie1.el | 2 +- lisp/play/decipher.el | 2 +- lisp/play/dissociate.el | 2 +- lisp/play/doctor.el | 2 +- lisp/play/dunnet.el | 2 +- lisp/play/fortune.el | 2 +- lisp/play/gamegrid.el | 2 +- lisp/play/gametree.el | 2 +- lisp/play/gomoku.el | 2 +- lisp/play/handwrite.el | 2 +- lisp/play/landmark.el | 2 +- lisp/play/life.el | 2 +- lisp/play/morse.el | 2 +- lisp/play/mpuz.el | 2 +- lisp/play/pong.el | 2 +- lisp/play/snake.el | 2 +- lisp/play/solitaire.el | 2 +- lisp/play/spook.el | 2 +- lisp/play/tetris.el | 2 +- lisp/play/yow.el | 2 +- lisp/play/zone.el | 2 +- lisp/printing.el | 2 +- lisp/proced.el | 2 +- lisp/progmodes/ada-mode.el | 2 +- lisp/progmodes/ada-prj.el | 2 +- lisp/progmodes/ada-stmt.el | 2 +- lisp/progmodes/ada-xref.el | 2 +- lisp/progmodes/antlr-mode.el | 2 +- lisp/progmodes/asm-mode.el | 2 +- lisp/progmodes/autoconf.el | 2 +- lisp/progmodes/bug-reference.el | 2 +- lisp/progmodes/cap-words.el | 2 +- lisp/progmodes/cc-align.el | 2 +- lisp/progmodes/cc-awk.el | 2 +- lisp/progmodes/cc-bytecomp.el | 2 +- lisp/progmodes/cc-cmds.el | 2 +- lisp/progmodes/cc-compat.el | 2 +- lisp/progmodes/cc-defs.el | 2 +- lisp/progmodes/cc-engine.el | 2 +- lisp/progmodes/cc-fonts.el | 2 +- lisp/progmodes/cc-guess.el | 2 +- lisp/progmodes/cc-langs.el | 2 +- lisp/progmodes/cc-menus.el | 2 +- lisp/progmodes/cc-mode.el | 2 +- lisp/progmodes/cc-styles.el | 2 +- lisp/progmodes/cc-vars.el | 2 +- lisp/progmodes/cfengine.el | 2 +- lisp/progmodes/cmacexp.el | 2 +- lisp/progmodes/compile.el | 2 +- lisp/progmodes/cperl-mode.el | 2 +- lisp/progmodes/cpp.el | 2 +- lisp/progmodes/cwarn.el | 2 +- lisp/progmodes/dcl-mode.el | 2 +- lisp/progmodes/delphi.el | 2 +- lisp/progmodes/ebnf-abn.el | 2 +- lisp/progmodes/ebnf-bnf.el | 2 +- lisp/progmodes/ebnf-dtd.el | 2 +- lisp/progmodes/ebnf-ebx.el | 2 +- lisp/progmodes/ebnf-iso.el | 2 +- lisp/progmodes/ebnf-otz.el | 2 +- lisp/progmodes/ebnf-yac.el | 2 +- lisp/progmodes/ebnf2ps.el | 2 +- lisp/progmodes/ebrowse.el | 2 +- lisp/progmodes/etags.el | 2 +- lisp/progmodes/executable.el | 2 +- lisp/progmodes/f90.el | 2 +- lisp/progmodes/flymake.el | 2 +- lisp/progmodes/fortran.el | 2 +- lisp/progmodes/gdb-mi.el | 2 +- lisp/progmodes/glasses.el | 2 +- lisp/progmodes/grep.el | 2 +- lisp/progmodes/gud.el | 2 +- lisp/progmodes/hideif.el | 2 +- lisp/progmodes/hideshow.el | 2 +- lisp/progmodes/icon.el | 2 +- lisp/progmodes/idlw-complete-structtag.el | 2 +- lisp/progmodes/idlw-help.el | 2 +- lisp/progmodes/idlw-shell.el | 2 +- lisp/progmodes/idlw-toolbar.el | 2 +- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/inf-lisp.el | 2 +- lisp/progmodes/js.el | 2 +- lisp/progmodes/ld-script.el | 2 +- lisp/progmodes/m4-mode.el | 2 +- lisp/progmodes/make-mode.el | 2 +- lisp/progmodes/mantemp.el | 2 +- lisp/progmodes/meta-mode.el | 2 +- lisp/progmodes/mixal-mode.el | 2 +- lisp/progmodes/octave-inf.el | 2 +- lisp/progmodes/octave-mod.el | 2 +- lisp/progmodes/pascal.el | 2 +- lisp/progmodes/perl-mode.el | 2 +- lisp/progmodes/prolog.el | 2 +- lisp/progmodes/ps-mode.el | 2 +- lisp/progmodes/python.el | 2 +- lisp/progmodes/ruby-mode.el | 2 +- lisp/progmodes/scheme.el | 2 +- lisp/progmodes/sh-script.el | 2 +- lisp/progmodes/simula.el | 2 +- lisp/progmodes/subword.el | 2 +- lisp/progmodes/tcl.el | 2 +- lisp/progmodes/vera-mode.el | 2 +- lisp/progmodes/verilog-mode.el | 2 +- lisp/progmodes/vhdl-mode.el | 2 +- lisp/progmodes/which-func.el | 2 +- lisp/progmodes/xscheme.el | 2 +- lisp/ps-bdf.el | 2 +- lisp/ps-def.el | 2 +- lisp/ps-mule.el | 2 +- lisp/ps-print.el | 2 +- lisp/ps-samp.el | 2 +- lisp/recentf.el | 2 +- lisp/rect.el | 2 +- lisp/register.el | 2 +- lisp/repeat.el | 2 +- lisp/replace.el | 2 +- lisp/reposition.el | 2 +- lisp/reveal.el | 2 +- lisp/rfn-eshadow.el | 2 +- lisp/rot13.el | 2 +- lisp/ruler-mode.el | 2 +- lisp/savehist.el | 2 +- lisp/saveplace.el | 2 +- lisp/sb-image.el | 2 +- lisp/scroll-all.el | 2 +- lisp/scroll-bar.el | 2 +- lisp/scroll-lock.el | 2 +- lisp/select.el | 2 +- lisp/server.el | 2 +- lisp/ses.el | 2 +- lisp/shadowfile.el | 2 +- lisp/shell.el | 2 +- lisp/simple.el | 2 +- lisp/skeleton.el | 2 +- lisp/sort.el | 2 +- lisp/soundex.el | 2 +- lisp/speedbar.el | 2 +- lisp/startup.el | 2 +- lisp/strokes.el | 2 +- lisp/subr.el | 2 +- lisp/t-mouse.el | 2 +- lisp/tabify.el | 2 +- lisp/talk.el | 2 +- lisp/tar-mode.el | 2 +- lisp/tempo.el | 2 +- lisp/term.el | 2 +- lisp/term/AT386.el | 2 +- lisp/term/README | 2 +- lisp/term/common-win.el | 2 +- lisp/term/internal.el | 2 +- lisp/term/iris-ansi.el | 2 +- lisp/term/news.el | 2 +- lisp/term/ns-win.el | 2 +- lisp/term/pc-win.el | 2 +- lisp/term/rxvt.el | 2 +- lisp/term/sun.el | 2 +- lisp/term/sup-mouse.el | 2 +- lisp/term/tty-colors.el | 2 +- lisp/term/tvi970.el | 2 +- lisp/term/vt100.el | 2 +- lisp/term/w32-win.el | 2 +- lisp/term/w32console.el | 2 +- lisp/term/wyse50.el | 2 +- lisp/term/x-win.el | 2 +- lisp/term/xterm.el | 2 +- lisp/terminal.el | 2 +- lisp/textmodes/artist.el | 2 +- lisp/textmodes/bib-mode.el | 2 +- lisp/textmodes/bibtex-style.el | 2 +- lisp/textmodes/bibtex.el | 2 +- lisp/textmodes/conf-mode.el | 2 +- lisp/textmodes/css-mode.el | 2 +- lisp/textmodes/dns-mode.el | 2 +- lisp/textmodes/enriched.el | 2 +- lisp/textmodes/fill.el | 2 +- lisp/textmodes/flyspell.el | 2 +- lisp/textmodes/ispell.el | 2 +- lisp/textmodes/makeinfo.el | 2 +- lisp/textmodes/nroff-mode.el | 2 +- lisp/textmodes/page-ext.el | 2 +- lisp/textmodes/page.el | 2 +- lisp/textmodes/paragraphs.el | 2 +- lisp/textmodes/picture.el | 2 +- lisp/textmodes/po.el | 2 +- lisp/textmodes/refbib.el | 2 +- lisp/textmodes/refer.el | 2 +- lisp/textmodes/refill.el | 2 +- lisp/textmodes/reftex-auc.el | 2 +- lisp/textmodes/reftex-cite.el | 2 +- lisp/textmodes/reftex-dcr.el | 2 +- lisp/textmodes/reftex-global.el | 2 +- lisp/textmodes/reftex-index.el | 2 +- lisp/textmodes/reftex-parse.el | 2 +- lisp/textmodes/reftex-ref.el | 2 +- lisp/textmodes/reftex-sel.el | 2 +- lisp/textmodes/reftex-toc.el | 2 +- lisp/textmodes/reftex-vars.el | 2 +- lisp/textmodes/reftex.el | 2 +- lisp/textmodes/remember.el | 2 +- lisp/textmodes/rst.el | 2 +- lisp/textmodes/sgml-mode.el | 2 +- lisp/textmodes/table.el | 2 +- lisp/textmodes/tex-mode.el | 2 +- lisp/textmodes/texinfmt.el | 2 +- lisp/textmodes/texinfo.el | 2 +- lisp/textmodes/texnfo-upd.el | 2 +- lisp/textmodes/text-mode.el | 2 +- lisp/textmodes/tildify.el | 2 +- lisp/textmodes/two-column.el | 2 +- lisp/textmodes/underline.el | 2 +- lisp/thingatpt.el | 2 +- lisp/thumbs.el | 2 +- lisp/time-stamp.el | 2 +- lisp/time.el | 2 +- lisp/timezone.el | 2 +- lisp/tmm.el | 2 +- lisp/tool-bar.el | 2 +- lisp/tooltip.el | 2 +- lisp/tree-widget.el | 2 +- lisp/tutorial.el | 2 +- lisp/type-break.el | 2 +- lisp/uniquify.el | 2 +- lisp/url/ChangeLog | 2 +- lisp/url/url-about.el | 2 +- lisp/url/url-auth.el | 2 +- lisp/url/url-cache.el | 2 +- lisp/url/url-cid.el | 2 +- lisp/url/url-cookie.el | 2 +- lisp/url/url-dav.el | 2 +- lisp/url/url-dired.el | 2 +- lisp/url/url-expand.el | 2 +- lisp/url/url-file.el | 2 +- lisp/url/url-ftp.el | 2 +- lisp/url/url-future.el | 2 +- lisp/url/url-gw.el | 2 +- lisp/url/url-handlers.el | 2 +- lisp/url/url-history.el | 2 +- lisp/url/url-http.el | 2 +- lisp/url/url-imap.el | 2 +- lisp/url/url-irc.el | 2 +- lisp/url/url-ldap.el | 2 +- lisp/url/url-mailto.el | 2 +- lisp/url/url-methods.el | 2 +- lisp/url/url-misc.el | 2 +- lisp/url/url-news.el | 2 +- lisp/url/url-nfs.el | 2 +- lisp/url/url-ns.el | 2 +- lisp/url/url-parse.el | 2 +- lisp/url/url-privacy.el | 2 +- lisp/url/url-proxy.el | 2 +- lisp/url/url-queue.el | 2 +- lisp/url/url-util.el | 2 +- lisp/url/url-vars.el | 2 +- lisp/url/url.el | 2 +- lisp/userlock.el | 2 +- lisp/vc/add-log.el | 2 +- lisp/vc/compare-w.el | 2 +- lisp/vc/cvs-status.el | 2 +- lisp/vc/diff-mode.el | 2 +- lisp/vc/diff.el | 2 +- lisp/vc/ediff-diff.el | 2 +- lisp/vc/ediff-help.el | 2 +- lisp/vc/ediff-hook.el | 2 +- lisp/vc/ediff-init.el | 2 +- lisp/vc/ediff-merg.el | 2 +- lisp/vc/ediff-mult.el | 2 +- lisp/vc/ediff-ptch.el | 2 +- lisp/vc/ediff-util.el | 2 +- lisp/vc/ediff-vers.el | 2 +- lisp/vc/ediff-wind.el | 2 +- lisp/vc/ediff.el | 2 +- lisp/vc/log-edit.el | 2 +- lisp/vc/log-view.el | 2 +- lisp/vc/pcvs-defs.el | 2 +- lisp/vc/pcvs-info.el | 2 +- lisp/vc/pcvs-parse.el | 2 +- lisp/vc/pcvs-util.el | 2 +- lisp/vc/pcvs.el | 2 +- lisp/vc/smerge-mode.el | 2 +- lisp/vc/vc-annotate.el | 2 +- lisp/vc/vc-arch.el | 2 +- lisp/vc/vc-bzr.el | 2 +- lisp/vc/vc-cvs.el | 2 +- lisp/vc/vc-dav.el | 2 +- lisp/vc/vc-dir.el | 2 +- lisp/vc/vc-dispatcher.el | 2 +- lisp/vc/vc-git.el | 2 +- lisp/vc/vc-hg.el | 2 +- lisp/vc/vc-hooks.el | 2 +- lisp/vc/vc-mtn.el | 2 +- lisp/vc/vc-rcs.el | 2 +- lisp/vc/vc-sccs.el | 2 +- lisp/vc/vc-svn.el | 2 +- lisp/vc/vc.el | 2 +- lisp/vcursor.el | 2 +- lisp/version.el | 2 +- lisp/view.el | 2 +- lisp/vt-control.el | 2 +- lisp/vt100-led.el | 2 +- lisp/w32-fns.el | 2 +- lisp/w32-vars.el | 2 +- lisp/wdired.el | 2 +- lisp/whitespace.el | 2 +- lisp/wid-browse.el | 2 +- lisp/wid-edit.el | 2 +- lisp/widget.el | 2 +- lisp/windmove.el | 2 +- lisp/window.el | 2 +- lisp/winner.el | 2 +- lisp/woman.el | 2 +- lisp/x-dnd.el | 2 +- lisp/xml.el | 2 +- lisp/xt-mouse.el | 2 +- lwlib/ChangeLog | 2 +- lwlib/Makefile.in | 2 +- lwlib/lwlib-Xaw.c | 2 +- lwlib/lwlib-Xlw.c | 2 +- lwlib/lwlib-Xm.c | 2 +- lwlib/lwlib-int.h | 2 +- lwlib/lwlib-utils.c | 2 +- lwlib/lwlib.c | 2 +- lwlib/lwlib.h | 2 +- lwlib/xlwmenu.c | 2 +- lwlib/xlwmenu.h | 2 +- lwlib/xlwmenuP.h | 2 +- make-dist | 2 +- msdos/ChangeLog | 2 +- msdos/INSTALL | 2 +- msdos/README | 4 ++-- msdos/depfiles.bat | 2 +- msdos/inttypes.h | 2 +- msdos/mainmake.v2 | 2 +- msdos/sed1v2.inp | 2 +- msdos/sed1x.inp | 2 +- msdos/sed2v2.inp | 2 +- msdos/sed2x.inp | 2 +- msdos/sed3v2.inp | 2 +- msdos/sed4.inp | 2 +- msdos/sed5x.inp | 2 +- msdos/sed6.inp | 2 +- msdos/sedalloc.inp | 2 +- msdos/sedleim.inp | 2 +- msdos/sedlibcf.inp | 2 +- msdos/sedlibmk.inp | 2 +- msdos/sedlisp.inp | 2 +- nextstep/ChangeLog | 2 +- nextstep/Cocoa/Emacs.base/Contents/Info.plist | 2 +- nextstep/INSTALL | 2 +- nextstep/README | 2 +- nt/ChangeLog | 2 +- nt/INSTALL | 2 +- nt/README | 2 +- nt/README.W32 | 2 +- nt/addpm.c | 2 +- nt/addsection.c | 2 +- nt/cmdproxy.c | 2 +- nt/config.nt | 2 +- nt/configure.bat | 2 +- nt/ddeclient.c | 2 +- nt/emacs.rc | 2 +- nt/emacsclient.rc | 2 +- nt/envadd.bat | 3 +-- nt/gmake.defs | 2 +- nt/icons/README | 6 +++--- nt/inc/grp.h | 2 +- nt/inc/inttypes.h | 2 +- nt/inc/langinfo.h | 2 +- nt/inc/nl_types.h | 2 +- nt/inc/stdint.h | 2 +- nt/inc/sys/socket.h | 2 +- nt/inc/sys/stat.h | 2 +- nt/makefile.w32-in | 2 +- nt/multi-install-info.bat | 3 +-- nt/nmake.defs | 2 +- nt/paths.h | 2 +- nt/preprep.c | 2 +- nt/runemacs.c | 2 +- nt/zipdist.bat | 2 +- oldXMenu/Activate.c | 2 +- oldXMenu/ChangeLog | 2 +- oldXMenu/Create.c | 2 +- oldXMenu/FindSel.c | 2 +- oldXMenu/Internal.c | 2 +- oldXMenu/Makefile.in | 2 +- oldXMenu/insque.c | 2 +- src/.gdbinit | 2 +- src/ChangeLog | 2 +- src/ChangeLog.1 | 2 +- src/ChangeLog.10 | 2 +- src/ChangeLog.11 | 2 +- src/ChangeLog.2 | 2 +- src/ChangeLog.3 | 2 +- src/ChangeLog.4 | 2 +- src/ChangeLog.5 | 2 +- src/ChangeLog.6 | 2 +- src/ChangeLog.7 | 2 +- src/ChangeLog.8 | 2 +- src/ChangeLog.9 | 2 +- src/Makefile.in | 2 +- src/README | 2 +- src/alloc.c | 2 +- src/atimer.c | 2 +- src/atimer.h | 2 +- src/bidi.c | 2 +- src/blockinput.h | 2 +- src/buffer.c | 2 +- src/buffer.h | 2 +- src/bytecode.c | 2 +- src/callint.c | 2 +- src/callproc.c | 2 +- src/casefiddle.c | 2 +- src/casetab.c | 2 +- src/category.c | 2 +- src/ccl.c | 2 +- src/character.c | 2 +- src/charset.c | 2 +- src/charset.h | 2 +- src/cm.c | 2 +- src/cm.h | 2 +- src/cmds.c | 2 +- src/coding.c | 2 +- src/coding.h | 2 +- src/commands.h | 2 +- src/composite.c | 2 +- src/composite.h | 2 +- src/data.c | 2 +- src/dbusbind.c | 2 +- src/deps.mk | 2 +- src/dired.c | 2 +- src/dispextern.h | 2 +- src/dispnew.c | 2 +- src/disptab.h | 2 +- src/doc.c | 2 +- src/doprnt.c | 2 +- src/dosfns.c | 2 +- src/dosfns.h | 2 +- src/editfns.c | 2 +- src/emacs-icon.h | 2 +- src/emacs.c | 2 +- src/emacsgtkfixed.c | 2 +- src/emacsgtkfixed.h | 2 +- src/epaths.in | 2 +- src/eval.c | 2 +- src/fileio.c | 2 +- src/filelock.c | 2 +- src/firstfile.c | 2 +- src/floatfns.c | 2 +- src/fns.c | 2 +- src/font.c | 2 +- src/font.h | 2 +- src/fontset.c | 2 +- src/fontset.h | 2 +- src/frame.c | 2 +- src/frame.h | 2 +- src/fringe.c | 2 +- src/ftfont.c | 2 +- src/ftxfont.c | 2 +- src/getpagesize.h | 2 +- src/gnutls.c | 2 +- src/gnutls.h | 2 +- src/gtkutil.c | 2 +- src/gtkutil.h | 2 +- src/image.c | 2 +- src/indent.c | 2 +- src/indent.h | 2 +- src/insdel.c | 2 +- src/intervals.c | 2 +- src/intervals.h | 2 +- src/keyboard.c | 2 +- src/keyboard.h | 2 +- src/keymap.c | 2 +- src/keymap.h | 2 +- src/lastfile.c | 2 +- src/lisp.h | 2 +- src/lisp.mk | 2 +- src/lread.c | 2 +- src/m/alpha.h | 2 +- src/m/amdx86-64.h | 2 +- src/m/ia64.h | 2 +- src/m/ibmrs6000.h | 2 +- src/m/ibms390x.h | 2 +- src/m/intel386.h | 2 +- src/m/m68k.h | 2 +- src/m/macppc.h | 2 +- src/m/sparc.h | 2 +- src/m/template.h | 2 +- src/m/vax.h | 2 +- src/macros.c | 2 +- src/macros.h | 2 +- src/makefile.w32-in | 2 +- src/marker.c | 2 +- src/mem-limits.h | 2 +- src/menu.c | 2 +- src/menu.h | 2 +- src/minibuf.c | 2 +- src/msdos.c | 2 +- src/msdos.h | 2 +- src/ns.mk | 2 +- src/nsfns.m | 2 +- src/nsfont.m | 2 +- src/nsgui.h | 2 +- src/nsimage.m | 2 +- src/nsmenu.m | 2 +- src/nsselect.m | 2 +- src/nsterm.h | 2 +- src/nsterm.m | 2 +- src/print.c | 2 +- src/process.c | 2 +- src/process.h | 2 +- src/puresize.h | 2 +- src/ralloc.c | 2 +- src/regex.c | 2 +- src/regex.h | 2 +- src/region-cache.c | 2 +- src/region-cache.h | 2 +- src/s/aix4-2.h | 2 +- src/s/bsd-common.h | 2 +- src/s/cygwin.h | 2 +- src/s/darwin.h | 2 +- src/s/freebsd.h | 2 +- src/s/gnu-linux.h | 2 +- src/s/gnu.h | 2 +- src/s/hpux10-20.h | 2 +- src/s/irix6-5.h | 2 +- src/s/ms-w32.h | 2 +- src/s/msdos.h | 2 +- src/s/netbsd.h | 2 +- src/s/sol2-6.h | 2 +- src/s/template.h | 2 +- src/s/unixware.h | 2 +- src/s/usg5-4-common.h | 2 +- src/scroll.c | 2 +- src/search.c | 2 +- src/sheap.c | 2 +- src/sound.c | 2 +- src/syntax.c | 2 +- src/syntax.h | 2 +- src/sysdep.c | 2 +- src/sysselect.h | 2 +- src/syssignal.h | 2 +- src/systime.h | 2 +- src/systty.h | 2 +- src/syswait.h | 2 +- src/term.c | 2 +- src/termchar.h | 2 +- src/termhooks.h | 2 +- src/terminal.c | 2 +- src/terminfo.c | 2 +- src/termopts.h | 2 +- src/textprop.c | 2 +- src/tparam.h | 2 +- src/undo.c | 2 +- src/unexaix.c | 2 +- src/unexcoff.c | 2 +- src/unexcw.c | 2 +- src/unexelf.c | 2 +- src/unexmacosx.c | 2 +- src/unexw32.c | 2 +- src/vm-limit.c | 2 +- src/w16select.c | 2 +- src/w32.c | 2 +- src/w32.h | 2 +- src/w32console.c | 2 +- src/w32fns.c | 2 +- src/w32font.c | 2 +- src/w32font.h | 2 +- src/w32gui.h | 2 +- src/w32heap.c | 2 +- src/w32heap.h | 2 +- src/w32inevt.c | 2 +- src/w32inevt.h | 2 +- src/w32menu.c | 2 +- src/w32proc.c | 2 +- src/w32reg.c | 2 +- src/w32select.c | 2 +- src/w32term.c | 2 +- src/w32term.h | 2 +- src/w32uniscribe.c | 2 +- src/w32xfns.c | 2 +- src/widget.c | 2 +- src/widget.h | 2 +- src/widgetprv.h | 2 +- src/window.c | 2 +- src/window.h | 2 +- src/xdisp.c | 2 +- src/xfaces.c | 2 +- src/xfns.c | 2 +- src/xfont.c | 2 +- src/xftfont.c | 2 +- src/xgselect.c | 2 +- src/xgselect.h | 2 +- src/xmenu.c | 2 +- src/xml.c | 2 +- src/xrdb.c | 2 +- src/xselect.c | 2 +- src/xsettings.c | 2 +- src/xsettings.h | 2 +- src/xsmfns.c | 2 +- src/xterm.c | 2 +- src/xterm.h | 2 +- test/ChangeLog | 2 +- test/automated/Makefile.in | 2 +- test/automated/bytecomp-tests.el | 2 +- test/automated/comint-testsuite.el | 2 +- test/automated/compile-tests.el | 2 +- test/automated/ert-tests.el | 2 +- test/automated/ert-x-tests.el | 2 +- test/automated/f90.el | 2 +- test/automated/font-parse-tests.el | 2 +- test/automated/gnus-tests.el | 2 +- test/automated/icalendar-tests.el | 2 +- test/automated/lexbind-tests.el | 2 +- test/automated/newsticker-tests.el | 2 +- test/automated/occur-tests.el | 2 +- test/automated/vc-bzr.el | 2 +- test/cedet/cedet-utests.el | 2 +- test/cedet/ede-tests.el | 2 +- test/cedet/semantic-ia-utest.el | 2 +- test/cedet/semantic-tests.el | 2 +- test/cedet/semantic-utest-c.el | 2 +- test/cedet/semantic-utest.el | 2 +- test/cedet/srecode-tests.el | 2 +- test/cedet/tests/test.c | 2 +- test/cedet/tests/test.el | 2 +- test/cedet/tests/test.make | 2 +- test/cedet/tests/testdoublens.cpp | 2 +- test/cedet/tests/testdoublens.hpp | 2 +- test/cedet/tests/testjavacomp.java | 2 +- test/cedet/tests/testpolymorph.cpp | 2 +- test/cedet/tests/testspp.c | 2 +- test/cedet/tests/testsppreplace.c | 2 +- test/cedet/tests/testsppreplaced.c | 2 +- test/cedet/tests/testsubclass.cpp | 2 +- test/cedet/tests/testsubclass.hh | 2 +- test/cedet/tests/testtypedefs.cpp | 2 +- test/cedet/tests/testvarnames.c | 2 +- test/eshell.el | 2 +- test/redisplay-testsuite.el | 2 +- test/rmailmm.el | 2 +- update-subdirs | 2 +- 1992 files changed, 2012 insertions(+), 2013 deletions(-) diff --git a/ChangeLog b/ChangeLog index 605ef32b598..fb342cffec9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10080,7 +10080,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1993-1999, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/GNUmakefile b/GNUmakefile index 5fd329c78ef..0602266adee 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ # Build Emacs from a fresh tarball or version-control checkout. -# Copyright 2011 Free Software Foundation, Inc. +# Copyright (C) 2011-2012 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # diff --git a/INSTALL b/INSTALL index dcbc729b463..1e0844879cb 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ GNU Emacs Installation Guide -Copyright (C) 1992, 1994, 1996-1997, 2000-2011 +Copyright (C) 1992, 1994, 1996-1997, 2000-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/INSTALL.BZR b/INSTALL.BZR index 69babac7a8b..93e53fd09aa 100644 --- a/INSTALL.BZR +++ b/INSTALL.BZR @@ -1,4 +1,4 @@ -Copyright (C) 2002-2011 Free Software Foundation, Inc. +Copyright (C) 2002-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/Makefile.in b/Makefile.in index 3ba7c9baae7..400fc73e6da 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,7 +2,7 @@ # DIST: make most of the changes to this file you might want, so try # DIST: that first. -# Copyright (C) 1992-2011 Free Software Foundation, Inc. +# Copyright (C) 1992-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/README b/README index eda81de1bbe..cf837ba4ea3 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/admin/ChangeLog b/admin/ChangeLog index 4da85943b7f..3bfbab881aa 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1226,7 +1226,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 2001-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/admin/README b/admin/README index 10a8f2244fc..b5eefc2da7a 100644 --- a/admin/README +++ b/admin/README @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/admin/admin.el b/admin/admin.el index 9235144f6c6..2ca838fdff9 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -1,6 +1,6 @@ ;;; admin.el --- utilities for Emacs administration -;; Copyright (C) 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 2001-2012 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. diff --git a/admin/alloc-colors.c b/admin/alloc-colors.c index b3ea8af9d70..2ad5acadcb0 100644 --- a/admin/alloc-colors.c +++ b/admin/alloc-colors.c @@ -1,6 +1,6 @@ /* Allocate X colors. Used for testing with dense colormaps. -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/admin/build-configs b/admin/build-configs index 79ba58aeec0..59a3a1bbbca 100755 --- a/admin/build-configs +++ b/admin/build-configs @@ -1,7 +1,7 @@ #! /usr/bin/perl # Build Emacs in several different configurations. -# Copyright (C) 2001-2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el index 583f0d88866..2efb17603cd 100644 --- a/admin/bzrmerge.el +++ b/admin/bzrmerge.el @@ -1,6 +1,6 @@ ;;; bzrmerge.el --- help merge one Emacs bzr branch to another -;; Copyright (C) 2010-2011 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: diff --git a/admin/charsets/mapfiles/README b/admin/charsets/mapfiles/README index e87d548cf31..b43611db11d 100644 --- a/admin/charsets/mapfiles/README +++ b/admin/charsets/mapfiles/README @@ -1,4 +1,4 @@ -Copyright (C) 2009-2011 Free Software Foundation, Inc. +Copyright (C) 2009-2012 Free Software Foundation, Inc. Copyright (C) 2009, 2010, 2011 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H13PRO009 diff --git a/admin/cus-test.el b/admin/cus-test.el index b254fedccc4..11d781ed01e 100644 --- a/admin/cus-test.el +++ b/admin/cus-test.el @@ -1,6 +1,6 @@ ;;; cus-test.el --- tests for custom types and load problems -;; Copyright (C) 1998, 2000, 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2002-2012 Free Software Foundation, Inc. ;; Author: Markus Rost ;; Maintainer: Markus Rost diff --git a/admin/diff-tar-files b/admin/diff-tar-files index 59ae1a6f26c..1dbf9a12399 100755 --- a/admin/diff-tar-files +++ b/admin/diff-tar-files @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2001-2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/admin/grammars/bovine-grammar.el b/admin/grammars/bovine-grammar.el index a7fe955acf4..efe4db039c4 100644 --- a/admin/grammars/bovine-grammar.el +++ b/admin/grammars/bovine-grammar.el @@ -1,6 +1,6 @@ ;;; bovine-grammar.el --- Bovine's input grammar mode ;; -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2012 Free Software Foundation, Inc. ;; ;; Author: David Ponce ;; Maintainer: David Ponce diff --git a/admin/grammars/c.by b/admin/grammars/c.by index 8c9da9a901b..1bdaf8f447b 100644 --- a/admin/grammars/c.by +++ b/admin/grammars/c.by @@ -1,6 +1,6 @@ ;;; c.by -- LL grammar for C/C++ language specification -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam ;; David Ponce diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy index 18e8b814303..1189d6b0886 100644 --- a/admin/grammars/grammar.wy +++ b/admin/grammars/grammar.wy @@ -1,6 +1,6 @@ ;;; semantic-grammar.wy -- LALR grammar of Semantic input grammars ;; -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2012 Free Software Foundation, Inc. ;; ;; Author: David Ponce ;; Maintainer: David Ponce diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy index f4b2f1f1f49..b58b96c6bfb 100644 --- a/admin/grammars/java-tags.wy +++ b/admin/grammars/java-tags.wy @@ -1,6 +1,6 @@ ;;; java-tags.wy -- Semantic LALR grammar for Java -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2012 Free Software Foundation, Inc. ;; ;; Author: David Ponce ;; Maintainer: David Ponce diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy index ffa324806cf..c6b3a58aac3 100644 --- a/admin/grammars/js.wy +++ b/admin/grammars/js.wy @@ -1,6 +1,6 @@ ;;; javascript-jv.wy -- LALR grammar for Javascript -;; Copyright (C) 2005-2011 Free Software Foundation, Inc. +;; Copyright (C) 2005-2012 Free Software Foundation, Inc. ;; Copyright (C) 1998-2011 Ecma International. ;; Author: Joakim Verona diff --git a/admin/grammars/make.by b/admin/grammars/make.by index dab4472b737..ee933805cf6 100644 --- a/admin/grammars/make.by +++ b/admin/grammars/make.by @@ -1,6 +1,6 @@ ;;; make.by -- BY notation for Makefiles. -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam ;; David Ponce diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy index b30305ee78a..65f317145a0 100644 --- a/admin/grammars/python.wy +++ b/admin/grammars/python.wy @@ -1,6 +1,6 @@ ;;; python.wy -- LALR grammar for Python -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2012 Free Software Foundation, Inc. ;; Copyright (C) 2001-2010 Python Software Foundation ;; Author: Richard Kim diff --git a/admin/grammars/scheme.by b/admin/grammars/scheme.by index bc6612d4c70..3925f03c28b 100644 --- a/admin/grammars/scheme.by +++ b/admin/grammars/scheme.by @@ -1,6 +1,6 @@ ;;; scheme.by -- Scheme BNF language specification -;; Copyright (C) 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 2001-2012 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. diff --git a/admin/grammars/srecode-template.wy b/admin/grammars/srecode-template.wy index 4ff2d7e4e41..f38d7eaa2a1 100644 --- a/admin/grammars/srecode-template.wy +++ b/admin/grammars/srecode-template.wy @@ -1,6 +1,6 @@ ;;; srecode-template.wy --- Semantic Recoder Template parser -;; Copyright (C) 2005-2011 Free Software Foundation, Inc. +;; Copyright (C) 2005-2012 Free Software Foundation, Inc. ;; Author: Eric Ludlam ;; Keywords: syntax diff --git a/admin/grammars/wisent-grammar.el b/admin/grammars/wisent-grammar.el index 66045c2294d..be014a56906 100644 --- a/admin/grammars/wisent-grammar.el +++ b/admin/grammars/wisent-grammar.el @@ -1,6 +1,6 @@ ;;; wisent-grammar.el --- Wisent's input grammar mode -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2012 Free Software Foundation, Inc. ;; ;; Author: David Ponce ;; Maintainer: David Ponce diff --git a/admin/make-announcement b/admin/make-announcement index dcfd55e8375..5b45d09e89b 100755 --- a/admin/make-announcement +++ b/admin/make-announcement @@ -1,6 +1,6 @@ #! /bin/bash -## Copyright (C) 2002-2011 Free Software Foundation, Inc. +## Copyright (C) 2002-2012 Free Software Foundation, Inc. ## Author: Francesco Potorti` diff --git a/admin/make-emacs b/admin/make-emacs index d231f66b03b..f64d51b0c41 100755 --- a/admin/make-emacs +++ b/admin/make-emacs @@ -2,7 +2,7 @@ # Build Emacs with various options for profiling, debugging, # with and without warnings enabled etc. -# Copyright (C) 2001-2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/admin/notes/copyright b/admin/notes/copyright index 0ad99900779..72b7d7e2d23 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright @@ -1,4 +1,4 @@ -Copyright (C) 2007-2011 Free Software Foundation, Inc. +Copyright (C) 2007-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/admin/notes/font-backend b/admin/notes/font-backend index d51d3ec1c3b..ec2dc11345b 100644 --- a/admin/notes/font-backend +++ b/admin/notes/font-backend @@ -1,4 +1,4 @@ -Copyright (C) 2002-2011 Free Software Foundation, Inc. +Copyright (C) 2002-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/admin/notes/lel-TODO b/admin/notes/lel-TODO index c03d0f6fdfb..065a10f20e4 100644 --- a/admin/notes/lel-TODO +++ b/admin/notes/lel-TODO @@ -1,6 +1,6 @@ Some lisp/emacs-lisp/ Features and Where They Are Documented -Copyright (C) 2007-2011 Free Software Foundation, Inc. +Copyright (C) 2007-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/admin/notes/multi-tty b/admin/notes/multi-tty index 8a10997eb8b..ad46f493a02 100644 --- a/admin/notes/multi-tty +++ b/admin/notes/multi-tty @@ -1,6 +1,6 @@ -*- coding: utf-8; mode: text; -*- -Copyright (C) 2007-2011 Free Software Foundation, Inc. +Copyright (C) 2007-2012 Free Software Foundation, Inc. See the end of the file for license conditions. From README.multi-tty in the multi-tty branch. diff --git a/admin/notes/unicode b/admin/notes/unicode index ce7d3732f03..382e3ee0f9f 100644 --- a/admin/notes/unicode +++ b/admin/notes/unicode @@ -1,6 +1,6 @@ -*-mode: text; coding: latin-1;-*- -Copyright (C) 2002-2011 Free Software Foundation, Inc. +Copyright (C) 2002-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Problems, fixmes and other unicode-related issues diff --git a/admin/nt/README-UNDUMP.W32 b/admin/nt/README-UNDUMP.W32 index 8c7d1510a05..d3dd88a99ec 100644 --- a/admin/nt/README-UNDUMP.W32 +++ b/admin/nt/README-UNDUMP.W32 @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Emacs for Windows diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server index c320bbe915d..1b0c9390889 100644 --- a/admin/nt/README-ftp-server +++ b/admin/nt/README-ftp-server @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Precompiled Distributions of diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs index 841a895248e..657dcdc1766 100755 --- a/admin/quick-install-emacs +++ b/admin/quick-install-emacs @@ -1,7 +1,7 @@ #!/bin/sh ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly -## Copyright (C) 2001-2011 Free Software Foundation, Inc. +## Copyright (C) 2001-2012 Free Software Foundation, Inc. ## Author: Miles Bader diff --git a/autogen.sh b/autogen.sh index 4778d6ca2ad..fb5917fbbf7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,7 @@ #!/bin/sh ### autogen.sh - tool to help build Emacs from a bzr checkout -## Copyright (C) 2011 Free Software Foundation, Inc. +## Copyright (C) 2011-2012 Free Software Foundation, Inc. ## Author: Glenn Morris diff --git a/autogen/update_autogen b/autogen/update_autogen index e406f346ede..58e3838f8c1 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -1,7 +1,7 @@ #!/bin/bash ### update_autogen - update the generated files in Emacs autogen/ directory -## Copyright (C) 2011 Free Software Foundation, Inc. +## Copyright (C) 2011-2012 Free Software Foundation, Inc. ## Author: Glenn Morris diff --git a/configure.in b/configure.in index 83acc82064e..91302e1c3ee 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl autoconf dnl in the directory containing this script. dnl If you changed any AC_DEFINES, also run autoheader. dnl -dnl Copyright (C) 1994-1996, 1999-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1994-1996, 1999-2012 Free Software Foundation, Inc. dnl dnl This file is part of GNU Emacs. dnl @@ -3516,7 +3516,7 @@ fi AH_TOP([/* GNU Emacs site configuration template file. -Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2011 +Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index 66cd7f1d92e..2ed265ecd70 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -1,6 +1,6 @@ #### Makefile for the Emacs Manual -# Copyright (C) 1994, 1996-2011 Free Software Foundation, Inc. +# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index 5868010806c..2df1a6b8d5a 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Abbrevs diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index e6d1f8979d7..184f8272cab 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -1,6 +1,6 @@ @c -*- coding: iso-latin-1 -*- @c This is part of the Emacs manual. -@c Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc. +@c Copyright (C) 1994-1997, 1999-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @node Acknowledgments, Screen, Concept Index, Top diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi index 1ee93362ae6..68f617d2cfd 100644 --- a/doc/emacs/anti.texi +++ b/doc/emacs/anti.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2005-2011 Free Software Foundation, Inc. +@c Copyright (C) 2005-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Antinews, Mac OS / GNUstep, X Resources, Top diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi index 6a24646b5f7..350f16f51dc 100644 --- a/doc/emacs/arevert-xtra.texi +++ b/doc/emacs/arevert-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 14101ce4fdd..3e768ab54d7 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Basic, Minibuffer, Exiting, Top diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 302693aecef..fb71e04c184 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Buffers, Windows, Files, Top diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 963bd510f67..7a94ba56052 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Building, Maintaining, Programs, Top diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi index 2d2b32943f5..4d37672b6ca 100644 --- a/doc/emacs/cal-xtra.texi +++ b/doc/emacs/cal-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 4a09d6e3d9c..495828d6d8a 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Calendar/Diary diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index d9109045570..487e3eca61b 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Emacs Invocation, X Resources, GNU Free Documentation License, Top diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index 817cfc369d1..f2a71b045f8 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @iftex diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index e807aebdeee..370a3126823 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Customization diff --git a/doc/emacs/dired-xtra.texi b/doc/emacs/dired-xtra.texi index 52ccccce58c..bc141650b4a 100644 --- a/doc/emacs/dired-xtra.texi +++ b/doc/emacs/dired-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 5097565830e..34ec0d2045c 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Dired diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index ea9bd95b8ee..4373718926d 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. diff --git a/doc/emacs/emacs-xtra.texi b/doc/emacs/emacs-xtra.texi index f9d1c27fe55..596cc13abf5 100644 --- a/doc/emacs/emacs-xtra.texi +++ b/doc/emacs/emacs-xtra.texi @@ -11,7 +11,7 @@ @copying This manual describes specialized features of Emacs. -Copyright @copyright{} 2004-2011 +Copyright @copyright{} 2004-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 7a1e71b0fd2..080f8a6957f 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -11,7 +11,7 @@ This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@* updated for Emacs version @value{EMACSVER}. -Copyright @copyright{} 1985-1987, 1993-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1985-1987, 1993-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/emacs/emerge-xtra.texi b/doc/emacs/emerge-xtra.texi index b46868cf52b..d9f0b4a2741 100644 --- a/doc/emacs/emerge-xtra.texi +++ b/doc/emacs/emerge-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi index 4a76f206aed..ba7f3132b6b 100644 --- a/doc/emacs/entering.texi +++ b/doc/emacs/entering.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @iftex diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 9b2322e1850..e4c40837b28 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Files, Buffers, Keyboard Macros, Top diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index bae78d94744..c4fbca6574b 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Fixit, Keyboard Macros, Search, Top diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi index 833265359ac..5fc20fae8a3 100644 --- a/doc/emacs/fortran-xtra.texi +++ b/doc/emacs/fortran-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index dec5aa771ea..1adeee480a6 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Frames, International, Windows, Top diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 3af75245e69..c6f91cb7b56 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Glossary, Key Index, Intro, Top diff --git a/doc/emacs/gnu.texi b/doc/emacs/gnu.texi index dfdeedd65ec..ac9b9de6dcb 100644 --- a/doc/emacs/gnu.texi +++ b/doc/emacs/gnu.texi @@ -1,4 +1,4 @@ -@c Copyright (C) 1985-1987, 1993, 1995, 2001-2011 +@c Copyright (C) 1985-1987, 1993, 1995, 2001-2012 @c Free Software Foundation, Inc. @c @c Permission is granted to anyone to make or distribute verbatim copies diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index c024d428511..ed08aca5080 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Help, Mark, M-x, Top diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi index f99e3519710..3892dc2ae99 100644 --- a/doc/emacs/indent.texi +++ b/doc/emacs/indent.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Indentation, Text, Modes, Top diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 1443ad019bb..e76e2fafc55 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index 4676983fc67..a767a312ed3 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Keyboard Macros, Files, Fixit, Top diff --git a/doc/emacs/m-x.texi b/doc/emacs/m-x.texi index cf55631e14e..81ceb1e3ac9 100644 --- a/doc/emacs/m-x.texi +++ b/doc/emacs/m-x.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node M-x, Help, Minibuffer, Top diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 3e1e67fecd8..a36dc0cbcc5 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2000-2011 Free Software Foundation, Inc. +@c Copyright (C) 2000-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Mac OS / GNUstep, Microsoft Windows, Antinews, Top @appendix Emacs and Mac OS / GNUstep diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 6ce298c1795..2ec477031ca 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Maintaining, Abbrevs, Building, Top diff --git a/doc/emacs/makefile.w32-in b/doc/emacs/makefile.w32-in index e128a50ebd3..488ccbaaf52 100644 --- a/doc/emacs/makefile.w32-in +++ b/doc/emacs/makefile.w32-in @@ -1,6 +1,6 @@ #### -*- Makefile -*- for the Emacs Manual -# Copyright (C) 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 7d65719e5f0..9a15f9454dd 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Mark, Killing, Help, Top diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index bbe42551345..b7c63171c56 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Minibuffer, M-x, Basic, Top diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 9e7c1dbfc94..69e141efb0f 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @iftex diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 40a36bd95ed..52ecd37fcf2 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Modes, Indentation, International, Top diff --git a/doc/emacs/msdog-xtra.texi b/doc/emacs/msdog-xtra.texi index 095a0cdacbf..dc50b3d248f 100644 --- a/doc/emacs/msdog-xtra.texi +++ b/doc/emacs/msdog-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 547d8cbadd9..d31906d9b04 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Microsoft Windows, Manifesto, Mac OS / GNUstep, Top diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index f676f0b96ce..aebff1e463a 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc. +@c Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node International, Modes, Frames, Top @chapter International Character Set Support diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index b342cbbf18c..bf4119b4878 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Packages diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi index 43a2dbc4704..629baaf9c52 100644 --- a/doc/emacs/picture-xtra.texi +++ b/doc/emacs/picture-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in emacs-xtra.texi (when producing the diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 7301ecfea8a..7fef7fb1e22 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Programs, Building, Text, Top diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index f7fd52bd28d..d02ddd64b49 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Registers, Display, Killing, Top diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index d05af468fa1..9713b825ee8 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Rmail diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index fcc31e30988..fe3222e198f 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Screen, User Input, Acknowledgments, Top diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index c6747042df5..877e291ff36 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Search, Fixit, Display, Top diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 331a25ef813..6f154ce2af6 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Sending Mail diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e4bc31e0266..ccc546fb0a1 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Text, Programs, Indentation, Top diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index ae7550d0fae..e7754c2044d 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @iftex diff --git a/doc/emacs/vc-xtra.texi b/doc/emacs/vc-xtra.texi index 978a2a31a2e..51137a273d3 100644 --- a/doc/emacs/vc-xtra.texi +++ b/doc/emacs/vc-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included in emacs-xtra.texi when producing the printed diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index b65e6f96a6e..48b902f18c1 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @c @c This file is included either in vc-xtra.texi (when producing the diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 6a6f7b1a4d7..76ab79361e4 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 +@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Windows, Frames, Buffers, Top diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index b32b3d905e4..cacf3617fc5 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1987, 1993-1995, 1997, 2001-2011 +@c Copyright (C) 1987, 1993-1995, 1997, 2001-2012 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node X Resources, Antinews, Emacs Invocation, Top diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 6cede6375f2..0365a3ca174 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog @@ -471,7 +471,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 2001-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in index df356f1b132..fa9a0a4037c 100644 --- a/doc/lispintro/Makefile.in +++ b/doc/lispintro/Makefile.in @@ -1,6 +1,6 @@ #### Makefile for the Emacs Lisp Introduction manual -# Copyright (C) 1994-1999, 2001-2011 Free Software Foundation, Inc. +# Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/lispintro/README b/doc/lispintro/README index ba4e727cc8e..d81a6bc2a3a 100644 --- a/doc/lispintro/README +++ b/doc/lispintro/README @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/doc/lispintro/cons-1.eps b/doc/lispintro/cons-1.eps index a1fb08463b4..d17082f5ac7 100644 --- a/doc/lispintro/cons-1.eps +++ b/doc/lispintro/cons-1.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:26:58 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-2.eps b/doc/lispintro/cons-2.eps index a711b66ca2e..bd227a14c03 100644 --- a/doc/lispintro/cons-2.eps +++ b/doc/lispintro/cons-2.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:26:39 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-2a.eps b/doc/lispintro/cons-2a.eps index 5612caa0717..676030d780f 100644 --- a/doc/lispintro/cons-2a.eps +++ b/doc/lispintro/cons-2a.eps @@ -4,7 +4,7 @@ %%CreationDate: Tue Mar 14 15:09:30 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-3.eps b/doc/lispintro/cons-3.eps index a1de449373f..329c751b856 100644 --- a/doc/lispintro/cons-3.eps +++ b/doc/lispintro/cons-3.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:25:41 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-4.eps b/doc/lispintro/cons-4.eps index 45882e815a7..fe28852a872 100644 --- a/doc/lispintro/cons-4.eps +++ b/doc/lispintro/cons-4.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:25:06 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-5.eps b/doc/lispintro/cons-5.eps index b8bff1da573..214c4059e32 100644 --- a/doc/lispintro/cons-5.eps +++ b/doc/lispintro/cons-5.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:27:28 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/drawers.eps b/doc/lispintro/drawers.eps index 99e3581f38e..2c066fc708a 100644 --- a/doc/lispintro/drawers.eps +++ b/doc/lispintro/drawers.eps @@ -9,7 +9,7 @@ %%EndComments %%BeginProlog -% Copyright (C) 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 23d0d5a8f34..0f9b6b906aa 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -228,7 +228,7 @@ people who are not programmers. @sp 1 Edition @value{edition-number}, @value{update-date} @sp 1 -Copyright @copyright{} 1990-1995, 1997, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1990-1995, 1997, 2001-2012 Free Software Foundation, Inc. @sp 1 @iftex diff --git a/doc/lispintro/lambda-1.eps b/doc/lispintro/lambda-1.eps index a9c3c530646..42f8d54264c 100644 --- a/doc/lispintro/lambda-1.eps +++ b/doc/lispintro/lambda-1.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:31:53 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/lambda-2.eps b/doc/lispintro/lambda-2.eps index 44238a1ad7d..ab9e8a85820 100644 --- a/doc/lispintro/lambda-2.eps +++ b/doc/lispintro/lambda-2.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:33:09 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/lambda-3.eps b/doc/lispintro/lambda-3.eps index 1c5cda046e0..8269650e0ec 100644 --- a/doc/lispintro/lambda-3.eps +++ b/doc/lispintro/lambda-3.eps @@ -4,7 +4,7 @@ %%CreationDate: Wed Mar 8 14:33:49 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/makefile.w32-in b/doc/lispintro/makefile.w32-in index 06641cc2222..a8aaf43096e 100644 --- a/doc/lispintro/makefile.w32-in +++ b/doc/lispintro/makefile.w32-in @@ -1,6 +1,6 @@ #### -*- Makefile -*- for the Emacs Lisp Introduction manual. -# Copyright (C) 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 152cd0d3ed7..daa5493ec83 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -9808,7 +9808,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1998-2011 Free Software Foundation, Inc. + Copyright (C) 1998-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in index 75fa884224b..0b616884ff2 100644 --- a/doc/lispref/Makefile.in +++ b/doc/lispref/Makefile.in @@ -1,6 +1,6 @@ # Makefile for the GNU Emacs Lisp Reference Manual. -# Copyright (C) 1990-1996, 1998-2011 Free Software Foundation, Inc. +# Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/lispref/README b/doc/lispref/README index a9c0922640b..df808e4bcab 100644 --- a/doc/lispref/README +++ b/doc/lispref/README @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi index 57030559d0b..f7fd8b541ed 100644 --- a/doc/lispref/abbrevs.texi +++ b/doc/lispref/abbrevs.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/abbrevs @node Abbrevs, Processes, Syntax Tables, Top diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi index 29356381229..ee1950a589a 100644 --- a/doc/lispref/advice.texi +++ b/doc/lispref/advice.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/advising @node Advising Functions, Debugging, Byte Compilation, Top diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi index bb1e42c9309..6b9473e99d4 100644 --- a/doc/lispref/anti.texi +++ b/doc/lispref/anti.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc. +@c Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @c This node must have no pointers. diff --git a/doc/lispref/back.texi b/doc/lispref/back.texi index 3add7b174d2..75c244ae1dd 100644 --- a/doc/lispref/back.texi +++ b/doc/lispref/back.texi @@ -1,6 +1,6 @@ \input texinfo @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @c @c %**start of header diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index aad0cbc146a..969220845d0 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/backups @node Backups and Auto-Saving, Buffers, Files, Top diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index ee2ce2e2001..c2e792cd585 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/buffers diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 41392273fbd..4a0bc8a6b24 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/commands diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 372c041ab7a..4e21df78430 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/compile @node Byte Compilation, Advising Functions, Loading, Top diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 875c23658b9..e74f3e198bf 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/control @node Control Structures, Variables, Evaluation, Top diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 868edaa5bd4..f8495513be4 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1997-2011 Free Software Foundation, Inc. +@c Copyright (C) 1997-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/customize @node Customization, Loading, Macros, Top diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 757906f286e..9466f21a563 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/debugging @node Debugging, Read and Print, Advising Functions, Top diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index a9921d7443d..381eaf66c12 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/display @node Display, System Interface, Processes, Top diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 391c22ba098..669a5d0edcd 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -1,6 +1,6 @@ @comment -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1992-1994, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1992-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @c This file can also be used by an independent Edebug User diff --git a/doc/lispref/elisp-covers.texi b/doc/lispref/elisp-covers.texi index 92dfb7a074f..b2cc5a9adf2 100644 --- a/doc/lispref/elisp-covers.texi +++ b/doc/lispref/elisp-covers.texi @@ -1,6 +1,6 @@ \input texinfo @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @c @comment %**start of header diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 98eaf1f8ade..0b8d972c1d5 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -44,7 +44,7 @@ This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* corresponding to Emacs version @value{EMACSVER}. -Copyright @copyright{} 1990-1996, 1998-2011 Free Software +Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index 98967b708b3..56ff3636750 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/errors @node Standard Errors, Standard Buffer-Local Variables, GNU Emacs Internals, Top diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index 74f3d9c48b9..adb4841a82d 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1998, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/eval @node Evaluation, Control Structures, Symbols, Top diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index b6d0b5c7ed2..614bd827489 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/files diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 06d212c27f2..4835a5b3da2 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/frames diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index f3b2375b61d..ada00867bd0 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/functions diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi index 0d77cba6fa6..0a2783b6f16 100644 --- a/doc/lispref/hash.texi +++ b/doc/lispref/hash.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/hash @node Hash Tables, Symbols, Sequences Arrays Vectors, Top diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 3426e81cdb3..678ea83465f 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/help diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index 6e2cac9c065..95655324ab4 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1998, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/hooks @node Standard Hooks, Index, Standard Keymaps, Top diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 9ef4646b50b..df6193cf13b 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/internals @node GNU Emacs Internals, Standard Errors, Tips, Top diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index 44ac947fa99..64c856d3ed4 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi @@ -1,6 +1,6 @@ @c -*-coding: iso-latin-1-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/intro diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index e5cca0622a9..8e03ade285f 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1998-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/keymaps @node Keymaps, Modes, Command Loop, Top diff --git a/doc/lispref/lay-flat.texi b/doc/lispref/lay-flat.texi index 55973adac59..73e2adbc03a 100644 --- a/doc/lispref/lay-flat.texi +++ b/doc/lispref/lay-flat.texi @@ -1,6 +1,6 @@ \input texinfo @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @c @comment %**start of header diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 056c924e72c..eb9ddf58603 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/lists @node Lists, Sequences Arrays Vectors, Strings and Characters, Top diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index ca233ac5f21..8d8fec62e2c 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/loading diff --git a/doc/lispref/locals.texi b/doc/lispref/locals.texi index a196efc9734..a075d955add 100644 --- a/doc/lispref/locals.texi +++ b/doc/lispref/locals.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/locals @node Standard Buffer-Local Variables, Standard Keymaps, Standard Errors, Top diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index c66feec08b7..1e4dfa54191 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/macros @node Macros, Customization, Functions, Top diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in index 7b88e861d67..08b176b7593 100644 --- a/doc/lispref/makefile.w32-in +++ b/doc/lispref/makefile.w32-in @@ -1,6 +1,6 @@ # -*- Makefile -*- for the GNU Emacs Lisp Reference Manual. -# Copyright (C) 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index d235fee90ee..02a3302f64f 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/maps @node Standard Keymaps, Standard Hooks, Standard Buffer-Local Variables, Top diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index 7b73c454c87..e8a009de401 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/markers @node Markers, Text, Positions, Top diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index aa22e6c92ff..e3008470233 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/minibuf diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index fcb7c772936..5d09b79748e 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/modes @node Modes, Documentation, Keymaps, Top diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 46dbbb08e57..19c72981174 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/characters @node Non-ASCII Characters, Searching and Matching, Text, Top diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 3efddebffb4..6768ecece9c 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/numbers diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 26def7858b7..3fb676edcd4 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/objects diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 7d05f8f3468..e63300cfac4 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/os diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 5533f8ab5fa..eb3612dc868 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 2010-2011 Free Software Foundation, Inc. +@c Copyright (C) 2010-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/package @node Packaging, Antinews, System Interface, Top diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 74444c7ad60..29b338369e5 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/positions @node Positions, Markers, Frames, Top diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 51d91572d0e..38eb5a86471 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/processes diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index a601ed0c2c0..21481568276 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/searching diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 825dd976eac..0ea32f99e12 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/sequences diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index 4d3a66d8852..36691624405 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/streams @node Read and Print, Minibuffers, Debugging, Top diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 2b8911277cd..49199d3e32f 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/strings diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 79b3249d760..866a63c4cd9 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/symbols @node Symbols, Evaluation, Hash Tables, Top diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 0d7a0c0bed4..dc215b1e0e6 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/syntax diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index f7f9c716162..b75c013298f 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/text @node Text, Non-ASCII Characters, Markers, Top diff --git a/doc/lispref/tindex.pl b/doc/lispref/tindex.pl index 5c9b88f57b2..a8765716e71 100755 --- a/doc/lispref/tindex.pl +++ b/doc/lispref/tindex.pl @@ -1,6 +1,6 @@ #! /usr/bin/perl -# Copyright (C) 2000-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index fd875b45be9..c0f6c0355e5 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1993, 1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/tips diff --git a/doc/lispref/two-volume-cross-refs.txt b/doc/lispref/two-volume-cross-refs.txt index 6eb11a92f47..67b5dbf89a3 100644 --- a/doc/lispref/two-volume-cross-refs.txt +++ b/doc/lispref/two-volume-cross-refs.txt @@ -1,4 +1,4 @@ -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See end for copying conditions. Two Volume Cross References diff --git a/doc/lispref/two-volume.make b/doc/lispref/two-volume.make index 8949bfe0157..4acbb193f82 100644 --- a/doc/lispref/two-volume.make +++ b/doc/lispref/two-volume.make @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2011 Free Software Foundation, Inc. +# Copyright (C) 2007-2012 Free Software Foundation, Inc. # See end for copying conditions. # although it would be nice to use tex rather than pdftex to avoid diff --git a/doc/lispref/two.el b/doc/lispref/two.el index b3a8666bcf2..39dee62d45d 100644 --- a/doc/lispref/two.el +++ b/doc/lispref/two.el @@ -1,6 +1,6 @@ ;; Auxiliary functions for preparing a two volume manual. -;; Copyright (C) 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 2001-2012 Free Software Foundation, Inc. ;; --rjc 30mar92 diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 62f5092497a..243da9f373d 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2011 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/variables @node Variables, Functions, Control Structures, Top diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index df631158689..85e1b9340fc 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2011 +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/windows diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 758cdde1dea..b6def1a7d8c 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog @@ -134,7 +134,7 @@ ;; add-log-time-zone-rule: t ;; End: - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 21aef5c5a9a..1494665c700 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -8662,7 +8662,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1993-1999, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 34f136b09ff..6fd0b983b87 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -1,6 +1,6 @@ #### Makefile for documentation other than the Emacs manual. -# Copyright (C) 1994, 1996-2011 Free Software Foundation, Inc. +# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/misc/ada-mode.texi b/doc/misc/ada-mode.texi index 0eb20d01324..8d06ae0de22 100644 --- a/doc/misc/ada-mode.texi +++ b/doc/misc/ada-mode.texi @@ -3,7 +3,7 @@ @settitle Ada Mode @copying -Copyright @copyright{} 1999-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1999-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 60bb6e7cdac..b6368cf0517 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -10,7 +10,7 @@ @copying This file describes the Emacs auth-source library. -Copyright @copyright{} 2008-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2008-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 289c08eb00e..9d7a51233ff 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -10,7 +10,7 @@ @c @cindex autotypist @copying -Copyright @copyright{} 1994-1995, 1999, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1994-1995, 1999, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 99029e0a83a..c42e8e6b9c0 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -94,7 +94,7 @@ This file documents Calc, the GNU Emacs calculator, included with GNU Emacs @value{EMACSVER}. @end ifnotinfo -Copyright @copyright{} 1990-1991, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1990-1991, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 8b589259a48..e2730cc8b3b 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -159,7 +159,7 @@ CC Mode @copying This manual is for CC Mode in Emacs. -Copyright @copyright{} 1995-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1995-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 3f3d616e343..594253e2c0a 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -5,7 +5,7 @@ @copying This file documents the GNU Emacs Common Lisp emulation package. -Copyright @copyright{} 1993, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1993, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index f515109bf76..71f60af530b 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -9,7 +9,7 @@ @syncodeindex fn cp @copying -Copyright @copyright{} 2007-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2007-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index a026c63e25b..95c129f411d 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi @@ -19,7 +19,7 @@ @comment %**end of header (This is for running Texinfo on a region.) @copying -Copyright @copyright{} 1994-1995, 1999, 2001-2011 +Copyright @copyright{} 1994-1995, 1999, 2001-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/ebrowse.texi b/doc/misc/ebrowse.texi index a2a4017eb64..cf716f4e031 100644 --- a/doc/misc/ebrowse.texi +++ b/doc/misc/ebrowse.texi @@ -10,7 +10,7 @@ @copying This file documents Ebrowse, a C++ class browser for GNU Emacs. -Copyright @copyright{} 2000-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2000-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index 2b2a6a21b7f..bc6e3281bb7 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -5,7 +5,7 @@ @copying This file describes EDE, the Emacs Development Environment. -Copyright @copyright{} 1998-2001, 2004-2005, 2008-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1998-2001, 2004-2005, 2008-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 62cd684b57b..1e9ecf07a14 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -25,7 +25,7 @@ This file documents Ediff, a comprehensive visual interface to Unix diff and patch utilities. -Copyright @copyright{} 1995-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1995-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi index 8f9f8fc03a2..af0069fb1bc 100644 --- a/doc/misc/edt.texi +++ b/doc/misc/edt.texi @@ -5,7 +5,7 @@ @copying This file documents the EDT emulation package for Emacs. -Copyright @copyright{} 1986, 1992, 1994-1995, 1999-2011 +Copyright @copyright{} 1986, 1992, 1994-1995, 1999-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 17f064406f9..c006e635a78 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -11,7 +11,7 @@ @copying This manual documents EIEIO, an object framework for Emacs Lisp. -Copyright @copyright{} 2007-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2007-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 91440dcfe8f..896eba2f1bb 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -11,7 +11,7 @@ @copying This file documents the Emacs MIME interface functionality. -Copyright @copyright{} 1998-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1998-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index b4137a7dac6..bb5e18f1c8b 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -9,7 +9,7 @@ @copying This file describes EasyPG Assistant @value{VERSION}. -Copyright @copyright{} 2007-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2007-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index b46748a08f9..6d791d7c5f6 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -8,7 +8,7 @@ @copying This manual is for ERC version 5.3. -Copyright @copyright{} 2005-2011 +Copyright @copyright{} 2005-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 00755262075..6002e678ff1 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -10,7 +10,7 @@ @end direntry @copying -Copyright @copyright{} 2008, 2010-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2008, 2010-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 7c178757927..99fbf1a4fcf 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -8,7 +8,7 @@ @copying This manual is for Eshell, the Emacs shell. -Copyright @copyright{} 1999-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1999-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi index a68eda50025..dec178c5258 100644 --- a/doc/misc/eudc.texi +++ b/doc/misc/eudc.texi @@ -12,7 +12,7 @@ EUDC is the Emacs Unified Directory Client, a common interface to directory servers using various protocols such as LDAP or the CCSO white pages directory system (PH/QI) -Copyright @copyright{} 1998, 2000-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1998, 2000-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index 15c9232d4b6..5b7bb7ec9ce 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -11,7 +11,7 @@ @c appreciate a notice if you do). @copying -Copyright @copyright{} 2001-2011 Free Software Foundation, Inc.@* +Copyright @copyright{} 2001-2012 Free Software Foundation, Inc.@* Copyright @copyright{} 1994, 1995, 1996, 1997, 1998, 1999, 2000 Reuven M. Lerner@* Copyright @copyright{} 1992, 1993 Steven Byrnes@* diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 625e9549444..687a2f7b4d4 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -11,7 +11,7 @@ This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}), which is a universal on-the-fly syntax checker for GNU Emacs. -Copyright @copyright{} 2004-2011 +Copyright @copyright{} 2004-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi index 17c1d7feaf0..34c418c14fd 100644 --- a/doc/misc/forms.texi +++ b/doc/misc/forms.texi @@ -18,7 +18,7 @@ @copying This file documents Forms mode, a form-editing major mode for GNU Emacs. -Copyright @copyright{} 1989, 1997, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1989, 1997, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/gnus-coding.texi b/doc/misc/gnus-coding.texi index a79c68f0123..bbaf2c068da 100644 --- a/doc/misc/gnus-coding.texi +++ b/doc/misc/gnus-coding.texi @@ -7,7 +7,7 @@ @syncodeindex pg cp @copying -Copyright @copyright{} 2004-2005, 2007-2011 Free Software +Copyright @copyright{} 2004-2005, 2007-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 7bd3e4ac7fa..ae6373e9a6e 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -1,7 +1,7 @@ @c \input texinfo @c -*-texinfo-*- @c Uncomment 1st line before texing this file alone. @c %**start of header -@c Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. +@c Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. @c @setfilename gnus-faq.info @settitle Frequently Asked Questions diff --git a/doc/misc/gnus-news.el b/doc/misc/gnus-news.el index 485e7ce4646..0c083c85a4d 100644 --- a/doc/misc/gnus-news.el +++ b/doc/misc/gnus-news.el @@ -1,5 +1,5 @@ ;;; gnus-news.el --- a hack to create GNUS-NEWS from texinfo source -;; Copyright (C) 2004-2011 Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: Reiner Steib ;; Keywords: tools @@ -26,7 +26,7 @@ (defvar gnus-news-header-disclaimer "GNUS NEWS -- history of user-visible changes. -Copyright (C) 1999-2011 Free Software Foundation, Inc. +Copyright (C) 1999-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Gnus bug reports to bugs@gnus.org. diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi index 612ea14e2cf..5421e64625a 100644 --- a/doc/misc/gnus-news.texi +++ b/doc/misc/gnus-news.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- -@c Copyright (C) 2004-2011 Free Software Foundation, Inc. +@c Copyright (C) 2004-2012 Free Software Foundation, Inc. @c Permission is granted to anyone to make or distribute verbatim copies @c of this document as received, in any medium, provided that the diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 6523dc9528c..82f424e090c 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -11,7 +11,7 @@ @documentencoding ISO-8859-1 @copying -Copyright @copyright{} 1995-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1995-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index c7495d8cc93..5423ff2e74f 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -22,7 +22,7 @@ Emacs, and interacting with an IDL shell run as a subprocess. This is edition @value{EDITION} of the IDLWAVE User Manual for IDLWAVE @value{VERSION}. -Copyright @copyright{} 1999-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1999-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/info.texi b/doc/misc/info.texi index 68390a2f0cc..7ce874d2941 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi @@ -14,7 +14,7 @@ This file describes how to use Info, the on-line, menu-driven GNU documentation system. -Copyright @copyright{} 1989, 1992, 1996-2011 +Copyright @copyright{} 1989, 1992, 1996-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/mairix-el.texi b/doc/misc/mairix-el.texi index d64f316cb7b..468283ffd93 100644 --- a/doc/misc/mairix-el.texi +++ b/doc/misc/mairix-el.texi @@ -6,7 +6,7 @@ @documentencoding ISO-8859-1 @copying -Copyright @copyright{} 2008-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2008-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/makefile.w32-in b/doc/misc/makefile.w32-in index 0edaf3db3d6..6e4a65c292c 100644 --- a/doc/misc/makefile.w32-in +++ b/doc/misc/makefile.w32-in @@ -1,6 +1,6 @@ #### -*- Makefile -*- for documentation other than the Emacs manual. -# Copyright (C) 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 774bf180266..7ed5f6a92a5 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -10,7 +10,7 @@ @copying This file documents Message, the Emacs message composition mode. -Copyright @copyright{} 1996-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1996-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 4e63410f4a0..538c3f1ba82 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -24,7 +24,7 @@ This is version @value{VERSION}@value{EDITION} of @cite{The MH-E Manual}, last updated @value{UPDATED}. -Copyright @copyright{} 1995, 2001-2003, 2005-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1995, 2001-2003, 2005-2012 Free Software Foundation, Inc. @c This dual license has been agreed upon by the FSF. diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index 18e11aeeeb3..9b61e8f6f3a 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -13,7 +13,7 @@ This manual is for Newsticker (version @value{VERSION}, @value{UPDATED}). @noindent -Copyright @copyright{} 2004-2011 +Copyright @copyright{} 2004-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi index 0cb0a82a468..5141ed0e93d 100644 --- a/doc/misc/nxml-mode.texi +++ b/doc/misc/nxml-mode.texi @@ -8,7 +8,7 @@ This manual documents nxml-mode, an Emacs major mode for editing XML with RELAX NG support. -Copyright @copyright{} 2007-2011 +Copyright @copyright{} 2007-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 6d9a6566d9f..bc82e0ba7fe 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -265,7 +265,7 @@ @copying This manual is for Org version @value{VERSION}. -Copyright @copyright{} 2004-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2004-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index d4f82b6b3a7..32d2114f5a0 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -6,7 +6,7 @@ @c %**end of header @copying -Copyright @copyright{} 1991-2011 +Copyright @copyright{} 1991-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/pgg.texi b/doc/misc/pgg.texi index 0de12577b2d..5aa9b1eb230 100644 --- a/doc/misc/pgg.texi +++ b/doc/misc/pgg.texi @@ -11,7 +11,7 @@ This file describes PGG @value{VERSION}, an Emacs interface to various PGP implementations. -Copyright @copyright{} 2001, 2003-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2001, 2003-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 192afe33cb4..0174c3fa87f 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -5,7 +5,7 @@ @c %**end of header @copying -Copyright @copyright{} 2006-2011 +Copyright @copyright{} 2006-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index e7e794926b7..28d0e9cc80c 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -27,7 +27,7 @@ citations and indices for LaTeX documents with Emacs. This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for @b{Ref@TeX{}} @value{VERSION} -Copyright @copyright{} 1997-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1997-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi index e67d6155bbe..a04ba53443d 100644 --- a/doc/misc/remember.texi +++ b/doc/misc/remember.texi @@ -8,7 +8,7 @@ @copying This manual is for Remember Mode, version 1.9 -Copyright @copyright{} 2001, 2004-2005, 2007-2011 +Copyright @copyright{} 2001, 2004-2005, 2007-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/sasl.texi b/doc/misc/sasl.texi index a75b237519c..a31d9ca5e38 100644 --- a/doc/misc/sasl.texi +++ b/doc/misc/sasl.texi @@ -10,7 +10,7 @@ @copying This file describes the Emacs SASL library, version @value{VERSION}. -Copyright @copyright{} 2000, 2004-2011 +Copyright @copyright{} 2000, 2004-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi index 37ccc4045be..6874828d427 100644 --- a/doc/misc/sc.texi +++ b/doc/misc/sc.texi @@ -14,7 +14,7 @@ This document describes Supercite, an Emacs package for citing and attributing replies to mail and news messages. -Copyright @copyright{} 1993, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1993, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi index e1631bcacc8..1984d69a695 100644 --- a/doc/misc/sem-user.texi +++ b/doc/misc/sem-user.texi @@ -1,6 +1,6 @@ @c This file is included by semantic.texi -@c Copyright (C) 1999-2005, 2007, 2009-2011 Free Software Foundation, Inc. +@c Copyright (C) 1999-2005, 2007, 2009-2012 Free Software Foundation, Inc. @c Permission is granted to copy, distribute and/or modify this @c document under the terms of the GNU Free Documentation License, diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index 3d74ebf042c..ad8392c208b 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi @@ -24,7 +24,7 @@ @copying This manual documents the Semantic library and utilities. -Copyright @copyright{} 1999-2005, 2007, 2009-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1999-2005, 2007, 2009-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 8300e6511a6..8cd2ee813ec 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -11,7 +11,7 @@ @copying This file documents SES: the Simple Emacs Spreadsheet. -Copyright @copyright{} 2002-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2002-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/sieve.texi b/doc/misc/sieve.texi index 64fd92f40ca..d13f25c2a55 100644 --- a/doc/misc/sieve.texi +++ b/doc/misc/sieve.texi @@ -11,7 +11,7 @@ @copying This file documents the Emacs Sieve package, for server-side mail filtering. -Copyright @copyright{} 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/smtpmail.texi b/doc/misc/smtpmail.texi index 854be0d0012..af09783f445 100644 --- a/doc/misc/smtpmail.texi +++ b/doc/misc/smtpmail.texi @@ -3,7 +3,7 @@ @settitle Emacs SMTP Library @syncodeindex vr fn @copying -Copyright @copyright{} 2003-2011 +Copyright @copyright{} 2003-2012 Free Software Foundation, Inc. @quotation diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi index 9dc47e4574c..6604dc5f0d0 100644 --- a/doc/misc/speedbar.texi +++ b/doc/misc/speedbar.texi @@ -4,7 +4,7 @@ @syncodeindex fn cp @copying -Copyright @copyright{} 1999-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1999-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 1cea074fa2b..41ba6689f13 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -37,7 +37,7 @@ @end macro @copying -Copyright @copyright{} 1999-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1999-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 63dc78dc4e8..b4fb5f9aa6a 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -2,7 +2,7 @@ @c texi/trampver.texi. Generated from trampver.texi.in by configure. @c This is part of the Emacs manual. -@c Copyright (C) 2003-2011 Free Software Foundation, Inc. +@c Copyright (C) 2003-2012 Free Software Foundation, Inc. @c See file doclicense.texi for copying conditions. @c In the Tramp CVS, the version number is auto-frobbed from diff --git a/doc/misc/url.texi b/doc/misc/url.texi index 42594457ab1..6464fba53b4 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -20,7 +20,7 @@ @copying This file documents the Emacs Lisp URL loading package. -Copyright @copyright{} 1993-1999, 2002, 2004-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1993-1999, 2002, 2004-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi index 03ca65882e5..4b4bbfe5091 100644 --- a/doc/misc/vip.texi +++ b/doc/misc/vip.texi @@ -3,7 +3,7 @@ @settitle VIP @copying -Copyright @copyright{} 1987, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1987, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 1f0dffee5b4..a660cfb6b9d 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -7,7 +7,7 @@ @setfilename ../../info/viper @copying -Copyright @copyright{} 1995-1997, 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 1995-1997, 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index a778f491e76..24fe3e63ac9 100644 --- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi @@ -8,7 +8,7 @@ @c %**end of header @copying -Copyright @copyright{} 2000-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2000-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index c869d1a46c7..1ad741d3d30 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -18,7 +18,7 @@ This file documents WoMan: A program to browse Unix manual pages `W.O. (without) man'. -Copyright @copyright{} 2001-2011 Free Software Foundation, Inc. +Copyright @copyright{} 2001-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document diff --git a/etc/CONTRIBUTE b/etc/CONTRIBUTE index 990335a3f77..06b9a9e45a5 100644 --- a/etc/CONTRIBUTE +++ b/etc/CONTRIBUTE @@ -1,4 +1,4 @@ -Copyright (C) 2006-2011 Free Software Foundation, Inc. +Copyright (C) 2006-2012 Free Software Foundation, Inc. See end for license conditions. diff --git a/etc/ChangeLog b/etc/ChangeLog index dc3249e5e30..2fa4aee8363 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -5570,7 +5570,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1993-1999, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/etc/DEBUG b/etc/DEBUG index 625a76ac952..20bdd6cdbdc 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -1,6 +1,6 @@ Debugging GNU Emacs -Copyright (C) 1985, 2000-2011 Free Software Foundation, Inc. +Copyright (C) 1985, 2000-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/DISTRIB b/etc/DISTRIB index cc121105073..7a724c97a95 100644 --- a/etc/DISTRIB +++ b/etc/DISTRIB @@ -1,7 +1,7 @@ -*- text -*- GNU Emacs availability information -Copyright (C) 1986-1993, 1995, 1998, 2000-2011 Free Software Foundation, Inc. +Copyright (C) 1986-1993, 1995, 1998, 2000-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index 14d2a22e9f9..68b4e7e8168 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -1,6 +1,6 @@ ERC NEWS -*- outline -*- -Copyright (C) 2006-2011 Free Software Foundation, Inc. +Copyright (C) 2006-2012 Free Software Foundation, Inc. See the end of the file for license conditions. * Changes in ERC 5.3 diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF index 333465b7a41..2b4857b747a 100644 --- a/etc/ETAGS.EBNF +++ b/etc/ETAGS.EBNF @@ -94,7 +94,7 @@ those. ===================== end of discussion of tag names ===================== -Copyright (C) 2002-2011 Free Software Foundation, Inc. +Copyright (C) 2002-2012 Free Software Foundation, Inc. COPYING PERMISSIONS: diff --git a/etc/ETAGS.README b/etc/ETAGS.README index fd9636c9734..39045719b1c 100644 --- a/etc/ETAGS.README +++ b/etc/ETAGS.README @@ -28,7 +28,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2011 +Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2012 Free Software Foundation, Inc. This file is not considered part of GNU Emacs. diff --git a/etc/GNU b/etc/GNU index 97ad4aa9d4b..45f36465da5 100644 --- a/etc/GNU +++ b/etc/GNU @@ -1,4 +1,4 @@ -Copyright (C) 1985, 1993, 2001-2011 Free Software Foundation, Inc. +Copyright (C) 1985, 1993, 2001-2012 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document, in any medium, provided that the copyright notice and diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index 3192a58ce90..086e44f2bba 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS @@ -1,6 +1,6 @@ GNUS NEWS -- history of user-visible changes. -Copyright (C) 1999-2011 Free Software Foundation, Inc. +Copyright (C) 1999-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Gnus bug reports to bugs@gnus.org. diff --git a/etc/HELLO b/etc/HELLO index d330bc8625c..d95f010aa6e 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -72,7 +72,7 @@ Korean ($(CGQ1[(B) $(C>H3gGO<H3gGO=J4O1n(B -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/etc/MACHINES b/etc/MACHINES index 1e68376b94a..695bc092e9e 100644 --- a/etc/MACHINES +++ b/etc/MACHINES @@ -1,6 +1,6 @@ Emacs machines list -Copyright (C) 1989-1990, 1992-1993, 1998, 2001-2011 +Copyright (C) 1989-1990, 1992-1993, 1998, 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/MAILINGLISTS b/etc/MAILINGLISTS index 98f10511835..33e4ff03657 100644 --- a/etc/MAILINGLISTS +++ b/etc/MAILINGLISTS @@ -318,7 +318,7 @@ mode: outline fill-column: 72 End: -Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. +Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this file, to deal in the file without restriction, including diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 8b96d08c17a..aca5781fe35 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -1,6 +1,6 @@ * COPYRIGHT -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. * Changes in MH-E 8.3.1 diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF index d876b6df504..84a34d24585 100644 --- a/etc/MORE.STUFF +++ b/etc/MORE.STUFF @@ -1,6 +1,6 @@ More Neat Stuff for your Emacs -Copyright (C) 1993, 1999, 2001-2011 Free Software Foundation, Inc. +Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. This file describes GNU Emacs programs and resources that are diff --git a/etc/NEWS b/etc/NEWS index a767aed2735..2676c544c2f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. -Copyright (C) 2010-2011 Free Software Foundation, Inc. +Copyright (C) 2010-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Emacs bug reports to bug-gnu-emacs@gnu.org. diff --git a/etc/NEWS.1-17 b/etc/NEWS.1-17 index 8b861cca875..7f568ffc1ce 100644 --- a/etc/NEWS.1-17 +++ b/etc/NEWS.1-17 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. 26-Mar-1986 -Copyright (C) 1985-1986, 2006-2011 Free Software Foundation, Inc. +Copyright (C) 1985-1986, 2006-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/NEWS.18 b/etc/NEWS.18 index 820103e3110..92454af1013 100644 --- a/etc/NEWS.18 +++ b/etc/NEWS.18 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. 17-Aug-1988 -Copyright (C) 1988, 2006-2011 Free Software Foundation, Inc. +Copyright (C) 1988, 2006-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/NEWS.19 b/etc/NEWS.19 index bfed2112a3a..54e49484c10 100644 --- a/etc/NEWS.19 +++ b/etc/NEWS.19 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. 1992. -Copyright (C) 1993-1995, 2001, 2006-2011 Free Software Foundation, Inc. +Copyright (C) 1993-1995, 2001, 2006-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/NEWS.20 b/etc/NEWS.20 index 332eec60535..7a76bdd38a9 100644 --- a/etc/NEWS.20 +++ b/etc/NEWS.20 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. 2006-05-31 -Copyright (C) 1999-2001, 2006-2011 Free Software Foundation, Inc. +Copyright (C) 1999-2001, 2006-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/NEWS.21 b/etc/NEWS.21 index 60392b384fe..6d50b687fae 100644 --- a/etc/NEWS.21 +++ b/etc/NEWS.21 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. 2006-05-31 -Copyright (C) 2000-2011 Free Software Foundation, Inc. +Copyright (C) 2000-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/NEWS.22 b/etc/NEWS.22 index 5cb7955006f..6dd12a7a34f 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Emacs bug reports to bug-gnu-emacs@gnu.org. diff --git a/etc/NEWS.23 b/etc/NEWS.23 index b9570ee9e29..f9dbfa8adef 100644 --- a/etc/NEWS.23 +++ b/etc/NEWS.23 @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. -Copyright (C) 2007-2011 Free Software Foundation, Inc. +Copyright (C) 2007-2012 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Emacs bug reports to bug-gnu-emacs@gnu.org. diff --git a/etc/NEXTSTEP b/etc/NEXTSTEP index 4aa1dca93f2..6ea431fe982 100644 --- a/etc/NEXTSTEP +++ b/etc/NEXTSTEP @@ -1,4 +1,4 @@ -Copyright (C) 2008-2011 Free Software Foundation, Inc. +Copyright (C) 2008-2012 Free Software Foundation, Inc. See the end of the file for license conditions. This file contains information about GNU Emacs on "Nextstep" platforms. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 57a3387ee40..78cb24b427d 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1,6 +1,6 @@ Known Problems with GNU Emacs -Copyright (C) 1987-1989, 1993-1999, 2001-2011 +Copyright (C) 1987-1989, 1993-1999, 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/README b/etc/README index d1cad4a3a0f..613306b397c 100644 --- a/etc/README +++ b/etc/README @@ -9,5 +9,5 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES File: emacs.icon Author: Sun Microsystems, Inc - Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING) diff --git a/etc/TERMS b/etc/TERMS index e361188247b..03c5cfeaba1 100644 --- a/etc/TERMS +++ b/etc/TERMS @@ -1,4 +1,4 @@ -Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. +Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. See the end of the file for copying permissions. This file describes what you must or might want to do to termcap entries diff --git a/etc/TODO b/etc/TODO index c58fd6dda78..411581673e3 100644 --- a/etc/TODO +++ b/etc/TODO @@ -1,6 +1,6 @@ Emacs TODO List -*-outline-*- -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/etc/charsets/README b/etc/charsets/README index cd009220c3b..10791b31971 100644 --- a/etc/charsets/README +++ b/etc/charsets/README @@ -1,8 +1,9 @@ # README file for charset mapping files in this directory. + +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 # National Institute of Advanced Industrial Science and Technology (AIST) # Registration Number H13PRO009 -# Copyright (C) 2003-2011 Free Software Foundation, Inc. # This file is part of GNU Emacs. diff --git a/etc/compilation.txt b/etc/compilation.txt index eeb09b1712c..269f8d23e6b 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -570,7 +570,7 @@ Compilation segmentation fault at Thu Jul 13 10:55:49 Compilation finished at Thu Jul 21 15:02:15 -Copyright (C) 2004-2011 Free Software Foundation, Inc. +Copyright (C) 2004-2012 Free Software Foundation, Inc. COPYING PERMISSIONS: diff --git a/etc/edt-user.el b/etc/edt-user.el index 84e6f8ca1b8..3a7a707eeda 100644 --- a/etc/edt-user.el +++ b/etc/edt-user.el @@ -1,6 +1,6 @@ ;;; edt-user.el --- Sample user customizations for Emacs EDT emulation -;; Copyright (C) 1986, 1992-1993, 2000-2011 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992-1993, 2000-2012 Free Software Foundation, Inc. ;; Author: Kevin Gallagher ;; Maintainer: Kevin Gallagher diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb index d4eecc9f8ef..2bd2fa23794 100644 --- a/etc/emacs-buffer.gdb +++ b/etc/emacs-buffer.gdb @@ -1,6 +1,6 @@ # emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps -# Copyright (C) 2005-2011 Free Software Foundation, Inc. +# Copyright (C) 2005-2012 Free Software Foundation, Inc. # Maintainer: Noah Friedman # Created: 2005-04-28 diff --git a/etc/emacs2.py b/etc/emacs2.py index 805024cca3d..ed99a3a1409 100644 --- a/etc/emacs2.py +++ b/etc/emacs2.py @@ -1,6 +1,6 @@ """Definitions used by commands sent to inferior Python in python.el.""" -# Copyright (C) 2004-2011 Free Software Foundation, Inc. +# Copyright (C) 2004-2012 Free Software Foundation, Inc. # Author: Dave Love # This file is part of GNU Emacs. diff --git a/etc/emacs3.py b/etc/emacs3.py index 470547b1877..f0e4659bb6b 100644 --- a/etc/emacs3.py +++ b/etc/emacs3.py @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2011 Free Software Foundation, Inc. +# Copyright (C) 2004-2012 Free Software Foundation, Inc. # Author: Dave Love # This file is part of GNU Emacs. diff --git a/etc/enriched.doc b/etc/enriched.doc index 5b2e1a88f24..78459de8090 100644 --- a/etc/enriched.doc +++ b/etc/enriched.doc @@ -256,7 +256,7 @@ bug reports are welcome. -Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. +Copyright (C) 1995, 1997, 2001-2012 Free Software Foundation, Inc. COPYING PERMISSIONS: diff --git a/etc/gnus-tut.txt b/etc/gnus-tut.txt index 9132ece533e..60594f0eb0a 100644 --- a/etc/gnus-tut.txt +++ b/etc/gnus-tut.txt @@ -24,7 +24,7 @@ was done by moi, yours truly, your humble servant, Lars Magne Ingebrigtsen. If you have a WWW browser, you can investigate to your heart's delight at . -;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news diff --git a/etc/grep.txt b/etc/grep.txt index 01ffa9f3ef8..e9fea92e304 100644 --- a/etc/grep.txt +++ b/etc/grep.txt @@ -84,7 +84,7 @@ grep -nH -e "xyzxyz" ../info/* -Copyright (C) 2005-2011 Free Software Foundation, Inc. +Copyright (C) 2005-2012 Free Software Foundation, Inc. COPYING PERMISSIONS: diff --git a/etc/images/README b/etc/images/README index ae2d0556ad2..a9a8d10be7e 100644 --- a/etc/images/README +++ b/etc/images/README @@ -23,19 +23,19 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES File: mh-logo.xpm Author: Satyaki Das - Copyright (C) 2003-2011 Free Software Foundation, Inc. + Copyright (C) 2003-2012 Free Software Foundation, Inc. Files: splash.pbm, splash.xpm, gnus.pbm Author: Luis Fernandes - Copyright (C) 2001-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. Files: splash.png, splash.svg Author: Francesc Rocher - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Files: checked.xpm, unchecked.xpm Author: Chong Yidong - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 Free Software Foundation, Inc. * The following icons are from GTK+ 2.x. They are not part of Emacs, but diff --git a/etc/images/checked.xpm b/etc/images/checked.xpm index 959e77d7050..9dc29171250 100644 --- a/etc/images/checked.xpm +++ b/etc/images/checked.xpm @@ -1,5 +1,5 @@ /* XPM */ -/* Copyright (C) 2010-2011 Free Software Foundation, Inc. +/* Copyright (C) 2010-2012 Free Software Foundation, Inc. * * Author: Chong Yidong * diff --git a/etc/images/custom/README b/etc/images/custom/README index ad37dc1a7ac..831fb8c6316 100644 --- a/etc/images/custom/README +++ b/etc/images/custom/README @@ -6,5 +6,5 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES Files: down.xpm down-pushed.xpm right.xpm right-pushed.xpm Author: Juri Linkov -Copyright (C) 2008-2011 Free Software Foundation, Inc. +Copyright (C) 2008-2012 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING) diff --git a/etc/images/ezimage/README b/etc/images/ezimage/README index 38d49f3bb64..cf6291208a9 100644 --- a/etc/images/ezimage/README +++ b/etc/images/ezimage/README @@ -7,5 +7,5 @@ Files: bits.xpm bitsbang.xpm box-minus.xpm box-plus.xpm tag-gt.xpm tag-minus.xpm tag-plus.xpm tag-type.xpm tag-v.xpm tag.xpm unlock.xpm Author: Eric M. Ludlam -Copyright (C) 1999-2011 Free Software Foundation, Inc. +Copyright (C) 1999-2012 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING) diff --git a/etc/images/gnus/README b/etc/images/gnus/README index b19ad3fedcb..824ca05ee2b 100644 --- a/etc/images/gnus/README +++ b/etc/images/gnus/README @@ -7,7 +7,7 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES Files: important.xpm, unimportant.xpm Author: Simon Josefsson -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. Files: catchup.pbm catchup.xpm cu-exit.pbm cu-exit.xpm describe-group.pbm describe-group.xpm exit-gnus.pbm exit-gnus.xpm @@ -21,11 +21,11 @@ Files: catchup.pbm catchup.xpm cu-exit.pbm cu-exit.xpm unsubscribe.pbm unsubscribe.xpm uu-decode.pbm uu-decode.xpm uu-post.pbm uu-post.xpm Author: Luis Fernandes -Copyright (C) 2001-2011 Free Software Foundation, Inc. +Copyright (C) 2001-2012 Free Software Foundation, Inc. Files: gnus.png, gnus.svg Author: Francesc Rocher - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. * The following icons are from GNOME 2.x. They are not part of Emacs, diff --git a/etc/images/gnus/gnus.svg b/etc/images/gnus/gnus.svg index aad6560a004..9c8e57a3f75 100644 --- a/etc/images/gnus/gnus.svg +++ b/etc/images/gnus/gnus.svg @@ -1,7 +1,7 @@