emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/xkcd 3acd31542b 06/82: Fix up search in xkcd-get-json. Add


From: ELPA Syncer
Subject: [nongnu] elpa/xkcd 3acd31542b 06/82: Fix up search in xkcd-get-json. Add new line to README.md.
Date: Mon, 12 Dec 2022 21:59:49 -0500 (EST)

branch: elpa/xkcd
commit 3acd31542b3a44f89ded77cd07a9ae928f1f5514
Author: Vibhav Pant <vibhavp@cthulhu-p5kpl.lan>
Commit: Vibhav Pant <vibhavp@cthulhu-p5kpl.lan>

    Fix up search in xkcd-get-json. Add new line to README.md.
---
 README.md     | 1 +
 emacs-xkcd.el | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 8e92be7985..752818bf2b 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ Enable it by adding
 to your .emacs file.
 #Loading up comics:
 `xkcd-get` loads up a user-specified comic.
+
 `xkcd-get-latest` loads up the latest xkcd.
 # Current keybindings:
 | Keybinding | Use                            |  Function      |
diff --git a/emacs-xkcd.el b/emacs-xkcd.el
index 830a934e38..aff133cf1f 100644
--- a/emacs-xkcd.el
+++ b/emacs-xkcd.el
@@ -47,7 +47,7 @@
   (let ((buffer (url-retrieve-synchronously url))
         (json nil))
     (with-current-buffer buffer
-      (re-search-backward "^$")
+      (re-search-forward "^$")
       (setq json (buffer-substring-no-properties (+ (point) 1) (point-max)))
       (kill-buffer (current-buffer)))
     json))
@@ -64,8 +64,8 @@
       (xkcd-mode))
   (setq xkcd-cur num)
   (let ((out (if (eq num nil)
-                (get-json "http://xkcd.com/info.0.json";)
-              (get-json (concat "http://xkcd.com/"; (number-to-string num)
+                (xkcd-get-json "http://xkcd.com/info.0.json";)
+              (xkcd-get-json (concat "http://xkcd.com/"; (number-to-string num)
                                 "/info.0.json"))))
        (img nil)
        (num nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]