{"action":"opened","issue":{"url":"https://api.github.com/repos/magit/magit/issues/2901","repository_url":"https://api.github.com/repos/magit/magit","labels_url":"https://api.github.com/repos/magit/magit/issues/2901/labels{/name}","comments_url":"https://api.github.com/repos/magit/magit/issues/2901/comments","events_url":"https://api.github.com/repos/magit/magit/issues/2901/events","html_url":"https://github.com/magit/magit/issues/2901","id":195609319,"number":2901,"title":"Magit commit fails with: There was a problem with the editor when setting default value of git-commit-summary-max-length to git-fill-collumn","user":{"login":"basbossink","id":153318,"avatar_url":"https://avatars.githubusercontent.com/u/153318?v=3","gravatar_id":"","url":"https://api.github.com/users/basbossink","html_url":"https://github.com/basbossink","followers_url":"https://api.github.com/users/basbossink/followers","following_url":"https://api.github.com/users/basbossink/following{/other_user}","gists_url":"https://api.github.com/users/basbossink/gists{/gist_id}","starred_url":"https://api.github.com/users/basbossink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basbossink/subscriptions","organizations_url":"https://api.github.com/users/basbossink/orgs","repos_url":"https://api.github.com/users/basbossink/repos","events_url":"https://api.github.com/users/basbossink/events{/privacy}","received_events_url":"https://api.github.com/users/basbossink/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-14T18:31:41Z","updated_at":"2016-12-14T18:31:41Z","closed_at":null,"body":"Recently I upgraded magit to version: 20161214.521 since then I can no longer perform a commit using magit, the git process buffer reads:\r\n```\r\n1 C:/Users/user/AppData/Local/Programs/Git/mingw64/libexec/git-core/git … commit --\r\n\r\n*ERROR*: Format specifier doesn’t match argument typeerror: There was a problem with the editor '\"c:/Users/user/PortableApps/emacs/bin/emacsclient.exe\"'.\r\nPlease supply the message using either -m or -F option.\r\n```\r\n\r\nUsing the procedure described in the issue template :+1:, I discovered that the problem is caused by the following line in my configuration:\r\n```\r\n(setq-default git-commit-summary-max-length git-commit-fill-column)\r\n```\r\n`C-h v git-commit-fill-column` shows it has the value `nil`, (it's default was changed in commit: 2087cce6c021c3f985e5c53caa74bf56ebdd30fe , which broke my configuration) adding the line:\r\n```\r\n(setq git-commit-fill-column 78)\r\n```\r\nfixes the problem.\r\n\r\nMy 'complaint' in this case would be that the 'error message' is not very helpful in this case. Secondly maybe it is an idea to introduce 'setter-functions' that can perform some basic validation on variables that are customizable, or make the code in \r\n```\r\n(defun git-commit-summary-regexp ()\r\n```\r\nhandle the case where the `git-commit-summary-max-length` is not set correctly.\r\nAnother suggestion could be to wrap any `-hook`s in a `condition-case` [form](https://www.gnu.org/software/emacs/manual/html_node/elisp/Handling-Errors.html), but I'm no stretch of the imagination on Emacs Lisp expert.\r\n\r\nSince I have now 'fixed' my initial problem I'm fine with this issue being put on low priority. I also submitted this to help any people that run into similar issues. "}}
{"actor":{"display_login":"basbossink"}}