emacs-citar / citar

Emacs package to quickly find and act on bibliographic references, and edit org, markdown, and latex academic documents.
GNU General Public License v3.0
479 stars 53 forks source link

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

Closed torfjelde closed 1 month ago

torfjelde commented 8 months ago

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 commented 8 months ago

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

bdarcus commented 8 months ago

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.

torfjelde commented 8 months ago

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?

bdarcus commented 8 months ago

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 commented 4 months ago

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

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

bdarcus commented 1 month ago

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.