Permalink
Commits on Apr 2, 2013
  1. Add account spec at last

    To avoid spliting account specification and primary specification.
    committed Apr 2, 2013
  2. Revert 1ec18f8

    Adding account specification as composite has a bug.
    When two :home timelines, :account/a/:home and :account/b/:home, tweets in
    these timelines are mixed.
    
    Account specification should be included as primary.
    committed Apr 2, 2013
  3. Fetch timeline with sub-account

    Specify an account with SPEC to get a private timeline of a sub-account
    (e.g.  home, replies, private lists).
    
    Changes:
    
    - Extend composite specs to include account spec
    - Call `twittering-call-api-with-account` if `account-info-alist` is specified
    - Add the account list variable: `twittering-oauth-access-tokens`
    committed Apr 2, 2013
Commits on Mar 24, 2013
  1. @cvmat

    Replace `delete-dups' with `twittering-remove-duplicates'.

    * 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.
    cvmat committed Mar 24, 2013
  2. @cvmat

    Display rate-limit information for each API.

    * 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'.
    cvmat committed Mar 24, 2013
  3. @cvmat

    Add `twittering-assoc-string' for portability.

    * 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'.
    cvmat committed Mar 24, 2013
  4. @cvmat

    Decode surrogate pairs in strings returned by `json-read'.

    Thanks to multiSnow who reported the problem.
    
    * 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'.
    cvmat committed Mar 24, 2013
Commits on Mar 4, 2013
  1. @cvmat

    Confirm that `json.el' and SSL are available for the new API.

    * 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.
    cvmat committed Mar 4, 2013
  2. @cvmat

    Invoke an API with an authentication header correctly.

    * 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.
    cvmat committed Mar 4, 2013
  3. @cvmat

    Fix the function parsing timelines related to direct messages.

    * 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.
    cvmat committed Mar 4, 2013
  4. @cvmat

    Bind a local variable correctly.

    * twittering-mode.el: Bind a local variable correctly.
    (twittering-call-api-with-account-in-api1.1): correctly bind the
    variable `spec-string' used.
    cvmat committed Mar 4, 2013
Commits on Mar 3, 2013
  1. @cvmat

    Fix the function of rendering a replied tweet.

    * 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.
    cvmat committed Mar 3, 2013
  2. @cvmat

    Fix a typo in the function retrieving the retweet_of_me 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.
    cvmat committed Mar 3, 2013
  3. @cvmat

    The timeline spec string "@" means the mentions timeline.

    * 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.
    cvmat committed Mar 3, 2013
  4. @cvmat

    Move the cursor to the tweet that will be retrieved.

    * 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.
    cvmat committed Mar 3, 2013
  5. @cvmat

    Support the Twitter REST API v1.1.

    * 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'.
    cvmat committed Mar 3, 2013
  6. @cvmat

    Separate the current core of `twittering-call-api-with-account'.

    * 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.
    cvmat committed Mar 3, 2013
  7. @cvmat

    Support the HTTP cookie.

    * 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'.
    cvmat committed Mar 3, 2013
  8. @cvmat

    Access an account information indirectly.

    * 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'.
    cvmat committed Mar 3, 2013
  9. @cvmat

    Add functions to make an authentication string from an alist.

    * 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'.
    cvmat committed Mar 3, 2013
  10. @cvmat

    Add a new function `twittering-call-api-with-account'.

    * 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'.
    cvmat committed Mar 3, 2013
  11. @cvmat

    Update the server info only when receiving a response from Twitter.

    * 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.
    cvmat committed Mar 3, 2013
  12. @cvmat

    Sort newly retrieved tweets before rendering them.

    * 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.
    cvmat committed Mar 3, 2013
  13. @cvmat

    Use the JSON format for retrieving server configuration 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.
    cvmat committed Mar 3, 2013
  14. @cvmat

    Use the JSON format for posting a status 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.
    cvmat committed Mar 3, 2013
  15. @cvmat

    Use the JSON format for retrieving list information if possible.

    * 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.
    cvmat committed Mar 3, 2013
Commits on Feb 10, 2013
  1. @cvmat

    Support different intervals of retrieving timelines.

    * 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'.
    cvmat committed Feb 10, 2013
  2. @cvmat

    Fix a return value of `twittering-render-replied-statuses'.

    Thanks to Ikumi Keita who reported the problem.
    
    * 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.
    cvmat committed Feb 10, 2013
  3. @cvmat

    Fix the jojo-mode that caused an error.

    Thanks to the anonymous person who reported the problem.
    
    * 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.
    cvmat committed Feb 10, 2013
Commits on Jan 20, 2013
  1. @cvmat

    Avoid rendering same tweets repeatedly.

    * 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.
    cvmat committed Jan 20, 2013
  2. @cvmat

    Update the regexp for extracting an ID from a tweet.

    * 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.
    cvmat committed Jan 20, 2013
Commits on Jan 14, 2013
  1. @cvmat

    Update 'README.markdown'.

    * README.markdown: Add explanations of major configurations and
    others.
    cvmat committed Jan 14, 2013
  2. @cvmat

    Fix a bug of backward retrieval of favorites timeline.

    Thanks to the anonymous person who reported the problem.
    
    * 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.
    cvmat committed Jan 14, 2013