Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

7037 lines (5779 sloc) 300.877 kb
<
2015-02-01 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: twittering-mode.el: Fix docstrings.
2015-01-31 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix indentation and tabs in docstrings.
2015-01-31 Xavier Maillard <xavier@maillard.im>
* twittering-mode.el: Install customize as much as
possible. Change many docstrings. Try to silent (a bit) checkdoc
checker tool. Update credits/copyrights.
2015-01-31 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Update copyright.
2015-01-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Add new format specifiers "%FIELD" and
"%FIELD-IF-NONZERO" to render a field of tweet.
(twittering-status-format): update docstring.
(twittering-generate-formater-for-first-spec): add new format
specifiers "%FIELD[...]{...}" and "%FIELD-IF-NONZERO[...]{...}".
2015-01-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Move the footer line to the very end of the
file. The previous position were inconsistent with the conventions
of headers for Emacs libraries.
2014-12-31 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Extract media entities from a JSON object.
(twittering-extract-common-element-from-json): extract media
entities.
* twittering-mode.el: Hide tweets matched with one of filter
patterns. Filter patterns can be defined with the new variable
`twittering-filter-alist'.
(twittering-filter-alist): new variable for specifying filters.
(twittering-generate-composite-timeline): exclude tweets matched
with one of filter patterns.
(twittering-get-filter-list-for-timeline-spec-string): new
function that returns filter pattern list for the given timeline.
(twittering-get-filter-list-for-timeline-spec): likewise.
(twittering-match-pattern): new function that returns non-nil if
the given tweet matches with the given pattern.
(twittering-match-pattern-list): new function that returns non-nil
if the given tweet matches with one of the given patterns.
(twittering-current-timeline-data): exclude tweets matched with
one of filter patterns.
* twittering-mode.el: Add new commands `twittering-mute' and
`twittering-unmute'.
(twittering-call-api-with-account): add new APIs mute/unmute to
the docstring.
(twittering-call-api-with-account-in-api1.1): implement new APIs
mute/unmute.
(twittering-mute): new command.
(twittering-unmute): new command.
* twittering-mode.el: Add the CA certificates issued by Equifax as
embedded CA certificates. The added certificates are used for a
HTTPS connection for Google URL Shortener, `goo.gl'.
(twittering-ca-cert-list): update CA certificates.
* update-cert.sh: Retrieve CA certificates issued by Equifax in
addition to those issued by Verisign.
* twittering-mode.el: Update embedded CA certificates.
(twittering-ca-cert-list): update CA certificates.
* twittering-mode.el: The timeline spec string "@" is equivalent
to ":mentions" instead of ":replies". "@" has been interpreted as
a shorten string of ":mentions", but
`twittering-timeline-spec-to-string' returned ":mentions" as the
shorten version of ":mentions".
(twittering-timeline-spec-to-string): interpret the timeline spec
string "@" as ":mentions" instead of ":replies".
* test/test-twittering-mode.el: The tests for timeline spec
strings related to "@" and ":mentions" are modified.
2014-12-15 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Replace `sit-for' with `sleep-for' for
avoiding an infinite loop. On rare occasions, `sit-for' may return
immediately even when no input is available (See the document of
`input-pending-p'). Since Emacs does not update status of an
asynchronous process in those cases, a loop which uses `sit-for'
and waits for a finish of a process will wait infinitely. To avoid
the situation, invocations of `sit-for' are replaced with those of
`sleep-for'. Thanks to Ikumi Keita, who investigates the problem
and writes this patch.
(twittering-wait-while): use `sleep-for' instead of `sit-for'.
(twittering-oauth-get-token-alist-url): likewise.
2014-04-21 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Normalize text properties of a tweet with
the Normalization Form Canonical Composition (NFC) defined in
Unicode Standard Annex #15.
(twittering-normalize-string): new function.
(twittering-make-gap-list): takes account of the normalization of
a tweet text with NFC.
(twittering-extract-common-element-from-json): normalize a tweet
text with NFC.
(twittering-json-object-to-a-status-base): normalize a source,
name, location and description of a tweet with NFC.
2014-03-31 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Remove 'flet'.
(twittering-normalize-raw-status): replace 'flet' with a
combination of 'let' and 'lambda'.
* twittering-mode.el: Add marks and a script for updating CA
certificates automatically.
(twittering-ca-cert-list): add marks for updating CA certificates
automatically.
* update-cert.sh: Add a script to update CA certificates
automatically. This script retrieves certificates distributed on
the site of cURL.
* cert/*: Removed.
* twittering-mode.el: Update embedded CA certificates.
(twittering-ca-cert-list): update CA certificates.
* twittering-mode.el: Replace images that had been imported from
other softwares.
(twittering-ssl-indicator-image): replaced with an original
image.
(twittering-active-indicator-image): likewise.
(twittering-inactive-indicator-image): likewise.
2013-12-12 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Embed root CA certificates to follow the
update of the server. The all root CA certificate available at
https://www.symantec.com/page.jsp?id=roots are embedded.
(twittering-ca-cert-list): add root CA certificates.
* cert/collect.sh: Add a script to collect and integrate root CA
certificates.
2013-12-09 Tadashi MATSUO <tad@mymail.twin.jp>
* doc/web/index.text: Fix the URL for the mailing list.
* twittering-mode.el: Retrieve the most recent tweets for search
timelines instead of including popular tweets.
(twittering-call-api-with-account-in-api1.1): use `recent' as the
`result_type' of search API.
* twittering-mode.el: Include `retweet-count' and `favorite-count'
in an alist representing a tweet.
(twittering-extract-common-element-from-json): include
`retweet-count' and `favorite-count' in an alist representing a
tweet.
* twittering-mode.el: Fix a URL for a native retweet. It was
generated from a screen-name of the retweeting user and an ID of
the retweeted original tweet.
(twittering-get-status-url-from-alist): explicitly use the
retweeted original tweet when making a URL for a native retweet.
(twittering-push-uri-onto-kill-ring): simply send a tweet alist
itself to the function `twittering-get-status-url-from-alist'.
* twittering-mode.el: Post a native retweet of another native
retweet if a user requests it. Previously, twittering-mode posted
a native retweet of an original tweet that had been retweeted. The
behavior is changed so that notification to the earlier
retweeting user from Twitter works well. Twitter sends a
notification to a user when his or her retweet is retweeted by
other users.
(twittering-native-retweet): post a retweet of a native retweet
instead of posting a native retweet of the original tweet when a
user requests to post a native retweet of another native retweet.
* twittering-mode.el: Embed a root CA certificate with 2048 bits
key to follow the update of the server. The root CA certificate
`VeriSign Class 3 Public Primary CA - G3' is also embedded, which
is used for verifying the server `api.twitter.com'.
(twittering-ca-cert-list): add the certificate `VeriSign Class 3
Public Primary CA - G3'.
2013-12-09 tomykaira <tomykaira@gmail.com>
* twittering-mode.el: Fix arguments of `twittering-http-post'.
(twittering-call-api-with-account-in-api1.0): fix arguments of
`twittering-http-post'.
(twittering-call-api-with-account-in-api1.1): likewise.
2013-06-16 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the bug that retrieved tweets may not be
rendered. This bug is caused by the previous commit. Thanks to
irie who reported the problem.
(twittering-add-statuses-to-timeline-data): call
`twittering-render-timeline' correctly.
2013-06-15 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the bug that a hook may be invoked twice
for the same timeline. Thanks to irie who discoverd the problem.
(twittering-add-statuses-to-timeline-data): do not invoke a hook
twice for the timeline spec given as `spec'.
2013-05-07 Tadashi MATSUO <tad@mymail.twin.jp>
* LAST-VERSION, NEWS, NEWS.ja, VERSION, doc/web/index.text,
doc/web/ja.po, doc/web/publish.rb, doc/web/screenshot.text:
release 3.0.0.
2013-04-22 tomykaira <tomykaira@gmail.com>
* twittering-mode.el: Check effective length of tweet when posting
from minibuffer.
(twittering-update-status-from-minibuffer): check an effective
length of a tweet instead of a literal length.
2013-04-22 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Suppress an error on a sentinel. Previously,
an error might be raised from a sentinel when a timeline of
non-existent user was requested. A sentinel for such a request
tries to remove the timeline spec string corresponding to
non-existent user from the history. In the process, conversion
from an invalid timeline spec string had caused an error.
(twittering-string-to-timeline-spec): add an optional argument
NOERROR. If NOERROR is non-nil, the function does not raise an
error even if SPEC-STR is invalid as a timeline spec string.
(twittering-equal-string-as-timeline): do not raise an error even
if either SPEC-STR1 or SPEC-STR2 is invalid as a timeline spec
string.
* twittering-mode.el: Reduce API rate limit information on
mode-line.
(twittering-get-ratelimit-indicator-string): reduce timelines
retrieved by a common API.
2013-03-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Decode surrogate pairs in strings returned
by `json-read'. A new advice is added for decoding surrogate
pairs.
A character not in the Basic Multilingual Plane is
represented by a surrogate pair in JSON (RFC4627). This is similar
to CESU-8. But the function `json-read' in `json.el' does not
correctly decode surrogate pairs. `json-read' returns a string
including invalid code points from U+D800 to U+DFFF.
`twittering-json-read' now decodes them by using a new advice.
Thanks to multiSnow who reported the problem.
(twittering-surrogate-pair-regexp): new constant that matches a
surrogate pair in CESU-8.
(twittering-decode-surrogate-pairs-as-cesu-8): new function that
decodes surrogate pairs in a given string similarly to CESU-8.
(json-read-string): new advice for decoding surrogate pairs.
(twittering-json-read): use the new advice for decoding surrogate
pairs in strings returned by `json-read'.
* twittering-mode.el: Add `twittering-assoc-string' for
portability. In Emacs 21, the function `assoc-string' is not
defined. In such case, the reimplemented version is
used. Othewise, `twittering-assoc-string' is an alias of
`assoc-string'.
(twittering-assoc-string): new function for portability.
(twittering-get-server-info): replace `assoc-string' with
`twittering-assoc-string'.
* twittering-mode.el: Display rate-limit information for each API.
(twittering-api-limit-info-alist): new variable for storing
rate-limit information for each API.
(twittering-timeline-spec-to-api-table): new variable for storing
combination of timeline spec and an API for retrieving the
timeline.
(twittering-update-api-table): new function for registering a
timeline spec and an API with the new variable
`twittering-timeline-spec-to-api-table'.
(twittering-make-rate-limit-alist): new function.
(twittering-update-rate-limit-info): new function for updating the
new variables `twittering-api-limit-info-alist' and
`twittering-timeline-spec-to-api-table'.
(twittering-update-server-info): update rate-limit information
with new function.
(twittering-get-server-info): removed.
(twittering-get-ratelimit-alist): new function.
(twittering-get-ratelimit-remaining): use the new function
`twittering-get-ratelimit-alist'.
(twittering-get-ratelimit-limit): likewise.
(twittering-get-ratelimit-indicator-string): new function for
making an indicator string of rate-limit information.
(twittering-mode-line-buffer-identification): make an indicator
string of rate-limit information by the new function
`twittering-get-ratelimit-indicator-string'.
* twittering-mode.el: Replace `delete-dups' with
`twittering-remove-duplicates' for portability.
(twittering-update-active-buffers): replace `delete-dups' with
`twittering-remove-duplicates' for portability.
2013-03-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Bind a local variable correctly.
(twittering-call-api-with-account-in-api1.1): correctly bind the
variable `spec-string' used.
* twittering-mode.el: Fix the function parsing timelines related
to direct messages with the Twitter REST API v1.1.
(twittering-http-get-default-sentinel): call the function
`twittering-json-object-to-a-status-on-direct-messages' correctly
when using the Twitter REST API v1.1.
* twittering-mode.el: Correctly add an authentication header for
the command `get-service-configuration' with the Twitter REST API
v1.1.
(twittering-call-api-with-account-in-api1.1): fix a path for the
command `get-service-configuration' and add an authentication
header correctly.
* twittering-mode.el: Confirm that `json.el' and SSL are available
before calling the Twitter REST API v1.1.
(twittering-call-api-with-account): confirm that `json.el' and SSL
are available for the Twitter REST API v1.1.
2013-03-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use the JSON format for retrieving list
information if possible.
(twittering-http-get-list-sentinel-base): support a response in
the JSON format.
(twittering-call-api): use the JSON format for the commands
`get-list-index' and `get-list-subscriptions' if possible.
* twittering-mode.el: Use the JSON format for posting a status if
possible.
(twittering-http-post-destroy-status-sentinel): support a response
in the JSON format.
(twittering-call-api): use the JSON format for the command
`destroy-status' if possible.
* twittering-mode.el: Use the JSON format for retrieving server
configuration if possible.
(twittering-call-api): use the JSON format for the command
`get-service-configuration' if possible.
(twittering-update-service-configuration-sentinel): support a
response in the JSON format.
* twittering-mode.el: Sort newly retrieved tweets before rendering
them.
(twittering-add-statuses-to-timeline-data): sort added tweets
before rendering them. This is necessary because
`twittering-render-timeline' assumes that given tweets are
ordered.
* twittering-mode.el: Update the server information only when
receiving a response from a Twitter-like service. Other types of
responses such as image retrieval and URL shortening do not update
the info.
(twittering-send-http-request): do not invoke
`twittering-update-server-info' directly.
(twittering-http-get): modify the sentinel so that it also invokes
`twittering-update-server-info'.
(twittering-http-post): likewise.
(twittering-update-server-info): receive an alist HEADER-INFO
instead of a string HEADER-STR.
* twittering-mode.el: Add a new function
`twittering-call-api-with-account'.
(twittering-add-application-header-to-http-request): receive an
alist ACCOUNT-INFO for specifying an account.
(twittering-http-get): likewise.
(twittering-http-post): likewise.
(twittering-call-api): call the new function
`twittering-call-api-with-account' with the main account.
(twittering-call-api-with-account): new function. This requires an
account information alist which it calls an API with.
(twittering-get-main-account-info): new function.
(twittering-verify-credentials): use a return value of
`twittering-get-main-account-info' instead of using variables
directly.
(twittering-http-get-verify-credentials-sentinel): extract an
account information from the `account-info' element in
`connection-info'.
* twittering-mode.el: Add functions to make an authentication
string from an account-info alist.
(twittering-add-application-header-to-http-request): use new
functions for making an authentication string for a HTTP request.
(twittering-get-from-account-info): new function.
(twittering-make-basic-authentication-string): new function.
(twittering-make-oauth-authentication-string): new function.
(twittering-verify-credentials): rename `account-info-alist'
`account-info'.
(twittering-http-get-verify-credentials-sentinel): extract a
screen name and a password with the new function
`twittering-get-from-account-info'.
* twittering-mode.el: Access an account information indirectly.
(twittering-register-account-info): new function.
(twittering-get-username): use `twittering-get-main-account-info'
instead of using the variable `twittering-username' directly.
(twittering-get-password): likewise.
(twittering-verify-credentials): use the functions
`twittering-get-main-account-info' and
`twittering-register-account-info' instead of using variables
directly.
(twittering-http-get-verify-credentials-sentinel): store or
discard the validated account information with the new function
`twittering-register-account-info'.
* twittering-mode.el: Support the HTTP cookie.
(twittering-cookie-alist): new variable to store cookies for each
account.
(twittering-add-application-header-to-http-request): add a cookie
string if necessary.
(twittering-http-get): invoke `twittering-update-server-info' with
`connection-info' according to the modification of the function.
(twittering-http-post): likewise.
(twittering-update-server-info): receive an alist CONNECTION-INFO
as a new argument and update `twittering-cookie-alist'. The new
argument is required to store cookies for each account.
(twittering-extract-cookie): new function to extract cookies from
a HTTP response header as an alist.
(twittering-make-cookie-string): new function to make a cookie
string for a HTTP request from the cookie information stored in
the variable `twittering-cookie-alist'.
* twittering-mode.el: Separate the current core of
`twittering-call-api-with-account' as a new function
`twittering-call-api-with-account-in-api1.0'.
(twittering-call-api-with-account): call a new function
`twittering-call-api-with-account-in-api1.0' instead of processing
a command directly.
(twittering-call-api-with-account-in-api1.0): new function.
* twittering-mode.el: Support the Twitter REST API v1.1.
(twittering-service-method): change the default service method.
(twittering-service-method-table): add entries for the new service
method `twitter-api-v1.1'.
(twittering-http-get-default-sentinel): switch parser according to
the service method and the timeline.
(twittering-http-get-list-sentinel-base): support a response from
the Twitter REST API v1.1.
(twittering-update-server-info): replace a header name for the
Twitter REST API v1.1 with that for the Twitter REST API
v1.0. This is an ad-hoc solution. Since each API method is
separately limited on the Twitter REST API v1.1, the rate limit
information should be managed for each API method.
(twittering-call-api-with-account): call a special function
according to the current `twittering-service-method'.
(twittering-call-api-with-account-in-api1.0): new function that is
the same as the previous `twittering-call-api-with-account'.
(twittering-call-api-with-account-in-api1.1): new function.
(twittering-update-service-configuration): support the new service
method `twitter-api-v1.1'.
(twittering-use-profile-image-api): add a supplementary document.
(twittering-effective-length): support the new service method
`twitter-api-v1.1'.
* README.markdown: Add an explanation of prerequisites for the
Twitter REST API v1.1.
* twittering-mode.el: Move the cursor to the tweet that will be
retrieved.
(twittering-toggle-or-retrieve-replied-statuses): move the cursor
to the tweet that will be retrieved.
* twittering-mode.el: The timeline spec string "@" means the
mentions timeline instead of the replies timeline.
(twittering-extract-timeline-spec): interpret the timeline spec
string "@" as the mentions timeline instead of the replies
timeline.
* twittering-mode.el: Fix a typo that disables twittering-mode.el
from retrieving the ":retweets_of_me" timeline.
(twittering-call-api-with-account-in-api1.1): fix a typo.
* twittering-mode.el: Fix the function of rendering a replied
tweet.
(twittering-retrieve-single-tweet-sentinel): fix the condition
for deciding whether it should re-render a tweet partially or
not.
2013-02-11 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the jojo-mode that caused an error when
the condition of automatically posting a tweet was satisfied.
Thanks to the anonymous person who reported the problem.
(twittering-post-predicted-message-like-jojo): fix variable name.
* twittering-mode.el: Fix a return value of
`twittering-render-replied-statuses'. The function returns nil
without regard to whether a tweet is rendered or not. Thanks to
Ikumi Keita who reported the problem.
(twittering-render-replied-statuses): fix a return value.
* twittering-mode.el: Support different intervals of retrieving
timelines.
(twittering-relative-retrieval-interval-alist): new variable.
(twittering-relative-retrieval-count-alist): new variable.
(twittering-retrieve-timeline): reset the retrieval count.
(twittering-start): update all active timelines forcibly once.
(twittering-get-relative-interval): new function.
(twittering-get-retrieval-count): new function.
(twittering-set-retrieval-count): new function.
(twittering-initialize-retrieval-count): new function.
(twittering-update-active-buffers): reduce retrievals according to
the variable `twittering-relative-retrieval-interval-alist'.
2013-01-21 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Update the regexp for extracting an ID from
a tweet.
(twittering-extract-id-from-url): update the regexp for extracting
an ID from a tweet.
* twittering-mode.el: Avoid rendering same tweets repeatedly. The
function `twittering-render-timeline' rendered given repeated
tweets as is. Since a merged timeline may include one tweet
multiple times, such a tweet was rendered multiple times.
(twittering-render-timeline): skip repeated tweets.
2013-01-14 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix a bug of backward retrieval of
favorites timeline. The functions, `twittering-goto-next-status'
and `twittering-goto-previous-status', did nothing for favorites
timeline. They now treat favorites timeline as they treat other
timelines. Thanks to the anonymous person who reported the
problem.
(twittering-goto-next-status): Remove a special action for
favorites timeline.
(twittering-goto-previous-status): likewise.
* README.markdown: Add explanations of major configurations and
others.
2012-11-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Support the backward retrieval of favorites
timeline.
(twittering-call-api): send the parameter `max_id' for retrieving
favorites timeline if necessary.
* twittering-mode.el: Display how many tweets are added to each
buffer.
(twittering-http-get-default-sentinel): display how many tweets
are added to each buffer.
(twittering-add-statuses-to-timeline-data): return a list of pairs
of a timeline spec string and the number of addtional tweets.
(twittering-render-timeline): return a list of tweets newly
rendered.
* twittering-mode.el: Extract the format from the HTTP response
header.
(twittering-get-content-subtype-symbol-from-header-info): new
function for extracting the content subtype from a HTTP header.
(twittering-send-http-request): fix docstring.
(twittering-get-error-message): extract the format from the HTTP
response header instead of using `connection-info`.
(twittering-http-get-default-sentinel): likewise.
(twittering-retrieve-single-tweet-sentinel): likewise.
2012-09-17 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Request a compressed HTTP response when
using `curl'.
(twittering-send-http-request-curl): add the option `--compressed'
to the arguments for the program `curl'.
* twittering-mode.el: Do not call `force-mode-line-update' via the
unread status notifier. It had been invoked via a sentinel or
`post-command-hook'.
(twittering-set-number-of-unread): do not call the function
`force-mode-line-update'.
* twittering-mode.el: Add a new function
`twittering-retrieve-timeline'.
(twittering-retrieve-timeline): new function for retrieving and
rendering a timeline. This accepts any timeilne spec string
including that for composite timeline, though
`twittering-call-api' accepts only a primary timeline. Also, the
new function can be invoked with more detailed retrieval options
than the existing function `twittering-get-and-render-timeline'.
(twittering-get-and-render-timeline): reimplemented with the new
function `twittering-retrieve-timeline'.
* twittering-mode.el: Add a new command
`twittering-get-tweets-before' to get tweets before a
specific time.
(twittering-parse-time-string): new function.
(twittering-time-to-id): new function.
(twittering-get-tweets-within-specific-time-range): new function.
(twittering-get-tweets-before): new function.
* twittering-mode.el: Display how many tweets are retrieved.
(twittering-http-get-default-sentinel): display how many tweets
are retrieved. This may includes some tweets that has been already
retrieved as an other timeline.
2012-07-22 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Clear list of undo entries on a pop-up edit
buffer.
(twittering-update-status-from-pop-up-buffer): clear list of undo
entries.
* twittering-mode.el: Fix the bug that retweets may not be
rendered in a composite timeline.
(twittering-render-timeline): render a retweet if the first ID
referring the retweet is unknown. This is necessary because a
referring ID table of a composite timeline may lack information of
some component timelines.
* twittering-mode.el: `twittering-id-to-time' restores the
milli-second parameter.
(twittering-id-to-time): restore the milli-second parameter.
* twittering-mode.el: Fix the bug that
`twittering-render-replied-statuses' may ignore the argument
`pos'.
(twittering-render-replied-statuses): correctly consider the
argument `pos'.
* twittering-mode.el: Fix the bug that a single tweet timeline
consisting of a retweet causes an error. A single tweet timeline
is registered to `twittering-timeline-data-table' in a special
way (See `twittering-retrieve-single-tweet-sentinel'). However,
`twittering-current-timeline-referring-id-table' did not take it
into account.
(twittering-current-timeline-referring-id-table): return the
correct hash table for a single tweet timeline.
2012-05-06 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Add some timeline specs to the definition of
timeline spec strings.
* twittering-mode.el: Remove routines for the filter timeline.
(twittering-timeline-spec-to-string): remove routines for the
filter timeline.
(twittering-extract-timeline-spec): likewise.
(twittering-timeline-spec-primary-p): remove the mention to the
filter timeline from the docstring.
* test/test-twittering-mode.el: remove tests for the filter
timeline.
* twittering-mode.el: Fix the docstring of `twittering-call-api'.
(twittering-call-api): fix the docstring for the command
`retrieve-single-tweet'.
* twittering-mode.el: Support a `single tweet' timeline, which
consists of a tweet specified by its ID.
(twittering-retrieve-single-tweet-sentinel): support the retrieval
via `twittering-call-api' with the command `retrieve-timeline'.
(twittering-timeline-spec-to-string): support a `single tweet'
timeline spec.
(twittering-extract-timeline-spec): likewise.
(twittering-timeline-spec-primary-p): likewise.
(twittering-current-timeline-data): likewise.
(twittering-call-api): invoke the `retrieve-single-tweet' command
if the `retrieve-timeline' command is specified with a single
tweet timeline spec.
* test/test-twittering-mode.el: Add a test for a `single tweet'
timeline spec.
* README.markdown: Add an explanation for a `single tweet'
timeline spec.
* twittering-mode.el: Add the expanded uri to the url string as a
property if possible.
(twittering-make-fontified-tweet-text-with-entity): add the
expanded-uri property to the url string.
* twittering-mode.el: Visit a single tweet timeline via a URL of a
tweet.
(twittering-extract-id-from-url): new function.
(twittering-other-user-timeline): visit a single tweet timeline if
the cursor points to a URL of a tweet.
2012-04-02 Tadashi MATSUO <tad@mymail.twin.jp>
* README.markdown: Fix the order of tags.
2012-04-01 Tadashi MATSUO <tad@mymail.twin.jp>
* README.markdown: Fix the explanation of the key binding 'd'.
* README.markdown: Add an explanation how to post an
official/native retweet.
* README.markdown: Add basic key bindings to the 'Quick start'
section.
* twittering-mode.el: Bind "C-cC-w" to
`twittering-delete-status'. The binding is a future replacement
for "C-cD", which violates the Emacs Key Binding Conventions.
(twittering-mode-map): bind "C-cC-w" to the function
`twittering-delete-status'.
* README.markdown: Fix the documents related to "C-cD".
* twittering-mode.el: Add a new variable
`twittering-pop-to-buffer-function' to specify how to open a
window for an edit buffer. Previously, a window for an edit buffer
was opened by invoking the function `pop-to-buffer' with
specifying non-nil as the argument NORECORD. This was an ad-hoc
solution of the problem that an edit buffer was assigned on a
different window for each time. However, with the solution, a
window for an edit buffer might be hidden by opening another
window because the window for an edit buffer was not recorded in
the list of recently selected windows. To avoid the behavior, new
functions open a window with a fixed rule and record a new window
in the list.
(twittering-pop-to-buffer-function): new variable.
(twittering-pop-to-buffer): new function, which just invokes the
function specified by `twittering-pop-to-buffer-function'.
(twittering-pop-to-buffer-simple): new function for the new
variable `twittering-pop-to-buffer-function'.
(twittering-pop-to-buffer-in-current-window): likewise.
(twittering-pop-to-buffer-in-largest-window): likewise.
(twittering-pop-to-buffer-in-bottom-largest-window): likewise.
(twittering-update-status-from-pop-up-buffer): use
`twittering-pop-to-buffer' instead of invoking `pop-to-buffer'
directly.
2012-03-27 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the filename of the footer line.
* twittering-mode.el: Fix the calculation of length of a tweet
including a URL.
(twittering-effective-length): always use the length retrieved by
'help/configuration' API. The function previously used the minimum
of the length by the API and the original length. This causes
failure in posting a tweet because the t.co URL wrapper
automatically wraps all links as of October 10, 2011.
* README.markdown: Fix a typo.
* README.markdown: Update the document.
* twittering-mode.el: Ensure that a pop-up edit buffer is
initially marked as unmodified.
(twittering-update-status-from-pop-up-buffer): mark the pop-up
edit buffer as unmodified. Since the help is rendered as a
read-only text, the buffer must be marked as unmodified
explicitly.
2012-03-17 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the condition of confirmation on posting
a tweet. The variable `twittering-request-confirmation-on-posting'
had been ignored on posting a reply. Thanks to Takashi Masuda who
reported the problem.
(twittering-edit-post-status): fix the condition of confirmation
on posting a tweet.
* twittering-mode.el: Support error messages formatted as JSON.
(twittering-get-error-message): receive a new argument
CONNECTION-INFO and support error messages sent as JSON.
(twittering-http-get-default-sentinel): send CONNECTION-INFO to
the function `twittering-get-error-message'.
(twittering-http-get-list-sentinel-base): likewise.
(twittering-http-post-default-sentinel): likewise.
(twittering-http-post-destroy-status-sentinel): likewise.
* twittering-mode.el: Parse a HTTP response body whose status code
is 401 or 404.
(twittering-get-error-message): try to parse a HTTP respose body
whose status code is 401 or 404.
* twittering-mode.el: Display an error message from the
'help/configuration' API.
(twittering-update-service-configuration-sentinel): display an
error message in a HTTP response body.
* twittering-mode.el: Record HTTP response headers on debug mode.
(twittering-get-response-header): record the extracted HTTP
response header if `twittering-debug-mode' is non-nil.
* twittering-mode.el: Remove the function
`twittering-make-field-properties'. It is unnecessary because
`twittering-render-a-field' automatically add a field property.
(twittering-get-common-properties): update the docstring.
(twittering-make-field-properties): removed.
(twittering-make-field-properties-of-popped-ancestors): removed.
(twittering-make-properties-of-popped-ancestors): new function.
(twittering-show-replied-statuses): use
`twittering-make-properties-of-popped-ancestors' instead of
`twittering-make-field-properties-of-popped-ancestors'.
* twittering-mode.el: Add a new function
`twittering-make-field-id-from-id' which generates a field ID from
a tweet ID instead of a tweet alist.
(twittering-make-field-id-from-id): new function.
(twittering-make-field-id): reimplemented with the new function
`twittering-make-field-id-from-id'.
* twittering-mode.el: Add a new command `retrieve-single-tweet'
to the function `twittering-call-api'.
(twittering-retrieve-single-tweet-sentinel): new function.
(twittering-call-api): add `retrieve-single-tweet' as a new
command.
(twittering-make-alist-of-forbidden-tweet): new function, which
generates a dummy alist for a forbidden tweet.
(twittering-make-alist-of-non-existent-tweet): new function, which
generates a dummy alist for a non-existent tweet.
* twittering-mode.el: Add functions for finding a region of
replied statuses with the common base status.
(twittering-replied-statuses-visible-p): add a docstring.
(twittering-get-beginning-of-visible-replied-statuses): new
function, which returns the beginning position of replied statuses
rendered by `twittering-show-replied-statuses'.
(twittering-get-end-of-visible-replied-statuses): new function,
which returns the end position of replied statuses rendered by
`twittering-show-replied-statuses'.
(twittering-hide-replied-statuses): determine a region being
deleted by using the new functions.
* twittering-mode.el: Fix the behavior of the function
`twittering-replied-statuses-visible-p' on a header or a footer.
(twittering-replied-statuses-visible-p): return nil on a header or
a footer.
* twittering-mode.el: Add a new function
`twittering-render-replied-statuses'.
(twittering-render-replied-statuses): new function, which renders
replied statuses even if some replied statuses have been already
rendered.
(twittering-show-replied-statuses): reimplemented with the new
function `twittering-render-replied-statuses'.
* twittering-mode.el: `twittering-redisplay-status-on-each-buffer'
supports various symbols as a specifier of regions to be
redisplayed.
(twittering-redisplay-status-on-each-buffer): support other
symbols besides `need-to-be-updated' as a specifier of regions to
be redisplayed.
* twittering-mode.el: Support iterative retrieval of a series of
replies.
(twittering-retrieve-single-tweet-sentinel): redisplay some
regions related to the retrieved status.
(twittering-render-a-tweet-with-delay): new function.
(twittering-toggle-or-retrieve-replied-statuses): new function.
(twittering-mode-map): bind "R" to the new function
`twittering-toggle-or-retrieve-replied-statuses'.
* twittering-mode.el: Add a new function `twittering-id-to-time'
that extracts a corresponding time from an ID generated by
Snowflake.
(twittering-snowflake-epoch-time): new function.
(twittering-id-to-time): new function.
* twittering-mode.el: Use the time extracted from ID for forbidden
or non-existent tweets.
(twittering-make-alist-of-forbidden-tweet): use the time extracted
from ID.
(twittering-make-alist-of-non-existent-tweet): likewise.
* twittering-mode.el: Update the docstring of the variable
`twittering-initial-timeline-spec-string'.
(twittering-initial-timeline-spec-string): update the docstring.
2012-03-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the escape of a query string in a search
timeline spec.
(twittering-timeline-spec-to-string): correctly escape a query of
a search timeline spec.
(twittering-extract-timeline-spec): correctly decode a query
string with escaped characters.
* test/test-twittering-mode.el: Add tests for search timeline
specs.
* twittering-mode.el: Support ":exclude-re/REGEXP/SPEC"
timelines.
(twittering-timeline-spec-to-string): support the new timeline
spec ":exclude-re/REGEXP/SPEC".
(twittering-extract-timeline-spec): likewise.
(twittering-timeline-spec-composite-p): likewise.
(twittering-get-base-timeline-specs): likewise.
(twittering-generate-composite-timeline): likewise.
(twittering-current-timeline-referring-id-table): likewise.
(twittering-current-timeline-data): likewise.
* test/test-twittering-mode.el: Add tests for exclude-re timeline
specs.
2012-02-28 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the function
`twittering-current-timeline-referring-id-table'. There was the
possibility that the function returns nil for a composite timeline
spec. This made native retweets disappear on the composite
timeline. Thanks to Boots_of_Lead who reported the bug.
(twittering-current-timeline-referring-id-table): for a composite
timeline spec, return the table of the first primary base spec
with a non-nil referring table. This function previously returned
the first direct base timeline spec, which might be nil.
* twittering-mode.el: Add an explanation to the docstring of
`twittering-new-tweets-rendered-hook'.
(twittering-new-tweets-rendered-hook): add an explanation to the
docstring.
* twittering-mode.el: Reimplement jojo-mode as a hook.
(twittering-add-statuses-to-timeline-data): remove statements for
jojo-mode.
(twittering-initialize-global-variables-if-necessary): add
`twittering-jojo-mode-hook-function' to the new tweets rendered
hook.
(twittering-jojo-mode-p): removed.
(twittering-update-jojo): removed.
(twittering-post-predicted-message-like-jojo): new function.
(twittering-jojo-mode-hook-function): new function.
* twittering-mode.el: Display the replied tweet on the pop-up
edit buffer.
(twittering-edit-set-help-string): new function.
(twittering-edit-setup-help): add a new argument REPLY-TO-ID.
(twittering-update-status-from-pop-up-buffer): send REPLY-TO-ID to
the function `twittering-edit-setup-help'.
* twittering-mode.el: Generate a description of a edited tweet by
`twittering-generate-format-status-function'.
(twittering-edit-set-help-string): do not add a text property to
STR.
(twittering-edit-setup-help): generate a description by
`twittering-generate-format-status-function'.
* twittering-mode.el: Render a help on a pop-up edit buffer as a
read-only text. The replied tweet can be copied on the edit
buffer. Rendering a help as a read-only text also suppresses
strange behavior of overlays exceeding the size of the current
window.
(twittering-help-overlay): removed.
(twittering-help-overlay-priority): removed.
(twittering-edit-help-end-pos): new variable.
(twittering-edit-mode): remove the parent mode to suppress
invocation of hooks for `text-mode'. The trick for disabling
font-lock mode is introduced. `twittering-edit-help-end-pos' is
prepared as a buffer-local variable.
(twittering-edit-extract-status): determine the region being
extracted with `twittering-edit-help-end-pos'.
(twittering-edit-reset-status): new function.
(twittering-edit-set-help-string): render a help for
`twittering-edit-mdoe' as a read-only text.
(twittering-update-status-from-pop-up-buffer): move the cursor
just behind the help.
(twittering-edit-next-history): extract the edited message by
`twittering-edit-extract-status' and reset it by
`twittering-edit-reset-status'.
(twittering-edit-previous-history): likewise.
* twittering-mode.el: Dynamically determine an end position of a
help on a pop-up edit buffer.
(twittering-edit-help-end-pos): removed.
(twittering-edit-mode): remove the variable
`twittering-edit-help-end-pos'.
(twittering-edit-get-help-end): new function, which replaces the
buffer-local variable `twittering-edit-help-end-pos'.
(twittering-edit-extract-status): use the function
`twittering-edit-get-help-end' instead of the variable
`twittering-edit-help-end-pos'.
(twittering-edit-reset-status): likewise.
(twittering-edit-set-help-string): likewise.
(twittering-update-status-from-pop-up-buffer): likewise.
* twittering-mode.el: Control an attribute of a tweet being edited
with an alist bound to `twittering-edit-mode-info'.
(twittering-reply-recipient): removed.
(twittering-edit-mode-info): new variable, which is an alist
specifying the attribute of the tweet being edited.
(twittering-update-status-from-pop-up-buffer): control the
attribute of the tweet being edited with the new variable
`twittering-edit-mode-info'.
(twittering-edit-post-status): determine the attribute of the
tweet being posted by the variable `twittering-edit-mode-info'.
* twittering-mode.el: Allow a reply where a mention is not placed
on the beginning.
(twittering-edit-post-status): allow a reply where a mention is
not placed on the beginning.
(twittering-update-status-from-minibuffer): likewise.
* twittering-mode.el: Send the cited ID to the function
`twittering-update-status' when editing an organic retweet.
(twittering-edit-skeleton-alist): mention that IN-REPLY-TO is
non-nil when a tweet is edited as an organic retweet.
(twittering-update-status-from-minibuffer): post a tweet as a
reply only if TWEET-TYPE is the symbol `reply'.
(twittering-update-status): mention that REPLY-TO-ID is non-nil
when a tweet cites or replies to a certain tweet.
(twittering-organic-retweet): send the ID of the cited tweet to
`twittering-update-status' as REPLY-TO-ID.
* twittering-mode.el: Generate a help on an edit buffer from the
buffer-local variable `twittering-edit-mode-info'.
(twittering-edit-setup-help): generate a help from the
buffer-local variable `twittering-edit-mode-info'.
(twittering-update-status-from-pop-up-buffer): remove obsolete
arguments from the invocation of `twittering-edit-setup-help'.
* twittering-mode.el: Enable to toggle a reply and a normal tweet
on an edit buffer.
(twittering-edit-mode-map): bind "C-c C-r" to
`twittering-edit-toggle-reply'.
(twittering-edit-setup-help): display a help for
`twittering-edit-toggle-reply'.
(twittering-edit-toggle-reply): new function, which toggles
whether the tweet being edited will be sent as a reply or not.
* twittering-mode.el: Confirm that the edited message should be
sent as a normal tweet when it has been edited as a reply but it
does not include a mention to the cited user.
(twittering-edit-post-status): confirm that the edited message
should be sent as a normal tweet when it has been edited as a
reply but it does not include a mention to the cited user.
* twittering-mode.el: Support a new format specifier "%u" for
`twittering-retweet-format'. It is replaced with the URL of the
cited tweet.
(twittering-retweet-format): update the docstring.
(twittering-get-status-url-from-alist): new function.
(twittering-organic-retweet): support a new format specifier
"%u".
2012-02-12 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Accept a symbol as FUNC of a composite
timeline spec ":exclude-if/FUNC/SPEC".
(twittering-extract-timeline-spec): accept a symbol as FUNC of
a composite timeline spec ":exclude-if/FUNC/SPEC".
* test/test-twittering-mode.el: Add a test of an exclude-if
timeline spec with a symbol as FUNC.
* twittering-mode.el: Give the help overlay a priority specified
by `twittering-help-overlay-priority'.
(twittering-help-overlay-priority): new variable.
(twittering-edit-setup-help): give the overlay a priority
specified by `twittering-help-overlay-priority'.
2012-02-11 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use an after-string property instead of
a before-string property to show the help on an edit buffer.
Thanks to irie who discoverd the problem and wrote a suitable
code.
(twittering-edit-setup-help): set an after-string property of the
overlay for the help and give high priority to the overlay.
* twittering-mode.el: Remove duplicates in a merge timeline spec.
(twittering-extract-timeline-spec): remove duplicates in a list of
timeline specs in a merge timeline spec.
* test/test-twittering-mode.el: Add a test of reducing duplicates
in a merge timeline spec.
* twittering-mode.el: Remove duplicates in the list of primary
base timeline specs.
(twittering-get-primary-base-timeline-specs): remove duplicates in
the list of primary base timeline specs.
* test/test-twittering-mode.el: Add a test of dependence of
composite timeline specs.
* twittering-mode.el: Fix the behavior of the function
`twittering-get-current-status-head' for the position following
the header. Thanks to lemit who reported the problem.
The previous one made `twittering-replied-statuses-visible-p'
return an incorrect value on the position following the header.
(twittering-get-current-status-head): fix the behavior when POS
points to the beginning of a field and also points to the end of
another field. The function previously returned the head of the
previous field.
* twittering-mode.el: Fix the behavior of `twittering-get-id-at'
on the head of the footer.
(twittering-get-id-at): use `twittering-get-current-status-head'
instead of `twittering-get-previous-status-head'. On the head of
the footer, the former returns the head of the footer and the
latter returns the head of the status followed by the footer.
2012-02-06 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Delete a specified status from composite
timeline buffers.
(twittering-get-dependent-timeline-specs): new function.
(twittering-delete-status-from-data-table): delete the given
status from buffers bound to composite timelines.
* twittering-mode.el: Decode a HTTP response body before invoking
a sentinel.
(twittering-decode-response-body): new function.
(twittering-send-http-request): decode the response body by
`twittering-decode-response-body' before invoking the sentinel.
(twittering-http-get-default-sentinel): do not decode the response
body here.
* twittering-mode.el: Delete a status after the successful
response for the `destroy-status' API is received.
(twittering-http-post-destroy-status-sentinel): new function.
(twittering-call-api): use the new function
`twittering-http-post-destroy-status-sentinel' as the sentinel of
`twittering-http-post' for the command `destroy-status'.
(twittering-delete-status): do not delete the specified status
here.
* twittering-mode.el: `twittering-render-a-field' moves the
cursor even if the given status is not rendered.
(twittering-render-a-field): move the cursor even if the given
status is not rendered.
* twittering-mode.el: Do not use the return value of the function
`twittering-render-a-field'.
(twittering-render-timeline): do not use the return value of
`twittering-render-a-field'.
(twittering-show-replied-statuses): likewise.
* twittering-mode.el: `twittering-render-a-field' returns nil if
the status is not rendered.
(twittering-render-a-field): return nil if the status is not
rendered.
(twittering-render-timeline): show replied statuses only if the
status is rendered.
* twittering-mode.el: Add a docstring for
`twittering-render-timeline'.
(twittering-render-timeline): add a docstring.
* twittering-mode.el: Add `twittering-rerender-timeline-all' that
re-renders tweets after clearing the buffer.
(twittering-render-timeline): modify arguments.
(twittering-rerender-timeline-all): new function.
(twittering-get-managed-buffer): replace the invocation of the
function `twittering-render-timeline' with that of the function
`twittering-rerender-timeline-all'.
(twittering-icon-mode): likewise.
(twittering-toggle-reverse-mode): likewise.
(twittering-erase-old-statuses): likewise.
* twittering-mode.el: Add a new hook
`twittering-new-tweets-rendered-hook'.
(twittering-rendered-new-tweets-spec): new variable.
(twittering-rendered-new-tweets-spec-string): new variable.
(twittering-rendered-new-tweets): new variable.
(twittering-new-tweets-rendered-hook): new hook.
(twittering-http-get-default-sentinel): call
`twittering-render-timeline' with non-nil INVOKE-HOOK.
(twittering-add-statuses-to-timeline-data): likewise.
(twittering-render-timeline): add a new argument INVOKE-HOOK.
(twittering-rerender-timeline-all): call
`twittering-render-timeline' with nil INVOKE-HOOK.
* twittering-mode.el: Unread status notifier uses the new hook
invoked when rendering tweets. This corrects the number of unread
statuses on composite timelines.
(twittering-update-unread-status-info): modified for use in
`twittering-new-tweets-rendered-hook'.
(twittering-enable-unread-status-notifier): use
`twittering-new-tweets-rendered-hook' instead of
`twittering-new-tweets-hook'.
* twittering-mode.el: Add a new hook `twittering-mode-init-hook'.
The new hook is invoked after initializing global variables.
(twittering-mode-init-hook): new hook invoked after initializing
global variables.
(twittering-mode-hook): add a docstring.
(twittering-initialize-global-variables-if-necessary): invoke
hooks specified by `twittering-mode-init-hook'.
2012-01-29 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Follow the header conventions. Thanks to
Jonas Bernoulli who reported the nonfulfillment.
* twittering-mode.el: Expand a path before calling the function
`alpaca-after-find-file'.
(twittering-read-from-encrypted-file): expand FILE into a full
path. Since "alpaca.el" uses the `buffer-file-name' as the prefix
of the temporary file, it must be a full path.
* twittering-mode.el: Add a new argument of the function
`twittering-render-a-field' for rendering a tweet without a
separator.
(twittering-render-a-field): add a new argument for rendering a
tweet without a separator.
* twittering-mode.el: Render the header and footer line.
(twittering-make-field-id-of-timeline-oldest-end): new function.
(twittering-make-field-id-of-timeline-latest-end): new function.
(twittering-field-id-is-timeline-oldest-end): new function.
(twittering-field-id-is-timeline-latest-end): new function.
(twittering-render-timeline): render the header and footer on
rendering the whole of the buffer. In that case, the function now
moves the cursor to the normal field not to the header nor
footer.
(twittering-mode-map): bind "G" to `twittering-goto-last-status'
instead of `end-of-buffer'.
(twittering-enter): update the timeline when the function is
invoked on the header or footer.
(twittering-goto-last-status): new function.
(twittering-get-last-status-head): new function.
(twittering-goto-first-normal-field): new function.
(twittering-goto-last-normal-field): new function.
(twittering-get-first-normal-field-head): new function.
(twittering-get-last-normal-field-head): new function.
(twittering-goto-next-status): move the cursor to the normal field
before instruction for updating the timeline.
(twittering-goto-previous-status): likewise.
* twittering-mode.el: Add variables for customizing the header and
footer.
(twittering-timeline-header-face): new variable.
(twittering-timeline-footer-face): new variable.
(twittering-timeline-header): new variable.
(twittering-timeline-footer): new variable.
(twittering-render-timeline): render the header and footer
according to the customization variables.
(twittering-initialize-global-variables-if-necessary): initialize
the faces for the header and footer.
* twittering-mode.el: The current version of twittering-mode
always behaves as the previous version does on scroll-mode. The
variable `twittering-scroll-mode' is obsolete.
(twittering-scroll-mode): removed.
(twittering-mode-line-buffer-identification): ignore the obsolete
variable `twittering-scroll-mode'.
(twittering-render-timeline): remove expressions for restoring
positions on non-scroll-mode.
(twittering-mode-map): do not bind "s" to the function
`twittering-scroll-mode'.
(twittering-mode-setup): do not call `make-local-variable' for the
variable `twittering-scroll-mode'.
* test/test-twittering-mode.el: Remove tests related to the
scroll-mode.
* twittering-mode.el: Remove invalid timeline specs from the
history after the failure of the retrieval.
(twittering-http-get-default-sentinel): remove the specified
timeline spec string from the history after it becomes clear that
the spec is invalid.
(twittering-remove-timeline-spec-string-from-history): new
function.
(twittering-get-managed-buffer): add the requested timeline spec
string to the history. It may be removed from the history after if
it is invalid.
* twittering-mode.el: Support ":exclude-if/FUNC/SPEC" timelines.
(twittering-http-get-default-sentinel): remove timeline spec
strings depending the invalid spec.
(twittering-timeline-spec-to-string): support the new timeline
spec ":exclude-if/FUNC/SPEC".
(twittering-extract-timeline-spec): likewise.
(twittering-timeline-spec-composite-p): new function.
(twittering-timeline-spec-depending-on-p): new function.
(twittering-get-base-timeline-specs): new function.
(twittering-get-primary-base-timeline-specs): new function.
(twittering-generate-composite-timeline): new function.
(twittering-current-timeline-referring-id-table): support the new
timeline spec ":exclude-if/FUNC/SPEC".
(twittering-current-timeline-data): likewise.
(twittering-add-statuses-to-timeline-data): update composite
timelines that depend on the primary timeline.
(twittering-get-and-render-timeline): add new arguments SPEC and
SPEC-STRING to retrieve timelines that have no buffers but
constitute some composite timelines.
* test/test-twittering-mode.el: Add tests for the timeline spec
":exclude-if/FUNC/SPEC".
* twittering-mode.el: Support merge timelines.
(twittering-timeline-spec-composite-p): support the merge timeline
spec.
(twittering-get-base-timeline-specs): likewise.
(twittering-generate-composite-timeline): likewise.
(twittering-current-timeline-referring-id-table): likewise.
(twittering-current-timeline-data): likewise.
2012-01-14 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Do not record the edit buffer in the list of
recently selected ones. Thanks to tdkn who reported the behavior
related to the list.
(twittering-update-status-from-pop-up-buffer): do not put the
buffer at the front of the list of recently selected ones.
* twittering-mode.el: Add a field property to a tweet on the
function `twittering-render-a-field'.
(twittering-make-common-properties): Do not add a field property.
(twittering-render-a-field): add a field property.
2012-01-08 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Explicitly signal an error when
twittering-mode fails to retrieve a request token.
(twittering-oauth-get-access-token): signal an error when
twittering-mode fails to retrieve a request token.
* test/test-twittering-mode.el: Add a test for parsing JSON with a
character unsupported by Emacs.
* test/test-twittering-mode.el: Add a test for parsing XML with a
character unsupported by Emacs.
* twittering-mode.el: Confirm that a file is readable before
decrypting it.
(twittering-read-from-encrypted-file): confirm that FILE is
readable.
* twittering-mode.el: Expand a path before invoking the function
`epg-decrypt-file'.
(twittering-read-from-encrypted-file): expand FILE before invoking
`epg-decrypt-file'.
2011-12-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Retrieve an ID of a tweet replied by a
tweet on a search timeline. You can display replied tweets on a
search timeline if they have been retrieved. This is available
only when tweets are retrieved as the JSON format.
(twittering-json-object-to-a-status-on-search): extract the
"in_reply_to_status_id_str" field, which Twitter begins to serve
recently.
* twittering-mode.el: Replace `json-read' with
`twittering-json-read' in order to prevent abnormal exit caused by
decoding an unknown code point. Thanks to lemit who reported the
problem.
(twittering-http-get-default-sentinel): use `twittering-json-read'
instead of `json-read'.
(twittering-json-read): new function.
2011-12-07 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Rearrange some codes for interpreting a JSON
object.
(twittering-json-object-to-a-status-base): rearrange codes for
interpreting a JSON object.
* twittering-mode.el: Fix the interpretation of JSON objects for
direct messages. Thanks to Alexis who reported the problem.
(twittering-http-get-default-sentinel): use
`twittering-json-object-to-a-status-on-direct-messages' for
timelines related to direct messages.
(twittering-json-object-to-a-status-on-direct-messages): new
function.
2011-11-26 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the strange behavior on moving the
cursor according to logical lines. Thanks to lemit who reported
the problem.
(twittering-mode-setup): bind `inhibit-field-text-motion' to
non-nil as a buffer-local variable. If it is nil, the field
property attached tweets interferes with the cursor motion based
on logical lines.
* twittering-mode.el: Store the tweet parameters, `truncated' and
`user-protected', as boolean parameters.
(twittering-normalize-raw-status): store the `truncated' and
`user-protected' parameters as boolean parameters.
(twittering-generate-format-table): use the `truncated' and
`user-protected' parameters as boolean.
(twittering-organic-retweet): likewise.
* test/test-twittering-mode.el: Update tests to follow the change
of internal representation of a tweet.
* test/fixture/timeline-data.el: Update data to follow the change
of internal representation of a tweet.
* twittering-mode.el: Store the tweet parameter `created-at' as
Emacs internal time representation. This avoids parsing a time
string whenever a tweet is re-rendered.
(twittering-atom-xmltree-to-status-datum): store `created-at' as
Emacs internal time representation.
(twittering-normalize-raw-status): likewise.
(twittering-created-at-to-seconds): removed.
(twittering-generate-format-table): use the parameters
`created-at' as Emacs internal time representation.
(twittering-generate-formater-for-first-spec): likewise.
* test/test-twittering-mode.el: Update tests to follow the change
of internal representation of a tweet.
* test/fixture/timeline-data.el: Update data to follow the change
of internal representation of a tweet.
* twittering-mode.el: `twittering-call-api' receives `sentinel' as
an argument for the command `retrieve-timeline'.
(twittering-call-api): receive `sentinel' as an argument for
the command `retrieve-timeline'.
* twittering-mode.el: `twittering-call-api' receives `format' as
an argument for the command `retrieve-timeline'.
(twittering-http-get-default-sentinel): refer to `format' in
`connection-info' for parsing the retrieved content.
(twittering-call-api): receive `format' as an argument for the
command `retrieve-timeline'. The `format' is automatically added
to the last of `additional-info' for `twittering-http-get'.
* twittering-mode.el: Support retrieval of tweets as the JSON
format.
(twittering-http-get-default-sentinel): support the JSON format.
(twittering-extract-common-element-from-json): new function.
(twittering-json-object-to-a-status): new function.
(twittering-json-object-to-a-status-base): new function.
(twittering-json-object-to-a-status-on-search): new function.
* twittering-mode.el: Retrieve tweets as the JSON format if
possible.
(twittering-get-and-render-timeline): retrieve tweets as the JSON
format if possible.
* twittering-mode.el: Render a link wrapped by the t.co service as
the original URL on a search timeline if possible. This requires
`json.el'.
(twittering-call-api): retrieve a search timeline with entities.
2011-11-13 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the bug that unconditionally adds
`emacs21' and `url-emacs21' into `load-path' on byte-compilation.
On byte-compilation, the directories `emacs21' and `url-emacs21',
which are included in the repository of twittering-mode, were
unconditionally added into `load-path'. Due to this bug, some
macros were embedded as obsolete definitions for Emacs21 in the
result of byte-compilation. Some functions in the result cause
errors on Emacs 22 or later because the obsolete definitions
conflict with Emacs newer than 21. On Emacs 22 or later, the
directories are no longer added to `load-path' on
byte-compilation.
Thanks to HKey who has discovered the bug.
2011-10-30 Tadashi MATSUO <tad@mymail.twin.jp>
* test/test-twittering-mode.el: Remove obsolete tests of the
obsolete feature related to `twittering-sign-string-function' and
`twittering-sign-simple-string'.
(test-sign-string): removed.
* twittering-mode.el: A tweet has a greater field ID than that of
its ancestor tweets. The order of field IDs matches with the order
in which tweets should be rendered.
(twittering-make-field-id): attach a greater field ID to normal
tweets than its ancestor tweets.
* twittering-mode.el: Use a common macro for rendering a status.
(twittering-render-a-field): new macro for rendering a status.
(twittering-render-timeline): use `twittering-render-a-field'.
(twittering-show-replied-statuses): use
`twittering-render-a-field'.
* twittering-mode.el: Accept list names including non-ASCII
characters.
(twittering-extract-timeline-spec): accept list names including
non-ASCII characters.
* test/test-twittering-mode.el (timeline-spec): add a test for a
list name including non-ASCII characters.
2011-10-23 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Keep the private information unless the
server explicitly informs that it is invalid.
(twittering-verify-credentials): display the reason of
authorization failure.
(twittering-http-get-verify-credentials-sentinel): keep the
private information for authorization unless the server returns
401(Unauthorized) as the HTTP response status code.
2011-10-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Bind `default-directory' to the temporary
directory to avoid problems caused by executing programs on
a removed directory. Thanks to tomykaira who reported the problem.
(twittering-send-http-request-internal): locally bind the variable
`default-directory' to the temporary directory in order to prevent
Emacs from executing an external program in the invalid condition
where `default-directory' points to a directory which has been
already removed.
(twittering-start-http-session-curl-https-p): likewise.
(twittering-sha1): likewise.
(twittering-read-from-encrypted-file): likewise.
(twittering-write-and-encrypt): likewise.
(twittering-convert-image-data): likewise.
(twittering-save-icon-properties): likewise.
(twittering-load-icon-properties): likewise.
(twittering-initialize-global-variables-if-necessary): likewise.
2011-10-07 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the argument of the function
`twittering-read-username-with-completion'. Thanks to Akira
Tamamori who reported a problem caused by the bug.
(twittering-read-timeline-spec-with-completion): fix the argument
of the function `twittering-read-username-with-completion'.
* twittering-mode.el: Search the content-type header from a HTTP
response in a case-insensitive way according to RFC2616. Thanks to
luozengbin who reported the bug.
(twittering-http-get-default-sentinel): fix the check of the
content-type header of a HTTP response. The content-type is now
searched in a case-insensitive way according to RFC2616.
* twittering-mode.el: Add new functions related to preparation for
invoking APIs.
(twittering-add-application-header-to-http-request): confirm the
existence of OAuth token.
(twittering-api-invocation-is-ready-p): new function for checking
whether prerequisites for invoking APIs have been prepared without
side effects. Strictly speaking, this function may have a side
effect because the function `twittering-lookup-connection-type'
may change some variables.
(twittering-ensure-preparation-for-api-invocation): new function
for ensuring prerequisites for invoking APIs.
(twittering-visit-timeline): use the new function
`twittering-ensure-preparation-for-api-invocation'.
* twittering-mode.el: Signal an error when no valid connection
method is found on sending a HTTP request.
(twittering-send-http-request-internal): signal an error when no
valid connection method is found.
2011-10-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Allow users to supplement a username for
timeline specs with a following username afterward.
(twittering-read-timeline-spec-with-completion): allow users to
supplement a username for timeline specs with a following username
afterward.
* twittering-mode.el: Add a username to the variable
`twittering-user-history' after retrieving a user timeline.
(twittering-timeline-spec-is-user-p): new function.
(twittering-add-timeline-history): add a username to the history
bound to `twittering-user-history' if the given spec is a user
timeline.
* twittering-mode.el: Fix the macro
`twittering-revive:prop-get-value'.
(twittering-revive:prop-get-value): use `macroexpand' instead of
`macroexpand-all'.
2011-09-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Users can post a tweet consisting of only
mentions from the pop-up buffer.
(twittering-edit-post-status): check a tweet with a simple regexp
instead of `twittering-status-not-blank-p'.
* twittering-mode.el: Add functions for `revive.el'.
(twittering-revive:prop-get-value): new macro defined only when
compiling `twittering-mode.el'.
(twittering-revive:twittering): new function for restoring a
timeline buffer with `revive.el'.
(twittering-setup-revive): new function configuring `revive.el'
for restoring a timeline buffer.
* twittering-mode.el: `twittering-update-status' receives a
tweet-type symbol instead of a timeline spec. It replaces a
timeline spec representing whether the tweet beingedited is a
direct message or not.
(twittering-update-status-function): update docstring.
(twittering-edit-setup-help): receive a tweet-type symbol as the
second argument instead of a timeline spec.
(twittering-update-status-from-pop-up-buffer): receive a
tweet-type symbol as the fourth argument instead of a timeline
spec.
(twittering-update-status-from-minibuffer): likewise.
(twittering-update-status): likewise.
(twittering-direct-message): invoke `twittering-update-status'
with a tweet-type symbol `direct-message' instead of a timeline
spec.
(twittering-enter): invoke `twittering-update-status' with a
tweet-type symbol instead of a timeline spec.
* twittering-mode.el: A skeleton can be used as
`twittering-retweet-format'.
(twittering-retweet-format): update docstring.
(twittering-update-status-from-pop-up-buffer): accept a skeleton
as the first argument.
(twittering-update-status-from-minibuffer): likewise.
(twittering-update-status): likewise.
(twittering-organic-retweet): invoke `twittering-update-status'
with a skeleton for generating an initial string.
* twittering-mode.el: In default, the cursor is placed on the head
when editing an organic retweet.
(twittering-retweet-format): modify the initial value so that the
cursor will be placed previous to the initial string.
* twittering-mode.el: The symbol `organic-retweet' is added as a
tweet type referred by edit skeleton.
(twittering-update-status-function): update docstring.
(twittering-edit-skeleton-alist): likewise.
(twittering-update-status): likewise.
(twittering-organic-retweet): invoke `twittering-update-status'
with the tweet type symbol `organic-retweet' as the explicit
fourth argument.
2011-09-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix extraction of hashtags from a XML
response.
(twittering-normalize-raw-status): Fix extraction of hashtags from
a XML response.
* twittering-mode.el: The sign string feature is obsolete. The
feature based on the function `twittering-sign-string-function'
and the variable `twittering-sign-simple-string' is removed. The
edit skeleton feature can be used as its alternative.
(twittering-initialize-global-variables-if-necessary): display a
warning about obsolete sign string feature. The function also
translates the configuration of obsolete sign string into that of
edit skeleton if possible.
(twittering-sign-simple-string): removed.
(twittering-sign-string-function): removed.
(twittering-sign-string-default-function): removed.
(twittering-sign-string): removed.
(twittering-edit-length-check): do not use the obsolete function
`twittering-sign-string'.
(twittering-show-minibuffer-length): likewise.
(twittering-update-status-from-minibuffer): likewise.
2011-09-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Remove stickiness of text properties.
(twittering-make-string-with-user-name-property): add front-sticky
and rear-nonsticky property to STR for removing stickiness.
(twittering-make-string-with-source-property): likewise.
(twittering-make-string-with-uri-property): likewise.
(twittering-generate-format-table): add front-sticky and
rear-nonsticky property to the string for "%r" in order to remove
stickiness.
(twittering-generate-formater-for-first-spec): add front-sticky
and rear-nonsticky property to the string for "%@" in order to
remove stickiness.
2011-09-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix a comment.
* twittering-mode.el: The properties for hashtags, mentions and
URIs are non-sticky.
(twittering-make-fontified-tweet-text): make the properties
non-sticky for the both direction.
* twittering-mode.el: Render a link wrapped by the t.co service as
the original URL.
(twittering-call-api): call APIs with the option
`include_entities=true' if possible.
(twittering-normalize-raw-status): extract entities.
(twittering-xmltree-to-status): extract entities of direct
messages.
(twittering-make-fontified-tweet-text): do not fontify a region if
it has been already fontified.
(twittering-make-fontified-tweet-text-with-entity): new function.
(twittering-generate-format-table): try to fontify the text with
entities first.
* twittering-mode.el: Fix indices in entities of a timeline
retrieved as XML.
(twittering-make-gap-list): new function.
(twittering-get-gap): new function.
(twittering-normalize-raw-status): correct indices in entities so
that they mean the position in the decoded text.
* twittering-mode.el: Suppress redundant decoding.
(twittering-normalize-raw-status): decode entities with
`twittering-decode-entities-after-parsing-xml'.
(twittering-decode-entities-after-parsing-xml): new function.
2011-08-27 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: A list timeline includes native retweets.
(twittering-call-api): retrieve a list timeline with native
retweets.
* twittering-mode.el: Update the service configuration with the
'help/configuration' API periodically.
(twittering-call-api): add `get-service-configuration' as a new
command.
(twittering-service-configuration-default): new constant.
(twittering-service-configuration): new variable.
(twittering-service-configuration-queried): new variable.
(twittering-service-configuration-update-interval): new variable.
(twittering-get-service-configuration): new function.
(twittering-update-service-configuration): new function.
(twittering-update-service-configuration-sentinel): new function.
(twittering-update-service-configuration-clean-up-sentinel): new
function.
(twittering-update-active-buffers): invoke
`twittering-update-service-configuration'.
* twittering-mode.el: Count characters with considering the t.co
link wrapper.
(twittering-effective-length): new function.
(twittering-edit-length-check): check the length with
`twittering-effective-length'.
(twittering-edit-post-status): likewise.
(twittering-show-minibuffer-length): likewise.
* twittering-mode.el: Ad-hoc support for non-ASCII hashtags.
(twittering-extract-timeline-spec): support non-ASCII hashtags by
an ad-hoc way.
(twittering-make-fontified-tweet-text): likewise.
(twittering-edit-skeleton-inherit-hashtags): likewise.
2011-08-18 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Display the requested URI if a HTTP request
has failed.
(twittering-send-http-request): display the requested method and
URI if the request has failed.
2011-08-17 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Correctly store icons when
`twittering-convert-fix-size' is nil.
(twittering-save-icon-properties): correctly generate stored
representation of icon images when its size is not specified
explicitly.
2011-08-14 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Update the API for a list timeline.
(twittering-call-api): use the current API for retrieving a list
timeline.
* twittering-mode.el: Support ":retweeted_to_user/USER" timeline.
(twittering-timeline-spec-to-string): support `retweeted_to_user'
timeline.
(twittering-extract-timeline-spec): support a string like
":retweeted_to_user/USER" as a `retweeted_by_user' timeline.
(twittering-timeline-spec-primary-p): add `retweeted_to_user'
as a primary timeline.
(twittering-call-api): support `retweeted_to_user' timeline.
(twittering-read-timeline-spec-with-completion): add
":retweeted_to_user/" as a candidate.
* twittering-mode.el: Support ":retweeted_by_user/USER" timeline.
(twittering-timeline-spec-to-string): support `retweeted_by_user'
timeline.
(twittering-extract-timeline-spec): support a string like
":retweeted_by_user/USER" as a `retweeted_by_user' timeline.
(twittering-timeline-spec-primary-p): add `retweeted_by_user'
as a primary timeline.
(twittering-call-api): support `retweeted_by_user' timeline.
(twittering-read-timeline-spec-with-completion): add
":retweeted_by_user/" as a candidate.
2011-08-13 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Add `migre.me' as a URL shortening serivce.
(twittering-tinyurl-services-map): add an entry for `migre.me'.
* twittering-mode.el: Save icons correctly when
`twittering-icon-storage-limit' is nil. Thanks to HufflepuffBR who
reported this problem.
(twittering-save-icon-properties): fix the list representation of
stored data when `twittering-icon-storage-limit' is nil.
2011-07-29 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: The hash by newer algorithm introduced in
OpenSSL 1.0.0 is also generated for each certificate. This is
required because OpenSSL 1.0.0 and later fails to find an
appropriate certificate if its name is based on the hash by the
older algorithm which has been used by OpenSSL before 1.0.0.
Thanks to Sakuma who reported this problem.
(twittering-ca-cert-alist): redefined as a constant. And each
entry has the hash generated by OpenSSL 1.0.0 and later.
(twittering-delete-ca-cert): delete multiple files for each
certificate.
(twittering-ensure-ca-cert): generate two files for each
certificate, where their names are the hash by the older algorithm
used by OpenSSL before 1.0.0 and the other hash by the newer
algorithm used by OpenSSL 1.0.0 and later.
* twittering-mode.el: Embed a new root CA certificate to follow
an update of the server.
(twittering-ca-cert-alist): add a new root CA certificate,
`GeoTrust Global CA' in order to follow the update of the server
certificate of `search.twitter.com'.
* twittering-mode.el: Output embedded certificates as a single
file instead of a directory including them. This avoids the
management of multiple hashes for each certificate.
(twittering-cert-file): new variable replacing
`twittering-cert-directory'.
(twittering-cert-directory): removed.
(twittering-ca-cert-list): new variable replacing
`twittering-ca-cert-alist'.
(twittering-ca-cert-alist): removed.
(twittering-delete-ca-cert): remove a single file including
multiple certificates.
(twittering-ensure-ca-cert): prepare a single file including
multiple certificates instead of a directory including multiple
files.
(twittering-make-connection-info): replace the parameter
`cacert-directory-fullpath' with `cacert-file-fullpath'.
(twittering-send-http-request-curl): use the option `--cacert'
instead of `--capath'.
(twittering-send-http-request-wget): use the option
`--ca-certificate' instead of `--ca-directory'.
2011-07-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the API call for `user_timeline' in
order to prevent Twitter from confusing a username consisting of
digits with a user id. Thanks to Makoto Fujiwara who reported this
problem.
(twittering-call-api): fix the API call for `user_timeline'. The
new implementation gives a username as a query parameter. This
prevents Twitter from confusing a username consisting of digits
with a user id.
* twittering-mode.el: Fix a bug that moves the cursor by calling
`twittering-update-status-interactive' from buffers which are not
managed by `twittering-mode'. Thanks to mofigan who reported this
problem.
(twittering-ensure-whole-of-status-is-visible): do not change
window configuration unless the given window is bound to a buffer
managed by `twittering-mode'.
2011-07-20 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix indentation of the function
`twittering-verify-credentials'.
(twittering-verify-credentials): fix indentation.
* twittering-mode.el: Display exit status of the process for
authorization if it exited abnormally.
(twittering-http-get-verify-credentials-clean-up-sentinel):
display exit status of the process if it exited abnormally.
* twittering-mode.el: Embed another root CA certificate to follow
an update of the server. Now, the server certificate for
`api.twitter.com' is updated and it cannot be verified by the
already embedded certificate `Equifax Secure Certificate
Authority'. So, a root CA certificate `VeriSign Class 3 Public
Primary CA - G2' is also embedded, which is used for verifying the
server `api.twitter.com'.
(twittering-cert-file): removed.
(twittering-delete-ca-cert-file): removed.
(twittering-cert-directory): new variable.
(twittering-delete-ca-cert): new function.
(twittering-ensure-ca-cert): prepare a directory including
multiple CA certificates instead of a single file. Now this
function generates "VeriSign Class 3 Public Primary CA - G2".
(twittering-make-connection-info): replace the parameter
`cacert-fullpath' with `cacert-directory-fullpath'.
(twittering-send-http-request-native): remove redundant bindings.
(twittering-send-http-request-curl): follow the modification of
the parameter generated by `twittering-make-connection-info'.
(twittering-send-http-request-wget): likewise.
* cert/equifax.pem: removed. This certificate had not been used.
* cert/Equifax_Secure_Certificate_Authority.cer: Add a certificate
that has been used. It was retrieved from
https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.cer ,
which is used only for verifying the server `search.twitter.com'.
* cert/PCA-3G2.pem: Add a root certificate. It is retrieved from
https://www.verisign.com/repository/roots/root-certificates/PCA-3G2.pem ,
which is used for verifying the server `api.twitter.com'.
2011-07-16 Tadashi MATSUO <tad@mymail.twin.jp>
* test/test-twittering-mode.el: Add tests for HMAC-SHA1.
* twittering-mode.el: Fix the function for HMAC-SHA1 so that it
always return a correct digest.
(twittering-sha1): new function. This function can return a
correct digest without regard to the current coding system.
For very long object, the function `sha1' uses an external program
and coding system for the program is not correctly specified.
Therefore, the result may depend on the current coding system.
The new function is an alternative without the above problem.
(twittering-hmac-sha1): use `twittering-sha1' instead of `sha1'.
* twittering-mode.el: `twittering-wait-while' is reimplemented
with `lexical-let'.
(twittering-wait-while): reimplemented with `lexical-let'.
Redundant statements are no longer added. This suppresses warnings
on byte-compilation.
* twittering-mode.el: Fix docstring of
`twittering-edit-skeleton-alist'.
(twittering-edit-skeleton-alist): fix docstring.
* twittering-mode.el: Load private information before
initialization.
(twittering-private-info-file-loaded): new variable.
(twittering-private-info-loaded-p): new function.
(twittering-ensure-private-info): new function.
(twittering-verify-credentials): do not try to load private
information.
(twittering-visit-timeline): ensure that private information is
loaded if necessary.
* twittering-mode.el: Initialize global variables before ensuring
a connection method.
(twittering-visit-timeline): invoke
`twittering-initialize-global-variables-if-necessary' first.
* twittering-mode.el: Open the timeline buffer only if
authorization succeeded.
(twittering-verify-credentials): return t or nil according to
whether the authorization succeeded or not.
(twittering-visit-timeline): open the timeline buffer only if
authorization succeeded.
* twittering-mode.el: In `twittering-start', bind a local variable
only if necessary.
(twittering-start): bind `action' only if necessary.
* twittering-mode.el: Start timers only when an active timeline
buffer is opened.
(twittering-verify-credentials): do not invoke `twittering-start'.
(twittering-http-get-verify-credentials-sentinel): likewise.
* twittering-mode.el: `twittering-account-authorization' must be
reset if `twittering-verify-credentials' exited non-locally.
(twittering-verify-credentials): do not manage the global variable
`twittering-account-authorization', which will be managed by the
new function `twittering-ensure-account-verification'.
`twittering-verify-credentials' raises an error if the function
`twittering-account-authorization-queried-p` returns non-nil.
(twittering-ensure-account-verification): new function. This
function can correctly reset the global variable
`twittering-account-authorization' if authorization is failed and
the function `twittering-verify-credentials' exits non-locally.
(twittering-visit-timeline): call
`twittering-ensure-account-verification' instead of
`twittering-verify-credentials'.
2011-06-26 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Revise the routine for the format specifier
"%C".
(twittering-make-string-with-uri-property): new function.
(twittering-generate-formater-for-first-spec): use the function
`twittering-make-string-with-uri-property' for the format
specifier "%C".
(twittering-make-time-string): removed.
* twittering-mode.el: Add a function to go to the next/previous
URI explicitly written in a tweet.
(twittering-make-fontified-tweet-text): add uri-origin property to
URIs explicitly written in a tweet.
(twittering-get-next-thing-pos): new function.
(twittering-goto-next-thing): ignore things except URIs explicitly
written in a tweet if a prefix argument is given.
(twittering-goto-previous-thing): likewise.
(twittering-goto-next-uri): new function.
(twittering-goto-previous-uri): new function.
* twittering-mode.el: Wait a moment after finding that the process
is dead and the query has not been finished. This prevents Emacs
from canceling the query on the middle of evaluating the
sentinel.
(twittering-wait-while): new macro.
(twittering-oauth-get-token-alist): wait a moment after finding
that the process is dead and the query has not been finished. This
prevents Emacs from canceling the query on the middle of
evaluating the sentinel.
(twittering-tinyurl-get): likewise.
(twittering-verify-credentials): likewise.
(twittering-get-list-sync): likewise.
* twittering-mode.el: Correctly ensure an available connection
method even if SSL is unavailable.
(twittering-ensure-connection-method): return correct value in the
case with compromise.
* twittering-mode.el: `twittering-ensure-connection-method'
displays an error message if no connection methods available.
(twittering-ensure-connection-method): display an error message if
no connection methods are available.
(twittering-visit-timeline): do not display an error message if no
connection methods are available.
2011-06-21 Takashi Masuda <masutaka@nifty.com>
* twittering-mode.el: Add text properties to "%C".
(twittering-generate-formater-for-first-spec): use
`twittering-make-time-string' instead of `format-time-string'.
(twittering-make-time-string): new function.
* twittering-mode.el: Add timeline spec aliases as completion
candidates on specifying a timeline spec.
(twittering-read-timeline-spec-with-completion): add timeline spec
aliases, defined in `twittering-timeline-spec-alias', as
completion candidates.
2011-05-21 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the message for dead process on basic
authentication.
(twittering-verify-credentials): make the message for dead process
on basic authentication similar as that on OAuth/xAuth
authentication.
* twittering-mode.el: Fix the display of messages about
authorization.
(twittering-send-http-request): do not display a message on
authorization.
(twittering-http-get-verify-credentials-sentinel): directly
display a message whether the authorization succeeded or not.
`twittering-send-http-request' does not display it.
* twittering-mode.el: Add the variable
`twittering-disable-overlay-on-too-long-string' in order to avoid
interference between the update of overlay and some input
methods.
(twittering-disable-overlay-on-too-long-string): new variable.
(twittering-edit-length-check): do not update the overlay if
`twittering-disable-overlay-on-too-long-string' is non-nil.
2011-05-16 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Ensure that a sentinel is invoked when a
process is started successfully.
(twittering-process-alive-p): new function.
(twittering-start-process-with-sentinel): new function.
(twittering-send-http-request-native): ensure that the given
sentinel is invoked when the process is started successfully.
(twittering-send-http-request-curl): replace `start-process' with
`twittering-start-process-with-sentinel' in order to ensure that
the sentinel is invoked.
(twittering-send-http-request-wget): likewise.
* twittering-mode.el: Confirm that the process is alive on waiting
for its sentinel.
(twittering-oauth-get-token-alist): check whether the process is
alive on waiting for the invocation of the sentinel for the
process.
(twittering-tinyurl-get): likewise.
(twittering-verify-credentials): likewise.
(twittering-get-list-sync): use `twittering-process-alive-p'.
* twittering-mode.el: Ignore errors on `xml-parse-region'.
(twittering-xml-parse-region): return nil if an error happens on
`xml-parse-region'.
* twittering-mode.el: Fix uri property of a list name in a
tweet. Thanks to Naohiro Aota who reported the problem.
(twittering-get-list-url): new function.
(twittering-make-fontified-tweet-text): correctly generate uri
property for a list name in a tweet.
2011-05-08 Tadashi MATSUO <tad@mymail.twin.jp>
* test/test-twittering-mode.el: Fix and add tests of proxy
configuration. Now they do not depend on environment variables.
2011-05-06 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Replace the symbol `us-ascii' for a
coding-system with `iso-safe', which is valid even on Emacs21.
(twittering-ensure-ca-cert): use `iso-safe' instead of `us-ascii'
as a coding-system for ASCII.
(twittering-start-http-session-curl-https-p): likewise.
(twittering-initialize-global-variables-if-necessary): likewise.
* twittering-mode.el: Add some directories for Emacs21 to
`load-path' even when byte-compiling the file on Emacs21.
* twittering-mode.el: embed a timeline spec string such as
"#HASHTAG" for `goto-spec' of a hashtag instead of a search
timeline spec as an internal representation.
(twittering-make-hashtag-timeline-spec-string-direct): new macro.
(twittering-make-fontified-tweet-text): embed a timeline spec
string such as "#HASHTAG" for `goto-spec' of a hashtag instead of
a search timeline spec as an internal representation.
* twittering-mode.el: Add `twittering-update-status' as a function.
(twittering-update-status-function): update docstring.
(twittering-update-status-from-pop-up-buffer): rename the argument
`spec' `tweet-type-as-spec'.
(twittering-update-status-from-minibuffer): likewise.
(twittering-update-status): new function.
(twittering-direct-message): call `twittering-update-status'
instead of referring `twittering-update-status-function'.
(twittering-reply-to-user): likewise.
(twittering-organic-retweet): likewise.
(twittering-enter): likewise.
* twittering-mode.el: Edit skeletons can refer to the current
timeline spec.
(twittering-update-status-function): update the docstring to
follow the additional argument CURRENT-SPEC.
(twittering-edit-skeleton-alist): update the docstring.
(twittering-edit-skeleton-insert-base): support the new argument
CURRENT-SPEC.
(twittering-edit-skeleton-insert): likewise.
(twittering-edit-skeleton-inherit-hashtags): likewise.
(twittering-edit-skeleton-inherit-mentions): likewise.
(twittering-update-status-from-pop-up-buffer): likewise.
(twittering-update-status-from-minibuffer): likewise.
(twittering-update-status): add a new argument
IGNORE-CURRENT-SPEC.
* twittering-mode.el: The predefined edit skeletons
`inherit-hashtags' and `inherit-any' insert hashtags if the
current timeline is a search timeline where the query string
includes hashtags.
(twittering-timeline-spec-is-search-p): new function.
(twittering-extract-query-string-from-search-timeline-spec): new
function.
(twittering-edit-skeleton-alist): change the definition of
`inherit-hashtags' and `inherit-any' so that they add hashtags if
the current timeline is a search timeline.
(twittering-edit-skeleton-inherit-hashtags): insert hashtags if
CURRENT-SPEC is a search timeline where the query string includes
hashtags.
2011-04-23 Tadashi MATSUO <tad@mymail.twin.jp>
* NEWS, NEWS.ja, LAST-VERSION, VERSION, doc/web/index.text:
Version 2.0.0 released.
* twittering-mode.el: Fix coding system for some operations so
that they work well even if the default coding system is
`utf-16le-dos'. Thanks to Moto_Dong who reported the problem.
(twittering-ensure-ca-cert): explicitly specify coding-system.
(twittering-start-http-session-curl-https-p): likewise.
(twittering-read-from-encrypted-file): likewise.
(twittering-write-and-encrypt): likewise.
(twittering-load-icon-properties): likewise.
(twittering-initialize-global-variables-if-necessary): likewise.
(twittering-status-not-blank-p): likewise.
* test/test-twittering-mode.el: add a test for a timeline spec
string like "#hashtag".
* twittering-mode.el: Store the formatter function before
compilation.
(twittering-format-status-function-without-compile): new
variable.
(twittering-update-status-format): store the formatter function as
a lambda expression before being compiled.
* twittering-mode.el: Embed expressions for fontification in the
formatter function instead of calling them as a function.
(twittering-make-fontified-tweet-text): return an expression that
fontifies a given string. The regular expressions of strings being
fontified are concatenated on generating a formatter function.
(twittering-generate-format-table): embed the expression
fontifying a string in the formatter function. The expression will
be byte-compiled by `twittering-update-status-format'.
* twittering-mode.el: Redefine some functions as inline in order
to make the formatter function more efficient.
(twittering-make-common-properties): redefined as an inline
function.
(twittering-make-string-with-user-name-property): likewise.
(twittering-make-string-with-source-property): likewise.
(twittering-fill-string): likewise.
(twittering-update-filled-string): likewise.
(twittering-make-passed-time-string): likewise.
* twittering-mode.el: Reduce redundant calls of `string-match' on
formatting a tweet. When generating a timeline spec from a string
with obvious meaning, the new macros are used instead of the
general function, `twittering-extract-timeline-spec'.
(twittering-make-user-timeline-spec-direct): new macro.
(twittering-make-list-timeline-spec-direct): new macro.
(twittering-make-hashtag-timeline-spec-direct): new macro.
(twittering-extract-timeline-spec): use new macros.
(twittering-make-string-with-user-name-property): call the new
macro `twittering-make-user-timeline-spec-direct' instead of
calling `twittering-extract-timeline-spec'.
(twittering-make-fontified-tweet-text): call the new macros
`twittering-make-{user,list,hashtag}-timeline-spec-direct' instead
of calling `twittering-extract-timeline-spec'.
2011-04-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix headers for a proxy.
(twittering-make-connection-info): extract proxy information from
`connection-info' instead of directly referring to
`twittering-http-proxy-user', `twittering-http-proxy-password',
etc.
(twittering-send-http-request-native): generate the
"Proxy-Authorization" header correctly and give the absolute URI
as the request URI when the connection is peformed via a proxy.
(twittering-send-http-request-urllib): add "Proxy-Authorization"
header if necessary.
(twittering-http-application-headers): do not add headers related
to a proxy. They are added in functions for each connection
method.
* twittering-mode.el: "U" pushes a URI of a tweet on text without
a uri property.
(twittering-push-uri-onto-kill-ring): push a URI of a tweet unless
the currently pointed character has a uri property.
* twittering-mode.el: `twittering-direct-message' always posts a
tweet with direct message API.
(twittering-direct-message): always post a tweet with direct
message API.
* twittering-mode.el: Introduce "edit skeleton".
(twittering-edit-skeleton-footer): new variable.
(twittering-edit-skeleton-footer-history): new variable.
(twittering-edit-skeleton-alist): new variable.
(twittering-switch-edit-skeleton): new function.
(twittering-edit-skeleton-change-footer): new function.
(twittering-edit-skeleton-insert-base): new function.
(twittering-edit-skeleton-insert): new function.
(twittering-update-status-from-pop-up-buffer): insert the current
edit skeleton before editing a tweet.
(twittering-update-status-from-minibuffer): likewise.
* twittering-mode.el: Add pre-defined edit skeletons.
(twittering-extract-matched-substring-all): new function.
(twittering-edit-skeleton-alist): add some examples of edit
skeletons.
(twittering-edit-skeleton-inherit-hashtags): new function for an
edit skeleton.
(twittering-edit-skeleton-inherit-mentions): likewise.
* twittering-mode.el: Add the variable
`twittering-fallback-image-format'.
(twittering-fallback-image-format): new variable.
(twittering-create-image-pair): use the value of
`twittering-fallback-image-format' as the fallback format instead
of directly using 'xpm.
2011-03-27 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Discard standard error of the program
"convert". On an environment where the option "-flatten" cause a
warning for a non-animated image, Emacs must exclude such
warnings.
(twittering-convert-image-data): discard standard error of the
program "convert".
* twittering-mode.el: Entrust image type estimation to the command
"convert".
(twittering-create-image-pair): do not send image type estimated by
Emacs to the function `twittering-convert-image-data'.
2011-03-26 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: `twittering-other-user-list-interactive'
works well when the specified user follows no list.
(twittering-other-user-list-interactive): fix an error occurring
when the specified user follows no list or selection is
cancelled.
* twittering-mode.el: `twittering-other-user-list-interactive'
displays a subscription as a string like timeline spec string.
(twittering-http-get-list-subscriptions-sentinel): exclude
preceding "@" from a string corresponding to a subscription.
(twittering-other-user-list-interactive): follow the above
modification.
* twittering-mode.el: Modify the prompts for subscription.
(twittering-read-subscription-list-name): modify the prompt for
subscription.
(twittering-other-user-list-interactive): likewise.
* twittering-mode.el: Add an advice for avoiding an error occuring
when `getenv' returns an empty string on Emacs21. The bug had been
fixed on Emacs22 and later.
* test/test-twittering-mode.el: Fix a test of formating a status
according to a change of behavior of `fill-region'. It does not
keep white spaces and tabs adjacent to hard newlines on Emacs21,
but it keeps them on Emacs22 and later.
* twittering-mode.el: Remove opacity on converting an image into
a XPM image on Emacs22 and earlier.
(twittering-convert-image-data): add an option "+matte" to the
command "convert" in order to avoid color allocation error
occurring when Emacs22 and earlier try to decode a XPM image with
opacity.
* twittering-mode.el: Convert an image, which may be animated,
into a single static image if Emacs does not support animated
images.
(twittering-convert-image-data): add an option "-flatten" to the
command "convert" unless `create-animated-image'.
* twittering-mode.el: Always convert a GIF image into a XPM image
if Emacs does not support animated images.
(twittering-create-image-pair): always convert a GIF image into a
XPM image if Emacs does not support animated images.
2011-03-26 Naohiro Aota <naota@elisp.net>
* twittering-mode.el (twittering-http-get-list-sentinel-base): New
macro: from `twittering-http-get-list-index-sentinel'.
(twittering-http-get-list-index-sentinel): Use it.
(twittering-http-get-list-subscriptions-sentinel): Ditto.
(twittering-call-api): Add `get-list-subscriptions' description;
Implement `get-list-subscriptions'.
(twittering-get-list-subscriptions): New function.
(twittering-get-list-sync): New function from
`twittering-get-list-index-sync'.
(twittering-get-list-index-sync): Rewrite to use it.
(twittering-get-list-subscriptions-sync): New function. Use it.
(twittering-read-timeline-spec-with-completion): New function.
(twittering-other-user-list-interactive): Accept prefix to read
other users' subscription list.
2011-03-15 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Support cancel of retweets posted by the
authenticated user.
(twittering-delete-status): cancel a retweet if it has been
retweeted by the authenticated user.
* twittering-mode.el: Explicitly use binary coding system on I/O
of icon properties. Thanks to Naohiro Aota.
(twittering-save-icon-properties): explicitly use binary coding
system on writing icon properties.
(twittering-load-icon-properties): likewise.
2011-02-19 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Disable the persistent icon storage if
`jka-compr' is unavailable.
(twittering-save-icon-properties): confirm that `jka-compr' is
available.
(twittering-load-icon-properties): likewise.
(twittering-initialize-global-variables-if-necessary): disable
the persistent icon storage if `jka-compr' is unavilable.
* twittering-mode.el: Add `twittering-add-to-history' for
Emacs21.
(twittering-add-to-history): new function.
(twittering-add-timeline-history): use
`twittering-add-to-history'.
* twittering-mode.el: Introduce the limit of number of
icons being stored persistently.
(twittering-icon-storage-file): add docstring about
`twittering-icon-storage-limit'.
(twittering-icon-storage-recent-icons): new variable to which
properties of recently rendered icons are stored.
(twittering-icon-storage-limit): new variable.
(twittering-update-icon-storage-recent-icons): new function.
(twittering-get-display-spec-for-icon): invoke
`twittering-update-icon-storage-recent-icons' whenever this
function is invoked.
(twittering-save-icon-properties): write properties of icons
within the limit specified by `twittering-icon-storage-limit'. In
addition, this function records properties in the new format.
(twittering-load-icon-properties): support the new format for
storing properties of icons.
2011-02-15 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Confirm validity of a format string before
updating the function formatting a tweet.
(twittering-update-status-format): update the function only if the
given format string is valid.
* twittering-mode.el: Support a new format specifier "%RT{...}".
(twittering-status-format): update docstring.
(twittering-generate-formater-for-first-spec): support a new
format specifier "%RT{...}".
2011-02-13 Tadashi MATSUO <tad@mymail.twin.jp>
* test/test-twittering-mode.el (test-hmac-sha1): Fix a typo.
* twittering-mode.el: Rearrange internal representation of a
retweet.
(twittering-add-statuses-to-timeline-data): use `retweeted-id'
instead of `source-id'.
(twittering-normalize-raw-status): rearrange internal
representation of a retweet. The information as a tweet posted by
the retweeter is stored with keys prefixed with `retweeting-'. The
information as a tweet posted by the original author is stored
with keys prefixed with `retweeted-'. Keys prefixed with
`original-' or `source-' are obsolete.
(twittering-make-common-properties): use `retweeted-id' instead of
`source-id'.
(twittering-get-common-properties): likewise.
(twittering-generate-format-table): use
`retweeting-user-screen-name' instead of
`original-user-screen-name'.
(twittering-generate-formater-for-first-spec): use `retweeted-id'
instead of `source-id'.
(twittering-render-timeline): likewise.
(twittering-native-retweet): likewise.
* twittering-mode.el: `created_at' for an official retweet means
when the original tweet was posted instead of when it was
retweeted.
(twittering-normalize-raw-status): do not override
`created_at'. The key `created_at' in an alist representing a
retweet means when the original tweet was posted.
* twittering-mode.el: When `twittering-follow' is invoked on an
official retweet, ask a subject.
(twittering-follow): ask a subject when this function is invoked
on an official retweet.
* twittering-mode.el: Add a function to report a user as a spammer.
(twittering-call-api): support a new command
`block-and-report-as-spammer'.
(twittering-block-and-report-as-spammer): new function.
* twittering-mode.el: Add a function to block a user.
(twittering-call-api): support a new command `block'.
(twittering-block): new function.
* twittering-mode.el: Support persistent icon storage.
(twittering-icon-storage-file): new variable.
(twittering-use-icon-storage): new variable.
(twittering-register-image-spec): new function.
(twittering-register-image-data): reimplemented with
`twittering-register-image-spec'.
(twittering-save-icon-properties): new function.
(twittering-load-icon-properties): new function.
2011-02-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Remove a trailing newline from strings
received from `bit.ly' and `j.mp'. Thanks to mm_o_ig.
(twittering-tinyurl-services-map): add a post-processing function
that removes a trailing newline from result of `bit.ly' and
`j.mp'.
* twittering-mode.el: Revise some messages. Thanks to Server.
(twittering-http-get-default-sentinel): revise messages.
(twittering-show-replied-statuses): likewise.
(twittering-hide-replied-statuses): likewise.
(twittering-edit-post-status): likewise.
(twittering-read-timeline-spec-with-completion): likewise.
(twittering-other-user-list-interactive): likewise.
(twittering-direct-message): likewise.
(twittering-goto-next-status): likewise.
(twittering-goto-previous-status): likewise.
2011-01-29 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Reimplement `twittering-tinyurl-get' with
`twittering-send-http-request'.
(twittering-url-wrapper): removed.
(twittering-url-insert-file-contents): removed.
(twittering-url-retrieve-synchronously): removed.
(twittering-tinyurl-get): reimplemented with
`twittering-send-http-request'. In addition, the query parameter
is correcly encoded by `twittering-percent-encode'.
* twittering-mode.el: Add `is.gd' as a URL shortening service.
Thanks to Michael Kohl.
(twittering-tinyurl-service): update the document.
(twittering-tinyurl-services-map): add an entry for `is.gd'.
* twittering-mode.el: Extend the format of
`twittering-tinyurl-services-map'. One can register a service that
requires a special HTTP request and/or post-processing.
(twittering-tinyurl-services-map): extend the meaning of the
variable.
(twittering-tinyurl-get): support new format of
`twittering-tinyurl-services-map'.
* twittering-mode.el: Add `goo.gl' as a URL shortening service.
(twittering-tinyurl-services-map): add an entry for `goo.gl'.
* twittering-mode.el: Add `bit.ly' and `j.mp' as URL shortening
services. Thanks to Lars Gregori.
(twittering-tinyurl-services-map): add entries for `bit.ly' and
`j.mp'.
(twittering-bitly-login): new variable.
(twittering-bitly-api-key): new variable.
(twittering-make-http-request-for-bitly): new function.
* twittering-mode.el: Reimplement normalization of alists from XML
structure.
(twittering-atom-xmltree-to-status-datum): change the value
corresponding to the key `source' into a URL with a tag.
(twittering-status-to-status-datum): removed.
(twittering-normalize-raw-status): new function to generate
normalized alist representing a tweet.
(twittering-xmltree-to-status): use
`twittering-normalize-raw-status' instead of
`twittering-status-to-status-datum'.
* twittering-mode.el: `twittering-make-clickable-status-datum'
does not redefine `source'.
(twittering-atom-xmltree-to-status-datum): define `source' as
a text surrounded by A-tag.
(twittering-normalize-raw-status): likewise.
(twittering-make-clickable-status-datum): do not redefine
`source'.
* twittering-mode.el: Add text properties to tweets on rendering.
(twittering-http-get-default-sentinel): do not call
`twittering-make-clickable-status-datum'.
(twittering-make-clickable-status-datum): removed.
(twittering-make-string-with-user-name-property): new function.
(twittering-make-string-with-source-property): new function.
(twittering-make-fontified-tweet-text): new function.
(twittering-generate-format-table): add text properties.
2011-01-23 Tadashi MATSUO <tad@mymail.twin.jp>
* test/test-twittering-mode.el: Add some tests for the format
specifiers "%FILL[prefix]{...}" and "%FOLD[prefix]{...}".
* twittering-mode.el (twittering-status-format): add a document
for the format specifier "%FOLD[prefix]{...}".
* test/test-twittering-mode.el: Fix an error of
`url-generic-parse-url' on Emacs21 by calling
`url-scheme-get-property' before `url-generic-parse-url' is called.
2011-01-21 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Decode received XML document as UTF-8 before
parsing it.
(twittering-http-get-default-sentinel): decode received XML
document as UTF-8 before parsing it if Content-Type in response
header has a parameter "charset=utf-8".
* twittering-mode.el: The format specifier "%FOLD[prefix]{...}"
does not squeeze white spaces.
(twittering-fill-string): does not squeeze white spaces if
`keep-newline' is non-nil.
2011-01-16 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Ensure that the pointed tweet is visible on
editing a tweet.
(twittering-ensure-whole-of-status-is-visible): new function.
* twittering-mode.el: Isolate addition of text properties from a
function parsing XML.
(twittering-http-get-default-sentinel): call
`twittering-make-clickable-status-datum' here.
(twittering-atom-xmltree-to-status): do not add text properties to
statuses.
(twittering-status-to-status-datum): likewise.
* twittering-mode.el: Render statuses in order of field property
instead of id property.
(twittering-make-common-properties): add field property as a
common property.
(twittering-get-common-properties): likewise.
(twittering-field-id<): new function.
(twittering-field-id=): new function.
(twittering-make-field-id): new function.
(twittering-make-field-properties): new function.
(twittering-render-timeline): render statuses in order of their
field properties.
(twittering-show-replied-statuses): add special field property to
replied statuses.
* twittering-mode.el: Move point by using field property instead
of id property.
(twittering-get-current-status-head): redefined with field
property instead of id property.
(twittering-get-first-status-head): likewise.
(twittering-get-next-status-head): likewise.
(twittering-get-previous-status-head): likewise.
* twittering-mode.el: Use rendered-as property for rendering
replied statuses instead of a trick with id and original-id
properties.
(twittering-get-common-properties): add rendered-as property as a
common property.
(twittering-make-field-properties): add rendered-as property if
necessary.
(twittering-make-field-properties-of-popped-ancestors): new
function.
(twittering-rendered-as-ancestor-status-p): new function.
(twittering-get-base-id-of-ancestor-at): new function.
(twittering-replied-statuses-visible-p): use the new function
`twittering-get-base-id-of-ancestor-at' instead of directly
referring id and original-id properties.
(twittering-hide-replied-statuses): likewise.
(twittering-show-replied-statuses): use
`twittering-make-field-properties-of-popped-ancestors'.
* twittering-mode.el: Remove a trick using id and original-id
properties for rendering replied statuses.
(twittering-get-common-properties): remove original-id from common
properties.
(twittering-show-replied-statuses): do not overwrite id and
original-id properties.
(twittering-enter): do not refer original-id property.
* twittering-mode.el: Support favorites timeline.
(twittering-timeline-spec-to-string): support favorites timeline
spec.
(twittering-extract-timeline-spec): likewise.
(twittering-timeline-spec-primary-p): add favorites timeline spec
is a primary timeline spec.
(twittering-call-api): support favorites timeline spec.
(twittering-read-timeline-spec-with-completion): add ":favorites"
as a candidate of completion. In addition, one can input a
username with completion for ":favorites/".
(twittering-goto-next-status): display an error message on the
oldest tweet on favorites timeline.
(twittering-goto-previous-status): likewise.
* test/test-twittering-mode.el: Add tests for favorites timeline
spec.
2011-01-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Ensure that encrypted strings are written
with no conversion. Thanks to Sakuma.
(twittering-write-and-encrypt): ensure that encrypted strings are
written with no conversion.
2010-12-17 Yuto HAYAMIZU <y.hayamizu@gmail.com>
* twittering-mode.el (twittering-organic-retweet): prohibit
retweeting protected tweets.
2010-11-30 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Ensure that the methods using url library
works well for HTTP redirection.
(twittering-send-http-request-urllib): make the variable,
`url-http-attempt-keepalives', buffer-local in order to send the
local value to the sentinel invoked for HTTP redirection. If the
variable is not made buffer-local, the connection with redirection
may not be closed according to its global value.
* twittering-mode.el: Introduce an ad-hoc treatment for url
library on Emacs21 again. This ensures that the sentinel for an
redirect HTTP request, such as asynchronous retrieval of icon
images, works well.
(twittering-send-http-request): introduce an ad-hoc treatment for
the url library again. It is required because the process for a
redirected HTTP request is alive when the url library for Emacs21
invokes the callback.
(twittering-send-http-request-urllib): add an ad-hoc treatment for
HTTP redirection on Emacs21.
2010-11-27 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix a bug of retrieving a URI repeatedly.
(twittering-resolve-url-request): bind `additional-info' to the
appropriate alist storing the URI that will be retrieved. The
alist is referred by `twittering-url-retrieve-async-sentinel' and
`twittering-url-retrieve-async-clean-up-sentinel'. Since the alist
was null, a URI might be retrieved repeatedly.
2010-11-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Delay next asynchronous retrieval until all
sentinels for the current retrieval finish.
(twittering-url-retrieve-async-sentinel): call
`twittering-resolve-url-request' after sentinels finish.
(twittering-url-retrieve-async-clean-up-sentinel): call
`twittering-resolve-url-request' only when the current retrieval
is failed.
* twittering-mode.el: Periodically invoke actions associated with
idle-timer even if Emacs remains idle long time.
(twittering-timer-interval-for-redisplaying): extended to 5.0.
(twittering-url-retrieve-async-sentinel): use
`twittering-run-on-idle' instead of `run-with-idle-timer'.
(twittering-idle-timer-for-redisplay): new variable.
(twittering-run-on-idle): new function.
(twittering-run-repeatedly-on-idle): new function.
(twittering-start): use `twittering-run-repeatedly-on-idle'
instead of `run-with-idle-timer'.
(twittering-stop): also cancel the idle timer for redisplaying.
* twittering-mode.el: Add retrieved timeline spec string to
history even if it includes no new statuses.
(twittering-http-get-default-sentinel): add `spec-string' on
successful retrieval even if there are no new statuses.
* twittering-mode.el: `twittering-url-retrieve-async' immediately
invokes the sentinel if the url has been already retrieved.
(twittering-url-retrieve-async): immediately invoke the sentinel
if the given url has been already retrieved.
* twittering-mode.el: Call `url-retrieve' without attempting
keep-alive.
(twittering-send-http-request): remove special treatment according
to `status-str' for the connection method by url library. It was
necessary because `url-retrieve' invoked its sentinel before the
process exits.
(twittering-send-http-request-urllib): call `url-retrieve' with
binding `url-http-attempt-keepalives' to nil.
* twittering-mode.el: The property symbol `belongs-to' is renamed
`source-spec'.
(twittering-render-timeline): add `source-spec' to each status
instead of `belongs-to'.
(twittering-direct-message): use `source-spec' instead of
`belongs-to'.
(twittering-enter): likewise.
* twittering-mode.el: Fix a bug that some text properties of a
tweet rendered on a buffer may be lost by redisplaying it.
(twittering-make-common-properties): new function.
(twittering-get-common-properties): new function.
(twittering-generate-format-status-function): use
`twittering-make-common-properties'.
(twittering-format-status-for-redisplay): use
`twittering-get-common-properties'.
(twittering-update-filled-string): likewise.
* twittering-mode.el: `twittering-redisplay-status-on-each-buffer'
restores common properties of re-rendered tweets.
(twittering-format-status-for-redisplay): do not restore
properties.
(twittering-update-filled-string): likewise.
(twittering-redisplay-status-on-each-buffer): restore common
properties.
* twittering-mode.el: Add `source-spec' as an entry of alist
storing a tweet.
(twittering-add-statuses-to-timeline-data): add the `source-spec'
property to each new status.
(twittering-make-common-properties): add `source-spec' as a common
property.
(twittering-get-common-properties): update docstring.
(twittering-render-timeline): do not add the `source-spec'
property.
* twittering-mode.el: Correctly define the alias of
`open-ssl-stream' for Emacs21 even if `url-gw.el' has been already
loaded and unavailable autoload has been declared.
(twittering-start-http-session-urllib-https-p): ignore the
autoload declaration of `open-ssl-stream' in `url-gw.el' if
"ssl.el" is unavailable.
* twittering-mode.el: Fix a bug that `twittering-username' is not
initialized when using encryption of authorized token with OAuth.
(twittering-http-get-verify-credentials-sentinel): apropriately
initialize `twittering-username' even if encryption of authorized
token is used with OAuth.
2010-11-14 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix a bug in registration of a sentinel for
asynchronous retrieval.
(twittering-url-retrieve-async): fix registration of sentinels to
avoid registering a sentinel repeatedly.
* twittering-mode.el: Contents retrieved by url library are copied
as unibyte string. Without this modification, binary data may be
retrieved incorrectly.
(twittering-send-http-request-urllib): copy contents retrieved by
url library as unibyte string. Without this modification, binary
data may be retrieved incorrectly.
* twittering-mode.el: Sentinels for `twittering-send-http-request'
are called with a process status symbol instead of a process
status symbol. This is necessary for faking a status of a process
generated by url library.
(twittering-send-http-request): call sentinels with a process
status symbol instead of a process status string.
(twittering-http-get-default-sentinel): receives `status' instead
of `status-str'.
(twittering-http-get-list-index-sentinel): likewise.
(twittering-http-post-default-sentinel): likewise.
(twittering-http-get-verify-credentials-sentinel): likewise.
(twittering-http-get-verify-credentials-clean-up-sentinel):
likewise.
(twittering-oauth-get-token-alist): define sentinels so that they
receive `status' instead of `status-str'.
(twittering-get-and-render-timeline): likewise.
* twittering-mode.el: Redisplay tweets with idle timer.
(twittering-timer-interval-for-redisplaying): change the meaning.
(twittering-start): `twittering-redisplay-status-on-buffer' is
called by `run-with-idle-timer'.
* twittering-mode.el: `twittering-resolve-url-request' uses
`twittering-send-http-request' instead of `url-retrieve'.
(twittering-resolve-url-request): use
`twittering-send-http-request' instead of `url-retrieve'.
(twittering-url-retrieve-async-sentinel): new function.
(twittering-url-retrieve-async-clean-up-sentinel): new function.
* twittering-mode.el: Sentinels for asynchronous retrieval are
invoked with `run-with-idle-timer'. The delay will prevent Emacs
from stucking on inputting characters on other buffer.
(twittering-url-request-sentinel-delay): new variable.
(twittering-url-retrieve-async-sentinel): invoke sentinels with
`run-with-idle-timer'.
2010-11-13 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: `twittering-send-http-request' correctly
transfer `additional-info'.
(twittering-send-http-request): call
`twittering-send-http-request-internal' with correct arguments.
* twittering-mode.el: Remove redundant entries from an argument of
`twittering-send-http-request'.
(twittering-http-get): remove redundant entries from
`additional-info', an argument of `twittering-send-http-request'.
(twittering-http-post): likewise.
* twittering-mode.el: Fix docstring of `twittering-call-api'.
(twittering-call-api): fix docstring.
* twittering-mode.el: `twittering-call-api' extracts a query
string from the given timeline spec.
(twittering-call-api): extract a query string of search timeline
from the given timeline spec.
(twittering-get-and-render-timeline): remove a query string
from the second argument of `twittering-call-api'.
* twittering-mode.el: `twittering-call-api' can calculate how many
tweets should be retrieved.
(twittering-call-api): let the argument `number' of the command
`retrieve-timeline' be optional.
(twittering-get-and-render-timeline): remove explicit calculation
of number of tweets which will be retrieved.
* twittering-mode.el: Add a new argument `additional-info' to
`twittering-http-{get,put}'. It can be used to send information to
generated processes.
(twittering-http-get): replace the argument `noninteractive' with
a new argument `additional-info', which will be sent to
`twittering-send-http-request'.
(twittering-http-post): add a new argument `additional-info',
which will be sent to `twittering-send-http-request'.
(twittering-call-api): send the information of `noninteractive' as
a member of `additional-info' to `twittering-http-get'.
* twittering-mode.el: Timeline spec is sent to a sentinel via
`connection-info' instead of `twittering-process-info-alist'.
(twittering-http-get-default-sentinel): receive the timeline spec
from `connection-info' instead of `twittering-process-info-alist'
via `twittering-get-timeline-spec-from-process'.
(twittering-get-and-render-timeline): send timeline spec to the
sentinel via `additional-info', which is an argument of
`twittering-call-api'.
* twittering-mode.el: Confirm that `twittering-proxy-use' is nil
when trying the connection method `native'.
(twittering-start-http-session-native-tls-p): return nil if
`twittering-proxy-use' is non-nil.
* twittering-mode.el: Display the current connection method on the
mode-line.
(twittering-display-connection-method): new variable.
(twittering-lookup-connection-type): add the entry `display-name'
if necessary.
(twittering-get-connection-method-name): new function.
(twittering-mode-line-buffer-identification): display the current
connection method on the mode-line.
* twittering-mode.el: The default value of
`twittering-url-show-status' is changed to nil.
(twittering-url-show-status): initialized as nil.
* twittering-mode.el: Postpone configuring the global variables
`twittering-username' and `twittering-password' until the account
is authenticated.
(twittering-prepare-account-info): return a pair of username and
password instead of setting them as global variables.
(twittering-verify-credentials): do not set the global variables
`twittering-username' and `twittering-password' until the account
is authenticated.
(twittering-http-get-verify-credentials-sentinel): set the global
variables `twittering-username' and `twittering-password' if
necessary.
* twittering-mode.el: Add new connection method `urllib-http' and
`urllib-https'.
(twittering-connection-type-order): add `urllib-http' and
`urllib-https'.
(twittering-connection-type-table): add new entries for
`urllib-http' and `urllib-https'.
(twittering-send-http-request): add special treatment for the
connection method using the url library.
(twittering-start-http-session-urllib-p): new function.
(twittering-start-http-session-urllib-https-p): new function.
(twittering-send-http-request-urllib): new function.
(twittering-pre-process-buffer-urllib): new function.
2010-10-14 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: `twittering-get-error-message' generates an
error message with explanation if possible.
(twittering-get-error-message): generate an error message with
explanation if possible. `twittering-xml-parse-region' is called
only when it is required. It is determined by the new argument
`header-info'.
(twittering-http-get-default-sentinel): use
`twittering-get-error-message' for generating a total error
message, not only explanation.
(twittering-http-get-list-index-sentinel): likewise.
(twittering-http-post-default-sentinel): likewise.
* twittering-mode.el: The second argument of `twittering-call-api'
is replaced with `additional-info', which is sent to
`twittering-send-http-request' via `twittering-http-get' or
`twittering-http-put'.
(twittering-call-api): replace the argument `noninteractive' with
`additional-info', which is sent to `twittering-send-http-request'
via `twittering-http-get' or `twittering-http-put'.
(twittering-get-and-render-timeline): send `noninteractive' via
the new argument `additional-info' of `twittering-call-api'.
2010-10-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Correctly render the format specifier "%L"
with a preceding whitespace. Thanks to Tom X. Tobin.
(twittering-generate-format-table): add a preceding whitespace to
the format specifier "%L". The previous routine contradicts the
docstring of `twittering-status-format'.
* test/test-twittering-mode.el: Correct the test for the format
specifier "%L".
* test/test-twittering-mode.el: Fix the test for HMAC.
* twittering-mode.el (twittering-connection-type-table): remove
obsolete entries.
* twittering-mode.el: `twittering-release-process' is called as a
clean-up sentinel.
(twittering-call-api): accept new option `clean-up-sentinel' for
`retrieve-timeline'.
(twittering-http-default-sentinel): do not call
`twittering-release-process'.
(twittering-get-and-render-timeline): explicitly register
`twittering-release-process' as a clean-up sentinel.
* twittering-mode.el: Classify functions into some groups.
* twittering-mode.el: Add a new function
`twittering-send-http-request-with-default-sentinel'.
(twittering-send-http-request-with-default-sentinel): new function.
* twittering-mode.el: Adapt some functions to
`twittering-send-http-request-with-default-sentinel'.
(twittering-get-response-body): removed.
(twittering-start-http-session): use
`twittering-send-http-request-with-default-sentinel' instead of
`twittering-send-http-request' and
`twittering-http-default-sentinel'.
(twittering-get-error-message): assume that the given buffer
consists of HTTP response body without headers.
(twittering-http-default-sentinel): removed.
(twittering-http-get-default-sentinel): modified so that it can be
invoked via `twittering-send-http-request-with-default-sentinel'.
(twittering-http-get-list-index-sentinel): likewise.
(twittering-http-post-default-sentinel): likewise.
(twittering-oauth-get-token-alist): likewise.
(twittering-http-get-verify-credentials-sentinel): likewise.
(twittering-http-get-verify-credentials-clean-up-sentinel):
likewise.
(twittering-get-status-from-http-response): removed.
(twittering-get-and-render-timeline): modify arguments of
`clean-up-sentinel' to adapt it to
`twittering-send-http-request-with-default-sentinel'.
* twittering-mode.el: Rename
`twittering-send-http-request-with-default-sentinel'
`twittering-send-http-request'.
(twittering-send-http-request-internal): renamed from
`twittering-send-http-request'.
(twittering-send-http-request): renamed from
`twittering-send-http-request-with-default-sentinel'.
(twittering-start-http-session): use
`twittering-send-http-requeset' instead of
`twittering-send-http-request-with-default-sentinel'.
(twittering-oauth-get-token-alist): likewise.
* twittering-mode.el: Validity of a HTTP request is confirmed by
`twittering-make-http-request'.
(twittering-make-http-request): check the validity of arguments.
(twittering-start-http-session): remove validity check.
* twittering-mode.el: Remove `twittering-start-http-session'.
(twittering-start-http-session): removed.
(twittering-http-get): use `twittering-send-http-request' instead
of `twittering-start-http-session'.
(twittering-http-post): likewise.
* twittering-mode.el: "Content-Length" for OAuth is calculated by
`twittering-make-http-request'.
(twittering-oauth-get-token-alist): remove explicit specification
of "Content-Length". The header value is determined by
`twittering-make-http-request'.
* twittering-mode.el: Add `encoded-query-alist' entry to an alist
of a HTTP request. This is required for generating "Authorization"
header of OAuth.
(twittering-make-http-request): add `encoded-query-alist' entry to
an alist corresponding to a HTTP request.
* twittering-mode.el: Add `uri-without-query' entry to an alist of
a HTTP request. This is required for generating "Authorization"
header of OAuth.
(twittering-make-http-request): add `uri-without-query' entry to
an alist corresponding to a HTTP request.
* twittering-mode.el: Introduce
`twittering-add-application-header-to-http-request'.
(twittering-http-application-headers-with-auth): removed.
(twittering-add-application-header-to-http-request): new
function.
(twittering-http-get): use
`twittering-add-application-header-to-http-request' instead of
`twittering-http-application-headers-with-auth'.
(twittering-http-post): likewise.
* twittering-mode.el: Fix `twittering-buffer-related-p' in order
to support multiple edit buffers.
(twittering-buffer-related-p): fix a condition so that it works
well even when multiple edit buffer exists.
* twittering-mode.el: Solve cyclic reference on definition of
`twittering-unicode-replacement-char'.
(twittering-ucs-to-char-internal): new function.
(twittering-unicode-replacement-char): initialized by
`twittering-ucs-to-char-internal'.
(twittering-ucs-to-char): redefined with
`twittering-unicode-replacement-char' and
`twittering-ucs-to-char-internal'.
* twittering-mode.el: Modify some codes to avoid warnings on
byte-compile.
(twittering-start-http-session-native-tls-p): load the tls library
before byte-compiling this function. This avoids a warning of the
reference to `tls-program' on byte-compile.
(twittering-read-from-encrypted-file): likewise. The epa library
and "alpaca.el" are loaded before byte-compiling this function.
(twittering-modeline-properties): new constant.
(twittering-modeline-active): defined with
`twittering-modeline-properties'.
(twittering-modeline-inactive): likewise.
2010-09-26 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Remove redundant pre-processing of HTTP
response buffer for SSL via a proxy.
(twittering-oauth-get-response-alist): remove redundant
pre-processing of HTTP response buffer for SSL via proxy. Instead
of it, `twittering-oauth-get-token-alist' invokes an appropriate
function for pre-processing.
* twittering-mode.el: Correct schemes of URIs used in OAuth/xAuth
procedures.
(twittering-oauth-request-token-url): removed.
(twittering-oauth-authorization-url-base): removed.
(twittering-oauth-access-token-url): removed.
(twittering-oauth-request-token-url-without-scheme): new variable.
(twittering-oauth-authorization-url-base-without-scheme): new
variable.
(twittering-oauth-access-token-url-without-scheme): new variable.
(twittering-oauth-get-token-alist): refer to the scheme of the
given URI instead of `twittering-oauth-use-ssl'.
(twittering-verify-credentials): make a URI with correct scheme
for OAuth or xAuth procedure. The scheme is determined by
`twittering-oauth-use-ssl'.
* twittering-mode.el: A HTTP request alist is included in the
connection info for the request.
(twittering-oauth-get-token-alist): add an HTTP request alist into
`connection-info'.
(twittering-send-http-request-curl): extract the HTTP request
alist from `connection-info' instead of an argument.
(twittering-send-http-request-wget): likewise.
(twittering-send-http-request-native): likewise.
(twittering-make-connection-info): generate connection info
according to an arugment `request'.
(twittering-send-http-request): register the sentinel so that it
will be invoked with three arguments, process, status-string and
connection-info. The connection-info is automatically generated
from the given HTTP request alist.
(twittering-start-http-session): do not bind `connection-info'.
* twittering-mode.el: `twittering-send-http-request' receives
optional arguments for connection method.
(twittering-send-http-request): add two optional arguments for
customizing connection method.
* twittering-mode.el: Fix docstring of
`twittering-make-http-request'.
(twittering-make-http-request): fix docstring.
* twittering-mode.el: `twittering-make-http-request' automatically
adds the header field "Content-Length" if necessary.
(twittering-make-http-request): add the header field
"Content-Length" if it is missing on "POST" method.
(twittering-http-application-headers): do not add the header field
"Content-Length".
* twittering-mode.el: Add `twittering-make-http-request-from-uri'.
(twittering-make-http-request): accept a string as the argument
`query-parameters', which is treated as an encoded query string.
(twittering-make-http-request-from-uri): new function, which
generates a HTTP request alist from URI.
* twittering-mode.el: Rearrange `twittering-oauth-get-token-alist'.
(twittering-oauth-get-token-function-table): removed. Instead of
the variable, `twittering-connection-type-table' is used.
(twittering-oauth-get-token-function-type): removed. Instead of
the variable, `twittering-connection-type-order' is used.
(twittering-oauth-get-token-alist): use
`twittering-make-http-request-from-uri' and
`twittering-send-http-request'.
(twittering-verify-credentials): remove unnecessary statements.
(twittering-ensure-connection-method): take account of
`twittering-oauth-use-ssl'.
* twittering-mode.el: Transfer sentinel functions to
`twittering-default-sentinel' via `connection-info'.
(twittering-start-http-session): transfer the variable `sentinel'
to `twittering-http-default-sentinel' via `connection-info'.
(twittering-http-default-sentinel): remove the arguments `func'
and `clean-up-sentinel'. The sentinel functions are retrieved from
`connection-info'.
2010-09-19 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix `twittering-push-uri-onto-kill-ring'.
(twittering-push-uri-onto-kill-ring): confirm that `kill-ring' is
non-nil before calling `current-kill'.
* twittering-mode.el: Copy tweets by "C-<mouse-3>".
Thanks to Faried Nawaz.
(twittering-mode-menu-on-uri-map): new keymap for menu on URI.
(twittering-mode-on-uri-map): new keymap used on URI.
(twittering-mode-map): bind "C-<down-mouse-3>" to
`mouse-set-point' to move the point and bind "C-<mouse-3>" to
`twittering-push-tweet-onto-kill-ring'.
(twittering-make-clickable-status-datum): embed new keymap
`twittering-mode-on-uri-map' in texts that have `uri' property.
(twittering-generate-format-table): likewise.
(twittering-generate-formater-for-first-spec): likewise.
(twittering-push-tweet-onto-kill-ring): new function.
* twittering-mode.el: Introduce a function sending a HTTP requests
with `curl'.
(twittering-connection-type-table): use new functions
`twittering-start-http-session-generic' and
`twittering-send-http-request-curl' for connection-type `curl'.
(twittering-oauth-get-token-function-table): register the
pre-processing function for `curl'.
(twittering-oauth-get-token-alist-generic): new function. This
works with a function sending HTTP request.
(twittering-oauth-get-token-alist-curl): removed. The function is
replaced with the combination of
`twittering-oauth-get-token-alist-generic' and
`twittering-send-http-request-curl'.
(twittering-oauth-get-token-alist): use
`twittering-oauth-get-token-alist-generic' if the found entry is a
cons pair of functions.
(twittering-send-http-request-curl): new function. This is
abstract interface for sending HTTP request via `curl'.
(twittering-start-http-session): add more entries to
`connection-info'. `twittering-send-http-request-curl' requires
them.
(twittering-start-http-session-generic): new function.
(twittering-start-http-session-curl): removed. The function is
replaced with the combination of
`twittering-start-http-session-generic' and
`twittering-send-http-request-curl'.
* twittering-mode.el: Introduce a function sending a HTTP request
with native functions.
(twittering-connection-type-table): use generic function for
connection-type `native'.
(twittering-oauth-get-token-function-table): likewise.
(twittering-oauth-get-token-alist-native): removed. The function
is replaced with the combination of
`twittering-oauth-get-token-alist-generic' and
`twittering-send-http-request-native'.
(twittering-start-http-session-native): removed. The function is
replaced with the combination of
`twittering-start-http-session-generic' and
`twittering-send-http-request-native'.
* twittering-mode.el: Integrate generic function into
`twittering-start-http-session'.
(twittering-connection-type-table): remove the entry `start' and
rename `start-process' `send-http-request'.
(twittering-lookup-http-start-function): use `send-http-request'
instead of `start-process'.
(twittering-start-http-session): unified with
`twittering-start-http-session-generic'.
(twittering-start-http-session-generic): removed.
* twittering-mode.el: The HTTP header field "Expect" will be added
only when using `curl'.
(twittering-send-http-request-curl): add the field "Expect".
(twittering-start-http-session): remove the field "Expect".
* twittering-mode.el: Integrate generic function into
`twittering-oauth-get-token-alist'.
(twittering-oauth-get-token-alist): unified with
`ftwittering-oauth-get-token-alist-generic'.
(twittering-oauth-get-token-alist-generic): removed.
* twittering-mode.el: Add new connection method `wget'.
(twittering-wget-program): new variable.
(twittering-connection-type-order): add an entry for `wget'.
(twittering-connection-type-table): add entries for
new connection-method `wget'.
(twittering-oauth-get-token-function-table): likewise.
(twittering-find-wget-program): new function.
(twittering-start-http-session-wget-p): new function.
(twittering-send-http-request-wget): new function.
(twittering-pre-process-buffer-wget): new function.
* twittering-mode.el: Use an alist for representing parameters of
a HTTP request.
(twittering-oauth-get-token-alist): use an alist for representing
a HTTP request.
(twittering-send-http-request-curl): receive a HTTP request as an
alist.
(twittering-send-http-request-wget): likewise.
(twittering-send-http-request-native): likewise.
* twittering-mode.el: Rearrange `twittering-make-http-request'.
(twittering-make-http-request): return an alist representing
parameters of a HTTP request instead of a function.
(twittering-start-http-session): generate a HTTP request alist by
`twittering-make-http-request'.
* twittering-mode.el: Ensure an available connection method before
visiting a timeline.
(twittering-lookup-http-start-function): do not retry finding
connection-method with compromise. It is assumed that an available
connection method is already determined here.
(twittering-ensure-connection-method): new function.
(twittering-visit-timeline): ensure that an available connection
method is determined.
* twittering-mode.el: Add `twittering-make-connection-info'.
(twittering-make-connection-info): new function.
(twittering-send-http-request): new function.
(twittering-start-http-session): use new functions.
2010-09-12 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Add an edited tweet into the history without
text properties.
(twittering-edit-extract-status): extract a status without text
properties. They may cause `session.el' to fail to save
`twittering-edit-history' because
`twittering-make-clickable-status-datum' adds text properties with
self-reference to tweets.
* twittering-mode.el (twittering-auth-method): fix docstring.
(twittering-timeline-spec-alias): likewise.
2010-09-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-push-uri-onto-kill-ring): avoid
pushing the same URL repeatedly.
* twittering-mode.el: Fix xAuth with `gnutls-cli'.
(twittering-oauth-get-token-alist-native): add a CRLF following
the POST body. `gnutls-cli', which may be invoked by
`open-tls-stream', requires the CRLF at the end of input.
* twittering-mode.el: Introduce `connection-info', which is
transferred to a sentinel.
(twittering-start-http-session): introduce the variable
`connection-info' to transfer the connection information to a
sentinel. Since `connection-info' includes `noninteractive', the
argument `noninteractive' is replaced with `connection-info'.
(twittering-start-http-session-curl): likewise.
(twittering-start-http-session-native): likewise.
(twittering-http-default-sentinel): use `connection-info' instead
of the current `twittering-use-ssl' and `twittering-proxy-use'.
* twittering-mode.el (twittering-http-post): remove use of unbound
variable `noninteractive'.
* twittering-mode.el (twittering-call-api): use the argument
`noninteractive' correctly.
* twittering-mode.el: Introduce a framework to pre-process HTTP
response buffer.
(twittering-connection-type-table): add the entries for
`pre-process-buffer'.
(twittering-oauth-get-response-alist): remove redundant
pre-processing for `openssl s_client'.
(twittering-oauth-get-token-alist-native): pre-process buffer
according to the variable `connection-info'.
(twittering-oauth-get-token-alist-curl): likewise.
(twittering-pre-process-buffer-curl): new function.
(twittering-pre-process-buffer-native): new function.
(twittering-http-default-sentinel): pre-process buffer with the
function registered as `pre-process-buffer' in `connection-info'.
* twittering-mode.el: Fix replying to tweets displayed as replied
tweets. Thanks to Naohiro Aota.
(twittering-enter): correctly use `original-id' for tweets
displayed by `twittering-show-replied-statuses'.
2010-08-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Confirm that a buffer associated with a
process hs not been killed.
(twittering-oauth-get-token-alist-native): confirm that the buffer
associated with the process has not been killed.
(twittering-oauth-get-token-alist-curl): likewise.
* twittering-mode.el: Verify an account synchronously.
(twittering-verify-credentials): wait for the authorization to
finish.
2010-08-22 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-atom-xmltree-to-status-datum):
retrieve `user-screen-name' and optional `user-name' from XML for
StatusNet correctly. Thanks to Takashi Masuda.
* twittering-mode.el: Introduce `clean-up-sentinel' to
`twittering-call-api'. It is executed whenever the process
sentinel is invoked.
(twittering-call-api): add new argument `clean-up-sentinel' for
the command `get-list-index' and `verify-credentials'.
(twittering-start-http-session): add new argument
`clean-up-sentinel' executed whenever the process sentinel is
invoked.
(twittering-start-http-session-curl): likewise.
(twittering-start-http-session-native): likewise.
(twittering-http-get): likewise.
(twittering-http-post): likewise.
(twittering-http-default-sentinel): invoke `clean-up-sentinel' if
it is non-nil.
* twittering-mode.el: Fix the race condition on resetting
authorization information when the process exits abnormally.
(twittering-verify-credentials): use `clean-up-sentinel' for
resetting variables when the process exits abnormally or the HTTP
response is invalid.
(twittering-http-get-verify-credentials-clean-up-sentinel): new
function for resetting some variables when the process for
`verify-credentials' API exits abnormally.
2010-08-21 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Restore `twittering-get-{search,status}-url'.
(twittering-lookup-get-status-url): removed.
(twittering-lookup-get-search-url): removed.
(twittering-get-status-url): look up a function suitable for
`twittering-service-method' and call it.
(twittering-get-search-url): likewise.
(twittering-make-clickable-status-datum): directly call
`twittering-get-status-url' and `twittering-get-search-url'
instead of calling them via `twittering-lookup-get-status-url' or
`twittering-lookup-get-search-url'.
(twittering-generate-format-table): likewise.
(twittering-generate-formater-for-first-spec): likewise.
* twittering-mode.el: Switch ways to parse XML depending on
`twittering-service-method'.
(twittering-atom-xmltree-to-status-datum): switch ways to parse
XML depending on `twittering-service-method'.
* twittering-mode.el: Simplify `twittering-call-api'.
(twittering-call-api): reduce calls of `twittering-api-path'.
* twittering-mode.el: Replace direct calls of
`twittering-http-post' with calls of `twittering-call-api'.
(twittering-update-status-from-minibuffer): use
`twittering-call-api' instead of `twittering-http-post'.
2010-08-20 Takashi Masuda <masutaka@nifty.com>
* twittering-mode.el: Support StatusNet.
(twittering-api-prefix): new variable.
(twittering-search-api-method): new variable.
(twittering-web-path-prefix): new variable.
(twittering-service-method): new variable.
(twittering-service-method-table): new variable.
(twittering-api-path): new function.
(twittering-lookup-get-status-url): new function.
(twittering-get-status-url-twitter): new function.
(twittering-get-status-url-statusnet): new function.
(twittering-lookup-get-search-url): new function.
(twittering-get-search-url-twitter): new function.
(twittering-get-search-url-statusnet): new function.
(twittering-call-api): generate a path of API by
`twittering-api-path'. (API のパスは twittering-api-path から取得
するようにした。)
(twittering-edit-post-status): likewise.
(twittering-update-status-from-minibuffer): likewise.
(twittering-atom-xmltree-to-status-datum): support the format
used in StatusNet.(いずれも検索関連の修正。
「interpret-time-diff.patch」「user-name が設定されていないユーザ
に対応」「検索時のユーザアイコンを取得出来るように修正」)
(twittering-make-clickable-status-datum): retrieve `status-url'
and `search-url' via `twittering-lookup-get-status-url' and
`twittering-lookup-get-search-url'. (twittering-lookup-get-status-url
と twittering-lookup-get-search-url を介して status-url と
search-url を取得するようにした。
(twittering-generate-format-table): likewise.
(twittering-generate-formater-for-first-spec): likewise.
* twittering-mode.el: fix statusnet user URL
(twittering-get-status-url-statusnet): fix user URL
* twittering-mode.el (twittering-generate-format-table):
Do not use icon images scaled by API unless Twitter.
* twittering-mode.el: fix statusnet URL
(twittering-get-status-url-statusnet): fix id URL
(twittering-get-status-url-statusnet): fix hashtag URL
2010-08-20 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-edit-post-status): call
`twittering-call-api' instead of calling `twittering-http-post'
directly.
* twittering-mode.el: Do not add unnecessary parameter `source' to
API calls.
(twittering-http-post): do not add unnecessary parameter `source'.
(twittering-call-api): add the parameter `source' when using BASIC
authentication.
* twittering-mode.el (twittering-call-api): Change parameters in
order to follow the update of Twitter API.
* twittering-mode.el: Add `twittering-push-uri-onto-kill-ring' and
bind "U" to it. Thanks to Faried Nawaz.
(twittering-push-uri-onto-kill-ring): new function for pushing the
uri property of the current position onto the kill-ring.
(twittering-mode-map): bind "U" to
`twittering-push-uri-onto-kill-ring'.
* twittering-mode.el: Add `twittering-new-tweets-statuses' for the
hook functions of `twittering-new-tweets-hook'. Thanks to Faried
Nawaz.
(twittering-new-tweets-statuses): new variable.
(twittering-add-statuses-to-timeline-data): bind
`twittering-new-tweets-statuses' to `new-statuses' so that the
hook functions can refer to the new tweets.
2010-08-15 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Confirm that sufficient information is
loaded from the private file.
(twittering-load-private-info): load only variables that are
enumerated in `twittering-variables-stored-with-encryption'.
(twittering-has-oauth-access-token-p): new function for checking
whether `twittering-oauth-access-token-alist' has sufficient
information.
(twittering-verify-credentials): confirm that sufficient
information is loaded from the private file.
2010-08-06 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix options of `curl' for POST with an empty
body.
(twittering-start-http-session-curl): add an option "-d" whenever
`method' equals to "POST".
* twittering-mode.el: Use the ID of the retweeted original tweet
on generating a URL or retweeting it.
(twittering-status-to-status-datum): add new property `source-id'
specifying a source tweet of a retweet.
(twittering-generate-formater-for-first-spec): generate a URL for
a retweet from the ID of its source.
(twittering-generate-format-status-function): add `source-id' as a
common property.
(twittering-native-retweet): use `source-id' for a retweet.
* twittering-mode.el: Update the embedded CA certificate into
`Equifax Secure Certificate Authority'.
(twittering-ensure-ca-cert): replace the CA certificate with
`Equifax Secure Certificate Authority' currently referred by
`api.twitter.com' and `search.twitter.com'.
2010-07-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-mode): avoid repeating
authorization when `twittering-initial-timeline-spec-string' is a
list of multiple timeline spec strings.
* twittering-mode.el (twittering-http-default-sentinel): display
an error message when waiting for a response of an authorization
query.
* twittering-mode.el: Replace functions `mapcan' and `map' defined
in `cl-extra' with built-in functions in order to prevent the
byte-compiled `twittering-mode' from depending on `cl-extra'.
(twittering-oauth-get-token-alist-curl): replace `mapcan' with a
combination of `apply', `append' and `mapcar'.
(twittering-start-http-session-curl): likewise.
2010-07-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-redisplay-status-on-buffer): Fix
the condition of redisplaying a timeline.
* twittering-mode.el: If it fails to retrieve an image a certain
times, retry no longer.
(twittering-create-image-pair): return
`twittering-error-icon-data-pair' if the argument `image-data' is
nil.
(twittering-make-icon-string): fix the condition of
`image-data'. If it is an integer, it means the time of retries.
* twittering-mode.el: Use icon images scaled by API if possible.
(twittering-generate-format-table): generate the URL of the scaled
icon image by API.
* twittering-mode.el: Use `GET users/profile_image' API only if
the variable `twittering-use-profile-image-api' is non-nil. Since
the API is rate limited, it may cause troubles on other API calls.
(twittering-use-profile-image-api): new variable.
(twittering-generate-format-table): call `GET users/profile_imagne'
API only if `twittering-use-profile-image-api' is non-nil.
2010-07-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Replace `xml-parse-region' with
`twittering-xml-parse-region' in order to prevent abnormal exit
caused by decoding unknown numeric character references.
(twittering-unicode-replacement-char): new variable.
(twittering-ucs-to-char): return
`twittering-unicode-replacement-char' if decoding failed.
(decode-char): new advice in order to return
`twittering-unicode-replacement-char' for unknown code-points.
(twittering-xml-parse-region): new function. This function does
not exit abnormally even if given XML includes unknown numeric
references. Unknown numeric references are replaced with
`twittering-unicode-replacement-char'.
(twittering-get-error-message): replace `xml-parse-region' with
`twittering-xml-parse-region'.
(twittering-http-get-list-index-sentinel): likewise.
(twittering-get-status-from-http-response): likewise.
* twittering-mode.el (twittering-oauth-get-token-alist-url): fix a
list of bindings.
2010-07-02 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-oauth-get-token-alist-native):
use `twittering-tls-program' correctly.
* twittering-mode.el: Detect abnormal exit of an invoked process.
(twittering-oauth-get-token-alist-native): confirm the exit
status of the invoked process.
(twittering-oauth-get-token-alist-curl): likewise.
(twittering-http-default-sentinel): likewise.
* twittering-mode.el: Allow insecure server certificates if
`twittering-allow-insecure-server-cert' is non-nil.
(twittering-allow-insecure-server-cert): new variable.
(twittering-oauth-get-token-alist-curl): add "--insecure" option
to the arguments for `curl' if
`twittering-allow-insecure-server-cert' is non-nil.
(twittering-start-http-session-curl): likewise.
(twittering-start-http-session-native-tls-p): add options to the
programs in `tls-program' in order to allow insecure server
certificates if `twittering-allow-insecure-server-cert' is
non-nil.
* twittering-mode.el (twittering-verify-credentials): display an
error message if the variable `twittering-auth-method' is
invalid.
2010-07-01 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Support the url library included in Emacs 23
and later.
(twittering-oauth-get-token-alist-native): support the function
`url-generic-parse-url' that returns parsed URL object generated
as `structure'.
(twittering-oauth-get-token-alist-curl): likewise.
* twittering-mode.el (twittering-call-api): `user', `friends',
`mentions' and `public' timelines include native retweets.
2010-06-30 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-verify-credentials): reset
`twittering-username' when authentication via xAuth failed.
* twittering-mode.el (twittering-verify-credentials): invoke
`twittering-prepare-account-info' before authentication method
requiring account information.
(twittering-visit-timeline): invoke
`twittering-verify-credentials' before reading timeline spec.
2010-06-29 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Confirm process status for avoiding
dead-lock.
(twittering-oauth-get-token-alist-native): confirm the process
status in order to avoid dead-lock. If the process exited
abnormally, the variable `result' becomes nil.
(twittering-oauth-get-token-alist-curl): likewise.
(twittering-verify-credentials): wait for the process to exit
in order to avoid dead-lock.
(twittering-get-list-index-sync): likewise.
* twittering-mode.el (twittering-verify-credentials): wait for the
process to exit in order to avoid dead-lock.
* twittering-mode.el: Support authentication via xAuth.
(twittering-get-list-index-sync): likewise.
(twittering-xauth-auth-str-access-token): new function.
(twittering-oauth-get-token-alist-url): add an argument
`post-body'.
(twittering-oauth-get-token-alist-native): likewise.
(twittering-oauth-get-token-alist-curl): likewise.
(twittering-oauth-get-token-alist): add an optional argument
`post-body'.
(twittering-xauth-get-access-token): new function.
(twittering-prepare-account-info): support xAuth.
(twittering-verify-credentials): likewise.
(twittering-http-application-headers-with-auth): likewise.
(twittering-visit-timeline): call
`twittering-prepare-account-info' for xAuth.
2010-06-13 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-write-and-encrypt): fix arguments
of `epg-context-set-progress-callback' because of the difference
between EasyPG 0.0.16 and that included in Emacs23.
* twittering-mode.el (twittering-save-private-info): change the
permission of the encrypted file in order to prevent others from
reading the file.
(twittering-write-and-encrypt): return t explicitly when it
succeeded in encrypting private information.
* twittering-mode.el (twittering-write-and-encrypt): In order to
prevent `epa-file' to encrypt the file double,
`epa-file-name-regexp' is temorarily changed into the null regexp
that never matches any string.
2010-06-12 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix bugs.
(twittering-hmac-sha1): remove invalid arguments.
(twittering-oauth-auth-str): correct a variable.
* twittering-mode.el: Support master password for storing private
information in an encrypted file.
(twittering-use-master-password): new variable.
(twittering-private-info-file): new variable.
(twittering-variables-stored-with-encryption): new variable.
(twittering-load-private-info): new function.
(twittering-load-private-info-with-guide): new function.
(twittering-save-private-info): new function.
(twittering-save-private-info-with-guide): new function.
(twittering-capable-of-encryption-p): new function.
(twittering-read-from-encrypted-file): new function.
(twittering-write-and-encrypt): new function.
(twittering-verify-credentials): support master password.
* twittering-mode.el: Add codes for debugging functions for
OAuth.
(twittering-oauth-get-token-alist-url): add codes for debug.
(twittering-oauth-get-token-alist-native): likewise.
(twittering-oauth-get-token-alist-curl): likewise.
2010-06-09 Yuto Hayamizu <y.hayamizu@gmail.com>
* twittering-mode.el (twittering-oauth-get-access-token): reject
invalid PIN code input and strip extra white spaces.
2010-06-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: confirm that a valid access token has been
retrieved.
(twittering-oauth-make-response-alist): do not decode a null entry.
(twittering-verify-credentials): confirm that the retrieved
`token-alist' is valid as an access token.
2010-06-04 Yuto Hayamizu <y.hayamizu@gmail.com>
* twittering-mode.el: removed (set-terminal-coding-system 'utf-8)
(twittering-mode-map): changed key bindings:
twittering-public-timeline: C-c C-g -> C-c C-p,
twittering-set-current-hashtag: C-c C-h -> C-c C-t
2010-06-03 Yuto Hayamizu <y.hayamizu@gmail.com>
* twittering-mode.el: add encrypted oauth consumer key/secret
(twittering-auth-method): changed default value to 'oauth
(twittering-oauth-get-access-token): give users a choise to open
authrization URL with browser or not when
twittering-oauth-invoke-browser is nil.
2010-06-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use `twittering-oauth-use-ssl' instead of
`twittering-use-ssl' on functions for OAuth.
(twittering-oauth-use-ssl): add docstring.
(twittering-oauth-get-response-alist): use
`twittering-oauth-use-ssl' instead of `twittering-use-ssl'.
(twittering-oauth-get-token-alist-native): likewise.
(twittering-oauth-get-token-alist-curl): likewise.
(twittering-verify-credentials): likewise.
* twittering-mode.el: Restore window parameters after automatic
redisplaying.
(twittering-current-window-config): new function.
(twittering-restore-window-config-after-modification): new function.
(twittering-redisplay-status-on-each-buffer): restore window
parameters after redisplaying.
* twittering-mode.el: Suppress automatic redisplaying if
unnecessary.
(twittering-redisplay-status-on-each-buffer): do not modify buffer
if updated string is same as the current string in the meaning of
`string='.
(twittering-make-icon-string): give different strings for
displayed and undisplayed icon.
* twittering-mode.el: Stop automatic redisplaying of buffers in
which the mark and region are active.
(twittering-redisplay-status-on-buffer): do not update buffer
in which the mark and region are active.
* twittering-mode.el: Reimplement the status formater that allows
recursive specifiers such as "%FILL{%FACE[bold]{%C{%m/%d}}: %T}".
(twittering-parse-format-string): removed.
(twittering-generate-formater): removed.
(twittering-generate-status-formater-base): removed.
(twittering-generate-format-table): new function.
(twittering-generate-formater-for-first-spec): new function.
(twittering-generate-formater-for-current-level): new function.
(twittering-generate-format-status-function): new function.
(twittering-generate-format-status-function): use new
implementation.
* twittering-mode.el: Add an optional argument for the format
specifier `FILL'. The argument specifies the prefix for the filled
region.
(twittering-status-format): use 2 white spaces as fill-prefix in
default.
(twittering-fill-string): use an additional argument `prefix' as
`fill-prefix' for `fill-region-as-paragraph' if the argument is
non-nil.
(twittering-update-filled-string): transfer the local prefix for
`twittering-fill-string'.
(twittering-generate-formater-for-first-spec): recognize an
optional argument for the format specifier `FILL'.
* twittering-mode.el: Add a new format specifier
"%FOLD[prefix]{...}".
(twittering-fill-string): add an argument `keep-newline'. If it is
non-nil, do not remove newlines in given string.
(twittering-update-filled-string): add an argument
`keep-newline'.
(twittering-generate-formater-for-first-spec): add a new specifier
"%FOLD[prefix]{...}".
* twittering-mode.el: Fix unintended cursor motion caused by
automatic redisplaying.
(twittering-redisplay-status-on-each-buffer): fix the incorrect
cursor motion occurring when it points the beginning of region
that will be be modified.
2010-05-27 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-toggle-activate-buffer): restart
the timer if it is not active when activating a buffer.
2010-05-24 Naohiro Aota <naota@elisp.net>
* twittering-mode.el (twittering-native-retweet): Check if tweet
is my own one.
2010-05-22 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use the coding-system `utf-8-unix' for
reading data retrieved from Twitter.
(twittering-start-http-session-curl): use the coding-system
`utf-8-unix' for reading data retrieved from Twitter.
(twittering-start-http-session-native): likewise.
* twittering-mode.el: Omit a successful HTTP response and headers
if they seem to be sent from a proxy for CONNECT method.
(twittering-http-default-sentinel): omit a successful HTTP
response and headers from a proxy if using SSL via the proxy.
(twittering-get-response-header): do not remove headers from a
proxy.
* twittering-mode.el: Do not initialize `twittering-tls-program'
multiple times.
(twittering-start-http-session-native-tls-p): check `tls-program'
only if `twittering-tls-program' is nil.
* twittering-mode.el: Cache the result of capability confirmation
for `curl'.
(twittering-start-http-session-curl-p): do not initialize
`twittering-curl-program' multiple times.
(twittering-start-http-session-curl-https-p): do not execute
`curl' multiple times.
* twittering-mode.el: Look-up of connection type is rearranged.
(twittering-lookup-http-start-function): reimplemented.
(twittering-lookup-connection-type): new function.
* twittering-mode.el: Confirm an available connection method
before visiting a timeline.
(twittering-visit-timeline): confirm connection method.
* twittering-mode.el: Support authentication via OAuth. The
authentication requires a consumer information registered with
Twitter and an external WWW browser to authorize a request token.
(twittering-auth-method): new variable.
(twittering-oauth-consumer-key, twittering-oauth-consumer-secret):
new variables for specifying an OAuth consumer.
(twittering-oauth-access-token-alist): new variable for storing
access token.
(twittering-oauth-url-encode): new function.
(twittering-oauth-unhex): new function.
(twittering-oauth-url-decode): new function.
(twittering-oauth-make-signature-base-string): new function.
(twittering-oauth-make-random-string): new function.
(twittering-hmac-sha1): imported from
http://www.emacswiki.org/emacs/HmacShaOne .
(twittering-oauth-auth-str): new function.
(twittering-oauth-auth-str-request-token): new function.
(twittering-oauth-auth-str-exchange-token): new function.
(twittering-oauth-auth-str-access): new function.
(twittering-oauth-make-response-alist): new function.
(twittering-oauth-get-response-alist): new function.
(twittering-oauth-get-token-alist-url): new function.
(twittering-oauth-get-token-alist-native): new function.
(twittering-oauth-get-token-alist-curl): new function.
(twittering-oauth-get-token-function-table): new variable.
(twittering-oauth-get-token-function-type): new variable.
(twittering-oauth-invoke-browser): new variable.
(twittering-oauth-get-token-alist): new function.
(twittering-oauth-get-request-token): new function.
(twittering-oauth-exchange-request-token): new function.
(twittering-oauth-get-access-token): new function.
(twittering-prepare-account-info): acquire username and password
only if `twittering-auth-method' is symbol `basic'.
(twittering-verify-credentials): support Authentication via OAuth.
(twittering-http-application-headers): do not add Authorization
header.
(twittering-http-application-headers-with-auth): new function for
generating headers adapted for each authentication method.
(twittering-http-get): use
`twittering-http-application-headers-with-auth'.
(twittering-http-post): likewise.
(twittering-percent-encode): encode a string according to
Percent-Encoding defined in RFC3986 instead of RFC1738. It simply
calls `twittering-oauth-url-encode'.
(twittering-url-reserved-p): removed.
* test/test-twittering-mode.el: add new test `test-oauth'.
* emacs21/hex-util.el: imported from Emacs22.
* emacs21/sha1.el: imported from Emacs22.
* twittering-mode.el (twittering-oauth-get-access-token): fix the
guide string of authorization via OAuth.
* twittering-mode.el (twittering-hmac-sha1): fix indentation.
* twittering-mode.el: Fix `twittering-hmac-sha1' so that it works
well on Emacs23 and later.
(twittering-hmac-sha1): ensure that internal variables are unibyte
strings even on Emacs23 and later.
* test/test-twittering-mode.el: add new test `test-hmac-sha1'.
* emacs21/sha1.el: Imported from Gnus distributed with Emacs
22.2.1 on Debian 5.0 for Emacs21 that does not include `sha1.el'.
* emacs21/hex-util.el: Imported from Gnus distributed with Emacs
22.2.1 on Debian 5.0 for Emacs21 that does not include
`hex-util.el'.
2010-05-20 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: The configuration of a proxy is referred via
the function `twittering-proxy-info'.
(twittering-proxy-info): return all configuration of the proxy for
the scheme.
* twittering-mode.el: Give priority to the variable
`twittering-proxy-*' over `twittering-http-proxy-*' and
`twittering-https-proxy-*'.
(twittering-proxy-server): defined as a variable.
(twittering-proxy-port): likewise.
(twittering-proxy-keep-alive): likewise.
(twittering-proxy-user): likewise.
(twittering-proxy-password): likewise.
(twittering-normalize-proxy-vars): normalize
`twittering-proxy-port'.
(twittering-proxy-info): return configuration generated from
`twittering-proxy-*' regardless of the scheme (HTTP or HTTPS) if
`twittering-proxy-server' and `twittering-proxy-port' are
non-nil.
2010-05-17 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-start-http-session-curl): fix
extraction of the scheme from the variable `request'.
* twittering-mode.el: Use a relative path to specify the temporary
cert file for `curl' to ignore the difference of path
representation between Windows and Cygwin.
(twittering-start-http-session-curl): change directory before
invoking `curl' and specify the temporary cert file with relative
path.
2010-05-15 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Add copyright of the ACTIVE/INACTIVE
indicators derived from Wanderlust.
(twittering-active-indicator-image): add the copyright as a
comment.
(twittering-inactive-indicator-image): likewise.
* twittering-mode.el: The function `twittering-icon-mode' keeps
the current cursor point.
(twittering-render-timeline): add a new argument `keep-point'.
(twittering-icon-mode): keep the current cursor point.
* test/test-twittering-mode.el: Remove an obsolete test and update
`test-format-status'.
* twittering-mode.el: The proxies for HTTP and HTTPS can be
configured individually. The variables
`twittering-proxy-{server,port,user,password,keep-alive}' are now
aliases.
(twittering-http-proxy-server): new variable.
(twittering-http-proxy-port): new variable.
(twittering-http-proxy-user): new variable.
(twittering-http-proxy-password): new variable.
(twittering-http-proxy-keep-alive): new variable.
(twittering-https-proxy-server): new variable.
(twittering-https-proxy-port): new variable.
(twittering-https-proxy-user): new variable.
(twittering-https-proxy-password): new variable.
(twittering-https-proxy-keep-alive): new variable.
(twittering-proxy-server): changed into an alias to
`twittering-http-proxy-server'.
(twittering-proxy-port): changed into an alias to
`twittering-http-proxy-port.
(twittering-proxy-user): changed into an alias to
`twittering-http-proxy-user.
(twittering-proxy-password): changed into an alias to
`twittering-http-proxy-password.
(twittering-proxy-keep-alive): changed into an alias to
`twittering-http-proxy-keep-alive.
(twittering-normalize-proxy-vars): new function.
(twittering-proxy-info): new function.
(twittering-url-proxy-services): new function.
(twittering-setup-proxy): initialize individual proxy
configurations for HTTP and HTTPS.
* twittering-mode.el: Enable to retrieve icon images silently.
(twittering-url-show-status): new variable.
(twittering-url-wrapper): control display of status even if the
retrieval is asynchronous.
2010-05-11 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix initialization of `twittering-tls-program'.
(twittering-start-http-session-native-tls-p): use
`twittering-tls-program' if it is non-nil.
2010-05-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use "\\`" as the regexp for the head of a
tweet instead of "^". This prevents misinterpretation of tweets
including multiple lines.
(twittering-edit-post-status): correct the regexp for determining
whether the "in-reply-to" ID should be attached or not.
(twittering-update-status-from-minibuffer): likewise.
(twittering-status-not-blank-p): correct the regexp for
distinguish a blank tweet from a non-blank tweet.
* twittering-mode.el: Prevent applying improper functions to a
failed connection.
(twittering-verify-credentials): give up authorization if
`twittering-call-api' returns nil.
(twittering-start-http-session-curl): return nil if it failed to
open a connection.
(twittering-start-http-session-native): likewise.
* twittering-mode.el: Support HTTPS with `tls' library.
(twittering-tls-program): new variable.
(twittering-connection-type-table): register
`twittering-start-http-session-native-tls-p' as the "https" entry
for "native".
(twittering-start-http-session-native-tls-p): new function.
(twittering-start-http-session-native): call `open-tls-stream' if
`twittering-use-ssl' is non-nil.
* emacs21/tls.el: Imported from Emacs 22.2.1 on Debian 5.0 for
Emacs21 that does not include `tls.el'.
2010-05-08 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Add an abstract layer for Twitter API.
(twittering-call-api): new function.
(twittering-timeline-spec-to-host-method): removed.
(twittering-host-method-to-timeline-spec): removed.
(twittering-manage-friendships): removed.
(twittering-manage-favorites): removed.
(twittering-get-tweets): removed.
(twittering-verify-credentials): use `twittering-call-api' instead
of calling `twittering-http-get' directly.
(twittering-get-list-index): likewise.
(twittering-get-and-render-timeline): use `twittering-call-api'
instead of calling `twittering-get-tweets'. The function also
calculates how many tweets should be retrieved.
(twittering-update-lambda): use `twittering-call-api' instead of
calling `twittering-http-post' directly.
(twittering-update-jojo): likewise.
(twittering-native-retweet): likewise.
(twittering-follow): use `twittering-call-api'.
(twittering-favorite): likewise.
* twittering-mode.el: Bind "C-c D" to `twittering-delete-status',
which is a new function deleting a tweet.
(twittering-delete-status): new function.
(twittering-call-api): add a new command `destroy-status'.
(twittering-delete-status-from-data-table): new function.
(twittering-mode-map): bind "C-c D" to `twittering-delete-status'.
2010-05-08 Takashi Masuda <masutaka@nifty.com>
* twittering-mode.el (twittering-update-jojo): 自分のツイートには返
信しないようにした。
* twittering-mode.el (twittering-update-jojo): do not reply to
tweets posted by the current user itself.
2010-05-08 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-jojo-mode-p): confirm that the
buffer has not been killed.
2010-05-06 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix the format specifier "%r" for direct
message.
(twittering-status-to-status-datum): add `recipient-screen-name'
as a element of a status.
(twittering-xmltree-to-status): store `recipient_screen_name'
without modificaiton.
(twittering-generate-status-formater-base): replace "%r" with
`recipient-screen-name' if it exists.
2010-05-05 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use a dummy buffer to prevent the cursor
from moving without intention after invoking `url-retrieve'.
(twittering-url-request-dummy-buffer-name): new constant for dummy
buffer.
(twittering-resolve-url-request): switch to the dummy buffer just
after killing the content buffer generated by `url-retrieve'. This
prevents multiple threads from having different cursor points for
the same buffer.
2010-05-05 Takashi Masuda <masutaka@nifty.com>
* twittering-mode.el: twittering-jojo-mode の判定ミスを修正。
(twittering-add-statuses-to-timeline-data): 判定方法を変更した。
(twittering-jojo-mode-p): new function
* twittering-mode.el: `twittering-jojo-mode' for each spec is
correctly referred in order to decide whether to invoke
`twittering-update-jojo'.
(twittering-add-statuses-to-timeline-data): correct the condition
for invoking `twittering-update-jojo'.
(twittering-jojo-mode-p): new function.
2010-05-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-ask-post): renamed
`twittering-request-confirmation-on-posting'.
* twittering-mode.el (twittering-edit-post-status): correct the
condition for requesting confirmation on posting a status.
2010-05-03 Takashi Masuda <masutaka@nifty.com>
* twittering-mode.el: Tweet する時に y-or-n-p で問い合わせを出来る
ようにした。デフォルトは聞かれない。
(twittering-ask-post): new variable
* twittering-mode.el: Add confirmation on posting a status edited
in pop-up buffer. It is disabled on default.
(twittering-ask-post): new variable.
* twittering-mode.el: `V' の補完対象に :direct_messages や :home を
追加した。
(twittering-read-timeline-spec-with-completion): dummy-hist に追加。
* twittering-mode.el: Add some primary timeline specs, such as
":direct_messages" and ":home", to candidates of completion.
(twittering-read-timeline-spec-with-completion): add some timeline
specs to dummy-hist.
2010-05-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-edit-setup-help): generate help
message by using `substitute-command-keys'.
* twittering-mode.el: The format specifier "@" can receive the
time format string, which is used to format the time of
sufficiently old statuses.
(twittering-generate-status-formater-base): add new parameter
'time-format' to the specifier "@".
(twittering-make-passed-time-string): receive new argument
`time-format'.
* twittering-mode.el: Functions for retrieving URLs asynchronously
are added.
(twittering-url-data-hash): new variable for retrieved data.
(twittering-url-request-list): new variable for additional requests.
(twittering-url-request-sentinel-hash): new variable for sentinels.
(twittering-internal-url-queue): new variable.
(twittering-url-request-resolving-p): new variable.
(twittering-url-request-retry-limit): new variable.
(twittering-remove-redundant-queries): new function.
(twittering-resolve-url-request): new function.
(twittering-url-retrieve-async): new function.
* twittering-mode.el: Icons are retrieved asynchronously.
(twittering-icon-prop-hash): new variable.
(twittering-image-data-table): removed.
(twittering-get-display-spec-for-icon): new function.
(twittering-convert-image-data): new function.
(twittering-error-icon-data-pair): new constant.
(twittering-create-image-pair): new function.
(twittering-register-image-data): new function.
(twittering-make-slice-spec): new function.
(twittering-make-display-spec-for-icon): rearranged.
(twittering-make-icon-string): new function.
(twittering-retrieve-image): removed.
(twittering-generate-status-formater-base): use
`twittering-make-icon-string'.
(twittering-image-stack): removed.
(twittering-image-type): removed.
(twittering-image-type-cache): removed.
2010-05-01 Immad Naseer <immad.naseer@gmail.com>
* twittering-mode.el: New interactive functions for direct
messages are added.
(twittering-direct-messages-timeline): new function.
(twittering-sent-direct-messages-timeline): new function.
2010-04-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix mode-line to display the rate limit.
(twittering-mode-line-buffer-identification): add the remaining
number of API requests if `twittering-display-remaining' is
non-nil.
* twittering-mode.el: Stop keeping undo information for buffers
managed by `twittering-mode'. Thanks to irie for pointing it out.
(twittering-mode-setup): call `buffer-disable-undo'.
* twittering-mode.el: Verify the account in advance of retrieving
statuses.
(twittering-account-authorization): new variable.
(twittering-account-authorized-p): new function.
(twittering-account-authorization-queried-p): new function.
(twittering-prepare-account-info): new function for completing
username and password.
(twittering-verify-credentials): new function.
(twittering-http-get-verify-credentials-sentinel): new function.
(twittering-get-managed-buffer): start the timer after
authorization.
(twittering-mode-init-global): initialize neither
`twittering-username' nor `twittering-password'.
(twittering-mode): call `twittering-prepare-account-info'.
(twittering-get-and-render-timeline): ignore requests unless
authorization is completed.
(twittering-update-active-buffers): do not retrieve statuses
unless authorization is completed.
(twittering-visit-timeline): verify the account.
(twittering-get-username): use `twittering-username' directly.
(twittering-get-password): use `twittering-password' directly.
(twittering-username-active): removed.
(twittering-password-active): removed.
* twittering-mode.el: `twittering-visit-timeline' initializes
global variables if necessary.
(twittering-visit-timeline): initialize global variables and
prepare account information.
(twittering-mode): delegate the initialization to
`twittering-visit-timeline'.
(twittering-mode-init-global): renamed
`twittering-initialize-global-variables-if-necessary'.
* twittering-mode.el: Support multiple timelines on initialization.
(twittering-initial-timeline-spec-string): mean multiple timelines
if the value is a list of strings.
(twittering-mode): support multiple timeline specs on
initialization.
2010-04-24 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Reimplement indicators.
(twittering-ssl-indicator-image): new constant.
(twittering-modeline-ssl): defined as a constant, which is
initialized on loading `twittering-mode.el'.
(twittering-ssl-image, twittering-ssl-indicator): removed.
(twittering-ssl-icon): removed.
(twittering-active-image, twittering-inactive-image): removed.
(twittering-active-indicator, twittering-inactive-indicator):
removed.
(twittering-icon-directory): removed.
(twittering-active-icon, twittering-inactive-icon): removed.
(twittering-display-image-p): removed.
(twittering-init-mode-line-icons): removed. Images are initialized
as constants on loading `twittering-mode.el'.
(twittering-active-indicator-image): new constant.
(twittering-inactive-indicator-image): new constant.
(twittering-modeline-active): defined as a constat.
(twittering-modeline-inactive): likewise.
(twittering-mode-init-global): remove the call of
`twittering-init-mode-line-icons'.
* twittering-mode.el: Display the buffer state as
`mode-line-buffer-identification' instead of `mode-name'.
(twittering-mode-line-buffer-identification): new function for
generating a mode-line string for `twittering-mode'.
(twittering-mode-string): removed.
(twittering-modeline-ssl): remove brackets from the mode-line
string.
(twittering-modeline-active): use a whitespace with `display' face
as a mode-line string.
(twittering-modeline-inactive): remove brackets from the mode-line
string.
(twittering-update-mode-line): call `force-mode-line-update' only.
(twittering-mode-setup): initialize `mode-name' and
`mode-line-buffer-identification'.
2010-04-19 Takashi Masuda <masutaka@nifty.com>
* twittering-mode.el : 関数名が古かったので、リネーム。
(twittering-init-mode-line-icons):
(twittering-mode-init-global):
twittering-init-active-inactive-icons から
twittering-init-mode-line-icons にリネーム。
* twittering-mode.el : rename old functions.
(twittering-init-mode-line-icons): rename
`twittering-init-active-inactive-icons'
`twittering-init-mode-line-icons'.
* twittering-mode.el : SSL と ACTIVE/INACTIVE の状態をモードライン
アイコンに表示するようにした。-nw 時は文字列を表示する。
(twittering-update-mode-line): mode-line-buffer-identification の設
定を追加。INACTIVE と ssl の mode-name への設定を削除した。
(twittering-display-image-p): 新規マクロ
(twittering-init-active-inactive-icons): 新規関数
(twittering-mode-init-global):
twittering-init-active-inactive-icons を呼ぶように修正。
* twittering-mode.el : display graphical indicators for SSL and
ACTIVE/INACTIVE state on mode-line.
(twittering-update-mode-line): add graphical indicators to
`mode-line-buffer-identification' instead of `mode-name'.
(twittering-display-image-p): new macro.
(twittering-init-active-inactive-icons): new function.
(twittering-mode-init-global): call
`twittering-init-active-inactive-icons'.
* icons/ssl.xpm: 上記に伴い Mew から拝借。
* icons/ssl.xpm: imported from Mew.
* offline.patch: 上記に伴い削除。元々私がブログに公開したものを
Hayamizu 氏が拾って下さったもの。
* offline.patch: removed. (Mr.Hayamizu imported it, which
originated from Masuda's blog.)
2010-04-19 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-get-buffer-from-spec): return nil
if the corresponding buffer has been already killed.
(twittering-update-unread-status-info): do not count statuses for
a killed buffer.
(twittering-http-get-default-sentinel): do not render a timeline
for a killed buffer.
2010-04-17 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Reimplement support of multiple buffers. The
timeline spec and active-mode flag of each managed buffer are
stored as buffer-local variables.
(twittering-timeline-spec): new buffer-local variable.
(twittering-timeline-spec-string): new buffer-local variable.
(twittering-active-mode): new buffer-local variable.
(twittering-buffer-info-list): redefined as a list of buffers.
(twittering-get-buffer-list): follow the redefinition of
`twittering-buffer-info-list'.
(twittering-get-active-buffer-list): likewise.
(twittering-buffer-p): likewise.
(twittering-get-buffer-from-spec): likewise.
(twittering-unregister-buffer): likewise.
(twittering-unregister-killed-buffer): likewise.
(twittering-buffer-active-p): use buffer-local
`twittering-active-mode'.
(twittering-get-timeline-spec-for-buffer): use buffer-local
`twittering-timeline-spec'.
(twittering-get-timeline-spec-string-for-buffer): use buffer-local
`twittering-timeline-spec-string'.
(twittering-register-buffer): removed. Its body is integrated into
`twittering-get-managed-buffer'.
(twittering-replace-spec-string-for-buffer): set buffer-local
`twittering-timeline-spec-string' directly.
(twittering-set-active-flag-for-buffer): use
`twittering-toggle-activate-buffer'.
(twittering-toggle-activate-buffer): set buffer-local
`twittering-active-mode' directly.
(twittering-get-managed-buffer): rearranged.
(twittering-mode-setup): set up `twittering-timeline-spec',
`twittering-timeline-spec-string' and `twittering-active-mode'.
And register the current buffer to `twittering-buffer-info-list'.
* twittering-mode.el: Add functions to switch timelines.
(twittering-switch-to-next-timeline): new function.
(twittering-switch-to-previous-timeline): new function.
(twittering-mode-map): bind "f" and "b" to
`twittering-switch-to-next-timeline' and
`twittering-switch-to-previous-timeline', respectively.
2010-04-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-mode-init-global): initialize
faces without using `copy-face' because it does not change the
default face for new frames.
2010-04-07 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix a bug on updating timeline history.
(twittering-http-get-default-sentinel): call
`twittering-add-timeline-history' with correct timeline spec
string.
(twittering-add-timeline-history): receive timeline spec string
instead of timeline spec.
* twittering-mode.el (twittering-mode-setup): omit redundant call
of `run-hook'.
* twittering-mode.el (twittering-direct-message): fix a lack of
separator. Thanks to Takashi Masuda.
2010-04-06 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-new-tweets-spec): new variable
for timeline spec on running `twittering-new-tweets-hook'.
* twittering-mode.el: Add an experimental notifier for unread
statuses on mode-line. You can enable it by invoking
`twittering-enable-unread-status-notifier'. To disable it, invoke
`twittering-disable-unread-status-notifier'.
(twittering-unread-status-info): new variable.
(twittering-reset-unread-status-info-if-necessary): new function.
(twittering-set-number-of-unread): new function.
(twittering-make-unread-status-notifier-string): new function.
(twittering-update-unread-status-info): new function.
(twittering-enable-unread-status-notifier): new function.
(twittering-disable-unread-status-notifier): new function.
* twittering-mode.el: Support fixed fill-column for the format
specifier "%FILL{...}". Thanks to William Xu.
(twittering-fill-column): new variable.
2010-04-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Improve compatibility with global-font-lock mode.
(twittering-mode-init-global): use `bold' instead of
`font-lock-string-face' if it has not been bound yet.
`twittering-mode' does not require loading `font-lock'.
(twittering-mode-setup): prevent `global-font-lock-mode' enabling
`font-lock-mode' by using buffer-local `font-lock-global-modes'.
`twittering-mode' can be used with/without any configuration for
font-lock mode.
* twittering-mode.el: Replace hard-coded hostnames with
variables and functions. Thanks to William Xu.
(twittering-api-host): new variable.
(twittering-api-search-host): new variable.
(twittering-web-host): new variable.
(twittering-get-search-url): new function.
(twittering-make-clickable-status-datum): call
`twittering-get-search-url' instead of using hard-coded hostname.
* twittering-mode.el (twittering-start-http-session-curl): do not
overwrite headers that `curl' will define internally. Thanks to
William Xu.
2010-04-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-buffer-active-p): renamed
`twittering-buffer-related-p'.
* twittering-mode.el (twittering-start): check the value of
`twittering-timer-for-redisplaying' before setting timer.
* twittering-mode.el: Multiple buffers are supported.
(twittering-buffer-info-list): new variable for managing multiple
buffers.
(twittering-buffer): both of the function and the variable are
removed.
(twittering-update-mode-line): remove timeline spec from mode-line
because it is displayed as the name of buffer.
(twittering-switch-timeline): removed.
(twittering-get-buffer-list): new function.
(twittering-get-active-buffer-list): new function.
(twittering-buffer-related-p): modified to support multiple buffers.
(twittering-buffer-p): new function.
(twittering-buffer-active-p): new function.
(twittering-get-buffer-from-spec): new function.
(twittering-get-buffer-from-spec-string): new function.
(twittering-get-timeline-spec-for-buffer): new function.
(twittering-get-timeline-spec-string-for-buffer): new function.
(twittering-current-timeline-spec): return timeline spec for the
current buffer.
(twittering-current-timeline-spec-string): return timeline spec
string for the current buffer.
(twittering-register-buffer): new function.
(twittering-unregister-buffer): new function.
(twittering-unregister-killed-buffer): new function.
(twittering-replace-spec-string-for-buffer): new function.
(twittering-set-active-flag-for-buffer): new function.
(twittering-toggle-activate-buffer): new function.
(twittering-activate-buffer): new function.
(twittering-deactivate-buffer): new function.
(twittering-kill-buffer): new function.
(twittering-generate-new-buffer): new function.
(twittering-switch-timeline): removed.
(twittering-get-managed-buffer): new function.
(twittering-mode-map): `twittering-toggle-activate-buffer' is
bound to "a". `twittering-kill-buffer' is bound to "q" instead of
`twittering-suspend'.
(twittering-mode-init-global): new function for initializing
global variables.
(twittering-initialized): new variable.
(twittering-mode-setup): new function for initializing a buffer
being managed by `twittering-mode'.
(twittering-mode): reimplemented.
(twittering-icon-mode): support multiple buffers.
(twittering-http-get-default-sentinel): render the retrieved
statuses on the buffer bound to the timeline spec.
(twittering-redisplay-status-on-buffer): support multiple buffers.
(twittering-redisplay-status-on-each-buffer): new function.
(twittering-render-timeline): require the target buffer.
(twittering-timer-action): support multiple buffers.
(twittering-get-tweets): support multiple buffers.
(twittering-get-and-render-timeline): retrieve and render the
timeline bound to the current buffer.
(twittering-start): use `twittering-update-active-timeline'
instead of `twittering-current-timeline-noninteractive' for
`twittering-timer'.
(twittering-toggle-reverse-mode): support multiple buffers.
(twittering-friends-timeline): call `twittering-visit-timeline'
instead of `twittering-get-and-render-timeline'.
(twittering-home-timeline): likewise.
(twittering-replies-timeline): likewise.
(twittering-public-timeline): likewise.
(twittering-user-timeline): likewise.
(twittering-other-user-timeline): likewise.
(twittering-other-user-timeline-interactive): likewise.
(twittering-other-user-list-interactive): likewise.
(twittering-search): likewise.
(twittering-update-active-buffers): new function for retrieving
timelines for active buffers.
(twittering-current-timeline): retrieve statuses for current
buffer.
(twittering-erase-old-statuses): erase statuses of the timeline
bound to the current buffer.
(twittering-visit-timeline): switch to the buffer generated by
`twittering-get-managed-buffer'.
* twittering-mode.el (twittering-update-server-info): update
mode-lines for all buffers managed by `twittering-mode' if
`twittering-display-remaining' is non-nil.
2010-03-30 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-get-response-header): return nil
if an empty line as a separater is not found in the given buffer.
(twittering-http-default-sentinel): generate `header-info' only if
`header' is non-nil.
2010-03-29 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-url-wrapper): new wrapper
function for using URL library with proxy configuration for
`twittering-mode'.
(twittering-url-insert-file-contents): likewise.
(twittering-url-retrieve-synchronously): likewise.
(twittering-setup-proxy): call `url-scheme-get-property' to avoid
`url-proxy-services' to be reset.
(twittering-retrieve-image): use the wrapper function instead of
a function in URL library.
(twittering-tinyurl-get): likewise.
* twittering-mode.el (twittering-update-status-from-minibuffer):
fix infinite loop on updating a status from minibuffer.
* twittering-mode.el (twittering-start-http-session-curl): modify
the order of arguments for `curl', where the URL is placed last.
2010-03-25 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el (twittering-get-status-url): change the
format of a URL of a certain status into that used in the web
interface on `http://twitter.com/'.
2010-03-24 Tadashi MATSUO <tad@mymail.twin.jp>