{"action":"created","issue":{"url":"https://api.github.com/repos/universal-ctags/ctags/issues/423","labels_url":"https://api.github.com/repos/universal-ctags/ctags/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/universal-ctags/ctags/issues/423/comments","events_url":"https://api.github.com/repos/universal-ctags/ctags/issues/423/events","html_url":"https://github.com/universal-ctags/ctags/issues/423","id":93136289,"number":423,"title":"RFC: Daemon mode","user":{"login":"vhda","id":606876,"avatar_url":"https://avatars.githubusercontent.com/u/606876?v=3","gravatar_id":"","url":"https://api.github.com/users/vhda","html_url":"https://github.com/vhda","followers_url":"https://api.github.com/users/vhda/followers","following_url":"https://api.github.com/users/vhda/following{/other_user}","gists_url":"https://api.github.com/users/vhda/gists{/gist_id}","starred_url":"https://api.github.com/users/vhda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vhda/subscriptions","organizations_url":"https://api.github.com/users/vhda/orgs","repos_url":"https://api.github.com/users/vhda/repos","events_url":"https://api.github.com/users/vhda/events{/privacy}","received_events_url":"https://api.github.com/users/vhda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/universal-ctags/ctags/labels/General%20discussion","name":"General discussion","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-07-05T19:02:03Z","updated_at":"2015-07-07T19:26:59Z","closed_at":null,"body":"I've been toying around with this idea in my head, where one could run ctags in a daemon mode. This could prove to be useful specially in development environments, where the file currently under update is constantly changing, but we don't really want to run ctags in the complete repository. In a daemon mode, ctags could quickly replace the tag list in memory of that file with a new one.\r\n\r\nI see two different complexity levels for this feature, being possible to develop the second on the top of the first:\r\n\r\n1. Simple Unix (or similar) socket that receives a file name and ctags will parse that file, update the tag list in memory and write a new tags file.\r\n2. Use dbus instead of the socket and adding the capability to also query the current tag database.\r\n\r\nAt this point I just to have your opinions about this idea, as I don't even know if I would have the capability of implementing such a feature!\r\n"},"comment":{"url":"https://api.github.com/repos/universal-ctags/ctags/issues/comments/119309796","html_url":"https://github.com/universal-ctags/ctags/issues/423#issuecomment-119309796","issue_url":"https://api.github.com/repos/universal-ctags/ctags/issues/423","id":119309796,"user":{"login":"b4n","id":793526,"avatar_url":"https://avatars.githubusercontent.com/u/793526?v=3","gravatar_id":"","url":"https://api.github.com/users/b4n","html_url":"https://github.com/b4n","followers_url":"https://api.github.com/users/b4n/followers","following_url":"https://api.github.com/users/b4n/following{/other_user}","gists_url":"https://api.github.com/users/b4n/gists{/gist_id}","starred_url":"https://api.github.com/users/b4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b4n/subscriptions","organizations_url":"https://api.github.com/users/b4n/orgs","repos_url":"https://api.github.com/users/b4n/repos","events_url":"https://api.github.com/users/b4n/events{/privacy}","received_events_url":"https://api.github.com/users/b4n/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T19:26:59Z","updated_at":"2015-07-07T19:26:59Z","body":"@vhda this is totally naive and might be optimized a little by reducing actual writes.  At first glance it'd be possible to at least remove one write by combining the ones of removing existing and adding new:\r\n```shell\r\n( sed -r \"/[^\\t]*\\t${escaped1}\\t/d\" < tags && ./ctags -o- \"$1\") > tags\r\n```\r\nI'd be interesting to see what actually takes the most time here -- but I guess if it's so slow it probably is sed removing the lines).\r\n\r\nBTW, my escaping of the argument is incomplete, should rather be\r\n```shell\r\nescaped1=\"$(echo \"$1\" | sed 's/[/.*$(){}]/\\\\\\0/g')\"\r\n```\r\nor similar ot also escape regex control characters. another solution that probably is good enough and might be faster would be be something like `grep -vF \"\\t$1\\t\"`.  that would require testing."}}