summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-05-19 03:05:44 +0200
committerGravatar Tom Willemse2013-05-19 03:05:44 +0200
commit113b8f307636163efca669743463c3910260a863 (patch)
treeb3c51d8e278cb374be47a85e32efff366f60b6a2
parent35930b57343c67d97fe52df31f48194ae417afff (diff)
downloadeliss-113b8f307636163efca669743463c3910260a863.tar.gz
eliss-113b8f307636163efca669743463c3910260a863.zip
Extract eliss-current-entry-content
-rw-r--r--eliss.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/eliss.el b/eliss.el
index f326d93..56fea4c 100644
--- a/eliss.el
+++ b/eliss.el
@@ -136,6 +136,11 @@ certain other properties.
(class "span7")
(rows "15")) "")))))))))
+(defun eliss-current-entry-content ()
+ "Get the content of the org entry currently at point."
+ (buffer-substring-no-properties (org-end-of-meta-data-and-drawers)
+ (org-entry-end-position)))
+
(defun eliss-issue-page (httpcon)
"Send an issue-detail page over HTTPCON."
(let* ((project (match-string 1 (elnode-http-mapping httpcon)))
@@ -163,15 +168,12 @@ certain other properties.
(dd ,(org-entry-get entry "TAGS"))
(dt "Category:")
(dd ,(org-entry-get entry "CATEGORY")))))
- `(pre ,(buffer-substring-no-properties
- (org-end-of-meta-data-and-drawers)
- (org-entry-end-position)))
- `(div ,@(org-map-entries (lambda ()
- `(div (h2 ,(nth 4 (org-heading-components)))
- (pre ,(buffer-substring-no-properties
- (org-end-of-meta-data-and-drawers)
- (org-entry-end-position)))))
- "/+COMMENT" 'tree))
+ `(pre ,(eliss-current-entry-content))
+ `(div ,@(org-map-entries
+ (lambda ()
+ `(div (h2 ,(nth 4 (org-heading-components)))
+ (pre ,(eliss-current-entry-content))))
+ "/+COMMENT" 'tree))
`(form (@ (action ,(concat "/" project "/" issue
"/comment/"))
(method "POST")