This fix is for Gnus. Problem reported by Katsumi Yamaoka.
* calendar/time-date.el (time-add, time-subtract, time-less-p):
Use eval-and-compile, not eval-when-compile.
This is needed for Gnus, which copies time-date.el and which
runs on older Emacs implementations.
* calendar/time-date.el (with-decoded-time-value):
Handle 'nil' and floating-point arg more compatibly with new Emacs.
(encode-time-value, with-decoded-time-value):
Obsolete only if new Emacs.
(time-add, time-subtract, time-less-p): Define if not new Emacs.
This implements a suggestion made in:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00587.html
Among other things, this means timer.el no longer needs to
autoload the time-date module.
* doc/lispref/os.texi (Time of Day, Time Conversion, Time Parsing)
(Processor Run Time, Time Calculations):
Document the new behavior, plus be clearer about the old behavior.
(Idle Timers): Take advantage of new functionality.
* etc/NEWS: Document the changes.
* lisp/allout-widgets.el (allout-elapsed-time-seconds): Doc fix.
* lisp/arc-mode.el (archive-ar-summarize):
* lisp/calendar/time-date.el (seconds-to-time, days-to-time, time-since):
* lisp/emacs-lisp/timer.el (timer-relative-time, timer-event-handler)
(run-at-time, with-timeout-suspend, with-timeout-unsuspend):
* lisp/net/tramp.el (tramp-time-less-p, tramp-time-subtract):
* lisp/proced.el (proced-time-lessp):
* lisp/timezone.el (timezone-time-from-absolute):
* lisp/type-break.el (type-break-schedule, type-break-time-sum):
Simplify by using new functionality.
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
Do not return time values in obsolete and undocumented (HI . LO)
format; use (HI LO) instead.
* lisp/calendar/time-date.el (with-decoded-time-value):
Treat 'nil' as current time. This is mostly for XEmacs.
(encode-time-value, with-decoded-time-value): Obsolete.
(time-add, time-subtract, time-less-p): Use no-op autoloads, for
XEmacs. Define only if XEmacs, as they're now C builtins in Emacs.
* lisp/ldefs-boot.el: Update to match new time-date.el
* lisp/proced.el: Do not require time-date.
* src/editfns.c (invalid_time): New function.
Use it instead of 'error ("Invalid time specification")'.
(time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
(decode_float_time, lisp_to_timespec, lisp_time_struct):
New functions.
(make_time_tail, make_time): Remove. All uses changed to use
new functions or plain list4i.
(disassemble_lisp_time): Return effective length if successful.
Check that LOW is an integer, if it's combined with other components.
(decode_time_components): Decode into struct lisp_time, not
struct timespec, so that we can support a wide set of times
regardless of whether time_t is signed. Decode plain numbers
as seconds since the Epoch, and nil as the current time.
(lisp_time_argument, lisp_seconds_argument, Ffloat_time):
Reimplement in terms of new functions.
(Fencode_time): Just use list2i.
(syms_of_editfns): Add time-add, time-subtract, time-less-p.
* src/keyboard.c (decode_timer): Don't allow the new formats (floating
point or nil) in timers.
* src/systime.h (LO_TIME_BITS): New constant. Use it everywhere in
place of the magic number '16'.
(struct lisp_time): New type.
(decode_time_components): Use it.
(lisp_to_timespec): New decl.
* doc/misc/org.texi (Dynamic blocks):
* lisp/allout-widgets.el (allout-widgets-hook-error-handler):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/icalendar.el (icalendar--convert-float-to-ical):
* lisp/calendar/timeclock.el (timeclock-in, timeclock-when-to-leave)
(timeclock-last-period, timeclock-day-base):
* lisp/eshell/em-ls.el (eshell-ls-file):
* lisp/eshell/esh-util.el (eshell-parse-ange-ls):
* lisp/generic-x.el (named-database-print-serial):
* lisp/net/newst-backend.el (newsticker--get-news-by-url-callback)
(newsticker-get-news, newsticker--sentinel-work)
(newsticker--image-get, newsticker--image-sentinel):
* lisp/net/tramp-sh.el (tramp-get-remote-touch):
* lisp/progmodes/opascal.el (opascal-debug-log):
* lisp/textmodes/remember.el (remember-mail-date)
(remember-store-in-files):
* lisp/vc/vc-annotate.el (vc-annotate-display-autoscale)
(vc-default-annotate-current-time):
* lisp/vc/vc-bzr.el (vc-bzr-shelve-snapshot):
* lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time):
* lisp/vc/vc-rcs.el (vc-rcs-annotate-current-time):
* lisp/url/url-util.el (url-get-normalized-date):
* lisp/erc/erc-backend.el (TOPIC):
* lisp/gnus/gnus-delay.el (gnus-delay-article):
* lisp/gnus/gnus-sum.el (gnus-summary-read-document):
* lisp/gnus/gnus-util.el (gnus-seconds-today, gnus-seconds-month):
* lisp/gnus/message.el (message-make-expires-date):
* lisp/org/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling):
* lisp/org/org-clock.el (org-resolve-clocks, org-clock-get-sum-start)
(org-clock-special-range):
* lisp/org/org-timer.el (org-timer-seconds):
* lisp/org/org.el (org-read-date-analyze, org-get-cursor-date):
* lisp/org/ox-html.el (org-html-format-spec):
* lisp/org/ox-icalendar.el (org-icalendar--vtodo):
Omit unnecessary call to current-time.
* lisp/calendar/time-date.el (time-to-seconds) [!float-time]:
* lisp/calendar/timeclock.el (timeclock-time-to-date):
* lisp/vc/vc-annotate.el (vc-annotate-convert-time):
Use current time if arg is nil, to be compatible with float-time.
(time-date--day-in-year): New function, with most of the guts of
the old time-to-day-in-year.
(time-to-day-in-year): Use it.
(time-to-days): Use it, to avoid decoding the same time stamp twice.
* lisp/calendar/timeclock.el (timeclock-update-mode-line):
* lisp/cedet/srecode/args.el (srecode-semantic-handle-:time):
* lisp/gnus/gnus-util.el (gnus-seconds-year):
* lisp/org/org.el (org-get-cursor-date):
Don't call current-time twice to get the current time stamp,
as this can lead to inconsistent results.
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/erc/erc.el (erc-emacs-time-to-erc-time):
* lisp/ido.el (ido-time-stamp):
* lisp/vc/vc-annotate.el (vc-annotate-convert-time):
Simplify by using float-time.
* lisp/completion.el (save-completions-to-file):
* lisp/url/url-cache.el (url-cache-prune-cache):
Rename local var to avoid confusion.
* lisp/gnus/gnus-util.el (gnus-float-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Simplify to an alias because time-to-seconds now behaves like float-time
with respect to nil arg.
* lisp/subr.el (progress-reporter-do-update):
Don't call float-time unless needed.
* lisp/erc/erc.el (erc-current-time): Simplify by using erc-emacs-time-to-erc-time.
* lisp/org/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy
conversion from floating point to Emacs time and back.
(org-resolve-clocks): Prefer two-argument floor.
* lisp/calendar/parse-time.el (parse-time-rules):
Allow years up to most-positive-fixnum.
* lisp/calendar/time-date.el (date-to-time):
Pass "Specified time is not representable" errors through.
* lisp/url/url-cookie.el (url-cookie-expired-p): Treat out-of-range
expiration dates as if they were far in the future.
* src/editfns.c (decode_time_components): Store an invalid timespec
on overflow, instead of returning false, so that the caller can
distinguish overflow from other errors.
(lisp_time_argument, lisp_seconds_argument): If the time is out
of range, signal a time overflow instead of an invalid time spec.
* src/keyboard.c (decode_timer): Treat time overflow like other
timespec errors.
Fixes: debbugs:18176
* calendar/time-date.el: Commentary fix.
* net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change;
too much other code depends on (0 0) time stamps.
* net/tramp.el (tramp-time-less-p, tramp-time-subtract):
Add a couple of FIXME comments.
message.texi (Various Commands): Document format specs in the ellipsis.
time-date.el (format-seconds): Use assoc instead of assoc-string to avoid warning on XEmacs.
gnus-art.el: Require mouse, which the build bot seems to say is needed.
gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on XEmacs, since it doesn't have url-retrieve-synchronously.
time-date.el (format-seconds): Use assoc instead of assoc-string, since assoc-string doesn't exist in XEmacs.
gnus-group.el (gnus-group-list-ticked): New function.
(gnus-group-make-menu-bar): Provide a menu entry for it.
(gnus-group-list-map): Provide a binding for it.
shr.el (shr-visit-file): New command.
nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch.
nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable servers.
* lisp/gnus/gnus-util.el (with-no-warnings): Remove compat stub, now unused.
(gnus-float-time): On Emacs, always an alias.
* lisp/gnus/ecomplete.el (with-no-warnings): Remove compat stub, now unused.
(ecomplete-add-item): Use float-time on Emacs, else gnus-float-time.
* lisp/textmodes/remember.el (remember-time-to-seconds): Remove.
(remember-store-in-mailbox): Use float-time.
* lisp/calendar/timeclock.el (timeclock-time-to-seconds): Make it an alias.
* lisp/calendar/time-date.el (time-to-seconds): Always an alias on Emacs,
never a real function.
(with-no-warnings): Remove compat stub, now unused.
(time-less-p): Doc fix.
(time-to-number-of-days): Simplify.
mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist, mm-mime-charset): Comment fix.
rfc2047.el (rfc2047-syntax-table): Comment fix.
utf7.el (utf7-utf-16-coding-system): Comment fix.
nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load' rather than `insert-file-contents' and `eval-region'.
pgg.el (pgg-run-at-time-1): Define it for XEmacs only; fix if/else construction.
time-date.el: No need to require cl for Emacs 21.
gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to get the start of data.
gnus-html.el: Use gnus-html-encode-url to encode URL.
gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks outside the active range.
gnus.el: Try to keep the server/method cache unique.
gnus-html.el (gnus-html-rescale-image): Use window-inside-pixel-edges rather than window-pixel-edges.
gnus-html.el (gnus-html-put-image): Stop using markers.
gnus-html.el (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of data.
nnimap.el: Expunge IMAP groups by default on article deletion.
gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since this command might take a while.
nnimap.el (nnimap-request-list): Set the current nnimap group to nil, since EXAMINE changes it on the server.
nnmail.el, nnimap.el: Allow nnimap to just delete 'junk messages when splitting.
nnimap.el (nnimap-parse-flags): Make IMAP flags parsing much faster by using `read'.
nnimap.el (nnimap-make-process-buffer): Record the server name.
gnus-html.el (gnus-html-image-fetched): Only cache if gnus-html-image-automatic-caching is set.
gnus-html.el (gnus-html-image-fetched): Check for errors.
gnus-start.el (gnus-read-active-for-groups): Only run -request-scan once per method on `g'.
nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is immediate, then expire all articles.
gnus-group.el (gnus-group-get-icon): Compute icon to return.
gnus-group.el (gnus-group-icon-list): Fix bad docstring information.
nnimap.el (nnimap-update-info): Fix up various off-by-one errors when syncing flags in nnimap.
time-date.el (date-to-time): Speed up date-to-time.
gnus-start.el (gnus-get-unread-articles): Don't have `gnus-get-unread-articles-in-group' update info.
gnus-group.el: Remove gnus-group-highlight-line from the default hook list.
gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start.
gnus-group.el (gnus-group-insert-group-line): Pass the real group name so that it gets the right data.
gnus-int.el (gnus-open-server): Add tracing for performance debugging.
nnimap.el (nnimap-parse-flags): Parse the data in any order.
nnimap.el (nnimap-update-info): Fix up code slightly.
Expand define-obsolete-function-alias into defalias and make-obsolete
for old Emacsen that Gnus supports.
(with-no-warnings): Define it for old Emacsen.
(time-to-seconds): Don't use (featurep 'xemacs) to check if float-time
is available.
(time-to-number-of-days): Don't use (featurep 'xemacs) to check if
float-time is available; suppress compile warning for time-to-seconds.
2009-09-09 Teodor Zlatanov <tzz@lifelogs.com>
* net/imap.el (imap-message-map): Docstring fix.
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 59)
- Update from CVS
2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/calendar/time-date.el (time-to-seconds): Don't use the #xhhhh
syntax which Emacs 20 doesn't support.
(seconds-to-time, days-to-time, time-subtract, time-add): Ditto.
2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/mm-util.el (mm-coding-system-p): Don't return binary for the nil
argument in XEmacs.
* lisp/gnus/nnrss.el (nnrss-compatible-encoding-alist): New variable.
(nnrss-request-group): Decode group name first.
(nnrss-request-article): Make a text/plain article if mml-to-mime
failed.
(nnrss-get-encoding): Return a compatible encoding according to
nnrss-compatible-encoding-alist.
(nnrss-opml-export): Use dolist.
(nnrss-find-el): Use consp instead of listp.
(nnrss-order-hrefs): Use dolist.
2005-04-06 Arne J,Ax(Brgensen <arne@arnested.dk>
* lisp/gnus/nnrss.el (nnrss-verbose): Remove.
(nnrss-request-group): Use `nnheader-message' instead.
2005-04-06 Mark Plaksin <happy@usg.edu> (tiny change)
* lisp/gnus/nnrss.el (nnrss-verbose): New variable.
(nnrss-request-group): Make it say nnrss is requesting a group.
2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-agent.el (gnus-agent-group-path): Decode group name.
(gnus-agent-group-pathname): Ditto.
* lisp/gnus/gnus-cache.el (gnus-cache-file-name): Decode group name.
* lisp/gnus/gnus-group.el (gnus-group-line-format-alist): Use decoded group
name for only %g and %c.
(gnus-group-insert-group-line): Bind gnus-tmp-decoded-group
instead of gnus-tmp-group to decoded group name.
(gnus-group-make-group): Decode group name.
(gnus-group-delete-group): Ditto.
(gnus-group-make-rss-group): Exclude `/'s from group names;
register the group data after opening the nnrss group; unify
non-ASCII group names; encode group name.
(gnus-group-catchup-current): Decode group name.
(gnus-group-expire-articles-1): Ditto.
(gnus-group-set-current-level): Ditto.
(gnus-group-kill-group): Ditto.
* lisp/gnus/gnus-spec.el (gnus-update-format-specifications): Flush the
group format spec cache if it doesn't support decoded group names.
* lisp/gnus/mm-url.el (mm-url-predefined-programs): Add --silent arg to curl.
* lisp/gnus/nnrss.el: Require rfc2047 and mml.
(nnrss-file-coding-system): New variable.
(nnrss-format-string): Redefine it as an inline function.
(nnrss-decode-group-name): New function.
(nnrss-string-as-multibyte): Remove.
(nnrss-retrieve-headers): Decode group name; don't use
nnrss-format-string.
(nnrss-request-group): Decode group name.
(nnrss-request-article): Decode group name; allow a Message-ID as
well as an article number; don't use nnrss-format-string; encode a
Message-ID string which may contain non-ASCII characters; use
mml-to-mime to compose a MIME article; use search-forward instead
of re-search-forward.
(nnrss-request-expire-articles): Decode group name.
(nnrss-request-delete-group): Delete entries in nnrss-group-alist
as well; decode group name.
(nnrss-get-encoding): Fix regexp.
(nnrss-fetch): Clarify error message.
(nnrss-read-server-data): Use insert-file-contents instead of load;
bind file-name-coding-system; use multibyte buffer.
(nnrss-save-server-data): Insert newline; bind
coding-system-for-write to the value of nnrss-file-coding-system;
bind file-name-coding-system; add coding cookie.
(nnrss-read-group-data): Use insert-file-contents instead of load;
bind file-name-coding-system; use multibyte buffer.
(nnrss-save-group-data): Bind coding-system-for-write to the
value of nnrss-file-coding-system; bind file-name-coding-system.
(nnrss-decode-entities-string): Rename from n-d-e-unibyte-string;
make it work with non-ASCII text.
(nnrss-opml-export): Use mm-set-buffer-file-coding-system instead
of set-buffer-file-coding-system.
(nnrss-find-el): Check carefully whether there's a list of string
which old xml.el may return rather than a string; make it work
with old xml.el as well.
2005-04-06 Tsuyoshi AKIHO <akiho@kawachi.zaq.ne.jp>
* lisp/gnus/gnus-sum.el (gnus-summary-walk-group-buffer): Decode group name.
* lisp/gnus/nnrss.el (nnrss-get-encoding): New function.
(nnrss-fetch): Use unibyte buffer initially; bind
coding-system-for-read while performing mm-url-insert; remove ^Ms;
decode contents according to the encoding attribute.
(nnrss-save-group-data): Add coding cookie.
(nnrss-mime-encode-string): New function.
(nnrss-check-group): Use it to encode subject and author.
2005-04-06 Maciek Pasternacki <maciekp@japhy.fnord.org> (tiny change)
* lisp/gnus/nnrss.el (nnrss-fetch): Signal an error if w3-parse-buffer also
failed.
2005-04-06 Jesper Harder <harder@ifa.au.dk>
* lisp/gnus/mm-util.el (mm-subst-char-in-string): Support inplace.
* lisp/gnus/nnrss.el: Pedantic docstring and whitespace fixes (courtesy of
checkdoc.el).
(nnrss-request-article): Cleanup.
(nnrss-request-delete-group): Use nnrss-make-filename.
(nnrss-read-server-data): Use nnrss-make-filename; use load.
(nnrss-save-server-data): Use nnrss-make-filename; use gnus-prin1.
(nnrss-read-group-data): Fix off-by-one error. From Joakim Verona
<joakim@verona.se>; hash on description if link is missing; use
nnrss-make-filename; use load.
(nnrss-save-group-data): Use nnrss-make-filename; use gnus-prin1.
(nnrss-make-filename): New function.
(nnrss-close): New function.
(nnrss-check-group): Hash on description if link is missing.
(nnrss-get-namespace-prefix): Use string= to compare strings!
Reported by David D. Smith <davidsmith@acm.org>.
(nnrss-opml-export): Turn on sgml-mode.
2005-04-06 Mark A. Hershberger <mah@everybody.org>
* lisp/gnus/nnrss.el (nnrss-opml-import, nnrss-opml-export): New functions.
2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (RSS): Addition.