Dev #19

Merged
dickmao merged 2 commits from dev into master 2020-02-25 16:05:14 +00:00
2 changed files with 32 additions and 7 deletions

View File

@ -1150,10 +1150,14 @@ Optionally provide STATIC-MAX-ITEM and STATIC-NEWSTORIES to prevent querying out
"Date: " (mail-header-date mail-header) "\n"
"Message-ID: " (mail-header-id mail-header) "\n"
"References: " (mail-header-references mail-header) "\n"
"Content-Type: text/html; charset=utf-8" "\n"
"Archived-at: " permalink "\n"
"Score: " score "\n"
"\n")
(mml-insert-multipart "alternative")
(mml-insert-tag 'part 'type "text/html"
'disposition "inline"
'charset "utf-8")
(save-excursion (mml-insert-tag '/part))
(-when-let*
((parent (plist-get header :parent))
(parent-author
@ -1164,14 +1168,20 @@ Optionally provide STATIC-MAX-ITEM and STATIC-NEWSTORIES to prevent querying out
(insert (nnhackernews--citation-wrap parent-author parent-body)))
(aif (and nnhackernews-render-story (plist-get header :url))
(condition-case err
(nnhackernews--request "nnhackernews-request-article" it
:success (cl-function
(lambda (&key data &allow-other-keys)
(insert data))))
(nnhackernews--request
"nnhackernews-request-article" it
:success (cl-function
(lambda (&key data &allow-other-keys)
(insert data))))
(error (gnus-message 5 "nnhackernews-request-article: %s"
(error-message-string err))
(insert body)))
(insert body))
(insert "\n")
(if (mml-validate)
(message-encode-message-body)
(gnus-message 2 "nnhackernews-request-article: Invalid mml:\n%s"
(buffer-string)))
(cons group article-number))))))
(deffoo nnhackernews-retrieve-headers (article-numbers &optional group server _fetch-old)

View File

@ -11,15 +11,29 @@ CASKDIR=$WORKDIR/cask
. tools/retry.sh
update_elpa_keys() {
mkdir -p $HOME/.emacs.d/elpa/gnupg || true
chmod 700 $HOME/.emacs.d/elpa/gnupg
GPG=gpg
if which gpg2 ; then GPG=gpg2 ; fi
travis_retry ${GPG} --keyserver hkp://pool.sks-keyservers.net:80 --homedir $HOME/.emacs.d/elpa/gnupg --recv-keys 066DAFCB81E42C40
mkdir -p $(cask package-directory) || true
mkdir -p $HOME/.cask || true
rsync -azSHe ssh $HOME/.cask $(dirname $(dirname $(dirname $(cask package-directory))))
rsync -azSHe ssh $HOME/.emacs.d/elpa/gnupg $(cask package-directory)
}
cask_upgrade_cask_or_reset() {
cask upgrade-cask || { rm -rf $HOME/.emacs.d/.cask && false; }
}
cask_install_or_reset() {
cask install </dev/null
cask update </dev/null
find $(cask package-directory)/archives -print | xargs ls -l
find $(cask package-directory)/gnupg -print | xargs ls -l
# travis cache
rsync -vazSHe ssh .cask $HOME/
rsync -azSHe ssh $(dirname $(dirname $(cask package-directory))) $HOME/
}
# Bootstrap the cask tool and its dependencies
@ -30,5 +44,6 @@ fi
# Install dependencies for cider as descriped in ./Cask
# Effect is identical to "make elpa", but here we can retry
# in the event of network failures.
update_elpa_keys
travis_retry cask_upgrade_cask_or_reset
travis_retry cask_install_or_reset && touch elpa-emacs