forked from dtaht/comics-el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomics.el
5211 lines (4883 loc) · 190 KB
/
comics.el
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
;; comics.el --- download and read comics from emacs
;;
;; Copyright (C) 2000,2004,2006,2009 Jay Belanger
;; $Date: 2007/02/18 00:14:45 $
;; $Revision: 1.75 $
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
;;
;;; Commentary:
;;
;; QUICK INTRO:
;; ============
;;
;; This package should work for Emacs versions 21.1 and up.
;;
;; comics.el provides a way to view and store comics that are available
;; on the web. A list of favorite comics can be kept.
;;
;; To simply read a comic:
;; M-x comics-read-comic
;; You will be prompted for a comic to read (with tab completion).
;; With a numeric argument, the comic will be from that many days ago.
;; With a non-numeric argument (such as C-u M-x comics-read-comic), you will
;; be prompted for a date (in the form YYYYMMDD).
;; In the buffer displaying the comic, the following commands are
;; available:
;;
;; To get a list of all available comics:
;; M-x comics-list-comics
;; You will be given a buffer with the categories of the available
;; comics. (Currently the categories are just the letters that the
;; comics start with.) Comics that have been chosen as favorites
;; will be in bold. The following commands will allow you to
;; sort through the categories:
;; TAB will toggle the display of the comics in the current category.
;; C-cC-e will expand all the categories (display all the comics)
;; C-cC-h will hide all the categories.
;;
;; Favorite comics:
;; Favorite comics can be read separately, and information about them
;; can be kept. comics.el will keep track of which dates the favorites
;; comics have been read (starting with the date they were entered as
;; favorites).
;; To get a list of comics that have been chosen as favorites:
;; M-x comics-favorites-list-comics
;; By default, the comics will be in alphabetical order.
;; If the customizable variable `comics-favorites-alphabetical' is
;; nil, then they won't necessarily be in order. The order can then
;; be adjusted with the following commands:
;; C-cC-a will put the comics in alphabetical order.
;; C-k will kill the current comic from the favorite comics list.
;; C-y will yank a killed comic to the favorites comics list.
;;
;; Bookmarks:
;; Bookmarks are a way of keeping track of particular comics.
;; Each comic can have a (default) bookmark, to make it easy to return
;; to a particular date. Comics can have more than one bookmark, by
;; giving them names. (The default bookmark corresponds to the name "".)
;; There are global bookmarks, which aren't attached to any comic, but
;; contain the comic information inside. There is also a default global bookmark.
;;
;; Commands:
;; The following commands are available (as appropriate) in all comics
;; related buffers (the buffers displaying the comics as well as the buffers
;; with the lists of comics). The "current comic" is the comic being viewed
;; or the comic on the current line.
;; d View the comic from a prompted-for date
;; D Download the comic from a prompted-for date
;; g View the comic at the default bookmark
;; With an argument, prompt for a bookmark name
;; G View the comic at the default global bookmark
;; With an argument, prompt for a bookmark name
;; C-cC-b Delete a bookmark
;; C-cC-g Delete a global bookmark
;; f Add the current comic to the favorites list.
;; With an argument, prompt for a percent to resize the comic
;; when it is displayed. (A "t" here will have the comic
;; resized to fill the buffer when opened.)
;; C Tell comics that all dates of all favorite comics have been read.
;; l Switch to a buffer containing the list of favorite
;; comics. Create one if necessary.
;; C-cC-f Download all the current favorite comics.
;; C-cC-u Download all the unread favorite comics.
;; L Switch to a buffer containing the list of available
;; comics. Create one if necessary.
;; q Bury the comic related buffers.
;; k Kill all the comics buffers
;; K Kill all the comic related buffers (comics and comic lists)
;;
;; When the current comic is a favorite, the following are also available:
;; c Tell comics that all dates of the current comic have been read.
;; C-cC-r Change the default resizing information for the current comic.
;; C-cC-k Remove the current comic from the favorites list.
;;
;; The following commands are available in the buffer displaying a comic:
;; n View the comic from the next day
;; (with argument N, view the comic from N days forward)
;; N View the comic from the next day, skipping missing days
;; p View the comic from the previous day
;; (with argument N, view the comic from P days previous)
;; P View the comic from the previous day, skipping missing days
;; b Set this comic as the default bookmark
;; With an argument (C-u b), prompt for a name for
;; the bookmark
;; B Set this comic as the default global bookmark
;; With an argument (C-u b), prompt for a name for
;; the bookmark
;; DEL Delete the comic file
;; SPC Read the next unread date (if the current comic is a favorite)
;; u Copy the URL of the comic to the kill ring.
;; i Copy the information (title, author, date) of the
;; comic to the kill ring.
;; U Copy the URL and info to the kill ring.
;; D Copy (Duplicate) the comic file to a prompted-for file.
;; C-cC-v View the comic in an external viewer
;; If the variable `comics-buffer-resize' is non-nil and "convert"
;; from the ImageMagick(TM) utilities is installed, then the following
;; commands are also available.
;; F Fit the comic to fill the buffer
;; R Resize the comic to a percentage of its current size
;; (The percentage can be given as a prefix, or it will
;; be prompted for.)
;; O Restore the comic to its original size.
;; This has been tested with version 6.2.6 of the ImageMagick(TM)
;; utilities; it may work with some older versions.
;; ImageMagick(TM) is free software which is available at
;; http://www.imagemagick.org/
;;
;; The following commands are available in the buffers containing lists
;; of comics:
;; r or RET Read the comic on the current line.
;; With a numeric argument, the comic will be from that many
;; days before.
;; With a non-numeric argument (such as C-u M-x comics-read-comic),
;; you will be prompted for a date (in the form YYYYMMDD).
;; If the point is on a category line, toggle the display of
;; the comics in the category.
;; R or F Like "r", but only downloads the comic (it doesn't display it).
;; C-cC-d Download the current comic and as many back strips as possible.
;; With argument N, download N comics.
;;
;;
;; NOTE: The list `comics-list' is used for completion and getting
;; information for downloading the comics. It is defined
;; using the initial value of `comics-categorized-list'.
;; If `comics-categorized-list' is changed after "comics"
;; is loaded, `comics-list' won't match `comics-categorized-list'.
;; If `comics-categorized-list' is made smaller, this isn't a
;; problem, but if new comics are added to `comics-categorized-list'
;; after "comics" is loaded, the function `comics-update-comics-list'
;; should be run.
;;
;; To you these commands, it may be useful to put
;; (autoload 'comics-read-comic "comics" "Read a comic." t)
;; (autoload 'comics-favorites-list-comics "comics"
;; "Go to a list of favorite comics." t)
;; in your .emacs
;;
;;Customizable variables:
;; Storing:
;; comics-dir (default: "~/Comics/")
;; This is the directory to store the comics.
;; comics-favorites-file (default: "~/.comics-favorites")
;; A file to keep a list of the favorite comics in.
;; comics-bookmark-file (default: "~/.comics-bookmarks")
;; A file to keep the comics bookmarks in.
;; comics-save-urls (default: t)
;; Non-nil means store the urls of the downloaded comics.
;; comics-url-file (default: (concat comics-dir "/comics-urls"))
;; A file to keep the comics urls in.
;; comics-filename-long-date (default: t)
;; If non-nil, use (e.g.) 2004_August_1 as the date in
;; the filenames, otherwise use 2004_08_01.
;; comics-use-separate-comic-directories (default: nil)
;; If non-nil, use separate directories for the separate
;; comics.
;; comics-temp-dir (default: "/tmp/")
;; The directory for temporary files.
;;
;; Viewing:
;; comics-buffer-resize (default: t)
;; If non-nil, enable commands to resize comics.
;; comics-buffer-resize-on-open (default: nil)
;; If t, open comics at a size to fill the buffer.
;; If a number, open comics at that percent of the original size.
;; If nil, open comics at original size.
;; comics-view-comics-with-external-viewer (default: nil)
;; If non-nil, use an external viewer to view comics.
;; comics-external-viewer (default: "display")
;; The external viewer to view the comics with.
;; comics-external-viewer-args (default: nil)
;; The arguments to pass to the external viewer.
;;
;; Lists:
;; comics-print-list-instructions (default: nil)
;; If non-nil, print the instructions at the top
;; when creating a comics list.
;; comics-favorites-alphabetical (default: t)
;; If non-nil, keep favorite comics in alphabetical order.
;;
;; Misc:
;; comics-fetch-misses-allowed (default: 3)
;; The number of times fetch back can fail to fetch a
;; comic before it gives up.
;; comics-adjust-current-time (default: t)
;; How to adjust today's date when computing today.
;; If t, then today's date will be computed by looking at
;; the time zone of the web site.
;; If a number, it will be number of hours to adjust today's
;; day by when computing today; comics will regard today as
;; your computer time + `comics-adjust-current-time' hours.
;; If nil, then today's date will the date where you are.
;; comics-use-ido-completion (default: nil)
;; If non-nil and `ido' is available, use `ido' for comic name
;; completions.
;;
;; A list of useful commands:
;; M-x comics-read-comic
;; Read a prompted-for comic.
;; With a numeric argument, the comic will be from that many days ago.
;; With a non-numeric argument (such as C-u M-x comics-read-comic), you will
;; be prompted for a date (in the form YYYYMMDD).
;; M-x comics-fetch-comic
;; Download a prompted-for comic.
;; With a numeric argument, the comic will be from that many days ago.
;; With a non-numeric argument (such as C-u M-x comics-read-comic), you will
;; be prompted for a date (in the form YYYYMMDD).
;; M-x comics-add-favorite
;; Prompt for a comic to add to the favorite comics list.
;; With an argument, prompt for a percent to resize the comic
;; when it is displayed. (A "t" here will have the comic
;; resized to fill the buffer when opened.)
;; (If the customizable variable `comics-get-storage-info' is
;; non-nil, then this will also prompt for information on how
;; to store the comic. Entering a "D" will put the comic
;; in a separate subdirectory, otherwise it will be stored in the
;; default comics directory, and "L" will save the comic with
;; the date written out, otherwise the comics will be saved with
;; the date in numeric form. These can be combined. Entering
;; a "t" will use the default storage method, which is customizable.)
;; M-x comics-remove-favorite
;; Prompt for a comic to remove from the favorite comics list.
;; M-x comics-kill-comics-buffers
;; Kill all the buffers used for viewing comics.
;; M-x comics-list-comics
;; You will be given a buffer with the categories of the available
;; comics.
;; M-x comics-favorites-list-comics
;; You will be given a buffer with a list of all the favorite comics.
;; M-x comics-fetch-favorite-comics
;; This will download a copy of the comics listed in the favorite
;; comics list.
;; M-x comics-fetch-this-comic-back
;; This will prompt you for a comic, then retrieve the current strip
;; and as many older strips as it can. The variable
;; `comics-fetch-misses-allowed' will determine how many days in
;; a row comics can fail to fetch a comic before it decides it's done.
;; With arg N, fetch comics that many days back.
;; M-x comics-fetch-favorite-comics-back
;; This will retrieve the current favorite comics and as many older
;; strips as it can. With arg N, fetch comics that many days back.
;; M-x comics-goto-bookmark
;; This will prompt you for a comic and will display the comic at the
;; default bookmark. With an argument, you will also be prompted for
;; a bookmark name.
;; M-x comics-goto-global-bookmark
;; This will display the comic at the global default bookmark.
;; With an argument, you will be prompted for a bookmark name.
;; M-x comics-delete-bookmark
;; This will prompt you for a comic and a bookmark, and will
;; delete the bookmark
;; M-x comics-delete-global-bookmark
;; This will prompt you for a bookmark, and will delete the
;; global bookmark
;;
;; NOTE: If any of these comics are no longer available, or if there
;; are ideas for more comics, please let me know so I can
;; keep the list up-to-date.
;; Please let me know of any other suggestions, bugs, comments,...
;;
;; ANOTHER NOTE: With the addition of the ability to keep track of dates on which the
;; favorites have been read, the format of the comics-favorites list has
;; changed slightly. If you didn't have storage information in the
;; comics-favorites list and simply had the comic names, the difference
;; won't matter, otherwise you might wish to edit .comics-favorites and
;; change entries like ("Comic Name" "D") to ("Comic Name" nil nil "D").
;;
;; CHANGES:
;;
;; 3 April 2010
;;
;; Fix `run-hooks' problem.
;; (Patch by Wesley Dawson.)
;;
;; 17 January 2010
;;
;; Fixed problem retrieving comics.com comics.
;;
;; 24 August 2009
;;
;; Added a variable, `comics-show-title', which if non-nil will cause the
;; comic title and author to appear in the comic buffer. By default it
;; is nil. (Patch by Dave Täht)
;;
;; 20 August 2009
;;
;; Added "Girl Genius" (Thanks to Dave Täht)
;;
;; 23 Feb 2009
;;
;; Fixed bug in `comics-favorites-catch-up-comic'
;;
;; 11 Feb 2009
;;
;; Fixed Piled Higher and Deeper.
;; (Patch by Dr. Reimar Finken)
;;
;; 7 Feb 2009
;;
;; Fixed kingfeatures comics.
;;
;; 12 Jan 2009
;; Fixed comics.com comics, dilbert.
;;
;; 17 Feb 2007
;; Fix a problem downloading Xkcd.
;;
;; Add "D" binding to comics-buffer, which will copy the file for the current
;; comic.
;;
;; Increase `comics-fetch-misses-allowed' to 7
;; If date of favorite comic being read is earlier than the earliest date,
;; don't add it to the dates-read list.
;; Add ShortPacked and Zippy.
;; Add "N" and "P" keybindings for comics buffers, which will read the next
;; or previous comic, but skip any dates in which the comic cannot be obtained.
;; (The most days skipped will be `comics-fetch-misses-allowed'.
;;
;; Some keybinding changes.
;; Remove fetch-only buffers.
;;
;; Now keeps track of which days the favorite comics have been read.
;; Resizing information can be kept on a per-comic basis.
;; (Suggested by Andy Scott.)
;;
;; Added the customizable variable `comics-buffer-resize-on-open'.
;; If t, this will cause the comic to fill the buffer when open.
;; If a number, this will cause the comic to be resized by that
;; percentage when opened.
;;
;; Add a "c" binding to calendar that will prompt for a comic
;; to display.
;;
;; SPC will sequence through the unread favorite comics.
;; (Suggested by Andy Scott.)
;; If your favorites list contains extra storage information, such
;; as ("Comic Name" "D"), then that needs to be changed to
;; ("Comic Name" nil "D"). If you never put extra storage
;; information in, then you don't need to worry about this.
;;
;; Use `comics-bury-comic-related-buffers' to bury buffers.
;;
;; Add bindings "k" and "K" to all comic related buffers. These
;; will kill all comic/comic related buffers.
;;
;; Add bindings "l" and "L" to comics buffer, to go to the list of
;; favorite or all comics, respectively.
;; Add bindings "u" and "i", to copy URL and information, respectively,
;; of comic to kill ring.
;; Suggested by Andy Scott.
;;
;; Change resizing keys "f" and "r" to "F" and "R" in comics buffer.
;; Use "f" and "r" for adding and removing from favorites list.
;; Use `ido' completion when available.
;; Many other fixes and improvements.
;; Suggested by Andy Scott.
;;
;; Changed `comics-select-list' to `comics-favorites-list' and changed
;; the format. This is no longer customizable, instead commands
;; are made to add or remove comics from the list.
;; Also, a buffer list for the favorite comics was added. (See the
;; intro above.)
;;
;; More fixes and cleanups due to Detlev Zundel.
;;
;; Made modes for the comics buffer and the comics list buffers.
;; Information on the keybindings can now be gotten with
;; C-hm (describe mode). "h" and "?" in the comics-buffer now
;; calls describe-mode.
;; (Suggested by Detlev Zundel.)
;;
;; Added some interactive help in the browsing mode.
;; (Due to Detlev Zundel)
;; In the comics-buffer, "h" and "?" will give a list of available keys.
;;
;; Added comics-kill-comics-buffers
;;
;; Added a simple test to check if a downloaded Snoopy comic is really
;; a comic.
;;
;; Added a simple test to make sure the downloaded file is an image.
;;
;; Added Snoopy from Japan.
;;
;; Added some messages for fetching comics.
;;
;; Added the customizable variables
;; comics-filename-long-date
;; If non-nil, use the `2004_August_01' form of the date in file
;; names, otherwise use `2004_08_01'. (The latter form will
;; the calender order the same as alphabetical order.)
;; comics-use-separate-comic-directories
;; If non-nil, each comic strip series will have its own
;; subdirectory of `comics-dir', otherwise all comics are
;; in the same directory.
;;
;; Some bug fixes.
;;
;; Added the customizable variable:
;; comics-adjust-current-time:
;; This determines what date to use when trying to fetch a
;; current comic. If this variable is `t', then comics.el
;; uses the current date at the website (based on a guess
;; of which time zone it is in). If this variable is a number,
;; that number of hours will be added to the current time
;; and that date will be used. (So if you think the websites
;; are a couple of time zones away, you could set this to 2...)
;; If this variable is nil, simply find the current date where you
;; are at.
;; This is an attempt to deal with the problem of looking for
;; current comics when, because of time zone differences, it is
;; a different day at your computer and the web site, so you wouldn't
;; be able to download the "current" comic.
;; It only applies when you are trying to get only a current comic,
;; (comics-read-comic, comics-fetch-comic, comics-fetch-all-comics,
;; comics-fetch-some-comics), and if the functions are given an
;; argument of "-" (C-u - M-x comics-read-comic), then there will be
;; no attempts to adjust the time.
;; I couldn't test this out very well, so if there are any problems
;; with it, please let me know immediately so I can fix it.
;; Thanks
;;
;; Added global bookmarks.
;; (Note that some bookmark bindings were changed)
;;
;; Added bookmarks.
;;
;; Added some resizing commands
;;
;; Added some new keys to the comic buffer keymap
;;
;; Added a face for the comics categories.
;; Changed how faces were applied.
;;
;; Created different faces for various parts of the buffer.
;; (Comic titles, dates, instructions, ...)
;; Added some keys to help move around in the list buffers.
;;
;; Fixed a few keymap problems.
;; Then, created distinct keymaps for the different buffers that
;; are created.
(require 'calendar)
;;; Code:
(defgroup comics nil
"Comics"
:prefix "comics-"
:tag "Comics"
:group 'applications)
(defcustom comics-dir "~/Comics/"
"This is the directory to store the comics."
:group 'comics
:type 'directory)
(defcustom comics-save-in-dir nil
"This is the default directory to copy the comic files to."
:group 'comics
:type '(choice (const :tag "Default" nil)
(directory)))
(defcustom comics-view-comics-with-external-viewer nil
"If non-nil, use an external viewer to view comics."
:group 'comics
:type 'string)
(defcustom comics-external-viewer "display"
"The external viewer to view the comics with."
:group 'comics
:type 'string)
(defcustom comics-external-viewer-args nil
"The arguments to pass to the external viewer."
:group 'comics
:type 'string)
(defcustom comics-print-list-instructions nil
"If non-nil, print the instructions at the top when creating a comics list."
:group 'comics
:type 'boolean)
(defcustom comics-buffer-resize t
"If non-nil, enable commands to resize comics."
:group 'comics
:type 'boolean)
(defcustom comics-buffer-resize-on-open nil
"If t, open comics at a size to fill the buffer.
If a number, open comics at that percent of the original size.
If nil, open comics at original size.
A non-nil value will slow the opening of the comic due to the
running of the convert program."
:group 'comics
:type '(choice (integer) (boolean)))
(defcustom comics-favorites-alphabetical t
"If non-nil, keep favorite comics in alphabetical order."
:group 'comics
:type 'boolean)
(defcustom comics-get-storage-info nil
"If non-nil, prompt for information on how to store favorite comics."
:group 'comics
:type 'boolean)
(defcustom comics-fetch-misses-allowed 7
"The number of times fetch back can fail to fetch a comic before it gives up."
:group 'comics
:type 'integer)
(defcustom comics-temp-dir "/tmp/"
"The directory for temporary files."
:group 'comics
:type 'directory)
(defcustom comics-bookmark-file "~/.comics-bookmarks"
"A file to keep the comics bookmarks in."
:group 'comics
:type 'file)
(defcustom comics-favorites-file "~/.comics-favorites"
"A file to keep a list of the favorite comics in."
:group 'comics
:type 'file)
(defcustom comics-save-urls t
"Non-nil means store the urls of the downloaded comics."
:group 'comics
:type 'boolean)
(defcustom comics-url-file
(concat comics-dir "/comics-urls")
"A file to keep the comics urls in."
:group 'comics
:type 'file)
(defcustom comics-filename-long-date t
"If non-nil, use (e.g.) 2004_August_1 as the date in the filenames.
Otherwise use 2004_08_01."
:group 'comics
:type 'boolean)
(defcustom comics-use-separate-comic-directories nil
"If non-nil, use separate directories for the separate comics."
:group 'comics
:type 'boolean)
(defcustom comics-adjust-current-time t
"How to adjust today's date when computing today.
If t, then today's date will be computed by looking at the time zone
of the web site.
If a number, it will be number of hours to adjust today's day by when
computing today; comics will regard today as your computer time +
`comics-adjust-current-time' hours.
If nil, then today's date will the date where you are."
:group 'comics
:type 'boolean)
(defcustom comics-use-ido-completion nil
"If non-nil and `ido' is available, use `ido' for comic name completions."
:group 'comics
:type 'boolean)
(defcustom comics-show-titles nil
"If non-nil display the text titles in the buffer"
:group 'comics
:type 'boolean)
(defvar comics-bookmarks '()
"The comics bookmarks.")
(defvar comics-favorites-list '()
"A list of comic names that can be downloaded as a group.")
(defvar comics-urls '()
"The comics urls.")
(defvar comics-convert-program "convert"
"The convert program from ImageMagick.")
(defvar comics-buffer-list '()
"The list of buffers used to read comics.")
(defvar comics-favorites-kill-list nil
"The list of comics that have been killed from the favorites buffer.")
(defface comics-list-current-face
'((((background dark))
(:foreground "LightSkyBlue"
:weight bold
:box t))
(t
(:foreground "blue"
:weight bold
:box t)))
"The face to display the current line in a comics list buffer."
:group 'comics)
(defface comics-list-prelude-face
'((t
:weight bold))
"The face to display the prelude in a comics list buffer."
:group 'comics)
(defface comics-list-instructions-face
'((t
:slant italic))
"The face to display the instructions in the comics list buffer."
:group 'comics)
(defface comics-list-category-face
'((t
:slant italic
:weight bold))
"The face to display the categories in the comics list buffer."
:group 'comics)
(defface comics-date-face
'((t
:slant italic))
"The face to display the date in the comics buffer."
:group 'comics)
(defface comics-name-face
'((t
:weight bold))
"The face to display the comic name in the comics buffer."
:group 'comics)
(defface comics-favorites-face
'((t
:weight bold))
"The face to display the favorite comics in the comics buffer."
:group 'comics)
(defvar comics-wget-program "wget"
"A program to get the comics.
It is expected to behave like `wget'.")
(defvar comics-latest-url nil)
(defvar comics-buffer-this-comic)
(make-variable-buffer-local 'comics-buffer-this-comic)
(defvar comics-buffer-comic-name)
(make-variable-buffer-local 'comics-buffer-comic-name)
(defvar comics-buffer-comic-date)
(make-variable-buffer-local 'comics-buffer-comic-date)
(defvar comics-buffer-comic-url)
(make-variable-buffer-local 'comics-buffer-comic-url)
(defvar comics-list-beg-point)
(make-variable-buffer-local 'comics-list-beg-point)
(defvar comics-list-buffer-name "*Comics*"
"The name of the buffer for a Comics list.")
(defvar comics-favorites-list-buffer-name "*Comic favorites*"
"The name of the buffer for a favorite comics list.")
(defvar comics-buffer-hook nil)
(defvar comics-list-comics-hook nil)
(defvar comics-favorites-list-comics-hook nil)
(defvar comics-categorized-list
'(("0-9"
(".blue" "Julien Tromeur"
"dotblue"
comics-get-ucomics-dot-com-latest "dotblue" "blue")
("9 Chickweed Lane" "Brooke McEldowney"
"9_Chickweed_Lane"
comics-get-comics-dot-com "chickweed" "comics")
("9 to 5" "Harley Schwadron"
"9_to_5"
comics-get-ucomics-dot-com "tmntf" "gif"))
("A"
("adam's rust" "Adam Rust"
"Adams_rust"
comics-get-comicssherpa-dot-com-latest "cslbx")
("Agnes" "Tony Cochran"
"Agnes"
comics-get-comics-dot-com "agnes" "creators")
("Alley Oop" "Jack and Carole Bender"
"Alley_Oop"
comics-get-comics-dot-com "alleyoop" "comics")
("Among Wolves" "Joseph Ward"
"Among_Wolves"
comics-get-comicssherpa-dot-com-latest "csvpk")
("Andy Capp" "Reg Smythe"
"Andy_Capp"
comics-get-comics-dot-com "andycapp" "creators")
("Andy's Town & Planet" "Andy Menconi"
"Andys_Town_and_Planet"
comics-get-comicssherpa-dot-com-latest "cssuu")
("Animal Crackers" "Fred Wagner"
"Animal_Crackers"
comics-get-ucomics-dot-com "tmani" "gif")
("Annie" "Jay Maeder and Alan Kupperberg"
"Annie"
comics-get-ucomics-dot-com "tmann" "gif")
("Another Editorial Cartoon" "Some Guy"
"Another_Editorial_Cartoon"
comics-get-comicssherpa-dot-com-latest "csqjy")
; ("Area 52" "Bob Darvas"
; "Area_52"
; comics-get-comicssherpa-dot-com-latest "cspgc")
("Arlo & Janis" "Jimmy Johnson"
"Arlo_and_Janis"
comics-get-comics-dot-com "arlo&janis" "comics")
("Assisted Living" "Steve Crider"
"Assisted_Living"
comics-get-comicssherpa-dot-com-latest "cshsf")
("Attorney at Large" "Castagnera and Roberg"
"Attorney_at_Large"
comics-get-comicssherpa-dot-com-latest "csrjk"))
("B"
("B.C." "Johnny Hart"
"BC"
comics-get-comics-dot-com "bc" "creators")
("Bad Speller" "Tim Peckham"
"Bad_Speller"
comics-get-comicssherpa-dot-com-latest "csqme")
("Baldo" "Hector D. Cantu and Carlos Castellanos"
"Baldo"
comics-get-ucomics-dot-com "ba" "gif")
("Ballads of Uncle Bam" "Gus St. Anthony"
"Ballads_of_Uncle_Bam"
comics-get-comicssherpa-dot-com-latest "csmlf")
("Ballard Street" "Jerry Van Amerongen"
"Ballard_Street"
comics-get-comics-dot-com "ballardst" "creators")
("Barkeater Lake" "Corey Pandolph"
"Barkeater_Lake"
comics-get-comics-dot-com "barkeaterlake" "comics")
("basketcase" "Kelly Ferguson"
"Basketcase"
comics-get-comicssherpa-dot-com-latest "csuvs")
("Battle Bug's Brigade" "Steven Bove"
"Battle_Bugs_Brigade"
comics-get-comicssherpa-dot-com-latest "csksb")
("Behind Door #3" "DeCourcey"
"Behind_Door_3"
comics-get-comicssherpa-dot-com-latest "csepb")
("Ben" "Daniel Shelton"
"Ben"
comics-get-comics-dot-com "ben" "comics")
("Benny & Floyd" "Tracy Nichols"
"Benny_and_Floyd"
comics-get-comicssherpa-dot-com-latest "csblf")
("Betty" "Delainey and Rasmussen"
"Betty"
comics-get-comics-dot-com "betty" "comics")
("Big Nate" "Lincoln Pierce"
"Big_Nate"
comics-get-comics-dot-com "bignate" "comics")
("Big Picture" "Lennie Peterson"
"Big_Picture"
comics-get-ucomics-dot-com "bi" "gif")
("Big Top" "Rob Harrell"
"Big_Top"
comics-get-ucomics-dot-com "bt" "gif")
("Blue Rice" "Shachar Meron"
"Blue_Rice"
comics-get-comicssherpa-dot-com-latest "csplp")
("Bo Nanas" "John Kovaleski"
"Bo_Nanas"
comics-get-comics-dot-com "bonanas" "wash")
("Bo Ring Adventures" "Erik Nodacker"
"Bo_Ring_Adventures"
comics-get-comicssherpa-dot-com-latest "cspsz")
("Bob the Squirrel" "Frank Page"
"Bob_the_Squirrel"
comics-get-ucomics-dot-com "bob" "gif")
("Bonser" "Rory Bonser"
"Bonser"
comics-get-comicssherpa-dot-com-latest "csany")
("The Boondocks" "Aaron McGruder"
"Boondocks"
comics-get-ucomics-dot-com "bo" "gif")
("The Born Loser" "Chip Sansom"
"Born_Loser"
comics-get-comics-dot-com "bornloser" "comics")
("Born Lucky" "Bruce Plante"
"Born_Lucky"
comics-get-ucomics-dot-com-latest "bornlucky" "bol")
("Bottle Rocket Chronicles" "Rob McClurkan"
"Bottle_Rocket_Chronicles"
comics-get-comicssherpa-dot-com-latest "csuet")
("Bottom Feeders" "Jason Black"
"Bottom_Feeders"
comics-get-comicssherpa-dot-com-latest "csedq")
("Bottom Liners" "Eric and Bill Teitelbaum"
"Bottom_Liners"
comics-get-ucomics-dot-com "tmbot" "gif")
("Bound & Gagged" "Dana Summers"
"Bound_and_Gagged"
comics-get-ucomics-dot-com "tmbou" "gif")
("Brain Squirts" "Frank Cummings"
"Brain_Squirts"
comics-get-comicssherpa-dot-com-latest "cskjh")
("Brain Waves" "Betsy Streeter"
"Brain_Waves"
comics-get-comicssherpa-dot-com-latest "cshbo")
("Brenda Starr" "June Brigman and Mary Schmich"
"Brenda_Starr"
comics-get-ucomics-dot-com "tmbre" "gif")
("Broom-Hilda" "Russell Myers"
"Broom_Hilda"
comics-get-ucomics-dot-com "tmbro" "gif")
("The Brothers Brady" "Mike and Scott Brady"
"Brothers_Brady"
comics-get-comicssherpa-dot-com-latest "csxfu")
("The Buckets" "Scott Santis and Greg Cravens"
"Buckets"
comics-get-comics-dot-com "buckets" "comics")
("Bull$ 'N' Bear$" "Wells and Lindstrom"
"Bulls_and_Bears"
comics-get-comics-dot-com "bullsnbears" "comics"))
("C"
("Calvin & Hobbes" "Bill Watterson"
"Calvin_and_Hobbes"
comics-get-calvin-at-ucomics-dot-com)
("Candorville" "Darrin Bell"
"Candorville"
comics-get-comics-dot-com "candorville" "wash")
("Captain Ribman" "John Sprengelmeyer and Rich Davis"
"Captain_Ribman"
comics-get-ucomics-dot-com-latest "captainribman" "tmcap")
("A Case in Point" "Rob Esmay"
"Case_in_Point"
comics-get-comics-dot-com "acaseinpoint" "comics")
("Cathy" "Cathy Guiswite"
"Cathy"
comics-get-ucomics-dot-com "ca" "gif")
("Cats with Hands" "Joe Martin"
"Cats_with_Hands"
comics-get-ucomics-dot-com "tmcat" "gif")
("CEO Dad" "Tom Stern and C. Covert Darbyshire"
"CEO_Dad"
comics-get-comics-dot-com "ceodad" "creators")
("C'est la Vie" "Jennifer Miyuki Babcock"
"Cest_la_Vie"
comics-get-comicssherpa-dot-com-latest "csxck")
("Check Please!" "Matthew Meskel"
"Check_Please"
comics-get-comicssherpa-dot-com-latest "csspe")
("Cheap Thrills" "Thach Bui and Bill Lombardo"
"Cheap_Thrills"
comics-get-comics-dot-com-latest "cheap_thrills" "wash")
("Chilling Out" "Stephen Francis and Rico Schacherl"
"Chilling_Out"
comics-get-comicssherpa-dot-com-latest "csldm")
; ("Citizen Dog" "Mark O'Hare"
; "Citizen_Dog"
; comics-get-ucomics-dot-com "cd" "gif")
("Clam Boy" "Marty Wilsey and Gerald McGee"
"Clam_Boy"
comics-get-comicssherpa-dot-com-latest "csoef")
("Clean Blue Water" "Karen Montague-Reyes"
"Clean_Blue_Water"
comics-get-ucomics-dot-com "cbw" "gif")
("Cleats" "Bill Hinds"
"Cleats"
comics-get-ucomics-dot-com "cle" "gif")
("Close to Home" "John McPherson"
"Close_to_Home"
comics-get-ucomics-dot-com "cl" "gif")
("Clutter Gutter" "Rick Faris and Adam Wiater"
"Clutter_Gutter"
comics-get-comicssherpa-dot-com-latest "csavj")
("Comics by Salamon" "Joe Salamon"
"Comics_by_Salamon"
comics-get-comicssherpa-dot-com-latest "csphr")
("Committed" "Michael Fry"
"Committed"
comics-get-comics-dot-com "committed" "comics")
("Compu-toon" "Charles Boyce"
"Computoon"
comics-get-ucomics-dot-com-latest "compu-toon" "tmcom")
("Conscious Pilot" "Chris Bautz"
"Conscious_Pilot"
comics-get-comicssherpa-dot-com-latest "csjvm")
("Cool Beans" "Richard Dominguez"
"Cool_Beans"
comics-get-comicssherpa-dot-com-latest "cswvq")
("Cornered" "Mike Baldwin"
"Cornered"
comics-get-ucomics-dot-com "co" "gif")
("Crunchy" "Francis Bonnet"
"Crunchy"
comics-get-comicssherpa-dot-com-latest "cscek"))
("D"
("Dandy & Company" "Derrick Fish"
"Dandy_and_Company"
comics-get-comicssherpa-dot-com-latest "csqrv")
("Dead Last" "Matty Meegan"
"Dead_Last"
comics-get-comicssherpa-dot-com-latest "csdpp")
("Dick Tracy" "Dick Locher and Michael Killian"
"Dick_Tracy"
comics-get-ucomics-dot-com "tmdic" "gif")
("Dilbert" "Scott Adams"
"Dilbert"
comics-get-dilbert)
("Ditto & Chance" "George F. Anzaldi, Jr."
"Ditto_and_Chance"
comics-get-comicssherpa-dot-com-latest "csypx")
("Dog Complex" "Dave Johnson"
"Dog_Complex"
comics-get-comicssherpa-dot-com-latest "csjvc")
("Dog eat Doug" "Brian Anderson"
"Dog_eat_Doug"
comics-get-comicssherpa-dot-com-latest "cslkd")
("Domestic World" "Charles Stouff"
"Domestic_World"
comics-get-comicssherpa-dot-com-latest "csioc")
("The Dann Duke Show" "Steven Duquette"
"Dann_Duke_Show"
comics-get-comicssherpa-dot-com-latest "csynn")
("Doodles" "Steve Sack and Craig Macintosh"
"Doodles"
comics-get-ucomics-dot-com-latest "doodles" "tmdoo")
("Doonesbury" "Garry Trudeau"
"Doonesbury"
comics-get-ucomics-dot-com "db" "gif")
("Doctor Fun" "David Farley"
"Doctor_Fun"
comics-get-doctor-fun)
("Drabble" "Kevin Fagan"
"Drabble"
comics-get-comics-dot-com "drabble" "comics")
("Dumbbellz" "Bill Temples"
"Dumbbellz"
comics-get-comicssherpa-dot-com-latest "csafd")
("The Duplex" "Glenn McCoy"
"Duplex"
comics-get-ucomics-dot-com "dp" "gif"))
("F"
("Fat Cats" "Charlie Podrebarac"
"Fat_Cats"
comics-get-comics-dot-com "fatcats" "comics")
("Fathead" "Graeme Hulse"
"Fathead"
comics-get-comicssherpa-dot-com-latest "csznj")
("Ferd'nand" "Henrik Rehr"
"Ferdnand"
comics-get-comics-dot-com "ferdnand" "comics")
("The 5th Wave" "Rich Tennant"
"Fifth_Wave"
comics-get-ucomics-dot-com-latest "thefifthwave" "fw")
("Fighting Words" "No Mind"
"Fighting_Words"
comics-get-comicssherpa-dot-com-latest "csnav")
("Flatland" "Grant Rogers"
"Flatland"
comics-get-comicssherpa-dot-com-latest "csqof")
("Flight Deck" "Peter Waldner"
"Flight_Deck"
comics-get-comics-dot-com "flightdeck" "creators")
("Flo & Friends" "John Gibel and Jenny Campbell"
"Flo_and_Friends"
comics-get-comics-dot-com "floandfriends""creators")
("For Better or For Worse" "Lynn Johnston"
"For_Better_or_For_Worse"
comics-get-ucomics-dot-com "fb" "gif")
("For Pete's Sake" "Pete Papanos"