forked from hayamiz/twittering-mode
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChangeLog
4432 lines (3566 loc) · 184 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2010-12-17 Yuto HAYAMIZU <[email protected]>
* twittering-mode.el (twittering-organic-retweet): prohibit
retweeting protected tweets.
2010-11-30 Tadashi MATSUO <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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.