module: remove :app twitter
This module has been deprecated for some time, because our overlord Elon-sama axed the twitter API.
This commit is contained in:
parent
4d2eeab7f0
commit
52e5327221
7 changed files with 1 additions and 302 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -11,7 +11,6 @@ modules/app/emms/ @doomemacs/app-emms
|
|||
modules/app/everywhere/ @doomemacs/app-everywhere
|
||||
modules/app/irc/ @doomemacs/app-irc
|
||||
modules/app/rss/ @doomemacs/app-rss
|
||||
modules/app/twitter/ @doomemacs/app-twitter
|
||||
modules/checkers/grammar/ @doomemacs/checkers-grammar
|
||||
modules/checkers/spell/ @doomemacs/checkers-spell
|
||||
modules/checkers/syntax/ @doomemacs/checkers-syntax
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
#+title: :app twitter
|
||||
#+subtitle: Be superficial in plain text
|
||||
#+created: October 11, 2019
|
||||
#+since: 2.0.0
|
||||
|
||||
#+begin_quote
|
||||
*This module is deprecated.* Changes upstream to Twitter's API has rendered
|
||||
twittering-mode non-functional, and there is no known alternative.
|
||||
#+end_quote
|
||||
|
||||
* Description :unfold:
|
||||
Enjoy twitter from emacs.
|
||||
|
||||
- View various timelines side by side, e.g. user's timeline, home, etc.
|
||||
- Post new tweets
|
||||
- Send direct messages
|
||||
- Retweet
|
||||
- Follow and un-follow users
|
||||
- Favorite tweets
|
||||
|
||||
** Maintainers
|
||||
/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]]
|
||||
|
||||
** Module flags
|
||||
/This module has no flags./
|
||||
|
||||
** Packages
|
||||
- [[doom-package:avy]]
|
||||
- [[doom-package:twittering-mode]]
|
||||
|
||||
** Hacks
|
||||
/No hacks documented for this module./
|
||||
|
||||
** TODO Changelog
|
||||
# This section will be machine generated. Don't edit it by hand.
|
||||
/This module does not have a changelog yet./
|
||||
|
||||
* Installation
|
||||
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
||||
|
||||
This module requires:
|
||||
- One of the following (for SSL connections; required by Twitter's API):
|
||||
- [[http://curl.haxx.se/][cURL]]
|
||||
- [[http://www.gnu.org/software/wget/][GNU Wget]]
|
||||
- [[http://www.openssl.org/][OpenSSL]]
|
||||
- [[http://www.gnu.org/software/gnutls/][GnuTLS]]
|
||||
- [[http://www.gnupg.org/][GnuPG]], for encrypting the OAuth token, stored locally.
|
||||
- [[http://www.gzip.org/][gzip]], for compressing retrieved profile pictures,
|
||||
- [[http://www.imagemagick.org/][ImageMagick]], for displaying and resizing profile pictures.
|
||||
|
||||
Build Emacs with ImageMagick support using the ~--with-imagemagick~ flag ([[https://git.savannah.gnu.org/cgit/emacs.git/tree/INSTALL][how
|
||||
to build Emacs from source]]).
|
||||
|
||||
* TODO Usage
|
||||
#+begin_quote
|
||||
This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
|
||||
#+end_quote
|
||||
|
||||
* TODO Configuration
|
||||
#+begin_quote
|
||||
/This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
||||
#+end_quote
|
||||
|
||||
** Commands & Keybindings
|
||||
Here is a list of available commands and their default keybindings (defined in
|
||||
[[./config.el][config.el]]):
|
||||
| command | key / ex command | description |
|
||||
|---------------------+------------------+-------------------------------------------------------------|
|
||||
| ~+twitter/quit~ | [[kbd:][q]] | Close current window |
|
||||
| ~+twitter/quit-all~ | [[kbd:][Q]] | Close all twitter windows and buffers, and delete workspace |
|
||||
|
||||
And when [[doom-module::editor evil +everywhere]] is active:
|
||||
| command | key / ex command | description |
|
||||
|--------------------------------------------------+------------------+------------------------------------------------------------------|
|
||||
| ~twittering-favorite~ | [[kbd:][f]] | Favorite/Like a tweet |
|
||||
| ~twittering-unfavorite~ | [[kbd:][F]] | Un-favorite/Un-like a tweet |
|
||||
| ~twittering-follow~ | [[kbd:][C-f]] | Follow user |
|
||||
| ~twittering-unfollow~ | [[kbd:][C-F]] | Un-follow user |
|
||||
| ~twittering-delete-status~ | [[kbd:][d]] | Delete a tweet |
|
||||
| ~twittering-retweet~ | [[kbd:][r]] | Retweet |
|
||||
| ~twittering-toggle-or-retrieve-replied-statuses~ | [[kbd:][R]] | Toggle or retrieve replies |
|
||||
| ~twittering-update-status-interactive~ | [[kbd:][o]] | Update tweets |
|
||||
| ~+twitter/ace-link~ | [[kbd:][O]] | Open some visible link from a ~twittering-mode~ buffer using ace |
|
||||
| ~twittering-search~ | [[kbd:][/]] | Search |
|
||||
| ~twittering-goto-next-status~ | [[kbd:][J]] | Go to next tweet |
|
||||
| ~twittering-goto-previous-status~ | [[kbd:][K]] | Go to previous tweet |
|
||||
| ~twittering-goto-first-status~ | [[kbd:][gg]] | Go to first tweet |
|
||||
| ~twittering-goto-last-status~ | [[kbd:][G]] | Go to last tweet |
|
||||
| ~twittering-goto-next-status-of-user~ | [[kbd:][gj]] | Go to next tweet of user |
|
||||
| ~twittering-goto-previous-status-of-user)))~ | [[kbd:][gk]] | Go to previous tweet of user |
|
||||
|
||||
* Troubleshooting
|
||||
[[doom-report:][Report an issue?]]
|
||||
|
||||
** ~twittering-mode~ overrides the [[kbd:][SPC]] key
|
||||
Currently ~twittering-mode~ binds [[kbd:][SPC]], breaking its functionality as a leader
|
||||
key for evil users. To work around this issue you may use [[kbd:][M-SPC]] instead.
|
||||
|
||||
* Frequently asked questions
|
||||
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
||||
|
||||
* TODO Appendix
|
||||
#+begin_quote
|
||||
This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
||||
#+end_quote
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
;;; app/twitter/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +twitter-workspace-name "*Twitter*"
|
||||
"The name to use for the twitter workspace.")
|
||||
|
||||
;;;###autoload
|
||||
(defun +twitter-display-buffer-fn (buf)
|
||||
"A replacement display-buffer command for `twittering-pop-to-buffer-function'
|
||||
that works with the ui/popup module."
|
||||
(let ((win (selected-window)))
|
||||
(display-buffer buf)
|
||||
;; This is required because the new window generated by `pop-to-buffer'
|
||||
;; may hide the region following the current position.
|
||||
(twittering-ensure-whole-of-status-is-visible win)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +twitter-buffer-p (buf)
|
||||
"Return non-nil if BUF is a `twittering-mode' buffer."
|
||||
(eq 'twittering-mode (buffer-local-value 'major-mode buf)))
|
||||
|
||||
|
||||
;;
|
||||
;; Commands
|
||||
|
||||
(defvar +twitter--old-wconf nil)
|
||||
;;;###autoload
|
||||
(defun =twitter (arg)
|
||||
"Opens a workspace dedicated to `twittering-mode'."
|
||||
(interactive "P")
|
||||
(condition-case _
|
||||
(progn
|
||||
(if (and (not arg) (modulep! :ui workspaces))
|
||||
(+workspace/new +twitter-workspace-name)
|
||||
(setq +twitter--old-wconf (current-window-configuration))
|
||||
(delete-other-windows)
|
||||
(switch-to-buffer (doom-fallback-buffer)))
|
||||
(call-interactively #'twit)
|
||||
(unless (get-buffer (car twittering-initial-timeline-spec-string))
|
||||
(error "Failed to open twitter"))
|
||||
(switch-to-buffer (car twittering-initial-timeline-spec-string))
|
||||
(dolist (name (cdr twittering-initial-timeline-spec-string))
|
||||
(split-window-horizontally)
|
||||
(switch-to-buffer name))
|
||||
(balance-windows)
|
||||
(call-interactively #'+twitter/rerender-all))
|
||||
('error (+twitter/quit-all))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +twitter/quit ()
|
||||
"Close the current `twitter-mode' buffer."
|
||||
(interactive)
|
||||
(when (eq major-mode 'twittering-mode)
|
||||
(twittering-kill-buffer)
|
||||
(cond ((one-window-p) (+twitter/quit-all))
|
||||
((modulep! :ui workspaces)
|
||||
(+workspace/close-window-or-workspace))
|
||||
((delete-window)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +twitter/quit-all ()
|
||||
"Close all open `twitter-mode' buffers and the associated workspace, if any."
|
||||
(interactive)
|
||||
(when (modulep! :ui workspaces)
|
||||
(+workspace/delete +twitter-workspace-name))
|
||||
(when +twitter--old-wconf
|
||||
(set-window-configuration +twitter--old-wconf)
|
||||
(setq +twitter--old-wconf nil))
|
||||
(dolist (buf (doom-buffers-in-mode 'twittering-mode (buffer-list) t))
|
||||
(twittering-kill-buffer buf)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +twitter/rerender-all ()
|
||||
"Rerender all `twittering-mode' buffers."
|
||||
(interactive)
|
||||
(dolist (buf (doom-buffers-in-mode 'twittering-mode (buffer-list) t))
|
||||
(with-current-buffer buf
|
||||
(twittering-rerender-timeline-all buf)
|
||||
(setq-local line-spacing 0.2)
|
||||
(goto-char (point-min)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +twitter/ace-link ()
|
||||
"Open a visible link, username or hashtag in a `twittering-mode' buffer."
|
||||
(interactive)
|
||||
(require 'avy)
|
||||
;; REVIEW Is this necessary anymore with `link-hint'
|
||||
(let ((pt (avy-with +twitter/ace-link
|
||||
(avy--process
|
||||
(+twitter--collect-links)
|
||||
(avy--style-fn avy-style)))))
|
||||
(when (number-or-marker-p pt)
|
||||
(goto-char pt)
|
||||
(let ((uri (get-text-property (point) 'uri)))
|
||||
(if uri (browse-url uri))))))
|
||||
|
||||
(defun +twitter--collect-links ()
|
||||
(let ((end (window-end))
|
||||
points)
|
||||
(save-excursion
|
||||
(goto-char (window-start))
|
||||
(while (and (< (point) end)
|
||||
(ignore-errors (twittering-goto-next-thing) t))
|
||||
(push (point) points))
|
||||
(nreverse points))))
|
|
@ -1,76 +0,0 @@
|
|||
;;; app/twitter/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! twittering-mode
|
||||
:commands twit
|
||||
:config
|
||||
(setq twittering-private-info-file
|
||||
(expand-file-name "twittering-mode.gpg" doom-data-dir)
|
||||
twittering-use-master-password t
|
||||
twittering-request-confirmation-on-posting t
|
||||
;; twittering-icon-mode t
|
||||
;; twittering-use-icon-storage t
|
||||
;; twittering-icon-storage-file (concat doom-cache-dir "twittering-mode-icons.gz")
|
||||
;; twittering-convert-fix-size 12
|
||||
twittering-timeline-header ""
|
||||
twittering-timeline-footer ""
|
||||
twittering-edit-skeleton 'inherit-any
|
||||
twittering-status-format "%FACE[font-lock-function-name-face]{ @%s} %FACE[italic]{%@} %FACE[error]{%FIELD-IF-NONZERO[❤ %d]{favorite_count}} %FACE[warning]{%FIELD-IF-NONZERO[↺ %d]{retweet_count}}
|
||||
%FOLD[ ]{%FILL{%t}%QT{
|
||||
%FOLD[ ]{%FACE[font-lock-function-name-face]{@%s}\t%FACE[shadow]{%@}
|
||||
%FOLD[ ]{%FILL{%t}}
|
||||
}}}
|
||||
|
||||
%FACE[twitter-divider]{ }
|
||||
"
|
||||
;; twittering-timeline-spec-alias '()
|
||||
twittering-initial-timeline-spec-string
|
||||
'(":home" ":mentions" ":direct_messages"))
|
||||
|
||||
(set-popup-rule! "^\\*twittering-edit" :size 15 :ttl nil :quit nil :select t)
|
||||
|
||||
(defface twitter-divider
|
||||
'((((background dark)) (:underline (:color "#141519")))
|
||||
(((background light)) (:underline (:color "#d3d3d3"))))
|
||||
"The vertical divider between tweets."
|
||||
:group 'twittering-mode)
|
||||
|
||||
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
|
||||
(when (modulep! :ui popup)
|
||||
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn))
|
||||
|
||||
;; Custom header-line for twitter buffers
|
||||
(add-hook! 'twittering-mode-hook
|
||||
(defun +twitter-switch-mode-and-header-line-h ()
|
||||
(setq header-line-format mode-line-format
|
||||
mode-line-format nil)))
|
||||
|
||||
;; `epa--decode-coding-string' isn't defined in later versions of Emacs 27
|
||||
(unless (fboundp 'epa--decode-coding-string)
|
||||
(defalias 'epa--decode-coding-string #'decode-coding-string))
|
||||
|
||||
(define-key! twittering-mode-map
|
||||
"q" #'+twitter/quit
|
||||
"Q" #'+twitter/quit-all
|
||||
[remap twittering-kill-buffer] #'+twitter/quit
|
||||
[remap delete-window] #'+twitter/quit
|
||||
[remap +workspace/close-window-or-workspace] #'+twitter/quit)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(define-key! twittering-mode-map
|
||||
[remap evil-window-delete] #'+twitter/quit
|
||||
"f" #'twittering-favorite
|
||||
"F" #'twittering-unfavorite
|
||||
"\C-f" #'twittering-follow
|
||||
"\C-F" #'twittering-unfollow
|
||||
"d" #'twittering-delete-status
|
||||
"r" #'twittering-retweet
|
||||
"R" #'twittering-toggle-or-retrieve-replied-statuses
|
||||
"o" #'twittering-update-status-interactive
|
||||
"O" #'+twitter/ace-link
|
||||
"/" #'twittering-search
|
||||
"J" #'twittering-goto-next-status
|
||||
"K" #'twittering-goto-previous-status
|
||||
"g" nil
|
||||
"gg" #'twittering-goto-first-status
|
||||
"G" #'twittering-goto-last-status
|
||||
"gj" #'twittering-goto-next-status-of-user
|
||||
"gk" #'twittering-goto-previous-status-of-user)))
|
|
@ -1,5 +0,0 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; app/twitter/packages.el
|
||||
|
||||
(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29")
|
||||
(package! avy :pin "be612110cb116a38b8603df367942e2bb3d9bdbe")
|
|
@ -469,15 +469,7 @@
|
|||
(:when (modulep! :completion ivy)
|
||||
:desc "Jump to channel" "j" #'+irc/ivy-jump-to-channel)
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to channel" "j" #'+irc/vertico-jump-to-channel)))
|
||||
|
||||
;;; <leader> T --- twitter
|
||||
(:when (modulep! :app twitter)
|
||||
(:prefix-map ("T" . "twitter")
|
||||
:desc "Open twitter app" "T" #'=twitter
|
||||
:desc "Quit twitter" "q" #'+twitter/quit
|
||||
:desc "Rerender twits" "r" #'+twitter/rerender-all
|
||||
:desc "Ace link" "l" #'+twitter/ace-link)))
|
||||
:desc "Jump to channel" "j" #'+irc/vertico-jump-to-channel))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -187,7 +187,6 @@
|
|||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue