issue with completion for S4 objects
meik michalke
meik.michalke at uni-duesseldorf.de
Tue Jan 22 14:32:05 GMT 2019
hi,
Am Dienstag, 22. Januar 2019, 12:38:33 CET schrieb Thomas Friedrichsmeier:
> Ok, this one should be fixed, now.
indeed, thanks!
> I also worked on some further details of the completion. Importantly:
>
> - Object matches and "Auto Word Completion" matches are now grouped,
> visibly.
very cool.
> - You can configure some aspects of the object name completion, e.g.
> using "$" as list access operator.
nice. IMO the old behavior should remain the default, because it's much more
secure; the "$" operator does automatching of shortened element names (like
with shortened function arguments), which can produce unexpected results. for
instance:
x <- list(yz=2)
x[["y"]]
returns NULL, whereas
x$y
still returns 2.
i ran into this issue in one of my packages once and it was hell to find out
what went wrong and why...
> For the moment this is in the
> script editor, only, but I do plan to do the same for the console,
> after your feedback. Any other settings that would make sense to you?
personally, i'd generally prefer
slot(x, "y")
over
x at y
in my code.
> Should the completion in the console be changed to use the same pop-up
> as in the script editor? In addition to / as a replacement for the
> text-based tab-completion behavior?
you mean for object names, not for tab completion in general, right?
i'd find that helpful, because the current tab completion of object names has
it's limits when there are several objects with similar names. i'm often
unable to get it to complete to the next unambiguous character, it then simply
repeats all available options, and it spoils the console history.
what i'd find even more exciting is if tab completion would become possible
for function arguments as well. there's currently only code hinting, but you
still have to type all yourself, which for long options like
"stringsAsFactors" is kind of annoying. if formals(data.frame) would be
triggered by a tab inside data.frame(), couldn't autocompletion be offered
here as well?
viele grüße :: m.eik
--
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at d-40204 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20190122/2e6cd822/attachment.sig>
More information about the rkward-devel
mailing list