citar icon indicating copy to clipboard operation
citar copied to clipboard

Generalize `citar--shorten-names` + add display transform function for full names

Open torfjelde opened this issue 2 years ago • 5 comments

Generalizes citar--shorten-names + implements rendering of full names as discussed in #805.

Replaces #807 as I did not follow the contribution guidelines in #807.

torfjelde avatar Oct 23 '23 21:10 torfjelde

@bdarcus are there any tests for this stuff? Didn't see anything obvious from a quick glance.

torfjelde avatar Oct 23 '23 21:10 torfjelde

are there any tests for this stuff?

Do you mean in this project, or more generally?

If the former, this is an example (see #780) where we should probably add some.

bdarcus avatar Oct 23 '23 21:10 bdarcus

For the project, and specifically of the display transform functions:)

But aight; should I just make a new ert-deftest for the short- and full-name methods? Are there an existing list of author names that I could maybe draw from as test-cases, or should I add some?

torfjelde avatar Oct 23 '23 21:10 torfjelde

Are there an existing list of author names that I could maybe draw from as test-cases, or should I add some?

There isn't, but I can give you an example of a key type that I included when developing the existing function; a corporate (organizational) name:

World Bank

That shouldn't be shortened.

Now that I think about it, you should be aware of the discussion here, in part because OP has some test names, but also because it's about refactoring that function:

https://github.com/emacs-citar/citar/issues/532

bdarcus avatar Oct 23 '23 21:10 bdarcus

So what do we want to do with this, given @aikrahguzar's alternative?

https://github.com/emacs-citar/citar/issues/805#issuecomment-1783892531

bdarcus avatar Feb 28 '24 13:02 bdarcus

So what do we want to do with this, given @aikrahguzar's alternative?

#805 (comment)

I'm going to close this, and we can consider @aikrahguzar's alernative.

bdarcus avatar May 13 '24 12:05 bdarcus