{"action":"closed","number":617,"pull_request":{"url":"https://api.github.com/repos/pazz/alot/pulls/617","id":5935964,"html_url":"https://github.com/pazz/alot/pull/617","diff_url":"https://github.com/pazz/alot/pull/617.diff","patch_url":"https://github.com/pazz/alot/pull/617.patch","issue_url":"https://api.github.com/repos/pazz/alot/issues/617","number":617,"state":"closed","locked":false,"title":"make tag commands undoable","user":{"login":"ignatz","id":111986,"avatar_url":"https://avatars2.githubusercontent.com/u/111986?v=4","gravatar_id":"","url":"https://api.github.com/users/ignatz","html_url":"https://github.com/ignatz","followers_url":"https://api.github.com/users/ignatz/followers","following_url":"https://api.github.com/users/ignatz/following{/other_user}","gists_url":"https://api.github.com/users/ignatz/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatz/subscriptions","organizations_url":"https://api.github.com/users/ignatz/orgs","repos_url":"https://api.github.com/users/ignatz/repos","events_url":"https://api.github.com/users/ignatz/events{/privacy}","received_events_url":"https://api.github.com/users/ignatz/received_events","type":"User","site_admin":false},"body":"First of all, i do not consider this patch ready to merge, however I wanted to kick of some discussion about an undo mechanism.\n\nTackling this issue in general is far from trivial and would also require rethinking the whole command mechanism. Inverse operations aren't always obvious/possible and the concept of command lines makes it even harder (e.g. a long command line could include a single non-reversible command).\nBut what can easily be realized is the undoing of _individual_ tag commands, which doesn't handle whole command lines. Yes, this feels like a hack, but the possibility to at least undo tagging is something I desperately like to have.\n\nApart from that, the implemented mechanism  does offend existing code, by registering the very same command in both search and thread mode, albeit implemented only in thread. One would need to duplicate the implementation to match the existing code/policy. \nCurrently, similar but independent TagCommands exist in search as well as tag mode. The reason for that -as far as I understand it- is, that each command is individually responsible for choosing it's scope to act on. If modes would be responsible for scoping, rather than commands, they could also handle ui refreshes, etc... and all commands could drop the corresponding code. Furthermore, commands like TagCommand could be reused in search and thread mode or maybe I got it all wrong ;-). Even though, beyond this pull request, this is more about kicking  off some discussion. Did you ever consider such a change and is this something you would be interested in? What do you think about undoing in general and in particular? What is your opinion on reusing the UndoTagCommand in thread and search mode?\n","created_at":"2013-05-26T15:53:58Z","updated_at":"2018-02-21T16:45:35Z","closed_at":"2018-02-21T16:45:34Z","merged_at":null,"merge_commit_sha":"37057d49e14c44fab7957fb7f44e790cf7ef5fd1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pazz/alot/pulls/617/commits","review_comments_url":"https://api.github.com/repos/pazz/alot/pulls/617/comments","review_comment_url":"https://api.github.com/repos/pazz/alot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pazz/alot/issues/617/comments","statuses_url":"https://api.github.com/repos/pazz/alot/statuses/9efe7ca1d824c290d3eb17c4dc455c9143fe05e1","head":{"label":"ignatz:undotag","ref":"undotag","sha":"9efe7ca1d824c290d3eb17c4dc455c9143fe05e1","user":{"login":"ignatz","id":111986,"avatar_url":"https://avatars2.githubusercontent.com/u/111986?v=4","gravatar_id":"","url":"https://api.github.com/users/ignatz","html_url":"https://github.com/ignatz","followers_url":"https://api.github.com/users/ignatz/followers","following_url":"https://api.github.com/users/ignatz/following{/other_user}","gists_url":"https://api.github.com/users/ignatz/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatz/subscriptions","organizations_url":"https://api.github.com/users/ignatz/orgs","repos_url":"https://api.github.com/users/ignatz/repos","events_url":"https://api.github.com/users/ignatz/events{/privacy}","received_events_url":"https://api.github.com/users/ignatz/received_events","type":"User","site_admin":false},"repo":{"id":9548290,"name":"alot","full_name":"ignatz/alot","owner":{"login":"ignatz","id":111986,"avatar_url":"https://avatars2.githubusercontent.com/u/111986?v=4","gravatar_id":"","url":"https://api.github.com/users/ignatz","html_url":"https://github.com/ignatz","followers_url":"https://api.github.com/users/ignatz/followers","following_url":"https://api.github.com/users/ignatz/following{/other_user}","gists_url":"https://api.github.com/users/ignatz/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatz/subscriptions","organizations_url":"https://api.github.com/users/ignatz/orgs","repos_url":"https://api.github.com/users/ignatz/repos","events_url":"https://api.github.com/users/ignatz/events{/privacy}","received_events_url":"https://api.github.com/users/ignatz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ignatz/alot","description":"commandline MUA using notmuch and urwid","fork":true,"url":"https://api.github.com/repos/ignatz/alot","forks_url":"https://api.github.com/repos/ignatz/alot/forks","keys_url":"https://api.github.com/repos/ignatz/alot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ignatz/alot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ignatz/alot/teams","hooks_url":"https://api.github.com/repos/ignatz/alot/hooks","issue_events_url":"https://api.github.com/repos/ignatz/alot/issues/events{/number}","events_url":"https://api.github.com/repos/ignatz/alot/events","assignees_url":"https://api.github.com/repos/ignatz/alot/assignees{/user}","branches_url":"https://api.github.com/repos/ignatz/alot/branches{/branch}","tags_url":"https://api.github.com/repos/ignatz/alot/tags","blobs_url":"https://api.github.com/repos/ignatz/alot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ignatz/alot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ignatz/alot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ignatz/alot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ignatz/alot/statuses/{sha}","languages_url":"https://api.github.com/repos/ignatz/alot/languages","stargazers_url":"https://api.github.com/repos/ignatz/alot/stargazers","contributors_url":"https://api.github.com/repos/ignatz/alot/contributors","subscribers_url":"https://api.github.com/repos/ignatz/alot/subscribers","subscription_url":"https://api.github.com/repos/ignatz/alot/subscription","commits_url":"https://api.github.com/repos/ignatz/alot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ignatz/alot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ignatz/alot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ignatz/alot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ignatz/alot/contents/{+path}","compare_url":"https://api.github.com/repos/ignatz/alot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ignatz/alot/merges","archive_url":"https://api.github.com/repos/ignatz/alot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ignatz/alot/downloads","issues_url":"https://api.github.com/repos/ignatz/alot/issues{/number}","pulls_url":"https://api.github.com/repos/ignatz/alot/pulls{/number}","milestones_url":"https://api.github.com/repos/ignatz/alot/milestones{/number}","notifications_url":"https://api.github.com/repos/ignatz/alot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ignatz/alot/labels{/name}","releases_url":"https://api.github.com/repos/ignatz/alot/releases{/id}","deployments_url":"https://api.github.com/repos/ignatz/alot/deployments","created_at":"2013-04-19T15:20:23Z","updated_at":"2013-08-25T03:44:18Z","pushed_at":"2013-08-25T03:44:11Z","git_url":"git://github.com/ignatz/alot.git","ssh_url":"git@github.com:ignatz/alot.git","clone_url":"https://github.com/ignatz/alot.git","svn_url":"https://github.com/ignatz/alot","homepage":"","size":7096,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pazz:master","ref":"master","sha":"cf3cec6c42f859ea79e0e74774f067f426f988ee","user":{"login":"pazz","id":628455,"avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","gravatar_id":"","url":"https://api.github.com/users/pazz","html_url":"https://github.com/pazz","followers_url":"https://api.github.com/users/pazz/followers","following_url":"https://api.github.com/users/pazz/following{/other_user}","gists_url":"https://api.github.com/users/pazz/gists{/gist_id}","starred_url":"https://api.github.com/users/pazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pazz/subscriptions","organizations_url":"https://api.github.com/users/pazz/orgs","repos_url":"https://api.github.com/users/pazz/repos","events_url":"https://api.github.com/users/pazz/events{/privacy}","received_events_url":"https://api.github.com/users/pazz/received_events","type":"User","site_admin":false},"repo":{"id":2197977,"name":"alot","full_name":"pazz/alot","owner":{"login":"pazz","id":628455,"avatar_url":"https://avatars3.githubusercontent.com/u/628455?v=4","gravatar_id":"","url":"https://api.github.com/users/pazz","html_url":"https://github.com/pazz","followers_url":"https://api.github.com/users/pazz/followers","following_url":"https://api.github.com/users/pazz/following{/other_user}","gists_url":"https://api.github.com/users/pazz/gists{/gist_id}","starred_url":"https://api.github.com/users/pazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pazz/subscriptions","organizations_url":"https://api.github.com/users/pazz/orgs","repos_url":"https://api.github.com/users/pazz/repos","events_url":"https://api.github.com/users/pazz/events{/privacy}","received_events_url":"https://api.github.com/users/pazz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pazz/alot","description":"Terminal-based Mail User Agent","fork":false,"url":"https://api.github.com/repos/pazz/alot","forks_url":"https://api.github.com/repos/pazz/alot/forks","keys_url":"https://api.github.com/repos/pazz/alot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pazz/alot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pazz/alot/teams","hooks_url":"https://api.github.com/repos/pazz/alot/hooks","issue_events_url":"https://api.github.com/repos/pazz/alot/issues/events{/number}","events_url":"https://api.github.com/repos/pazz/alot/events","assignees_url":"https://api.github.com/repos/pazz/alot/assignees{/user}","branches_url":"https://api.github.com/repos/pazz/alot/branches{/branch}","tags_url":"https://api.github.com/repos/pazz/alot/tags","blobs_url":"https://api.github.com/repos/pazz/alot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pazz/alot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pazz/alot/git/refs{/sha}","trees_url":"https://api.github.com/repos/pazz/alot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pazz/alot/statuses/{sha}","languages_url":"https://api.github.com/repos/pazz/alot/languages","stargazers_url":"https://api.github.com/repos/pazz/alot/stargazers","contributors_url":"https://api.github.com/repos/pazz/alot/contributors","subscribers_url":"https://api.github.com/repos/pazz/alot/subscribers","subscription_url":"https://api.github.com/repos/pazz/alot/subscription","commits_url":"https://api.github.com/repos/pazz/alot/commits{/sha}","git_commits_url":"https://api.github.com/repos/pazz/alot/git/commits{/sha}","comments_url":"https://api.github.com/repos/pazz/alot/comments{/number}","issue_comment_url":"https://api.github.com/repos/pazz/alot/issues/comments{/number}","contents_url":"https://api.github.com/repos/pazz/alot/contents/{+path}","compare_url":"https://api.github.com/repos/pazz/alot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pazz/alot/merges","archive_url":"https://api.github.com/repos/pazz/alot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pazz/alot/downloads","issues_url":"https://api.github.com/repos/pazz/alot/issues{/number}","pulls_url":"https://api.github.com/repos/pazz/alot/pulls{/number}","milestones_url":"https://api.github.com/repos/pazz/alot/milestones{/number}","notifications_url":"https://api.github.com/repos/pazz/alot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pazz/alot/labels{/name}","releases_url":"https://api.github.com/repos/pazz/alot/releases{/id}","deployments_url":"https://api.github.com/repos/pazz/alot/deployments","created_at":"2011-08-12T16:22:37Z","updated_at":"2018-02-20T14:44:17Z","pushed_at":"2018-02-21T10:32:01Z","git_url":"git://github.com/pazz/alot.git","ssh_url":"git@github.com:pazz/alot.git","clone_url":"https://github.com/pazz/alot.git","svn_url":"https://github.com/pazz/alot","homepage":"","size":7573,"stargazers_count":380,"watchers_count":380,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":107,"mirror_url":null,"archived":false,"open_issues_count":148,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":107,"open_issues":148,"watchers":380,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pazz/alot/pulls/617"},"html":{"href":"https://github.com/pazz/alot/pull/617"},"issue":{"href":"https://api.github.com/repos/pazz/alot/issues/617"},"comments":{"href":"https://api.github.com/repos/pazz/alot/issues/617/comments"},"review_comments":{"href":"https://api.github.com/repos/pazz/alot/pulls/617/comments"},"review_comment":{"href":"https://api.github.com/repos/pazz/alot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pazz/alot/pulls/617/commits"},"statuses":{"href":"https://api.github.com/repos/pazz/alot/statuses/9efe7ca1d824c290d3eb17c4dc455c9143fe05e1"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":5,"review_comments":1,"maintainer_can_modify":false,"commits":1,"additions":56,"deletions":10,"changed_files":2}}
{"actor":{"display_login":"pazz"}}