;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'grapnel) #@28 Version of emacs ix client (defconst ix-version "0.7" (#$ . 106)) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\302\312\313\314\306\301&\210\310\315\302\316\313\314\306\301&\207" [custom-declare-group ix nil "ix -- the Emacs http://ix.io pastebin client" :tag "ix" :group applications custom-declare-variable ix-user "user name for posting at http://ix.io" :type string ix-token "token/password for posting at http://ix.io"] 8) (defalias 'ix-post #[(text) "\303\304\305\306\307\310\311\312G#B\313 B\314\nBE%\207" [text ix-user ix-token grapnel-retrieve-url "http://ix.io" ((success . ix-post--success-callback) (failure . ix--failure-callback) (error . ix--error-callback)) "POST" nil format "%s:%s" "f" "login" "token"] 9]) (defalias 'ix-post--success-callback #[(res hdrs) "\302\303O\304\305 \"\210\306 !)\207" [res ix-url 0 -1 message "Paste created and saved to kill-ring url: %s" kill-new] 3]) #@59 On success, create a new buffer and display ix post there (defalias 'ix-get--success-callback #[(res hdrs) "\301\302\303\304!!!\210c\207" [res pop-to-buffer get-buffer-create generate-new-buffer-name "*ix*"] 4 (#$ . 1030)]) (defalias 'ix--failure-callback #[(res hdrs) "\301\302\"\207" [hdrs message "request failure! %s"] 3]) (defalias 'ix--error-callback #[(res hdrs) "\301\302\"\207" [hdrs message "curl error! %s"] 3]) (defalias 'ix-url--extract-id #[(ix-url) "\301\302\303\"!@\207" [ix-url last split-string "/"] 4]) #@85 Delete a post, this requires you to be logged in. Specify the post id or the url (defalias 'ix-delete #[(ix-url) "\303\304\305\306\307\310\311\312G#\313B\314 B\315\nB\316\317!BF%\207" [ix-url ix-user ix-token grapnel-retrieve-url "http://ix.io" ((success lambda (res hdrs) (message "%s" (substring res 0 -1))) (failure . ix--failure-callback) (error . ix--error-callback)) "POST" nil format "%s:%s" "f" "" "login" "token" "rm" ix-url--extract-id] 11 (#$ . 1562) "sEnter ix url to delete:"]) #@184 Paste the region at http://ix.io, url returned is saved to the kill ring. It is recommended to set up a username and token by configuring the variables `ix-user' and `ix-token' (defalias 'ix #[(start end) "\303 \"\304\305!\210\306\n!)\207" [start end selection buffer-substring-no-properties message "posting..." ix-post] 3 (#$ . 2065) (byte-code "\203\n\301 \302 D\207edD\207" [mark-active region-beginning region-end] 2)]) #@234 Browse a paste from http://ix.io, given an input of either a post identifier or the complete url. The output is displayed in a special buffer, *ix*. If the buffer needs to be saved for some reason it has to be done manually (defalias 'ix-browse #[(ix-url) "\301\302\303!P\304\305#\207" [ix-url grapnel-retrieve-url "http://ix.io/" ix-url--extract-id ((success . ix-get--success-callback) (failure . ix--failure-callback) (error . ix--error-callback)) "GET"] 4 (#$ . 2507) (list (read-string "Enter ix url/ID to browse:" (thing-at-point 'url) nil nil nil))]) (provide 'ix)