;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require sx sx-filter sx-method sx-question-list sx-interaction] 2) #@42 Filter used when retrieving inbox items. (defconst sx-inbox-filter '((inbox_item\.answer_id inbox_item\.body inbox_item\.comment_id inbox_item\.creation_date inbox_item\.is_unread inbox_item\.item_type inbox_item\.link inbox_item\.question_id inbox_item\.site inbox_item\.title) (site\.logo_url site\.audience site\.icon_url site\.high_resolution_icon_url site\.site_state site\.launch_date site\.markdown_extensions site\.related_sites site\.styling)) (#$ . 234)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable sx-inbox-fill-column funcall function #[0 "\300\207" [40] 1] "`fill-column' used in `sx-inbox-mode'." :type integer :group sx] 8) #@436 Get an array of inbox items for the current user. If NOTIFICATIONS is non-nil, query from `notifications' method, otherwise use `inbox' method. Return an array of items. Each item is an alist of properties returned by the API. See https://api.stackexchange.com/docs/types/inbox-item KEYWORDS are added to the method call along with PAGE. `sx-method-call' is used with `sx-inbox-filter'. (fn &optional NOTIFICATIONS PAGE KEYWORDS) (defalias 'sx-inbox-get #[768 "\301\203 \302\202\n\303\304\305\306&\207" [sx-inbox-filter sx-method-call notifications inbox :keywords :page :filter] 11 (#$ . 923)]) #@60 If non-nil, current buffer lists notifications, not inbox. (defvar sx-inbox--notification-p nil (#$ . 1538)) (make-variable-buffer-local 'sx-inbox--notification-p) #@35 List of inbox items still unread. (defvar sx-inbox--unread-inbox nil (#$ . 1708)) #@43 List of notifications items still unread. (defvar sx-inbox--unread-notifications nil (#$ . 1796)) #@74 List of inbox items which are read. These are identified by their links. (defvar sx-inbox--read-inbox nil (#$ . 1900)) #@81 List of notification items which are read. These are identified by their links. (defvar sx-inbox--read-notifications nil (#$ . 2025)) #@37 Header-line used on the inbox list. (defconst sx-inbox--header-line '(" " (:propertize "n p j k" face mode-line-buffer-id) ": Navigate" " " (:propertize "RET" face mode-line-buffer-id) ": View" " " (:propertize "v" face mode-line-buffer-id) ": Visit externally" " " (:propertize "q" face mode-line-buffer-id) ": Quit") (#$ . 2165)) #@35 Mode-line used on the inbox list. (defconst sx-inbox--mode-line '(" " (:propertize (sx-inbox--notification-p "Notifications" "Inbox") face mode-line-buffer-id)) (#$ . 2515)) (defvar sx-inbox-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [sx-inbox-mode-hook variable-documentation put "Hook run after entering Question List mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp sx-inbox-mode-map definition-name sx-inbox-mode] 4) (defvar sx-inbox-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [sx-inbox-mode-abbrev-table sx-inbox-mode-map variable-documentation put purecopy "Keymap for `sx-inbox-mode'." boundp sx-inbox-mode-syntax-table definition-name sx-inbox-mode (lambda (def-tmp-var) (defvar sx-inbox-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `sx-inbox-mode'." (lambda (def-tmp-var) (defvar sx-inbox-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `sx-inbox-mode'." derived-mode-parent sx-question-list-mode] 5) #@255 Mode used to list inbox and notification items. In addition to any hooks its parent mode `sx-question-list-mode' might have run, this mode runs the hook `sx-inbox-mode-hook', as the final or penultimate step during initialization. \{sx-inbox-mode-map} (defalias 'sx-inbox-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R  =\204R\326 \325 C#\210\327 !\210\330\f!\210  \331\332!\210!\"\333#\334$\335%&'())\336\337!\207" [delay-mode-hooks major-mode mode-name sx-inbox-mode-map sx-inbox-mode-syntax-table sx-inbox-mode-abbrev-table make-local-variable t sx-question-list-mode sx-inbox-mode "Question List" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table toggle-truncate-lines 1 sx-inbox--print-info #[257 "\301\"\207" [sx-inbox--notification-p sx-inbox-get] 4 "\n\n(fn PAGE)"] [("Type" 30 t nil t) ("Date" 10 t :right-align t) ("Title" 0)] run-mode-hooks sx-inbox-mode-hook local-abbrev-table sx-inbox-fill-column fill-column sx-question-list--print-function sx-question-list--next-page-function tabulated-list-format sx-inbox--mode-line mode-line-format sx-inbox--header-line header-line-format] 5 (#$ . 3903) nil]) (mapc #[257 "\301@A@#\207" [sx-inbox-mode-map define-key] 5 "\n\n(fn X)"] '(("t" nil) ("a" nil) ("h" nil) ("m" sx-inbox-mark-read) ([13] sx-display))) #@287 Convert `json-read' DATA into tabulated-list format. This is the default printer used by `sx-inbox'. It assumes DATA is an alist containing the elements: `answer_id', `body', `comment_id', `creation_date', `is_unread', `item_type', `link', `question_id', `site', `title'. (fn DATA) (defalias 'sx-inbox--print-info #[257 "\211\302!\210\303\236A\304\236A\305\236A\306\236A\307\236A\310\236A\311\236A\312\313\314\315\316 \2060\n#!\203;\317\202@\205@\320P\321\322E\323!P\321\324E\325\316\326\327\325 \321\324#\330 \331\332\333\"r\211q\210\334\335\"\216\336\f\261\210\337ed\"\210\340 *\262\262R\321\341%C#\266\207\262D\207" [sx-question-list-ago-string fill-column sx--ensure-site item_type notification_type answer_id question_id creation_date title body vector capitalize replace-regexp-in-string "_" " " " on Answer at:" " on:" face font-lock-keyword-face sx-time-since sx-question-list-date propertize display "\n " "\n" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] " " fill-region buffer-string default] 24 (#$ . 5500)]) #@37 Buffer being used to display inbox. (defvar sx-inbox--buffer nil (#$ . 6631)) #@133 Display a buffer listing inbox items. With prefix NOTIFICATIONS, list notifications instead of inbox. (fn &optional NOTIFICATIONS) (defalias 'sx-inbox #[256 "\304\305!\306rq\210\307 \210\310 \210\211\311 \210*\312!\313!\203#\314!\207\315!\210\316 \317\\\320 Z\321\"\207" [sx-inbox--buffer inhibit-read-only sx-inbox--notification-p fill-column get-buffer-create "*sx-inbox*" t erase-buffer sx-inbox-mode tabulated-list-revert get-buffer-window window-live-p select-window pop-to-buffer enlarge-window 4 window-width horizontal] 5 (#$ . 6716) "P"]) #@46 Display a buffer listing notification items. (defalias 'sx-inbox-notifications #[0 "\300\301!\207" [sx-inbox t] 2 (#$ . 7280) nil]) (provide 'sx-inbox)