Hi Pete,
I think I applied most of your changes now. Here are a few comments:
Pete Beardmore writes:
> #1. bug #1: Bug Showing Completions: (wrong-type-argument consp nil)
> #2. bug #2: Bug Showing Completions:
> (wrong-type-argument number-or-marker-p (+ -90))
Both applied.
> #3. bug #3: tooltip disappears immediately
>
> #recipe
> place the mouse cursor in the region that the tooltip will be displayed in
> #commentary
> this is a 'bug' / 'feature' in the low-level C 'x-show-tip' function ..i
> won't be looking in there any time soon.
I find that difficult to reproduce. I think it depends very much on the
used toolkit. Did you maybe manage to produce a recipe for this, only
using 'x-show-tip' and starting with 'emacs -Q' ? If so, this should be
reported as an Emacs bug.
> the patch below is a work around which simply warps the mouse pointer
> out of the way.
Since I wasn't able to really reproduce this, I haven't applied that
patch yet.
> #4. bug #4 use last completions when new prefix is subset of old prefix
Applied.
> #5. 'bug' #5 don't complete if there's no context
>
> #recipe
> apply idle patch
> set verbose mode -> (setq semantic-idle-scheduler-verbose-flag t)
> *@#k ..cannot reproduce
Me neither. :-)
>
> #location
> semantic-complete-analyze-inline-idle
> semantic-complete.el:2145 (bzr8071)
>
> #commentary
> a (in)valid overlay ..and no context?! how did i get here? probably just
> ignore this as it 'should' be impossible, although i suppose it can't
> hurt to add it given that i don't think i was far enough into my hacking
> session to have tampered with anything that would obviously leave the
> engine in an unrecoverable state (i.e. quiting the debugger so the
> clean-up hooks don't run). i patched 'semantic-complete-analyze-idle'
> assuming a similar issue could arise from the mini-buffer.
I'm not too fond of sprinkling the code with
semantic-analyze-current-context calls; I think we should try to find
the 'real' bug here... :-)
> also note that this error was only evident having patched semantic-idle.el
> to not simply ignore problems (which i think should stand going forward!)
I agree and have applied that.
> #6. misc typo patches..
> #7. improvement #1 collect additional matches when the context/prefix
> decreases in size
> #8. improvement #2 short-circuit 'display action on TAB
All applied.
> #9. improvement #3 refine displayor modes of operation, make some properties
> customisable, add 'remaining match' counts to tooltips, reset max-tags count
> when searching on a shortened prefix
I applied most of this with a few changes.
> 'quiet-mode' - suppress all matches until the total number of matches
> available is less than 'semantic-completion max-tags' number. several
> tab presses will show an extended completion list, but only until the
> next non-completion key/command is sent, hence truly staying 'quiet'.
>
> 'standard-mode' - always provide up to 'semantic-completion max-tags'
> number of completions when available by default. single TAB will reveal
> the extended list of completions up to
> 'semantic-completion max-tags-extended' number, and this extended list
> will be shown for the remainder of the completion, unless backspace is
> keyed which resets the max-tags count back down to
> 'semantic-completion-max-tags'.
>
> 'verbose-mode' - always show the extended completions list. horrible.
I think those modes are good and an improvement over the previous
'force-show' option, which was a bit... erm, strange. :-)
> +(defcustom semantic-complete-inline-mode-quiet nil
> + "When enabled, only show completions when we have narrowed all
> +posibilities down to a maximum of 'semantic-complete-inline-max-tags'
> +tags. Pressing TAB multiple times will also show completions."
> + :group 'semantic
> + :type 'boolean
> + :set '(lambda (sym var)
> + (set-default sym var)
> + (setq semantic-complete-inline-mode-standard nil)
> + (setq semantic-complete-inline-mode-verbose nil)
> + (if var (setq semantic-complete-inline-mode -1))))
I did change that, since you usually implement those kinds of 'radio
button' behavior by using the 'choice' type and one variable. I also
renamed all variables to make clear that they're related to the tooltip
class. Most of my other changes were small and shouldn't touch the
actual code you did, but please try it out.
A few more remarks:
- Use 'delete-trailing-whitespace' to, well, delete trailing
whitespaces. :-)
- doc-strings are expected to have a certain style in Emacs. For
example, the first line should be a sentence describing the
function. Also, all documentation in Emacs uses 'sentence spacing',
meaning that there should be two whitespaces between sentences. (You
can run 'checkdoc' to check your doc-strings and other stuff).
- You don't have to use 'progn' in the "else"-branch of an 'if'.
Thanks again,
-David
|