Skip to content
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

some help tags about function details are inconsistent #6849

Closed
lacygoill opened this issue Sep 3, 2020 · 2 comments
Closed

some help tags about function details are inconsistent #6849

lacygoill opened this issue Sep 3, 2020 · 2 comments

Comments

@lacygoill
Copy link

This command outputs all the help tags matching the pattern -function*-details:

pu=getcompletion('-function*-details', 'help')

job-functions-details
sign-functions-details
test-functions-details
popup-function-details
assert-functions-details
channel-functions-details
terminal-function-details

Notice that all the tags use the plural of the word "function":

job-functions-details
            ^
sign-functions-details
             ^
test-functions-details
             ^
assert-functions-details
               ^
channel-functions-details
                ^

Except these 2:

popup-function-details
             ^
             ✘

terminal-function-details
                ^
                ✘

This is inconsistent.


If you run this global command while reading :h eval:

:g/are documented/p

You get this output:

assert_ functions are documented here: |assert-functions-details|
ch_ functions are documented here: |channel-functions-details|
job_ functions are documented here: |job-functions-details|
popup_ functions are documented here: |popup-functions|.
prop_ functions are documented here: |text-prop-functions|.
sign_ functions are documented here: |sign-functions-details|
term_ functions are documented here: |terminal-function-details|
test_ functions are documented here: |test-functions-details|

Notice that all the lines end with a tag name using the keyword "details" and without a dot at the end:

assert_ functions are documented here: |assert-functions-details|
                                                         ^-----^

ch_ functions are documented here: |channel-functions-details|
                                                      ^-----^

job_ functions are documented here: |job-functions-details|
                                                   ^-----^

sign_ functions are documented here: |sign-functions-details|
                                                     ^-----^

term_ functions are documented here: |terminal-function-details|
                                                        ^-----^

test_ functions are documented here: |test-functions-details|
                                                     ^-----^

Except these 2:

prop_ functions are documented here: |text-prop-functions|.
                                                         ^^
                                                         details is missing; dot is superfluous

popup_ functions are documented here: |popup-functions|.
                                                      ^^
                                                      details is missing; dot is superfluous

This is also inconsistent.


The following patch tries to address these issues:

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index a2e1af919..0f7e14ec4 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -7607,7 +7607,7 @@ perleval({expr})					*perleval()*
 <		{only available when compiled with the |+perl| feature}
 
 
-popup_ functions are documented here: |popup-functions|.
+popup_ functions are documented here: |popup-functions-details|
 
 
 pow({x}, {y})						*pow()*
@@ -7890,7 +7890,7 @@ prompt_setprompt({buf}, {text})				*prompt_setprompt()*
 		Can also be used as a |method|: >
 			GetBuffer()->prompt_setprompt('command: ')
 
-prop_ functions are documented here: |text-prop-functions|.
+prop_ functions are documented here: |text-prop-functions-details|
 
 pum_getpos()						*pum_getpos()*
 		If the popup menu (see |ins-completion-menu|) is not visible,
@@ -10552,7 +10552,7 @@ tempname()					*tempname()* *temp-file-name*
 		option is set or when 'shellcmdflag' starts with '-'.
 
 
-term_ functions are documented here: |terminal-function-details|
+term_ functions are documented here: |terminal-functions-details|
 
 
 terminalprops()						*terminalprops()*
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index 8a0f2ba51..187682570 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -13,7 +13,7 @@ Displaying text in a floating window.	*popup* *popup-window* *popupwin*
    Popup buffer and window	|popup-buffer|
    Terminal in popup window	|popup-terminal|
 2. Functions			|popup-functions|
-   Details			|popup-function-details|
+   Details			|popup-functions-details|
 3. Usage			|popup-usage|
    popup_create() arguments	|popup_create-arguments|
    Popup text properties	|popup-props|
@@ -201,7 +201,7 @@ Other:
 	|popup_list()|		get list of all popups
 
 
-DETAILS						*popup-function-details*
+DETAILS						*popup-functions-details*
 
 popup_atcursor({what}, {options})			*popup_atcursor()*
 		Show the {what} above the cursor, and close it when the cursor
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index ff5207854..6db37f07c 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -23,7 +23,7 @@ If the result is "1" you have it.
       Special keys				|terminal-special-keys|
       Unix					|terminal-unix|
       MS-Windows				|terminal-ms-windows|
-2. Terminal functions			|terminal-function-details|
+2. Terminal functions			|terminal-functions-details|
 3. Terminal communication		|terminal-communication|
       Vim to job: term_sendkeys()		|terminal-to-job|
       Job to Vim: JSON API			|terminal-api|
@@ -455,7 +455,7 @@ Environment variables are used to pass information to the running job:
 
 
 ==============================================================================
-2. Terminal functions				 *terminal-function-details*
+2. Terminal functions				 *terminal-functions-details*
 
 							*term_dumpdiff()*
 term_dumpdiff({filename}, {filename} [, {options}])
diff --git a/runtime/doc/textprop.txt b/runtime/doc/textprop.txt
index ac6d12a69..ce4a9b153 100644
--- a/runtime/doc/textprop.txt
+++ b/runtime/doc/textprop.txt
@@ -115,6 +115,8 @@ prop_list({lnum} [, {props}])  		text properties in {lnum}
 prop_remove({props} [, {lnum} [, {lnum-end}]])
 					remove a text property
 
+DETAILS						*textprop-functions-details*
+
 						*prop_add()* *E965*
 prop_add({lnum}, {col}, {props})
 		Attach a text property at position {lnum}, {col}.  {col} is

@brammool
Copy link
Contributor

brammool commented Sep 3, 2020 via email

@lacygoill
Copy link
Author

This comes from adding "-details" after "some-functions". But it reads
strange, perhaps we should follow the last two. Not sure though.
Opinions?

I guess it would work too. Using the last two as a template for the other ones would bring the whole set of tags more in line with all the -functions tags which don't jump to another file (like :h tag-functions, :h list-functions, ...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants