Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/org/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:07:16 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/org/org-feed.el ;;; in Emacs version 24.3.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\306\307\310\311\301&\210\312\313\305\314\311\304\315\316&\210\312\317\320\321\311\304\315\322&\210\312\323\324\325\311\304\315\326&\210\312\327\330\331\311\304\315\332&\210\312\333\334\335\311\304\315\336&\210\312\337\305\340\311\304\315\341&\210\312\342\305\343\311\304\315\341&\207" [require org sha1 custom-declare-group org-feed nil "Options concerning RSS feeds as inputs for Org files." :tag "Org Feed" :group custom-declare-variable org-feed-alist "Alist specifying RSS feeds that should create inputs for Org.\nEach entry in this list specified an RSS feed tat should be queried\nto create inbox items in Org. Each entry is a list with the following items:\n\nname a custom name for this feed\nURL the Feed URL\nfile the target Org file where entries should be listed\nheadline the headline under which entries should be listed\n\nAdditional arguments can be given using keyword-value pairs. Many of these\nspecify functions that receive one or a list of \"entries\" as their single\nargument. An entry is a property list that describes a feed item. The\nproperty list has properties for each field in the item, for example `:title'\nfor the `<title>' field and `:pubDate' for the publication date. In addition,\nit contains the following properties:\n\n`:item-full-text' the full text in the <item> tag\n`:guid-permalink' t when the guid property is a permalink\n\nHere are the keyword-value pair allows in `org-feed-alist'.\n\n:drawer drawer-name\n The name of the drawer for storing feed information. The default is\n \"FEEDSTATUS\". Using different drawers for different feeds allows\n several feeds to target the same inbox heading.\n\n:filter filter-function\n A function to select interesting entries in the feed. It gets a single\n entry as parameter. It should return the entry if it is relevant, or\n nil if it is not.\n\n:template template-string\n The default action on new items in the feed is to add them as children\n under the headline for the feed. The template describes how the entry\n should be formatted. If not given, it defaults to\n `org-feed-default-template'.\n\n:formatter formatter-function\n Instead of relying on a template, you may specify a function to format\n the outline node to be inserted as a child. This function gets passed\n a property list describing a single feed item, and it should return a\n string that is a properly formatted Org outline node of level 1.\n\n:new-handler function\n If adding new items as children to the outline is not what you want\n to do with new items, define a handler function that is called with\n a list of all new items in the feed, each one represented as a property\n list. The handler should do what needs to be done, and org-feed will\n mark all items given to this handler as \"handled\", i.e. they will not\n be passed to this handler again in future readings of the feed.\n When the handler is called, point will be at the feed headline.\n\n:changed-handler function\n This function gets passed a list of all entries that have been\n handled before, but are now still in the feed and have *changed*\n since last handled (as evidenced by a different sha1 hash).\n When the handler is called, point will be at the feed headline.\n\n:parse-feed function\n This function gets passed a buffer, and should return a list\n of entries, each being a property list containing the\n `:guid' and `:item-full-text' keys. The default is\n `org-feed-parse-rss-feed'; `org-feed-parse-atom-feed' is an\n alternative.\n\n:parse-entry function\n This function gets passed an entry as returned by the parse-feed\n function, and should return the entry with interesting properties added.\n The default is `org-feed-parse-rss-entry'; `org-feed-parse-atom-entry'\n is an alternative." :type (repeat (list :value (#1="" "http://" #1# #1#) (string :tag "Name") (string :tag "Feed URL") (file :tag "File for inbox") (string :tag "Headline for inbox") (repeat :inline t (choice (list :inline t :tag "Filter" (const :filter) (symbol :tag "Filter Function")) (list :inline t :tag "Template" (const :template) (string :tag "Template")) (list :inline t :tag "Formatter" (const :formatter) (symbol :tag "Formatter Function")) (list :inline t :tag "New items handler" (const :new-handler) (symbol :tag "Handler Function")) (list :inline t :tag "Changed items" (const :changed-handler) (symbol :tag "Handler Function")) (list :inline t :tag "Parse Feed" (const :parse-feed) (symbol :tag "Parse Feed Function")) (list :inline t :tag "Parse Entry" (const :parse-entry) (symbol :tag "Parse Entry Function")))))) org-feed-drawer "FEEDSTATUS" "The name of the drawer for feed status information.\nEach feed may also specify its own drawer name using the `:drawer'\nparameter in `org-feed-alist'.\nNote that in order to make these drawers behave like drawers, they must\nbe added to the variable `org-drawers' or configured with a #+DRAWERS\nline." (string :tag "Drawer Name") org-feed-default-template "\n* %h\n %U\n %description\n %a\n" "Template for the Org node created from RSS feed items.\nThis is just the default, each feed can specify its own.\nAny fields from the feed item can be interpolated into the template with\n%name, for example %title, %description, %pubDate etc. In addition, the\nfollowing special escapes are valid as well:\n\n%h The title, or the first line of the description\n%t The date as a stamp, either from <pubDate> (if present), or\n the current date\n%T Date and time\n%u,%U Like %t,%T, but inactive time stamps\n%a A link, from <guid> if that is a permalink, else from <link>\n%(sexp) Evaluate elisp `(sexp)' and replace with the result, the simple\n %-escapes above can be used as arguments, e.g. %(capitalize \\\"%h\\\")" (string :tag "Template") org-feed-save-after-adding t "Non-nil means save buffer after adding new feed items." boolean org-feed-retrieve-method 'url-retrieve-synchronously "The method to be used to retrieve a feed URL.\nThis can be `curl' or `wget' to call these external programs, or it can be\nan Emacs Lisp function that will return a buffer containing the content\nof the file pointed to by the URL." (choice (const :tag "Internally with url.el" url-retrieve-synchronously) (const :tag "Externally with curl" curl) (const :tag "Externally with wget" wget) (function :tag "Function")) org-feed-before-adding-hook "Hook that is run before adding new feed items to a file.\nYou might want to commit the file in its current state to version control,\nfor example." hook org-feed-after-adding-hook "Hook that is run after new items have been added to a file.\nDepending on `org-feed-save-after-adding', the buffer will already\nhave been saved."] 8) #@37 The buffer used to retrieve a feed. (defvar org-feed-buffer "*Org feed*" (#$ . 7493)) #@53 Get inbox items from all feeds in `org-feed-alist'. (defalias 'org-feed-update-all #[nil "G\303\304\305\306\"\"\307\310 \311U\203 \312\202% \313U\203! \314\202% \315\316 \"\n\211\313U\2030 \317\2021 \320$*\207" [org-feed-alist nnew nfeeds apply + mapcar org-feed-update message "%s from %d %s" 0 "No new entries" 1 "1 new entry" format "%d new entries" "feed" "feeds"] 6 (#$ . 7585) nil]) #@156 Get inbox items from FEED. FEED can be a string with an association in `org-feed-alist', or it can be a list structured like an entry in `org-feed-alist'. (defalias 'org-feed-update #[(feed &optional retrieve-only) ";\203\n \302 \"\204 \303\304!\210\305\306\215\207" [feed org-feed-alist assoc error "No such feed in `org-feed-alist" exit (byte-code "@A@\3068\3078\310>A@\311>A@\312>A@\313>A@\314>A@\206( \315>A@\2061 \n\316>A@\206: \317\320>A@\206C \321\322\211\211\211\211\211\211\211\211\211\211\211?@ABCDEFGHIJKLMNOPQRS\323R!\211G\203\217 \324\325G!!\204\225 \326\327S\"\210T\203\240 \330\331G\"\210IG!D\322\332\333\217\210\212\334 U\335\216\336QP\"F\337FJ\"C\340\341D\"\211D\322\211V\203V@\342 \343\"\204\347 ABA\202\306\344\342 \345\"C\"8\211\203\346\342 \347\"!\230\204 @B@VA\211V\204\323 *\340HA\"A\340H@\"@O\203<\350\322\340OA\"\"A\350\322\340OA\"\"@A\204Q@\204Q\351\352S\"\210\330\331\353\"\210\354\340\355A\"\340\356@\"\"?\340\357D\"BA\203\213M\203}Fb\210MA!\210\202\204\340\360A\"E\361FE\"\210L\203\237@\203\237Fb\210L@!\210\362FJB#\210Fb\210\363 \210\364 \210\365\366!\210W\203\276\367 \210\351\370AGAG\371V\203\317\372\202\320\373S\374Q!P&\210\375\376!\210AG.\207" [feed org-feed-default-template org-feed-drawer olds guid e 2 3 :filter :formatter :new-handler :changed-handler :template :drawer :parse-feed org-feed-parse-rss-feed :parse-entry org-feed-parse-rss-entry nil org-feed-get-feed bufferp get-buffer error "Cannot get feed %s" throw exit (kill-buffer feed-buffer) ((error)) current-window-configuration ((set-window-configuration #1=#:wconfig)) org-feed-goto-inbox-internal org-feed-read-previous-status mapcar #[(e) "\302\303\304\305\306\" \"A@#\211\207" [e old-status plist-put :handled assoc plist-get :guid] 7] plist-get :handled assoc :guid sha1 :item-full-text delq message "No new items in feed %s" 0 append #[(e) "\301\302\"D\207" [e plist-get :guid] 3] #[(e) "\301\302\"D\207" [e plist-get :guid] 3] #[(e) "\303\304\"\211\305 \n\"\203 \306\202 \303\307\"\310\303\311\"!E\207" [e guid guid-alist plist-get :guid assoc t :handled sha1 :item-full-text] 7] #[(e) "\303 \n#\207" [e template formatter org-feed-format-entry] 4] org-feed-add-items org-feed-write-status hide-subtree show-children org-cycle-hide-drawers children save-buffer "Added %d new item%s from feed %s to file %s, heading %s" 1 "s" "" file-name-nondirectory run-hooks org-feed-after-adding-hook guid-alist changed new status old-status entries new-formatted inbox-pos feed-buffer parse-entry parse-feed drawer template changed-handler new-handler formatter filter headline file url name retrieve-only #1# --dolist-tail-- org-feed-save-after-adding] 25)] 3 (#$ . 7987) (list (org-completing-read "Feed name: " org-feed-alist))]) #@52 Go to the inbox that captures the feed named FEED. (defalias 'org-feed-goto-inbox #[(feed) ";\203\n \302 \"\204 \303\304!\210\305\3068\3078\"\207" [feed org-feed-alist assoc error "No such feed in `org-feed-alist" org-feed-goto-inbox-internal 2 3] 4 (#$ . 10876) (list (if (= (length org-feed-alist) 1) (car org-feed-alist) (org-completing-read "Feed name: " org-feed-alist)))]) #@37 Show the raw feed buffer of a feed. (defalias 'org-feed-show-raw-feed #[(feed) ";\203\n \302 \"\204 \303\304!\210\305\306\307\"!\210eb\207" [feed org-feed-alist assoc error "No such feed in `org-feed-alist" org-pop-to-buffer-same-window org-feed-update retrieve-only] 4 (#$ . 11268) (list (if (= (length org-feed-alist) 1) (car org-feed-alist) (org-completing-read "Feed name: " org-feed-alist)))]) #@98 Find or create HEADING in FILE. Switch to that buffer, and return the position of that headline. (defalias 'org-feed-goto-inbox-internal #[(file heading) "\302!\210~\210eb\210\303\304 \305Q\306\307#\203 \310\224b\210\202( db\210\311 \312\261\210\313\307!\210`\207" [file heading find-file re-search-forward "^\\*+[ ]+" "[ ]*\\(:.*?:[ ]*\\)?$" nil t 0 "\n\n* " "\n\n" org-back-to-heading] 4 (#$ . 11679)]) #@96 Get the alist of old GUIDs from the entry at POS. This will find DRAWER and extract the alist. (defalias 'org-feed-read-previous-status #[(pos drawer) "\212b\210\212\303\304\211\")\305\306\n\307Q \304#\205 \310\311\312!!*\207" [pos end drawer org-end-of-subtree t re-search-forward "^[ ]*:" ":[ ]*\n\\([^ ]*?\\)\n[ ]*:END:" read match-string 1] 4 (#$ . 12096)]) #@50 Write the feed STATUS to DRAWER in entry at POS. (defalias 'org-feed-write-status #[(pos drawer status) "\212b\210\212\305\306\211\")\307\310\311\312Q\n\306#\203. \313\225b\210`\212\310\314\307\306#\205( \313\224)|\210\202; \315 \210\316\317\261\210\320\313!\210\321\f!c+\207" [pos guid end drawer status org-end-of-subtree t nil re-search-forward "^[ ]*:" ":[ ]*\n" 0 "^[ ]*:END:" outline-next-heading " :" ":\n :END:\n" beginning-of-line pp-to-string] 5 (#$ . 12470)]) #@49 Add the formatted items to the headline as POS. (defalias 'org-feed-add-items #[(pos entries) "\305\211\212\nb\210\306!\204 \307\310!\210\311\312\313!G\313\"\314\315\211\"\210\316\305x\210\317\320!\210`\f\211A@\211\203<