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

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

[nongnu] elpa/orgit 3c83adc34a 62/76: orgit--format-export: New function


From: ELPA Syncer
Subject: [nongnu] elpa/orgit 3c83adc34a 62/76: orgit--format-export: New function
Date: Thu, 13 Jan 2022 13:58:47 -0500 (EST)

branch: elpa/orgit
commit 3c83adc34ac6ac097f2eabe336afce33eb34f3bd
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    orgit--format-export: New function
---
 orgit.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/orgit.el b/orgit.el
index ad9e0f1730..3299a6fe6e 100644
--- a/orgit.el
+++ b/orgit.el
@@ -407,14 +407,17 @@ store links to the Magit-Revision mode buffers for these 
commits."
                                (format-spec (nth idx format)
                                             `((?n . ,(match-string 1 url))
                                               (?r . ,rev)))))))
-            (pcase format
-              (`html  (format "<a href=\"%s\">%s</a>" link desc))
-              (`latex (format "\\href{%s}{%s}" link desc))
-              (`ascii link)
-              (_      link))
+            (orgit--format-export link desc format)
           (error "Cannot determine public url for %s" path))
       (error "Cannot determine public remote for %s" default-directory))))
 
+(defun orgit--format-export (link desc format)
+  (pcase format
+    (`html  (format "<a href=\"%s\">%s</a>" link desc))
+    (`latex (format "\\href{%s}{%s}" link desc))
+    (`ascii link)
+    (_      link)))
+
 ;;; Utilities
 
 (defun orgit--current-repository ()



reply via email to

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