nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] New Feature: completion from external dictionary


From: Benno Schulenberg
Subject: Re: [Nano-devel] New Feature: completion from external dictionary
Date: Wed, 1 Aug 2018 19:45:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Op 12-07-18 om 19:06 schreef Marco Diego Aurélio Mesquita:
> On Wed, Jul 11, 2018 at 7:52 AM, Benno Schulenberg <address@hidden> wrote:
>> But... this means that when a syntax specifies a dictionary, then nano
>> will only find possible completions in that dictionary and no longer
>> in the current file?
>>
> Yes.

Comes back my original complaint: if the dictionary is a real dictionary,
with a nearly complete set of valid words in a specific language, I find
using the completion keystroke is useless: it gives tens of words that I
don't want before finally coming up with the one that I intend.  What do
you propose that people would use to have a more useful dictionary?>

>       Syntaxes can now be extended

"can now contain"

> with the "completer" keyword

Why "completer"?  Completer sounds like a program, but a static dictionary
is all that is accepted, right?  So, simply call it "dictionary".

(General criticism: you send your patches too soon.  Review your own patch
the next day, and then again the day after.  Give things sensible names.
And at least fix all the spelling errors.)


> +     /* Open the included syntax file. */
> +     rcstream = fopen(path, "rb");

Fuck.  *Again* you have blindly copied a piece of code and left the
original comment in place.  This comment *doesn't make any sense here*.
Rrrr...

> +     char *dictionary;
> +             /* The path to the completions dicitonary to this type of file. 
> */

"dictionary for"

> +     struct filestruct *completions;
> +             /* The dicitonary cache for this syntax. */

"The list of valid words for this syntax."

> +/* Loads completions dictionary for syntax of currently open file. */
> +filestruct *get_dictionary()

"Loads the completions dictionary for the currently open file."

> +     /* Do not reload it if it is cached. */

"When it has already been loaded, there is no need to reload."

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]