magit-todos icon indicating copy to clipboard operation
magit-todos copied to clipboard

Add magit-todos-filename-modifier customization option

Open matsievskiysv opened this issue 3 years ago • 4 comments

Apply function stored in magit-todos-filename-modifier to the filenames. Closes #105

For example, this is the default view with full path: 2020-10-27_20-48

And with function f-filename applied: 2020-10-27_20-49

matsievskiysv avatar Oct 27 '20 17:10 matsievskiysv

That definitely helps in that situation.

Regarding the implementation, I think it would probably be better to do something like:

(when magit-todos-trim-filename-fn
  (setf filename (funcall magit-todos-trim-filename-fn)))

This avoids making a function call when the option is disabled. As well, funcall can be used instead of apply, which avoids having to cons another list.

Thanks.

alphapapa avatar Oct 31 '20 21:10 alphapapa

all done

matsievskiysv avatar Nov 01 '20 09:11 matsievskiysv

Thanks for your patience on this. If you're still interested, I have a few more comments (apologies if any go in circles; it's been a while, so my tastes may have changed since the last time I reviewed this, as I've learned more about Elisp)...

alphapapa avatar Aug 11 '21 04:08 alphapapa

All done

matsievskiysv avatar Aug 11 '21 15:08 matsievskiysv

@matsievskiysv Thanks for your patience. I couldn't update the PR because you made it from your master branch, but I rebased and merged the PR with a couple of commits on top.

alphapapa avatar Mar 07 '23 05:03 alphapapa