{"issue":{"state":"closed","created_at":"2011-11-22T12:08:57Z","updated_at":"2011-11-23T00:17:20Z","user":{"gravatar_id":"4d6ebaa43618b9ab9a8eb9436ad7d0d3","id":217543,"url":"https://api.github.com/users/DamienCassou","login":"DamienCassou","avatar_url":"https://secure.gravatar.com/avatar/4d6ebaa43618b9ab9a8eb9436ad7d0d3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"Hi,\r\n\r\nI found this version somewhere on the web a long time ago and thought it might be a good addition to your package. Sure, it's not related to dired, but the idea is the same. Moreover, this function could benefit from dired-toggle-sudo code which looks more robust:\r\n\r\n``` Lisp\r\n(defun find-alternative-file-with-sudo ()\r\n  (interactive)\r\n  (let ((fname (or buffer-file-name\r\n\t\t   dired-directory)))\r\n    (when fname\r\n      (if (string-match \"^/sudo:root@localhost:\" fname)\r\n\t  (setq fname (replace-regexp-in-string\r\n\t\t       \"^/sudo:root@localhost:\" \"\"\r\n\t\t       fname))\r\n\t(setq fname (concat \"/sudo:root@localhost:\" fname)))\r\n      (find-alternate-file fname))))\r\n```","assignee":null,"id":2317208,"labels":[],"number":1,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Opening the current file with sudo","closed_at":"2011-11-23T00:17:20Z","html_url":"https://github.com/renard/dired-toggle-sudo/issues/1","milestone":null,"url":"https://api.github.com/repos/renard/dired-toggle-sudo/issues/1"},"action":"closed"}