Re: Tooltip and incremental drop-down menus of automatic completion.

2021-06-14 Thread Basil L. Contovounesios
Hongyi Zhao  writes:

> On Mon, Jun 14, 2021 at 4:22 PM Jean Louis  wrote:
>>
>> * Hongyi Zhao  [2021-06-14 10:04]:
>> > When I typeset LaTeX source file in Emacs with auctex enabled, I
>> > want to know if the features like tooltip and incremental drop-down
>> > menus of automatic completion are available.
>>
>> I don't know about the tooltip, that usually shortly explains the icon
>> in the toolbar.
>
> See screenshot named as tooltip.png, which is shown in TeXstudio.

AFAIK the only tooltip support in AUCTeX is for revealing folded buffer
content; see the end of (info "(auctex) Folding") [0].

One way to find the documentation of a package at point is with the
commands TeX-documentation-texdoc or TeX-doc;
see (info "(auctex) Documentation") [1].  I'm not aware of any commands
for briefly summarising that information, though.  I'm sure the AUCTeX
experts here will know better.

[0]: https://www.gnu.org/software/auctex/manual/auctex/Folding.html
[1]: https://www.gnu.org/software/auctex/manual/auctex/Documentation.html

> I tried `ivy' in Emacs, but it shows some shortcomings, as described below:
>
> 1. The incremental drop down menu only will be triggered when the
> input character number greater than 3.

That must be a result of some setting/package unrelated to Ivy.
With or without Ivy, AUCTeX can complete even the start of a macro '\'.

> 2. Some commands, say, `\href', will not be automatically completed at all.

This is not an issue with Ivy; see my reply on the Ivy issue tracker:
https://github.com/abo-abo/swiper/issues/2887#issuecomment-860617241

-- 
Basil



Re: Tooltip and incremental drop-down menus of automatic completion.

2021-06-14 Thread Basil L. Contovounesios
Hongyi Zhao  writes:

> On Ubuntu 20.04, I use the latest git master Emacs and auctex compiled
> from source.
>
> When I typeset LaTeX source file in Emacs with auctex enabled, I want
> to know if the features like tooltip and incremental drop-down menus
> of automatic completion are available.

Have you tried company-mode?  https://company-mode.github.io/

-- 
Basil



Re: Tooltip and incremental drop-down menus of automatic completion.

2021-06-14 Thread Jean Louis
* Hongyi Zhao  [2021-06-14 12:59]:
> See screenshot named as tooltip.png, which is shown in TeXstudio.

Replacement for that kind of information of the command in LaTeX is
the command C-? in auctex that will show you documentation of it.

The completion is possible with `ivy' package, it is almost the same.



-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



Re: Tooltip and incremental drop-down menus of automatic completion.

2021-06-14 Thread Jean Louis
* Hongyi Zhao  [2021-06-14 10:04]:
> When I typeset LaTeX source file in Emacs with auctex enabled, I
> want to know if the features like tooltip and incremental drop-down
> menus of automatic completion are available.

I don't know about the tooltip, that usually shortly explains the icon
in the toolbar.

Completion of macros is available with C-M-i, for example you write:

\use and press C-M-i then you get possible completions:

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
usebox
usecounter
usepackage

If you write:

\usep

and press C-M-i it completes to \usepackage

Now to get an incremental drop down meny I may recommend using package
`ivy' from GNU ELPA as that would open up the possible completions
when using macro completion key bindings C-M-i 

See screenshot attached, as it shows possible incremental completion
next to the cursor, that is `ivy' package doing it.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/