Skip to content

Commit 9520484

Browse files
committed
Allow getting URL from gist buffers
`gist-current-url` now works from both the `gist-list` buffer, and any buffer belonging to an open gist. This closes #103
1 parent a03f142 commit 9520484

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gist.el

+6-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,12 @@ for the gist."
538538

539539
(defun gist-current-url ()
540540
"Helper function to fetch current gist url"
541-
(let* ((id (tabulated-list-get-id))
541+
(let* ((id (or (and (boundp 'gist-list-mode)
542+
gist-list-mode
543+
(tabulated-list-get-id))
544+
(and (boundp 'gist-mode)
545+
gist-mode
546+
gist-id)))
542547
(gist (gist-list-db-get-gist id)))
543548
(oref gist :html-url)))
544549

0 commit comments

Comments
 (0)