diff options
Diffstat (limited to 'pearl.el')
| -rw-r--r-- | pearl.el | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -4187,6 +4187,15 @@ merge rewrites keep working." (propertize (concat (pearl--preamble-summary) "\n") 'face 'pearl-preamble-summary)))))))) +(defun pearl--linear-source-string (source) + "Serialize SOURCE for the `#+LINEAR-SOURCE:' header, in full. +Binds `print-length' and `print-level' to nil so a long source (a view's +descriptor carries a sort vector, url, and several keys) never truncates to +`...' under a user's global print settings -- a truncated descriptor reads back +as a malformed plist and breaks refresh and sort." + (let ((print-length nil) (print-level nil)) + (prin1-to-string source))) + (defun pearl--build-org-content (issues &optional source truncated states account) "Build the Org content string for the linear org file from ISSUES. SOURCE is the active-source descriptor recorded in the header so a later @@ -4219,7 +4228,7 @@ no side effects." ;; rest is human-readable provenance. (when account (insert (format "#+LINEAR-ACCOUNT: %s\n" account))) - (insert (format "#+LINEAR-SOURCE: %s\n" (prin1-to-string src))) + (insert (format "#+LINEAR-SOURCE: %s\n" (pearl--linear-source-string src))) (insert (format "#+LINEAR-RUN-AT: %s\n" (format-time-string "%Y-%m-%d %H:%M"))) (insert (format "#+LINEAR-FILTER: %s\n" (pearl--summarize-filter filter))) (insert (format "#+LINEAR-COUNT: %d\n" (length issues))) @@ -6782,7 +6791,7 @@ count/timestamp provenance and leaves the descriptor alone." (save-excursion (goto-char (point-min)) (when (re-search-forward "^#\\+LINEAR-SOURCE: .*$" nil t) - (replace-match (format "#+LINEAR-SOURCE: %s" (prin1-to-string source)) t t)))) + (replace-match (format "#+LINEAR-SOURCE: %s" (pearl--linear-source-string source)) t t)))) (defun pearl--active-source-or-error () "Return the active source descriptor, or signal a `user-error' if absent." |
