From 80ca5744599762be838dc9a317cea104396b95de Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 4 Apr 2023 19:36:23 +0200 Subject: [PATCH 01/37] tiny changes to unbreak --- tumblesocks-user.el | 3 ++ tumblesocks-view.el | 77 ++++++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/tumblesocks-user.el b/tumblesocks-user.el index b473aaf..615241e 100644 --- a/tumblesocks-user.el +++ b/tumblesocks-user.el @@ -85,3 +85,6 @@ the user what to do for each post." "Create a new Tumblr markdown text post from the current buffer, returning the ID and copying the URL to the clipboard." (interactive "sTitle: \nsTags (optional, comma separated): ") (tumblesocks-text-post-from-region (point-min) (point-max) title tags)) + +(provide 'tumblesocks-user) +;;; tumblesocks-user.el ends here diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 60988ea..9c9e0cb 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -205,7 +205,7 @@ This causes Tumblesocks to ignore the setting of "Renders and inserts an HTML sexp. If inline is t, then

tags will have no effect." (let ((shr-width nil)) (if inline - (flet ((shr-ensure-paragraph () 0)) + (cl-flet ((shr-ensure-paragraph () 0)) ; cl-flet ;; disable newlines, for now ... (condition-case nil ;; this must go in the flet, sorry! @@ -214,6 +214,7 @@ This causes Tumblesocks to ignore the setting of (condition-case nil (shr-insert-document html-frag-parsed) (error (message "Couldn't insert HTML.")))))) + (defun tumblesocks-view-insert-html-fragment (html-fragment &optional inline) "Renders and inserts an HTML fragment. If inline is t, then

