mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Nest org, md results at level 2 on Emacs interface. Improve readability
- Makes it easier to fold/unfold, traverse and read results - This 2 level nesting is already being used on the web interface - Previously we were using the original nesting depth of the entry. This was aimed at providing more of the orginal context of the results. But currently this additional information does not provide as much, for the decreased legibility of the results
This commit is contained in:
parent
dbc7ca74c9
commit
0ebfbb43ce
1 changed files with 9 additions and 3 deletions
|
@ -78,7 +78,10 @@
|
|||
(format "# %s\n%s"
|
||||
query
|
||||
(mapcar
|
||||
(lambda (args) (format "%s" (cdr (assoc 'entry args))))
|
||||
(lambda (args)
|
||||
(replace-regexp-in-string
|
||||
"^\#+" "##"
|
||||
(format "%s" (cdr (assoc 'entry args)))))
|
||||
json-response))))
|
||||
|
||||
(defun khoj--extract-entries-as-org (json-response query)
|
||||
|
@ -90,8 +93,11 @@
|
|||
(format "* %s\n%s"
|
||||
query
|
||||
(mapcar
|
||||
(lambda (args) (format "%s" (cdr (assoc 'entry args))))
|
||||
json-response))))
|
||||
(lambda (args)
|
||||
(replace-regexp-in-string
|
||||
"^\*+" "**"
|
||||
(format "%s" (cdr (assoc 'entry args)))))
|
||||
json-response))))
|
||||
|
||||
(defun khoj--extract-entries-as-images (json-response query)
|
||||
"Convert json response from API to html with images"
|
||||
|
|
Loading…
Reference in a new issue