HOME


sh-3ll 1.0
DIR:/proc/self/root/usr/share/emacs/26.1/lisp/gnus/
Upload File :
Current File : //proc/self/root/usr/share/emacs/26.1/lisp/gnus/gnus-cloud.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\303\304\305\"\210\303\306\305\"\210\303\307\305\"\210\303\310\305\"\210\311\312\313\314\315\316\317\320&\210\321\322\323\324\317\312\325\326&\210\321\327\330\331\315\332\317\312\325\333&	\210\321\334\335\336\315\332\317\312\325\337&	\207" [require parse-time nnimap autoload epg-make-context "epg" epg-context-set-passphrase-callback epg-decrypt-string epg-encrypt-string custom-declare-group gnus-cloud nil "Syncing Gnus data via IMAP." :version "25.1" :group gnus custom-declare-variable gnus-cloud-synced-files '("~/.authinfo.gpg" "~/.gnus.el" (:directory "~/News" :match ".*.SCORE\\'")) "List of files that should be kept up-to-date via the cloud.\nEach element may be either a string or a property list.\nThe latter should have a :directory element whose value is a string,\nand a :match element whose value is a regular expression to match\nagainst the basename of files in said directory." :type (repeat (choice (string :tag "File") (plist :tag "Property list"))) gnus-cloud-storage-method (if (featurep 'epg) 'epg 'base64-gzip) "Storage method for cloud data, defaults to EPG if that's available." "26.1" (radio (const :tag "No encoding" nil) (const :tag "Base64" base64) (const :tag "Base64+gzip" base64-gzip) (const :tag "EPG" epg)) gnus-cloud-interactive t "Whether Gnus Cloud changes should be confirmed." boolean] 10)
(defvar gnus-cloud-group-name "Emacs-Cloud")
(defvar gnus-cloud-covered-servers nil)
(defvar gnus-cloud-version 1)
(defvar gnus-cloud-sequence 1)
#@168 The IMAP select method used to store the cloud data.
See also `gnus-server-toggle-cloud-method-server' for an
easy interactive way to set this from the Server buffer.
(custom-declare-variable 'gnus-cloud-method nil '(#$ . 1927) :group 'gnus-cloud :type '(radio (const :tag "Not set" nil) (string :tag "A Gnus server name as a string")))
(defalias 'gnus-cloud-make-chunk #[(elems) "\303\304!rq\210\305\216\306\307	\"c\210\310\n!c\210\311 +\207" [#1=#:temp-buffer gnus-cloud-version elems generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1# buffer-name kill-buffer] 2] format "Gnus-Cloud-Version %s\n" gnus-cloud-insert-data buffer-string] 3])
(defalias 'gnus-cloud-insert-data #[(elems) "\306\307!rq\210\310\216\311 \210	\312\211\203\216@\313\n\314\"\315=\203Z\312\211\306\307!rq\210\316\216\311 \210\317\313\n\320\"!\210\321 \322 +\323\324\313\n\320\"\313\n\325\"
$c\210\fc\210\326c\210*\202\207\313\n\314\"\327=\203u\312\211\330\np\"\210*\326c\210\202\207\313\n\314\"\331=\203\207\323\332\313\n\320\"\"c\210A\211\204*\333 \210\322 +\207" [#1=#:temp-buffer elems elem --dolist-tail-- data length generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1# buffer-name kill-buffer] 2] mm-disable-multibyte nil plist-get :type :file #[nil "\301!\205	\302!\207" [#2=#:temp-buffer buffer-name kill-buffer] 2] insert-file-contents-literally :file-name buffer-size buffer-string format "(:type :file :file-name %S :timestamp %S :length %d)\n" :timestamp "\n" :newsrc-data print :delete "(:type :delete :file-name %S)\n" gnus-cloud-encode-data #2# print-length print-level] 7])
(defalias 'gnus-cloud-encode-data #[nil "\306=\203\307ed\310\311p\312\313&\210\314ed\"\207\315=\203!\314ed\"\207\316=\203n\317\320!\312\321\n!>\204<\322\323\324\nD\"\210\n\211\325\311I\210)\321\n!>\204S\322\323\324\nD\"\210\n\211\326\311I\210)\327\n\330ed\"\312#ed|\210c+\207\204w\331\326\332\"\207\333\334\335#\207" [gnus-cloud-storage-method cipher context cl-struct-epg-context-tags #1=#:v #2=#:v base64-gzip call-process-region "gzip" t nil "-c" base64-encode-region base64 epg epg-make-context OpenPGP type-of signal wrong-type-argument epg-context 4 5 epg-encrypt-string buffer-substring-no-properties gnus-message "Leaving cloud data plaintext" gnus-error 1 "Invalid cloud storage method %S" data] 9])
(defalias 'gnus-cloud-decode-data #[nil "\303>\203\304ed\"\207\305=\203\306ed\307\310p\311\312&\207\313=\2036\314\315!\316	\317ed\"\"ed|\210\nc*\207\204?\320\321\322\"\207\323\324\325#\207" [gnus-cloud-storage-method context data (base64 base64-gzip) base64-decode-region base64-gzip call-process-region "gunzip" t nil "-c" epg epg-make-context OpenPGP epg-decrypt-string buffer-substring-no-properties gnus-message 5 "Reading cloud data as plaintext" gnus-error 1 "Invalid cloud storage method %S"] 8])
(defalias 'gnus-cloud-parse-chunk #[nil "\212\303\304!\204\305\306!\210\307y\210\310\311\307!!`d{\312\313!r\nq\210\314\216\315 \210c\210	\307U\2039\316 \210eb\210\317 \202=\305\320	\".\207" [data version #1=#:temp-buffer looking-at "Gnus-Cloud-Version \\([0-9]+\\)" error "Not a valid Cloud chunk in the current buffer" 1 string-to-number match-string generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1# buffer-name kill-buffer] 2] mm-disable-multibyte gnus-cloud-decode-data gnus-cloud-parse-version-1 "Unsupported Cloud chunk version %s"] 3])
(defalias 'gnus-cloud-parse-version-1 #[nil "\303m\204hm\204\304\305!\204\306y\210\202m\204\3071%\310p!0\202'\210\303\303\211:\203d\311\n\312\"\313>\203W\311\n\314\"\315\n\316`T\317`\306	#{D\"B\317`\306	#b\210\202d\311\n\312\"\320>\203d\nB*\202\237)\207" [elems length spec nil looking-at "(:type" 1 (error) read plist-get :type (:file :delete) :length append :contents + (:newsrc-data)] 9])
(defalias 'gnus-cloud-update-all #[(elems) "\304\211\205>\n@\305	\306\"\211\307=\203!\310\305	\311\"	\"\210\2025\312>\203/\313	\"\210\2025\314\315\316#\210)\nA\211\204\304*\207" [elems elem --dolist-tail-- type nil plist-get :type :newsrc-data gnus-cloud-update-newsrc-data :name (:delete :file) gnus-cloud-update-file gnus-message 1 "Unknown type %s; ignoring"] 5])
#@85 Update the newsrc data for GROUP from ELEM.
Use old data if FORCE-OLDER is not nil.
(defalias 'gnus-cloud-update-newsrc-data #[(group elem &optional force-older) "\306\307\"\306\310\"\206
\311\312\313 !\n\231\314\315
\"J8	\203\205	@;\203\205	A@\250\203\205\203}\316\317\"\316\317	\"\232\203L\320\321\322
#\202\213\f\203_\204_\320\321\323
\n%\202\213 \203l\324\316\325
\n#!\210\320\314\326
#\210\327
	\"\210\330
!\202\213\331\332\333
#\202\213\331\332\334
$-\207" [elem contents date now newer group plist-get :contents :timestamp "0" gnus-cloud-timestamp current-time 2 intern-soft format "%S" gnus-message 3 "Skipping cloud update of group %s, the info is the same" "Skipping outdated cloud info for group %s, the info is from %s (now is %s)" gnus-y-or-n-p "%s has older different info in the cloud as of %s, update it here? " "Installing cloud update of group %s" gnus-set-info gnus-group-update-group gnus-error 1 "Sorry, group %s is not subscribed" "Sorry, could not update newsrc for group %s (invalid data %S)" gnus-newsrc-hashtb group-info force-older gnus-cloud-interactive] 6 (#$ . 6176)])
#@56 Apply Gnus Cloud data ELEM and operation OP to a file.
(defalias 'gnus-cloud-update-file #[(elem op) "\306\307\"\306\310\"\306\311\"\312	!\313	!\203\203
\314\267\202\f\203< \2032\315\316\317	\n#!\203<\320	\321	!@\"\202\210\322\323\324	#\202\210\f\203w\f\205\210\325\326!!r!q\210\327\216\330 \210\331	!\210\332 \232+?\205\210 \203w\315\316\333	\n#!\205\210\334	\n#\202\210\335\202\210\322\336\337	#,\207" [elem file-name date contents exists op plist-get :file-name :timestamp :contents file-exists-p gnus-cloud-file-covered-p #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:delete 31 :file 68)) gnus-y-or-n-p format "%s has been deleted as of %s, delete it locally? " rename-file find-backup-file-name gnus-message 3 "%s was already deleted before the cloud got it" generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] mm-disable-multibyte insert-file-contents-literally buffer-string "%s has updated contents as of %s, update it? " gnus-cloud-replace-file nil 2 "%s isn't covered by the cloud; ignoring" gnus-cloud-interactive #1#] 5 (#$ . 7314)])
(defalias 'gnus-cloud-replace-file #[(file-name date new-contents) "\304\305!rq\210\306\216\307 \210	c\210\310\n!\203\311\n\312\n!@\"\210\313ed\n#\210\314\n\315!\"+\207" [#1=#:temp-buffer new-contents file-name date generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1# buffer-name kill-buffer] 2] mm-disable-multibyte file-exists-p rename-file find-backup-file-name write-region set-file-times parse-iso8601-time-string] 4])
(defalias 'gnus-cloud-file-covered-p #[(file-name) "\305	\305\211\203F@\211;\203\n\f\232\203?\306\202?\n:\203?\307\310\n\311\"!\307\312\f!!\232\203?\313\310\n\314\"\315\f!\"\203?\306A\211\204\n*)\207" [matched gnus-cloud-synced-files elem --dolist-tail-- file-name nil t directory-file-name plist-get :directory file-name-directory string-match :match file-name-nondirectory] 5])
(defalias 'gnus-cloud-all-files #[nil "\305	\305\211\203O@\211;\203\nB\202H\n:\203H\306\307\n\310\"\305\307\n\311\"#\305\211\203G@\312\313\314\307\n\310\"!\f#BA\211\2040*A\211\204\n*\237)\207" [files gnus-cloud-synced-files elem --dolist-tail-- file nil directory-files plist-get :directory :match format "%s/%s" directory-file-name] 7])
(defvar gnus-cloud-file-timestamps nil)
(defalias 'gnus-cloud-files-to-upload #[(&optional full) "\306\211\307 \306\211\203C@\310\n!\203-\311\n\f\"\211\203<\312\313\314\n\315\257	B\202<\316\n
\"\203<\312\317\314\nF	BA\211\204
*	\237*\207" [timestamp files file --dolist-tail-- full gnus-cloud-file-timestamps nil gnus-cloud-all-files file-exists-p gnus-cloud-file-new-p :type :file :file-name :timestamp assoc :delete] 7])
#@45 Return a general timestamp string for TIME.
(defalias 'gnus-cloud-timestamp #[(time) "\301\302\"\207" [time format-time-string "%FT%T%z"] 3 (#$ . 10138)])
(defalias 'gnus-cloud-file-new-p #[(file full) "\305\306\307!8!\310	\"A@\f\204\n\203\n\231\205*\207" [file gnus-cloud-file-timestamps old timestamp full gnus-cloud-timestamp 5 file-attributes assoc] 4])
(defalias 'gnus-cloud-ensure-cloud-group #[nil ";\203F\211\203	<\203	\206B\306	\n\"A\206B	\307\232\203&\206+\306	\f\"A\206+\306	
\"A\206+\203\\	\310\311@@@@@A@#\232\204\\\211A\210\202:@@)\206+\203\210	\310\311@@@A@#\232\204\210\211A\210\202h@)\206+A\312\211\203(\313\211A\2428\211;\204\232	\312\314 \3152\206\304 \204\320\316\317\n\"\210\316\320\f
D\"\210A@\321\235\203\351\310\322@\"\202\363\310\311@A@#\211!B\211\"\n\235\204\204\306\"@\n\"\204\"\nB!*0+\232\203\232\312\211\204\237+\211#\203?\306	\n\"\204?	#B\nB#))\202G\323$%\"J\206Z\324$\312\211$?\205t\325$\"\205t\324$\312\211$\205t\326$!)\207" [gnus-cloud-method server gnus-server-method-cache gnus-select-method gnus-server-alist gnus-predefined-server-alist assoc "native" format "%s:%s" nil 4 t server-name mapc #[(name-method) "A	\232\205\f\302\303@\"\207" [name-method method throw server-name] 3] #[(server-alist) "\301\302\"\207" [server-alist mapc #[(name-method) "\303A	\"\205\n\235\204\nB\304\305@\"\207" [name-method method gnus-server-method-cache gnus-methods-equal-p throw server-name] 3]] 3] (nil "") "%s" intern-soft gnus-activate-group gnus-request-create-group gnus-subscribe-group gnus-opened-servers opened gnus-secondary-select-methods servers gnus-newsrc-alist match method alist no-enter-cache nocache name name-method result gnus-cloud-group-name gnus-active-hashtb] 6])
#@55 Upload all data (newsrc and files) to the Gnus Cloud.
(defalias 'gnus-cloud-upload-all-data #[nil "\300\301!\207" [gnus-cloud-upload-data t] 2 (#$ . 12028) nil])
#@128 Upload data (newsrc and files) to the Gnus Cloud.
When FULL is t, upload everything, not just a difference from the last full.
(defalias 'gnus-cloud-upload-data #[(&optional full) "\306 \210\307\310!rq\210\311\216\312\313	!\314 \"\315\n\"\316\317!\206\"\320	\203*\321\202+\322\"$c\210\323c\210\324c\210\325
!c\210\326\n\327\211$\203]!\206J\330T!\331
!\210\332\333\334\f#\210\335\f!\202b\336\337\340\f#-\207" [#1=#:temp-buffer full gnus-cloud-group-name gnus-cloud-method group elems gnus-cloud-ensure-cloud-group generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1# buffer-name kill-buffer] 2] append gnus-cloud-files-to-upload gnus-cloud-collect-full-newsrc gnus-group-full-name format "Subject: (sequence: %s type: %s storage-method: %s)\n" "UNKNOWN" :full :partial "From: nobody@gnus.cloud.invalid\n" "\n" gnus-cloud-make-chunk gnus-request-accept-article t 0 gnus-cloud-add-timestamps gnus-message 3 "Uploaded Gnus Cloud data successfully to %s" gnus-group-refresh-group gnus-error 2 "Failed to upload Gnus Cloud data to %s" gnus-cloud-sequence gnus-cloud-storage-method] 5 (#$ . 12197) nil])
(defalias 'gnus-cloud-add-timestamps #[(elems) "\306\211\2050\n@\307	\310\"\311\f\"\211\203\312
\f\"\307	\313\"D\fB*\nA\211\204\306*\207" [elems elem --dolist-tail-- file-name gnus-cloud-file-timestamps old nil plist-get :file-name assoc delq :timestamp] 5])
(defalias 'gnus-cloud-available-chunks #[nil "\306\307\211	$\210\310	\"\311\n\"J\307\211\312\313\f!\n\"\203=rq\210eb\210m\204<\314 \211\203<
B\202()\315
\237\316\",\207" [gnus-cloud-group-name gnus-cloud-method group gnus-active-hashtb active headers gnus-activate-group nil gnus-group-full-name intern-soft gnus-retrieve-headers gnus-uncompress-range nnheader-parse-head sort #[(h1 h2) "\302\303H!\302	\303H!V\207" [h1 h2 gnus-cloud-chunk-sequence 1] 4] head nntp-server-buffer] 6])
(defalias 'gnus-cloud-chunk-sequence #[(string) "\301\302\"\203\303\304\305\"!\207\306\207" [string string-match "sequence: \\([0-9]+\\)" string-to-number match-string 1 0] 4])
(defalias 'gnus-cloud-prune-old-chunks #[(headers) "\304!\305\203\"	\204\"\306\307@\310H\"\203\311\211A\210\202\2051\312\313\314\237\"\315\n\"\"*\207" [headers found gnus-cloud-group-name gnus-cloud-method reverse nil string-match "type: :full" 1 t gnus-request-expire-articles mapcar #[(h) "\301H\207" [h 0] 2] gnus-group-full-name] 5])
#@95 Download the Gnus Cloud data and install it.
Starts at `gnus-cloud-sequence' in the sequence.
(defalias 'gnus-cloud-download-all-data #[nil "\300\301!\207" [gnus-cloud-download-data t] 2 (#$ . 14646) nil])
#@279 Download the Gnus Cloud data and install it if UPDATE is t.
When SEQUENCE-OVERRIDE is given, start at that sequence number
instead of `gnus-cloud-sequence'.

When UPDATE is t, returns the result of calling `gnus-cloud-update-all'.
Otherwise, returns the Gnus Cloud data chunks.
(defalias 'gnus-cloud-download-data #[(&optional update sequence-override) "\306\211\307 \306\211\203L@\310\n\311H!\f\206
\206\312V\203E\313\314\315\"\n\311H\"\2038\n\316H	B\202E\317\311\320\n\316H\n\311H%\210A\211\204
*	\203w\321	\237\"\210rq\210eb\210\322\323\306\324#\203v\325 \210\326 B\311y\210\202`)\203\203\327\330\"\202\204*\207" [chunks articles header --dolist-tail-- sequence-override gnus-cloud-sequence nil gnus-cloud-available-chunks gnus-cloud-chunk-sequence 1 -1 string-match format "storage-method: %s" 0 gnus-message "Skipping article %s because it didn't match the Gnus Cloud method %s: %s" nnimap-request-articles re-search-forward "^Gnus-Cloud-Version " t beginning-of-line gnus-cloud-parse-chunk mapcar gnus-cloud-update-all gnus-cloud-storage-method gnus-cloud-group-name nntp-server-buffer update] 8 (#$ . 14859)])
(defalias 'gnus-cloud-server-p #[(server) "	\235\207" [server gnus-cloud-covered-servers] 2])
(defalias 'gnus-cloud-host-server-p #[(server) "	\232\207" [gnus-cloud-method server] 2])
(defalias 'gnus-cloud-host-acceptable-method-p #[(server) "\211\203<\203\206<\306	\"A\206<\307\232\203!\n\206%\306\"A\206%\306\f\"A\206%
\203V\310\311@@@@@A@#\232\204V\211A\210\2024@@)\206%\203\202\310\311@@@A@#\232\204\202\211A\210\202b@)\206%A\312\211\203\"\313\211A\2428\211;\204\224\312\314\3152\206\276\n\204\312\316\317	\"\210\316\320\fD\"\210A@\321\235\203\343\310\322@\"\202\355\310\311@A@#\211B\211	\235\204\204\306@	\"\204	B*0+\232\203\224\312\211\204\231+\211\2039\306	\"\2049B	B))\242\323=\207" [server gnus-server-method-cache gnus-select-method gnus-server-alist gnus-predefined-server-alist gnus-opened-servers assoc "native" format "%s:%s" nil 4 t server-name mapc #[(name-method) "A	\232\205\f\302\303@\"\207" [name-method method throw server-name] 3] #[(server-alist) "\301\302\"\207" [server-alist mapc #[(name-method) "\303A	\"\205\n\235\204\nB\304\305@\"\207" [name-method method gnus-server-method-cache gnus-methods-equal-p throw server-name] 3]] 3] (nil "") "%s" nnimap opened gnus-secondary-select-methods servers gnus-newsrc-alist match method alist no-enter-cache nocache name name-method result] 6])
#@56 Collect all the Gnus newsrc data in a portable format.
(defalias 'gnus-cloud-collect-full-newsrc #[nil "\306	A\306\211\203\232@\307\310\n@!\306\211\3112}\206$
\2040\312\313\"\210\312\314D\"\210A@\315\235\203K\316\317@\"\202U\316\320@A@#\211B\211\235\204y\f\204y\321@\"\204yB*0+!\203\223\322\323\324\n@\325\n\326\327\330 !\257BA\211\204*)\207" [infos gnus-newsrc-alist info --dolist-tail-- no-enter-cache nocache nil gnus-cloud-server-p gnus-find-method-for-group server-name mapc #[(name-method) "A	\232\205\f\302\303@\"\207" [name-method method throw server-name] 3] #[(server-alist) "\301\302\"\207" [server-alist mapc #[(name-method) "\303A	\"\205\n\235\204\nB\304\305@\"\207" [name-method method gnus-server-method-cache gnus-methods-equal-p throw server-name] 3]] 3] (nil "") format "%s" "%s:%s" assoc :type :newsrc-data :name :contents :timestamp gnus-cloud-timestamp current-time method gnus-select-method gnus-server-method-cache gnus-server-alist gnus-predefined-server-alist name name-method] 10 (#$ . 17495)])
(provide 'gnus-cloud)