{"action":"opened","issue":{"url":"https://api.github.com/repos/ho-tex/oberdiek/issues/17","repository_url":"https://api.github.com/repos/ho-tex/oberdiek","labels_url":"https://api.github.com/repos/ho-tex/oberdiek/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/ho-tex/oberdiek/issues/17/comments","events_url":"https://api.github.com/repos/ho-tex/oberdiek/issues/17/events","html_url":"https://github.com/ho-tex/oberdiek/issues/17","id":186077752,"number":17,"title":"add a `\\DeclareCodeOption` to kvoptions ?","user":{"login":"jfbu","id":2589111,"avatar_url":"https://avatars.githubusercontent.com/u/2589111?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbu","html_url":"https://github.com/jfbu","followers_url":"https://api.github.com/users/jfbu/followers","following_url":"https://api.github.com/users/jfbu/following{/other_user}","gists_url":"https://api.github.com/users/jfbu/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbu/subscriptions","organizations_url":"https://api.github.com/users/jfbu/orgs","repos_url":"https://api.github.com/users/jfbu/repos","events_url":"https://api.github.com/users/jfbu/events{/privacy}","received_events_url":"https://api.github.com/users/jfbu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-29T13:11:41Z","updated_at":"2016-10-29T13:11:41Z","closed_at":null,"body":"there is no suitable interface on github for proposals, hence I use the issue tracker\r\n\r\nin my experience of kvoptions, I have been frustrated by the lack of a `\\DeclareCodeOption`.\r\n\r\nIf I issue `\\DeclareStringOption [foo]{bar}`, and then later issue `\\AddToKeyvalOption*{bar}{some code}`, it is too late because ``some code`` will not have been executed at the time of the `[foo]`, hence whatever ``some code`` does, on has to execute it explicitely with parameter `#1` being `foo`.\r\n\r\n`\\DeclareCodeOption [100pt]{bar}{\\dimen@=#1\\relax}` would do the initial assignment `\\dimen@=100pt\\relax`. If the package receives the option `bar=200pt`,  then the `\\dimen@=200pt\\relax` will get done. If the package receives no option, the default assignment has been done.\r\n\r\nCurrently I have to do three things: `\\DeclareStringOption`,  do the assignment, and do `\\AddToKeyvalOption` to generally set the key handling. Also,  `\\DeclareStringOption` defines a macro expanding to `foo` which  I can judge has no utility. In the end  I ended up using `\\define@key` directly."}}
{"actor":{"display_login":"jfbu"}}