Morgan Smith <[email protected]> writes: >>> + ;; FIXME: this is the wrong way to deal with prefix arguments and is >>> + ;; in conflict with the docstring >>> + (setq n (prefix-numeric-value n)) >> >> Why do you need to add this at all? You could simply change the >> interactive spec in the two callers of org-clock-timestamp-change. > > I threw the FIXME in there because I didn't want to investigate how > prefix arguments or interactive statements work. I've now done minimal > studying and have come to following conclusion: > > (prefix-numeric-value INTEGER) => INTEGER > (prefix-numeric-value nil) => 1 > > Which means this actually isn't in conflict with the docstring and > shouldn't cause any issues whatsoever. > > If we want to go through all the org functions like this to make sure > the interactive specs are correct and we aren't calling > `prefix-numeric-value' unnecessarily, then there are probably about 15 > functions we need to change.
I just referred to this particular function you are changing in the patch. It has exactly two callers that declare their interactive spec as "raw". We can instead change those callers to pass numeric value. Does it make sense? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
