-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preparing for 1.0; last call for command or function name changes #121
Comments
As I mentioned to you, I found the name But here's a thought: could you have
You could even allow for customization of the 'initial' string for that function. You could then have the analog of The model here would be something like what EDIT: here's a quick prototype of sorts (not sure if I'm quoting everything I should be quoting here, but the general shape should do what I have in mind): (defcustom bibtex-actions-open
'bibtex-actions-open-any
:type 'function
:options '(bibtex-actions-open-any
bibtex-actions-open-link
bibtex-actions-open-pdf
bibtex-actions-open-entry
bibtex-actions-open-note
)
:group 'bibtex-actions)
|
Oh, and you may want to point people to this discussion to address the issue with |
I had thought about that for possibility of a top-level But that feels like config overkill when you consider one can just use an alias. (defalias 'apc/bib-open #'bibtex-actions-open-entry)
(defalias 'apc/bib-open-any #'bibtex-actions-open) Another possibility is to make the following name changes here:
|
I see the point, yes. Though for users who rely on the customization interface the
Interesting. If you don't go for the top-level command, I would vote for the 'default' sounding function name to go with |
What do you mean this?
I do think we've settled on two separate questions:
Edit: I will say I have felt less need for 2, given all the action functions here are full commands. Copying @emiller88 just in case has any thoughts. |
I mean: I would reserve EDIT: I say 'default'-sounding because "bibtex-actions-open" sounds like the default, or main, or primary 'open' action. Does that make sense?
|
@publicimageltd - can you weigh in on this issue? |
Yes. The confusion comes up different categories of thing these commands open: bibtex entry, notes, and then a mix of different source formats. |
I think Why not predefine an alias which maps |
Emacs does have a mechanism (a macro) that allows you to mark a function as
deprecated, and what the new name is.
Internally, that I believe creates an alias, but you can, for example,
specify when it will be removed.
|
PS - my problem with "any" (and I think Titus agrees, BTW) is it's almost
as vague as nothing. "Any" what?
Why I was thinking about "open-src" or some such.
Edit: I keep with bibtex completion names where it makes sense, and diverge where not. Those function names weren't designed to be interactive, and who knows what happens to this dependency in the future.
|
FWIW: I like |
I understand. |
Ah, here it is; how I would do this technically if making the change: (define-obsolete-function-alias
'bibtex-actions-open
'bibtex-actions-open-source
"1.0")
I do want to point out a problem with this approach, which is why I went originally with just "open". To be totally consistent would suggest also renaming those commands; like to |
Per discussion on #130, another possible list of command names:
In this approach, But I'm not sure that's a necessary distinction. If not, this would be the more explicit and consistent approach:
... but some of these names become long enough they may not play well in 🤷 |
Crazy idea:
Each one is a command for acting on a key's pdf, link, etc. What actions are performed for each item depends on what it is: if it's 'notes', it makes sense that the actions are 'add' or 'edit/view'; it it's 'entry', it makes sense that it's just 'open', etc. Just putting this out there, feel free to ignore (of course)! |
That's an interesting idea I hadn't thought of.
Worth considering, seems to me.
Edit: doesn't address the issue that inspired this, however, and the command names aren't shorter.
|
I like it! Maybe the actual actions should be displayed in the prompt, like "Open Bibtex Entries" or "Add or view notes". This solution also works nicely with the |
I think the command names just won't get significantly shorter, given the name space conventions and the fact that 'bibtex-actions' is, well, a long string. But the issue of the 'bibtex-actions-open' command could be addressed by just getting rid of it(!), or replacing it with |
PS: also, |
I've opened #131 to settle this. As I say there, I'm not convinced after this (very helpful though) discussion it's worth changing. But at minimum, I thought, I'd start with clarifying the docstrings, which I'll have to do either way. |
@apc raised a question about the wisdom of the
bibtex-actions-open
command name, and I explained the reasoning in a followup here: #120 (comment).I'm kind of agnostic, so would probably leave as is unless there were strong arguments in favor of changing.
But now is the time to raise the question, as I'm planning to tag 1.0 soon, which is me arbitrarily drawing a line-in-the-sand on command and function name changes.
It doesn't mean we can't revisit later, but that I'd prefer not to.
To recap, we have the follow action verbs:
... and then command names based on these, the potential confusing ones being:
bibtex-actions-open
bibtex-actions-open-entry
Do note that aside from the clarity of the commands, I was also shooting for conciseness, to accommodate
M-x
, and menu displays likewhich-key
(though see [this comment]((defalias 'apc/bib-open #'bibtex-actions-open-entry))) when usingembark-act
.Bottomline, this (with marginalia annotations from the docstrings) should be as elegant, clear and concise as possible:
So what do people think?
cc @mtreca @wenjie2wang
The text was updated successfully, but these errors were encountered: