From bd471870f800559279738e4f3d7ef3a7993dd951 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 8 Jan 2015 14:15:01 -0200 Subject: Hotfix Add site_url to sx-site-browse-filter. Fix #220 --- sx-site.el | 1 + 1 file changed, 1 insertion(+) diff --git a/sx-site.el b/sx-site.el index 9b2ea34..4dac8e6 100644 --- a/sx-site.el +++ b/sx-site.el @@ -33,6 +33,7 @@ ((site site_type name api_site_parameter + site_url related_sites) (related_site api_site_parameter relation))) -- cgit v1.2.3 From 954e54ba2521dde8f2e3a9349802e24c7d60c7c3 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 8 Jan 2015 14:25:43 -0200 Subject: Don't use sx-favorites--initialize --- sx-favorites.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sx-favorites.el b/sx-favorites.el index d98b4c2..444df29 100644 --- a/sx-favorites.el +++ b/sx-favorites.el @@ -45,8 +45,10 @@ Added as hook to initialization." (or (setq sx-favorites--user-favorite-list (sx-cache-get 'question-favorites)) (sx-favorites-update))) -;; Append to ensure `sx-network--initialize is run before it. -(add-hook 'sx-init--internal-hook #'sx-favorites--initialize 'append) +;; ;; Append to ensure `sx-network--initialize' is run before it. +;; This is removed for now because it performs a lot of API calls and +;; was never used. +;; (add-hook 'sx-init--internal-hook #'sx-favorites--initialize 'append) (defun sx-favorites--retrieve-favorites (site) "Obtain list of starred QUESTION_IDs for SITE." -- cgit v1.2.3 From 7ca84717120848f0172c06b5f124a62753cdf5df Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 8 Jan 2015 15:49:20 -0200 Subject: Require sx-tag --- sx-compose.el | 1 + 1 file changed, 1 insertion(+) diff --git a/sx-compose.el b/sx-compose.el index 67c476e..f734904 100644 --- a/sx-compose.el +++ b/sx-compose.el @@ -34,6 +34,7 @@ (require 'markdown-mode) (require 'sx) +(require 'sx-tag) (defgroup sx-compose-mode nil "Customization group for sx-compose-mode." -- cgit v1.2.3 From 5acb70ccce4be466b54e7d0a01df1010e8145aa0 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 8 Jan 2015 15:58:00 -0200 Subject: Hotfix: Go back to https for data --- sx-request.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sx-request.el b/sx-request.el index 9a788ca..2650c55 100644 --- a/sx-request.el +++ b/sx-request.el @@ -218,7 +218,7 @@ Currently returns nil." ;;; Our own generated data (defconst sx-request--data-url-format - "http://raw.githubusercontent.com/vermiculus/sx.el/data/data/%s.el" + "https://raw.githubusercontent.com/vermiculus/sx.el/data/data/%s.el" "Url of the \"data\" directory inside the SX `data' branch.") (defun sx-request-get-data (file) -- cgit v1.2.3 From 14f219c69039b681adbb0312973ae481b96a980e Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Sun, 11 Jan 2015 19:50:38 -0200 Subject: Hotfix: Less aggressive raw links --- sx-question-print.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sx-question-print.el b/sx-question-print.el index f6cd1dc..e120752 100644 --- a/sx-question-print.el +++ b/sx-question-print.el @@ -334,10 +334,10 @@ E.g.: (rx (or (and "[" (group-n 1 (1+ (not (any "]")))) "]" (or (and "(" (group-n 2 (1+ (not (any ")")))) ")") (and "[" (group-n 3 (1+ (not (any "]")))) "]"))) - (group-n 4 (and (or (and "http" (opt "s") "://") "") - (+ (any alnum "_%")) + (group-n 4 (and (and "http" (opt "s") "://") "" + (>= 2 (any lower numeric "_%")) "." - (+ (any alnum "/._%&#?=;")))))) + (>= 2 (any lower numeric "/._%&#?=;")))))) "Regexp matching markdown links.") (defun sx-question-mode--fill-and-fontify (text) -- cgit v1.2.3 From 72c00ea6a42f2a3f7c1bdb8a1f5c88446d263ae9 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Mon, 12 Jan 2015 19:50:47 +0100 Subject: Add missing format call `y-or-n-p` doesn't accept format arguments, so we need to call `format` explicitly. --- sx-compose.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sx-compose.el b/sx-compose.el index f734904..3047a97 100644 --- a/sx-compose.el +++ b/sx-compose.el @@ -200,7 +200,7 @@ tags. Return a list of already inserted tags." (if invalid-tags ;; If the user doesn't want to create the tags, we return ;; nil and sending is aborted. - (y-or-n-p "Following tags don't exist. Create them? %s " invalid-tags) + (y-or-n-p (format "Following tags don't exist. Create them? %s " invalid-tags)) t)))) -- cgit v1.2.3 From 766d008e12d7164053bda6d56f336af442109232 Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Wed, 14 Jan 2015 08:41:38 -0500 Subject: Sort answers by score --- sx-question-print.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sx-question-print.el b/sx-question-print.el index e120752..737844a 100644 --- a/sx-question-print.el +++ b/sx-question-print.el @@ -179,7 +179,12 @@ QUESTION must be a data structure returned by `json-read'." ;; Print everything (sx-question-mode--print-section question) (sx-assoc-let question - (mapc #'sx-question-mode--print-section .answers)) + (mapc #'sx-question-mode--print-section + (cl-sort .answers + ;; Highest-voted first. @TODO: custom sorting + (lambda (a b) + (> (cdr (assoc 'score a)) + (cdr (assoc 'score b))))))) (insert "\n\n ") (insert-text-button "Write an Answer" :type 'sx-button-answer) ;; Go up -- cgit v1.2.3 From 7d6583a6da023f0a1f243d01cb2d856e272fc625 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 12 Jan 2015 09:13:21 -0200 Subject: Hotfix: Unused argument page --- sx-inbox.el | 1 + 1 file changed, 1 insertion(+) diff --git a/sx-inbox.el b/sx-inbox.el index 1efceb1..21589fb 100644 --- a/sx-inbox.el +++ b/sx-inbox.el @@ -69,6 +69,7 @@ KEYWORDS are added to the method call along with PAGE. `sx-method-call' is used with `sx-inbox-filter'." (sx-method-call (if notifications 'notifications 'inbox) :keywords keywords + :page page :filter sx-inbox-filter)) -- cgit v1.2.3