tags will have no effect." (let (html-frag-parsed) @@ -547,42 +548,43 @@ You can browse around, edit, and delete posts from here. (defun tumblesocks-view-render-notes (notes) "Render the given notes into the current buffer." (let ((start (point))) - (flet ((comment-that () - (put-text-property start (point) 'face font-lock-comment-face) - (setq start (point))) - (bold-that () - (put-text-property start (point) 'face - (cons '(:weight bold) font-lock-comment-face)) - (setq start (point)))) + (cl-flet ((comment-that () + (put-text-property start (point) 'face font-lock-comment-face) + (setq start (point))) + (bold-that () + (put-text-property start (point) 'face + (cons '(:weight bold) font-lock-comment-face)) + (setq start (point)))) (insert "-- Notes:\n") (comment-that) (dolist (note notes) - (tumblesocks-bind-plist-keys note - (type post_id blog_name blog_url reply_text answer_text added_text) - (cond ((string= type "posted") - (insert blog_name " posted this")) - ((string= type "answer") - (insert blog_name " answers:\n ") - (comment-that) - (tumblesocks-view-insert-html-fragment answer_text t) - (bold-that)) - ((string= type "reblog") - (insert blog_name " reblogged this on " blog_url)) - ((string= type "like") - (insert blog_name " liked this")) - ((string= type "reply") - (insert blog_name " says: ") - (comment-that) - (tumblesocks-view-insert-html-fragment reply_text t) - (bold-that)) - (t (insert (format "%S" note)))) - (when added_text - (insert "\n ") - (comment-that) - (insert added_text) - (bold-that)) - (insert "\n") - (comment-that)))))) + (tumblesocks-bind-plist-keys + note + (type post_id blog_name blog_url reply_text answer_text added_text) + (cond ((string= type "posted") + (insert blog_name " posted this")) + ((string= type "answer") + (insert blog_name " answers:\n ") + (comment-that) + (tumblesocks-view-insert-html-fragment answer_text t) + (bold-that)) + ((string= type "reblog") + (insert blog_name " reblogged this on " blog_url)) + ((string= type "like") + (insert blog_name " liked this")) + ((string= type "reply") + (insert blog_name " says: ") + (comment-that) + (tumblesocks-view-insert-html-fragment reply_text t) + (bold-that)) + (t (insert (format "%S" note)))) + (when added_text + (insert "\n ") + (comment-that) + (insert added_text) + (bold-that)) + (insert "\n") + (comment-that)))))) (defun tumblesocks-view-like-post-at-point (like-p) "Like the post underneath point. With prefix arg (C-u), unlike it." @@ -618,7 +620,7 @@ You can browse around, edit, and delete posts from here. (defun tumblesocks-view-posts-tagged (tag) "Search for posts with the given tag." (interactive (list (read-from-minibuffer - "Search for posts with tag: " + "Search for posts with tag: " (tumblesocks-view--dwim-at-point)))) (tumblesocks-view-prepare-buffer (concat "Tag search: " tag)) @@ -656,7 +658,7 @@ You can browse around, edit, and delete posts from here. :help "Move to the previous post."] "--" ["Search" tumblesocks-view-posts-tagged - :help "Search for posts with a certain tag."] + :help "Search for posts with a certain tag."] ["Refresh List" tumblesocks-view-refresh :help "Refresh the current view (download new posts)."] "---" @@ -666,3 +668,6 @@ You can browse around, edit, and delete posts from here. :help "tumblesocks-mode settings"] ["Quit" quit-window :help "Close the current frame"])) + +(provide 'tumblesocks-view) +;;; tumblesocks-view.el ends here From 486bd8bcf915144c93a80dc250e928aaf7d27150 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 4 Apr 2023 20:55:38 +0200 Subject: [PATCH 02/37] readme notice --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 8688b49..fed7b16 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ + +tumblesocks - un-break it fork +============================== + +`tumblesocks.el` old, crazy, messy, awesome, abandoned, and broken, and it depends on `emacs-oauth`, which is much the same. each file has about 70 `flycheck` errors in it. but it also fucking rocks. + +so this repo adds patches that people have shared online for un-breaking `tumblesocks.el`. + +a patched version of ye olde `emacs-oauth` is also needed. it's here: https://codeberg.org/martianh/emacs-oauth. + +i haven't actually tried this out yet, i have just patched changes from my `init.el` to these two repos. if you try these out, i'd recommend you remove all trace of any other versions. + +further patches welcome. + +original readme +=============== + `tumblesocks-mode` - Tumblr Support for Emacs ============================================= From 21b2b7e1d80642fa71247c23d2bff963824874f6 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 7 Jul 2023 08:08:24 +0200 Subject: [PATCH 03/37] I had some issues with view-post-at-point and reblog-post-at-point and replaced the original code with these small modifications. It seems to work now. --- tumblesocks-view.el | 46 ++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 9c9e0cb..746a223 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -154,37 +154,41 @@ This causes Tumblesocks to ignore the setting of (tumblesocks-view-refresh) (goto-char pos)))) -(defun tumblesocks-view-edit-post-at-point () +(defun tumblesocks-view-post-at-point () + "Open the post under point in a new buffer, showing notes, etc" (interactive) - (when (yes-or-no-p "Really try to edit this post? ") - (tumblesocks-compose-edit-post - (format "%d" - (plist-get (get-text-property (point) 'tumblesocks-post-data) :id))) - '(lambda () - (let ((pos (point))) - (tumblesocks-view-refresh) - (goto-char pos))))) + (when (get-text-property (point) 'tumblesocks-post-data) + (let ((id (plist-get (get-text-property (point) 'tumblesocks-post-data) + :id)) + (tumblesocks-blog (plist-get (get-text-property (point) 'tumblesocks-post-data) + :blog_name))) + (tumblesocks-view-post id)))) (defun tumblesocks-view-reblog-post-at-point () "Reblog the post at point, if there is one." (interactive) - (when (get-text-property (point) 'tumblesocks-post-data) + (let* ((data (get-text-property (point) 'tumblesocks-post-data)) + (from-blog (plist-get data :channel-name)) + (post_id (format "%d" (plist-get data :id))) + (reblog_key (plist-get data :reblog_key))) + (when data ;; Get the reblog key. - (let* ((post_id - (format "%d" - (plist-get - (get-text-property (point) 'tumblesocks-post-data) :id))) - ;; we need to do another API fetch because - ;; tumblesocks-post-data doesn't have reblog keys, by design - (blog (tumblesocks-api-blog-posts - nil post_id nil "1" nil "true" nil "html")) - (post (car (plist-get blog :posts))) - (reblog_key (plist-get post :reblog_key))) + ;; (let* ((tumblesocks-blog from-blog) + ;; ;; we need to do another API fetch because + ;; ;; tumblesocks-post-data doesn't have reblog keys, by design + ;; (blog (tumblesocks-api-blog-posts + ;; nil post_id nil "1" nil "true" nil "html")) + ;; (post (car (plist-get blog :posts)))) + ;; (setq reblog_key (plist-get post :reblog_key))) + (tumblesocks-api-reblog-post post_id reblog_key (read-string "(Optional) comments to add: ")) (message "Reblogged.") - (tumblesocks-view-refresh)))) + (let ((pos (point))) + (tumblesocks-view-refresh) + (goto-char pos)) + ))) From cf80d98f6b8128410e5bc5511346899245eec170 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 7 Jul 2023 10:56:01 +0200 Subject: [PATCH 04/37] I got errors in the json processing; a bit of brute force, change (search-forward-regexp "^$" nil t) into (search-forward-regexp "^{" nil t) add (previous-line) tumblesocks-api-process-response --- tumblesocks-api.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tumblesocks-api.el b/tumblesocks-api.el index edd4682..0a848d2 100644 --- a/tumblesocks-api.el +++ b/tumblesocks-api.el @@ -180,8 +180,8 @@ returning JSON or signaling an error for other requests." (decode-coding-region (point-min) (point-max) 'utf-8-dos) ;; the following copied from url.el (goto-char (point-min)) - (skip-chars-forward " \t\n") ; Skip any blank crap - (skip-chars-forward "HTTP/") ; Skip HTTP Version + (skip-chars-forward " \t\n") ; Skip any blank crap + (skip-chars-forward "HTTP/") ; Skip HTTP Version (skip-chars-forward "[0-9].") (let ((pointpos (point)) (code (read (current-buffer)))) @@ -194,7 +194,9 @@ returning JSON or signaling an error for other requests." (error (buffer-substring pointpos (line-end-position)))) (t - (search-forward-regexp "^$" nil t) + ;; brute force and ignorance + (search-forward-regexp "^{" nil t) + (previous-line) ;; body (let* ((json-response (buffer-substring (1+ (point)) (point-max))) (json-object-type 'plist) From 164084d5a0440be42b342ef88ed146dda0b77bff Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:18:22 +0200 Subject: [PATCH 05/37] add a function in the api to list out all notifications, and provide a tumblesocks-view-notifications function --- tumblesocks-api.el | 11 +++++++++++ tumblesocks-view.el | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/tumblesocks-api.el b/tumblesocks-api.el index 0a848d2..c14ec5d 100644 --- a/tumblesocks-api.el +++ b/tumblesocks-api.el @@ -260,6 +260,17 @@ returning JSON or signaling an error for other requests." (tumblesocks-api-http-oauth-post (tumblesocks-api-url "/user/unlike") `(:id ,id :reblog_key ,reblog_key))) +(defun tumblesocks-api-blog-notifications (&optional limit offset) + "Retrieve the activity items for a specific blog, in reverse chronological order, newest first" + (unless tumblesocks-blog (error "Which blog? Please set `tumblesocks-blog'")) + (let ((args (append + (and limit `(:limit ,limit)) + (and offset `(:offset ,offset))))) + (tumblesocks-api-http-oauth-get + (tumblesocks-api-url "/blog/" + tumblesocks-blog + "/notifications") args))) + (defun tumblesocks-api-blog-info () "Gather information about the blog listed in `tumblesocks-blog'." diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 746a223..058c43f 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -590,6 +590,29 @@ You can browse around, edit, and delete posts from here. (insert "\n") (comment-that)))))) +(defun tumblesocks-view-notifications () + "View all notfications, newest on top" + ;; TODO paging! + (interactive) + (tumblesocks-api-blog-notifications) + (tumblesocks-view-prepare-buffer "notifications") + (insert "Notifications") + (center-line) + (insert "\n\n") + (dolist (notification (plist-get (tumblesocks-api-blog-notifications) :notifications)) + ;;(insert (format "%s\n" notification)) + (insert (format "%s - " (format-time-string "%D %r" (plist-get notification :timestamp)))) + (insert (format "%s - " (plist-get notification :type))) + (insert (format "%s - " (plist-get notification :from_tumblelog_name))) + (when (string= (plist-get notification :type) "reply") + (insert (format "%s - " (plist-get notification :reply_text)))) + (tumblesocks-view-insert-parsed-html-fragment + `(img ((src . ,(plist-get notification :media_url)))) t) + (insert (format "\n%s\n\n\n" (plist-get notification :target_post_summary)))) + (tumblesocks-view-finishrender) + (setq tumblesocks-view-refresh-action + `(lambda () (tumblesocks-view-notifications)))) ; <-- CLOSURE HACK :p + (defun tumblesocks-view-like-post-at-point (like-p) "Like the post underneath point. With prefix arg (C-u), unlike it." (interactive "P") From f39e68386ff12f6e342d6ff96b3c6889722c6737 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:19:37 +0200 Subject: [PATCH 06/37] add a function in the api to list out all notifications, and provide a tumblesocks-view-notifications function --- tumblesocks-view.el | 1 + 1 file changed, 1 insertion(+) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 058c43f..3af0a32 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -53,6 +53,7 @@ This causes Tumblesocks to ignore the setting of (define-key tumblesocks-view-mode-map "l" 'tumblesocks-view-like-post-at-point) (define-key tumblesocks-view-mode-map "o" 'tumblesocks-view-post-url-at-point) (define-key tumblesocks-view-mode-map "y" 'tumblesocks-view-yank-post-url-at-point) + (define-key tumblesocks-view-mode-map "a" 'tumblesocks-view-notifications) tumblesocks-view-mode-map)) (defun tumblesocks-view-compose-new-post () From 3842e96e2df5486c5bf35645c3c6ec81e2effd33 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:21:11 +0200 Subject: [PATCH 07/37] do not list out the question in the header, do not change the face --- tumblesocks-view.el | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 3af0a32..8489d75 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -352,7 +352,7 @@ better suited to inserting each post." (cond (title (tumblesocks-view-insert-html-fragment title t)) (caption (tumblesocks-view-insert-html-fragment caption t)) - (question (tumblesocks-view-insert-html-fragment question t)) + ;;(question (tumblesocks-view-insert-html-fragment question t)) (t (insert " "))) ;; Notes (when (and note_count (> note_count 0)) @@ -368,14 +368,7 @@ better suited to inserting each post." "\nPermalink: ") (tumblesocks-view-insert-parsed-html-fragment `(a ((href . ,post_url)) ,post_url) t) - (insert "\n")) - (put-text-property begin end_bname 'face - (list '(:inverse-video t) - '(:weight bold) - font-lock-keyword-face)) - (put-text-property end_bname (point) 'face - (list '(:weight bold) - 'highlight)))) + (insert "\n")))) (defun tumblesocks-view-insert-text () (tumblesocks-view-insert-html-fragment body) From bc2975556f247e1726efab1e7bd5045ecfdada35 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:22:22 +0200 Subject: [PATCH 08/37] no more extra newline after the subtitle asks:, identation at 32 instead of 4, and no more changes to the face --- tumblesocks-view.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 8489d75..efd61bd 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -409,11 +409,13 @@ better suited to inserting each post." (insert "\n")) (defun tumblesocks-view-insert-answer () - (insert asking_name " asks: \n ") + (insert asking_name " asks:") (let ((start (point)) - (shr-indentation 4)) + (shr-indentation 32)) (tumblesocks-view-insert-html-fragment question t) - (put-text-property start (point) 'face font-lock-comment-face)) + ;;(put-text-property start (point) 'face font-lock-comment-face) + ;;(set-face-attribute start (point) :background "grey") + ) (tumblesocks-view-insert-html-fragment answer)) (defun tumblesocks-view-insert-link () From 1190772363fb0c06c53989f5ee2d32616444ac0b Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:28:12 +0200 Subject: [PATCH 09/37] key "a" will get us the list of notifications --- tumblesocks-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index efd61bd..129dd03 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -46,6 +46,7 @@ This causes Tumblesocks to ignore the setting of (define-key tumblesocks-view-mode-map "r" 'tumblesocks-view-reblog-post-at-point) (define-key tumblesocks-view-mode-map (kbd "RET") 'tumblesocks-view-post-at-point) (define-key tumblesocks-view-mode-map (kbd "SPC") 'forward-page) + (define-key tumblesocks-view-mode-map "a" 'tumblesocks-view-notifications) (define-key tumblesocks-view-mode-map "b" 'tumblesocks-view-blog) (define-key tumblesocks-view-mode-map "d" 'tumblesocks-view-delete-post-at-point) (define-key tumblesocks-view-mode-map "e" 'tumblesocks-view-edit-post-at-point) @@ -53,7 +54,6 @@ This causes Tumblesocks to ignore the setting of (define-key tumblesocks-view-mode-map "l" 'tumblesocks-view-like-post-at-point) (define-key tumblesocks-view-mode-map "o" 'tumblesocks-view-post-url-at-point) (define-key tumblesocks-view-mode-map "y" 'tumblesocks-view-yank-post-url-at-point) - (define-key tumblesocks-view-mode-map "a" 'tumblesocks-view-notifications) tumblesocks-view-mode-map)) (defun tumblesocks-view-compose-new-post () From 2b1c07d7eb4285e6406020f4762f4cc134ea0862 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:55:16 +0200 Subject: [PATCH 10/37] Notifications in a seperate let block with font-lock-comment-face --- tumblesocks-view.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 129dd03..475a7b5 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -592,9 +592,11 @@ You can browse around, edit, and delete posts from here. (interactive) (tumblesocks-api-blog-notifications) (tumblesocks-view-prepare-buffer "notifications") - (insert "Notifications") - (center-line) - (insert "\n\n") + (let ((begin (point))) + (insert "Notifications") + (center-line) + (insert "\n\n") + (put-text-property begin (point) 'face font-lock-comment-face)) (dolist (notification (plist-get (tumblesocks-api-blog-notifications) :notifications)) ;;(insert (format "%s\n" notification)) (insert (format "%s - " (format-time-string "%D %r" (plist-get notification :timestamp)))) From 3ce9841b993bb1511d70fd5c7a81e9c70c50762c Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 13:58:37 +0200 Subject: [PATCH 11/37] my modifications to reblog-post-at-point and view-post-at-point --- tumblesocks-view.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 475a7b5..c0acff1 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -107,8 +107,11 @@ This causes Tumblesocks to ignore the setting of "Open the post under point in a new buffer, showing notes, etc" (interactive) (when (get-text-property (point) 'tumblesocks-post-data) - (tumblesocks-view-post - (plist-get (get-text-property (point) 'tumblesocks-post-data) :id)))) + (let ((id (plist-get (get-text-property (point) 'tumblesocks-post-data) + :id)) + (tumblesocks-blog (plist-get (get-text-property (point) 'tumblesocks-post-data) + :blog_name))) + (tumblesocks-view-post id)))) (defun tumblesocks-view-post-url-at-point () "Open the post under point in your browser" @@ -169,9 +172,9 @@ This causes Tumblesocks to ignore the setting of "Reblog the post at point, if there is one." (interactive) (let* ((data (get-text-property (point) 'tumblesocks-post-data)) - (from-blog (plist-get data :channel-name)) - (post_id (format "%d" (plist-get data :id))) - (reblog_key (plist-get data :reblog_key))) + (from-blog (plist-get data :channel-name)) + (post_id (format "%d" (plist-get data :id))) + (reblog_key (plist-get data :reblog_key))) (when data ;; Get the reblog key. ;; (let* ((tumblesocks-blog from-blog) From b8e282a52d2bb5ec69b32a9b7f83dec56cae7b55 Mon Sep 17 00:00:00 2001 From: gargle Date: Fri, 18 Aug 2023 12:33:18 +0000 Subject: [PATCH 12/37] Update the README.md file with a screenshot and some explaining about tumblesocks-view-notifications. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8688b49..c1497df 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ `tumblesocks-mode` - Tumblr Support for Emacs ============================================= - -![http://i.imgur.com/9wroS.png](http://i.imgur.com/9wroS.png) +![https://ibb.co/vhXD51R](https://ibb.co/vhXD51R) Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes. @@ -34,6 +33,9 @@ Managing your posts: * **d: Delete** the post under the cursor. (This only works if you made that post.) * **e: Edit** the post under the cursor. (This only works if you made that post.) +View activity +* **a: Notifications** shows you your Notifications (likes, reblogs, milestones, replies.) `tumblesocks-view-notifications` works as well. + Installing ---------- From 9ad0c50936b1707f32761f750b11af8a963bd689 Mon Sep 17 00:00:00 2001 From: gargle Date: Fri, 18 Aug 2023 12:34:54 +0000 Subject: [PATCH 13/37] The full url of the image The full url of the image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1497df..2b66d32 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ `tumblesocks-mode` - Tumblr Support for Emacs ============================================= -![https://ibb.co/vhXD51R](https://ibb.co/vhXD51R) +![https://i.ibb.co/w7cYHyj/d2849738d4c24cc0.jpg](https://i.ibb.co/w7cYHyj/d2849738d4c24cc0.jpg) Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes. From 56953dc20c6c10f65d6ae6b44b23229cc43dbab7 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 17:27:44 +0200 Subject: [PATCH 14/37] show the tags of a post --- tumblesocks-view.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index c0acff1..8cbf72f 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -338,6 +338,10 @@ better suited to inserting each post." ((string= type "photo") (tumblesocks-view-insert-photo)) ((string= type "chat") (tumblesocks-view-insert-chat)) (t (tumblesocks-view-insert-i-have-no-clue-what-this-is))) + ;; Tags + (when tags + (insert (mapconcat 'identity (mapcar (lambda (tag) (format "#%s" tag)) tags) ", "))) + (insert "\n") (insert "\n") ;; Record this post data so we know how to read it next (put-text-property begin-post-area (point) @@ -350,6 +354,7 @@ better suited to inserting each post." (setq begin (point)) (insert blog_name ":") (setq end_bname (point)) + (put-text-property begin end_bname 'face (list '(:weight bold) 'highlight)) ;; Title (insert " ") (cond From 2482fb756df18524b288f65a49bd061321b26d5a Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 17:45:00 +0200 Subject: [PATCH 15/37] no more commas between tags, and no : after the blog name --- tumblesocks-view.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 8cbf72f..67b513f 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -340,7 +340,7 @@ better suited to inserting each post." (t (tumblesocks-view-insert-i-have-no-clue-what-this-is))) ;; Tags (when tags - (insert (mapconcat 'identity (mapcar (lambda (tag) (format "#%s" tag)) tags) ", "))) + (insert (mapconcat 'identity (mapcar (lambda (tag) (format "#%s" tag)) tags) " "))) (insert "\n") (insert "\n") ;; Record this post data so we know how to read it next @@ -352,7 +352,7 @@ better suited to inserting each post." "Draw the header for the current post, optionally being verbose." (let (begin end_bname) (setq begin (point)) - (insert blog_name ":") + (insert blog_name) (setq end_bname (point)) (put-text-property begin end_bname 'face (list '(:weight bold) 'highlight)) ;; Title From 604f7fa808d2301cfa7a428124090a28e9654bed Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 17:52:17 +0200 Subject: [PATCH 16/37] a new image for the readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b66d32..dde0ed3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ `tumblesocks-mode` - Tumblr Support for Emacs ============================================= -![https://i.ibb.co/w7cYHyj/d2849738d4c24cc0.jpg](https://i.ibb.co/w7cYHyj/d2849738d4c24cc0.jpg) +![https://i.ibb.co/JR6BwqW/xwd.jpg](https://i.ibb.co/JR6BwqW/xwd.jpg) Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes. From 3138f1272c3d2631ec506d9d6caf33cdd9f3defe Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 20:12:58 +0200 Subject: [PATCH 17/37] a divider line between each post and each notification --- tumblesocks-view.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 67b513f..4442afe 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -327,6 +327,8 @@ better suited to inserting each post." ;; For answer posts: asking_name asking_url question answer) (let ((begin-post-area (point))) + (insert (make-string fill-column ?\u2500)) + (insert "\n") (tumblesocks-view-insert-header verbose-header) (cond ((string= type "text") (tumblesocks-view-insert-text)) From 85aadef52b70b4cdfcb58e232c9975020640fd1e Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 20:14:21 +0200 Subject: [PATCH 18/37] a divider line between each post and each notification --- tumblesocks-view.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 4442afe..849448f 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -608,6 +608,8 @@ You can browse around, edit, and delete posts from here. (insert "\n\n") (put-text-property begin (point) 'face font-lock-comment-face)) (dolist (notification (plist-get (tumblesocks-api-blog-notifications) :notifications)) + (insert (make-string fill-column ?\u2500)) + (insert "\n") ;;(insert (format "%s\n" notification)) (insert (format "%s - " (format-time-string "%D %r" (plist-get notification :timestamp)))) (insert (format "%s - " (plist-get notification :type))) @@ -616,7 +618,7 @@ You can browse around, edit, and delete posts from here. (insert (format "%s - " (plist-get notification :reply_text)))) (tumblesocks-view-insert-parsed-html-fragment `(img ((src . ,(plist-get notification :media_url)))) t) - (insert (format "\n%s\n\n\n" (plist-get notification :target_post_summary)))) + (insert (format "\n%s\n" (plist-get notification :target_post_summary)))) (tumblesocks-view-finishrender) (setq tumblesocks-view-refresh-action `(lambda () (tumblesocks-view-notifications)))) ; <-- CLOSURE HACK :p From 4307061029107552652b3d5ae003c9d37ecb87fb Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 20:35:15 +0200 Subject: [PATCH 19/37] remove extra newline after the tags --- tumblesocks-view.el | 1 - 1 file changed, 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 849448f..06780b9 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -344,7 +344,6 @@ better suited to inserting each post." (when tags (insert (mapconcat 'identity (mapcar (lambda (tag) (format "#%s" tag)) tags) " "))) (insert "\n") - (insert "\n") ;; Record this post data so we know how to read it next (put-text-property begin-post-area (point) 'tumblesocks-post-data From f049cd60c99b57da5acf227f77666909f20d025c Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 20:48:53 +0200 Subject: [PATCH 20/37] a new image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dde0ed3..a8059ef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ `tumblesocks-mode` - Tumblr Support for Emacs ============================================= -![https://i.ibb.co/JR6BwqW/xwd.jpg](https://i.ibb.co/JR6BwqW/xwd.jpg) +![https://i.ibb.co/njkRfq4/xwd.jpg](https://i.ibb.co/njkRfq4/xwd.jpg) Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes. From e8247c6b9b099d159ab15dc810eb950931344be8 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Fri, 18 Aug 2023 20:53:41 +0200 Subject: [PATCH 21/37] a new image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a8059ef..3cb0967 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ `tumblesocks-mode` - Tumblr Support for Emacs ============================================= -![https://i.ibb.co/njkRfq4/xwd.jpg](https://i.ibb.co/njkRfq4/xwd.jpg) +![https://i.ibb.co/9WYG2mB/xwd.jpg](https://i.ibb.co/9WYG2mB/xwd.jpg) Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes. From fff776d45b38d5eff2e7de9248d0ce523e4ac0bf Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Sat, 19 Aug 2023 07:31:35 +0200 Subject: [PATCH 22/37] change the timestamp of notifications so that the timezone is gone --- tumblesocks-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 06780b9..c6ba07e 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -610,7 +610,7 @@ You can browse around, edit, and delete posts from here. (insert (make-string fill-column ?\u2500)) (insert "\n") ;;(insert (format "%s\n" notification)) - (insert (format "%s - " (format-time-string "%D %r" (plist-get notification :timestamp)))) + (insert (format "%s - " (format-time-string "%D %R" (plist-get notification :timestamp)))) (insert (format "%s - " (plist-get notification :type))) (insert (format "%s - " (plist-get notification :from_tumblelog_name))) (when (string= (plist-get notification :type) "reply") From 41ae6a7a66308a890976b683ad07d0e9fb4ebbea Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Sat, 19 Aug 2023 07:39:53 +0200 Subject: [PATCH 23/37] A modified README --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fed7b16..269d8f6 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,27 @@ tumblesocks - un-break it fork ============================== -`tumblesocks.el` old, crazy, messy, awesome, abandoned, and broken, and it depends on `emacs-oauth`, which is much the same. each file has about 70 `flycheck` errors in it. but it also fucking rocks. +`tumblesocks.el` old, crazy, messy, awesome, abandoned, and broken, and it depends on `emacs-oauth`, +which is much the same. each file has about 70 `flycheck` errors in it. But it also fucking rocks. -so this repo adds patches that people have shared online for un-breaking `tumblesocks.el`. +So this repo adds patches that people have shared online for un-breaking `tumblesocks.el`. -a patched version of ye olde `emacs-oauth` is also needed. it's here: https://codeberg.org/martianh/emacs-oauth. +A patched version of ye olde `emacs-oauth` is also needed. It's here: https://codeberg.org/martianh/emacs-oauth. -i haven't actually tried this out yet, i have just patched changes from my `init.el` to these two repos. if you try these out, i'd recommend you remove all trace of any other versions. +If you try these out, I'd recommend you remove all trace of any other versions. -further patches welcome. +Further patches are most welcome. -original readme + + +Modified README =============== `tumblesocks-mode` - Tumblr Support for Emacs ============================================= +This is how tumblesocks looks now: + ![http://i.imgur.com/9wroS.png](http://i.imgur.com/9wroS.png) Tumblesocks is an Emacs tumblr client. With it, you can write posts, From dbfbc39b2ad73f9c39d203eec1650723971cf9f3 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Sat, 19 Aug 2023 07:44:09 +0200 Subject: [PATCH 24/37] A modified README, wrong image! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df5eeb8..278af98 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Modified README This is how tumblesocks looks now: -![http://i.imgur.com/9wroS.png](http://i.imgur.com/9wroS.png) +![https://i.ibb.co/9WYG2mB/xwd.jpg](https://i.ibb.co/9WYG2mB/xwd.jpg) Tumblesocks is an Emacs tumblr client. With it, you can write posts, check your dashboard, and view blogs and notes. From 6186b65dc35eecd54c3c1b11b86f1b4c6868e5fc Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Sat, 19 Aug 2023 08:51:32 +0200 Subject: [PATCH 25/37] Add my name and copyright to the code --- tumblesocks-api.el | 1 + tumblesocks-view.el | 3 +++ tumblesocks.el | 3 +++ 3 files changed, 7 insertions(+) diff --git a/tumblesocks-api.el b/tumblesocks-api.el index c14ec5d..db09116 100644 --- a/tumblesocks-api.el +++ b/tumblesocks-api.el @@ -1,5 +1,6 @@ ;; tumblesocks-api.el -- functions for talking with tumblr ;; Copyright (C) 2012 gcr +;; Copyright (C) 2023 gargle (require 'oauth) (require 'json) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index c6ba07e..357a16f 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -1,5 +1,8 @@ ;; tumblesocks-view.el -- Provide an interface to view tumblr blog posts. +;; Copyright 2012 gcr +;; Copyright 2023 gargle + (eval-when-compile (require 'easymenu)) diff --git a/tumblesocks.el b/tumblesocks.el index 8c7a6e1..e1172e9 100644 --- a/tumblesocks.el +++ b/tumblesocks.el @@ -1,9 +1,12 @@ ;;; tumblesocks.el --- An Emacs tumblr client. ;; Copyright 2012 gcr +;; Copyright 2023 gargle ;; Author: gcr +;; gargle ;; URL: http://github.com/gcr/tumblesocks +;; https://codeberg.org/gargle/tumblesocks ;; License: zlib (defgroup tumblesocks nil From b956bce0aa20cf7570129b7e402c6a8694fcef8c Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Sat, 19 Aug 2023 11:35:46 +0200 Subject: [PATCH 26/37] my email is johan.laenen+codeberg@gmail.com --- tumblesocks.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks.el b/tumblesocks.el index e1172e9..c37ed8a 100644 --- a/tumblesocks.el +++ b/tumblesocks.el @@ -4,7 +4,7 @@ ;; Copyright 2023 gargle ;; Author: gcr -;; gargle +;; gargle ;; URL: http://github.com/gcr/tumblesocks ;; https://codeberg.org/gargle/tumblesocks ;; License: zlib From f7b0284fd3544be62dba9ac03d4935b1616b1c1b Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Mon, 21 Aug 2023 08:16:28 +0200 Subject: [PATCH 27/37] do not show the caption because it would appear twice --- tumblesocks-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 357a16f..ef69934 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -363,7 +363,7 @@ better suited to inserting each post." (insert " ") (cond (title (tumblesocks-view-insert-html-fragment title t)) - (caption (tumblesocks-view-insert-html-fragment caption t)) + ;;(caption (tumblesocks-view-insert-html-fragment caption t)) ;;(question (tumblesocks-view-insert-html-fragment question t)) (t (insert " "))) ;; Notes From a0a72f173b928c511227cc4967daf9a230ace9c3 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Mon, 21 Aug 2023 08:20:35 +0200 Subject: [PATCH 28/37] date and time for notifications in the locale format --- tumblesocks-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index ef69934..e4a8ead 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -613,7 +613,7 @@ You can browse around, edit, and delete posts from here. (insert (make-string fill-column ?\u2500)) (insert "\n") ;;(insert (format "%s\n" notification)) - (insert (format "%s - " (format-time-string "%D %R" (plist-get notification :timestamp)))) + (insert (format "%s - " (format-time-string "%x %X" (plist-get notification :timestamp)))) (insert (format "%s - " (plist-get notification :type))) (insert (format "%s - " (plist-get notification :from_tumblelog_name))) (when (string= (plist-get notification :type) "reply") From ec0cfcf370e733f411c2f046490e657015b3ca89 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Tue, 22 Aug 2023 08:29:05 +0200 Subject: [PATCH 29/37] use %c instead of %x %X for the date and time in notifications --- tumblesocks-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index e4a8ead..b78b003 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -613,7 +613,7 @@ You can browse around, edit, and delete posts from here. (insert (make-string fill-column ?\u2500)) (insert "\n") ;;(insert (format "%s\n" notification)) - (insert (format "%s - " (format-time-string "%x %X" (plist-get notification :timestamp)))) + (insert (format "%s - " (format-time-string "%c" (plist-get notification :timestamp)))) (insert (format "%s - " (plist-get notification :type))) (insert (format "%s - " (plist-get notification :from_tumblelog_name))) (when (string= (plist-get notification :type) "reply") From c6b667b46464233b20b7b398f2de3dd30c4a34e5 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Tue, 22 Aug 2023 16:03:40 +0200 Subject: [PATCH 30/37] show the title in bold and highlighted if it exists, and show the time of posting in local time --- tumblesocks-view.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index b78b003..098fc0c 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -357,15 +357,18 @@ better suited to inserting each post." (let (begin end_bname) (setq begin (point)) (insert blog_name) - (setq end_bname (point)) - (put-text-property begin end_bname 'face (list '(:weight bold) 'highlight)) ;; Title (insert " ") (cond - (title (tumblesocks-view-insert-html-fragment title t)) + (title (tumblesocks-view-insert-html-fragment title)) ;;(caption (tumblesocks-view-insert-html-fragment caption t)) ;;(question (tumblesocks-view-insert-html-fragment question t)) (t (insert " "))) + (setq end_bname (point)) + (put-text-property begin end_bname 'face (list '(:weight bold) 'highlight)) + ;; Date + (insert (format-time-string "%c" (date-to-time date))) + (insert " ") ;; Notes (when (and note_count (> note_count 0)) (insert " (" (format "%d" note_count) " note" From 16c1556b557418894884b28a6388f4689877ae41 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Tue, 22 Aug 2023 16:28:51 +0200 Subject: [PATCH 31/37] show the title on the same line as the blogname, with a : to seperate the two --- tumblesocks-view.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 098fc0c..3cc62d2 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -358,15 +358,13 @@ better suited to inserting each post." (setq begin (point)) (insert blog_name) ;; Title - (insert " ") (cond - (title (tumblesocks-view-insert-html-fragment title)) - ;;(caption (tumblesocks-view-insert-html-fragment caption t)) - ;;(question (tumblesocks-view-insert-html-fragment question t)) - (t (insert " "))) + (title (if (not (string= title "")) + (insert " : " title)))) (setq end_bname (point)) (put-text-property begin end_bname 'face (list '(:weight bold) 'highlight)) ;; Date + (insert "\n") (insert (format-time-string "%c" (date-to-time date))) (insert " ") ;; Notes From 55bb6b504ea447bef1cc5eaf837d410d2b0049d3 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Mon, 28 Aug 2023 17:08:42 +0200 Subject: [PATCH 32/37] try to list out our notifications as raw instead of html --- tumblesocks-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index 3cc62d2..fbd9a07 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -665,7 +665,7 @@ You can browse around, edit, and delete posts from here. (tumblesocks-view-prepare-buffer (concat "Tag search: " tag)) (tumblesocks-view-render-blogdata - (tumblesocks-api-tagged tag nil nil "html") + (tumblesocks-api-tagged tag nil nil "raw") 0) ; don't allow them to browse next (this isn't possible in general anyways) (tumblesocks-view-finishrender) (setq tumblesocks-view-refresh-action From 56f6663139035e9608d67cad54357b65be3dc44a Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Tue, 29 Aug 2023 21:47:10 +0200 Subject: [PATCH 33/37] eln-cache still has make-oauth-t and make-oauth-access-token in my .emacs.d/ directory. oauth is using oauth-t--create and oauth-access-token--create now --- tumblesocks-api.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tumblesocks-api.el b/tumblesocks-api.el index db09116..52ff16e 100644 --- a/tumblesocks-api.el +++ b/tumblesocks-api.el @@ -66,10 +66,10 @@ call `tumblesocks-api-reauthenticate' after this." (if (string-match "\\([^:]*\\):\\(.*\\)" (buffer-substring (point-min) (point-max))) (setq tumblesocks-token - (make-oauth-access-token + (oauth-access-token--create :consumer-key tumblesocks-consumer-key :consumer-secret tumblesocks-secret-key - :auth-t (make-oauth-t + :auth-t (oauth-t--create :token (match-string 1 str) :token-secret (match-string 2 str)))))) (kill-this-buffer))) From 8b748e071add34b11573395cd6b55b5fcb63b4a4 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Wed, 30 Aug 2023 13:06:18 +0200 Subject: [PATCH 34/37] update the version numbers of our dependencies as of 30/08/2023 --- tumblesocks-pkg.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tumblesocks-pkg.el b/tumblesocks-pkg.el index 585f992..2f042e5 100644 --- a/tumblesocks-pkg.el +++ b/tumblesocks-pkg.el @@ -1,5 +1,5 @@ (define-package "tumblesocks" "0.0.6" "An Emacs tumblr client." - '((htmlize "1.39") - (oauth "1.0.3") - (markdown-mode "1.8.1"))) + '((htmlize "20210825.2150") + (oauth "20230706.2026") + (markdown-mode "20230820.2349"))) From 4d329e39552fe553c73769687a62e39a84bbff36 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Thu, 7 Sep 2023 10:02:55 +0200 Subject: [PATCH 35/37] make the separator line between posts fill the (frame-width) and insert # before '(lambda to get rid of some warnings --- tumblesocks-api.el | 6 +++--- tumblesocks-compose.el | 4 ++-- tumblesocks-user.el | 2 +- tumblesocks-view.el | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tumblesocks-api.el b/tumblesocks-api.el index 52ff16e..0432029 100644 --- a/tumblesocks-api.el +++ b/tumblesocks-api.el @@ -137,7 +137,7 @@ error if the error code is not in the 200 category." tumblesocks-token (concat url "?api_key=" tumblesocks-consumer-key (mapconcat - '(lambda (x) + #'(lambda (x) (concat "&" (url-hexify-string (format "%s" (car x))) "=" (url-hexify-string (format "%s" (cdr x))))) (tumblesocks-plist-to-alist params) ""))) @@ -152,7 +152,7 @@ error if the error code is not in the 200 category." (with-current-buffer (url-retrieve-synchronously (concat url "?api_key=" tumblesocks-consumer-key (mapconcat - '(lambda (x) + #'(lambda (x) (concat "&" (url-hexify-string (format "%s" (car x))) "=" (url-hexify-string (format "%s" (cdr x))))) (tumblesocks-plist-to-alist params) ""))) @@ -169,7 +169,7 @@ error if the error code is not in the 200 category." (with-current-buffer (oauth-post-url tumblesocks-token url - (mapcar '(lambda (x) + (mapcar #'(lambda (x) (cons (format "%s" (car x)) (format "%s" (cdr x)))) (tumblesocks-plist-to-alist params))) diff --git a/tumblesocks-compose.el b/tumblesocks-compose.el index e6091fe..eb3b9f2 100644 --- a/tumblesocks-compose.el +++ b/tumblesocks-compose.el @@ -8,7 +8,7 @@ ;; Tumblr compose mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar tumblesocks-compose-finish-action - '(lambda () (call-interactively 'tumblesocks-text-post-from-buffer)) + #'(lambda () (call-interactively 'tumblesocks-text-post-from-buffer)) "The action to run when finishing posting") (defvar tumblesocks-compose-continuation nil "Optional action to run when finishing editing or posting. @@ -38,7 +38,7 @@ tumblesocks-view uses this to refresh buffers, for example.") "Major mode for composing a new Tumblr post." (make-local-variable 'tumblesocks-compose-finish-action) (setq tumblesocks-compose-finish-action - '(lambda () (call-interactively 'tumblesocks-text-post-from-buffer))) + #'(lambda () (call-interactively 'tumblesocks-text-post-from-buffer))) (make-local-variable 'tumblesocks-compose-editing-args) (make-local-variable 'tumblesocks-compose-editing-id) (make-local-variable 'tumblesocks-compose-continuation)) diff --git a/tumblesocks-user.el b/tumblesocks-user.el index 615241e..88c6c7d 100644 --- a/tumblesocks-user.el +++ b/tumblesocks-user.el @@ -42,7 +42,7 @@ the user what to do for each post." "Blog URL to unfollow (TAB to complete): " (let ((bloglist (plist-get (tumblesocks-api-user-following) :blogs))) - (mapcar '(lambda (blog) + (mapcar #'(lambdao (blog) (plist-get blog :url)) bloglist)) nil t))) diff --git a/tumblesocks-view.el b/tumblesocks-view.el index fbd9a07..a76fa49 100644 --- a/tumblesocks-view.el +++ b/tumblesocks-view.el @@ -330,7 +330,7 @@ better suited to inserting each post." ;; For answer posts: asking_name asking_url question answer) (let ((begin-post-area (point))) - (insert (make-string fill-column ?\u2500)) + (insert (make-string (frame-width) ?\u2500)) (insert "\n") (tumblesocks-view-insert-header verbose-header) (cond @@ -377,7 +377,7 @@ better suited to inserting each post." (when verbose (insert "Date: " date - "\nTags: " (mapconcat '(lambda (x) (concat "#" x)) tags ", ") + "\nTags: " (mapconcat #'(lambda (x) (concat "#" x)) tags ", ") "\nPermalink: ") (tumblesocks-view-insert-parsed-html-fragment `(a ((href . ,post_url)) ,post_url) t) @@ -392,7 +392,7 @@ better suited to inserting each post." `(p () . ,(apply 'append (mapcar - '(lambda (photodata) + #'(lambda (photodata) ;; There could be several photos here, and ;; each photo has several alternative sizes. ;; The first is usually the biggest, the @@ -400,7 +400,7 @@ better suited to inserting each post." (let* ((alts (plist-get photodata :alt_sizes)) (desired-size-alts (delq nil - (mapcar '(lambda(alt) + (mapcar #'(lambda(alt) (and (= (plist-get alt :width) tumblesocks-desired-image-size) alt)) @@ -533,7 +533,7 @@ You can browse around, edit, and delete posts from here. 99999) ; allow them to browse practically infinite posts (tumblesocks-view-finishrender) (setq tumblesocks-view-refresh-action - '(lambda () (tumblesocks-view-dashboard t))))) + #'(lambda () (tumblesocks-view-dashboard t))))) (defun tumblesocks-view-post (post_id) "View a post in its own dedicated buffer, with notes" From 01f03a9995afdad403367be3dd4e03e4a1e85ea4 Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Thu, 7 Sep 2023 10:09:40 +0200 Subject: [PATCH 36/37] we use markdown-mode 20230830.1338 now --- tumblesocks-pkg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-pkg.el b/tumblesocks-pkg.el index 2f042e5..d3b6de8 100644 --- a/tumblesocks-pkg.el +++ b/tumblesocks-pkg.el @@ -2,4 +2,4 @@ "An Emacs tumblr client." '((htmlize "20210825.2150") (oauth "20230706.2026") - (markdown-mode "20230820.2349"))) + (markdown-mode "20230830.1338"))) From 1eaa6bd6874cb7accbfcf9539228faf360bb063b Mon Sep 17 00:00:00 2001 From: Johan Laenen Date: Thu, 7 Sep 2023 10:13:36 +0200 Subject: [PATCH 37/37] this is tumblesocks v1.1.8 --- tumblesocks-pkg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tumblesocks-pkg.el b/tumblesocks-pkg.el index d3b6de8..b3e61a6 100644 --- a/tumblesocks-pkg.el +++ b/tumblesocks-pkg.el @@ -1,4 +1,4 @@ -(define-package "tumblesocks" "0.0.6" +(define-package "tumblesocks" "1.1.8" "An Emacs tumblr client." '((htmlize "20210825.2150") (oauth "20230706.2026")