Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to copy story ID under point in the Link popup menu #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion pivotal-tracker.el
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ If you try to go before 0 it just reloads current."
'pivotal-check-task-callback
(format "<task><complete>true</complete></task>")))

(defun pivotal-kill-ring-save-id ()
"Save the external story ID as if killed, but don't kill anything."
(interactive)
(let ((story-id (pivotal-story-id-at-point)))
(kill-new story-id)
(message (concat "copied story ID to kill ring: " story-id))))

(defun pivotal-kill-ring-save-story-url ()
"Save the external story URL as if killed, but don't kill anything."
(interactive)
Expand Down Expand Up @@ -322,7 +329,8 @@ If you try to go before 0 it just reloads current."
"Popup for opening stories in a web browser"
:actions '((?o "Current story" pivotal-open-story-in-browser)
(?p "Current project" pivotal-open-current-project-in-browser)
(?l "Copy current story URL" pivotal-kill-ring-save-story-url)))
(?l "Copy current story URL" pivotal-kill-ring-save-story-url)
(?i "Copy current story ID" pivotal-kill-ring-save-id)))

(magit-define-popup pivotal-story-popup
"Popup for interacting with stories"
Expand Down