unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Tooltip and incremental drop-down menus of automatic completion.
@ 2021-06-14  7:02 Hongyi Zhao
  2021-06-14  8:18 ` Jean Louis
  2021-06-14 12:05 ` Basil L. Contovounesios
  0 siblings, 2 replies; 6+ messages in thread
From: Hongyi Zhao @ 2021-06-14  7:02 UTC (permalink / raw)
  To: auctex; +Cc: help-gnu-emacs

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.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tooltip and incremental drop-down menus of automatic completion.
  2021-06-14  7:02 Tooltip and incremental drop-down menus of automatic completion Hongyi Zhao
@ 2021-06-14  8:18 ` Jean Louis
  2021-06-14  9:57   ` Hongyi Zhao
  2021-06-14 12:05 ` Basil L. Contovounesios
  1 sibling, 1 reply; 6+ messages in thread
From: Jean Louis @ 2021-06-14  8:18 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: auctex, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

* Hongyi Zhao <hongyi.zhao@gmail.com> [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/

[-- Attachment #2: 2021-06-14-11:15:03.png --]
[-- Type: image/png, Size: 6960 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tooltip and incremental drop-down menus of automatic completion.
  2021-06-14  8:18 ` Jean Louis
@ 2021-06-14  9:57   ` Hongyi Zhao
  2021-06-14 12:00     ` Jean Louis
  2021-06-14 12:06     ` Basil L. Contovounesios
  0 siblings, 2 replies; 6+ messages in thread
From: Hongyi Zhao @ 2021-06-14  9:57 UTC (permalink / raw)
  To: Hongyi Zhao, auctex, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]

On Mon, Jun 14, 2021 at 4:22 PM Jean Louis <bugs@gnu.support> wrote:
>
> * Hongyi Zhao <hongyi.zhao@gmail.com> [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.

>
> 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.

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.
2. Some commands, say, `\href', will not be automatically completed at all.

But TeXstudio doesn't have all the above-mentioned disadvantages, see
screenshot named as autocompletin.png for more detailed info.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China

[-- Attachment #2: tooltip.png --]
[-- Type: image/png, Size: 827940 bytes --]

[-- Attachment #3: autocompletin.png --]
[-- Type: image/png, Size: 77478 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tooltip and incremental drop-down menus of automatic completion.
  2021-06-14  9:57   ` Hongyi Zhao
@ 2021-06-14 12:00     ` Jean Louis
  2021-06-14 12:06     ` Basil L. Contovounesios
  1 sibling, 0 replies; 6+ messages in thread
From: Jean Louis @ 2021-06-14 12:00 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: auctex, help-gnu-emacs

* Hongyi Zhao <hongyi.zhao@gmail.com> [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/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tooltip and incremental drop-down menus of automatic completion.
  2021-06-14  7:02 Tooltip and incremental drop-down menus of automatic completion Hongyi Zhao
  2021-06-14  8:18 ` Jean Louis
@ 2021-06-14 12:05 ` Basil L. Contovounesios
  1 sibling, 0 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2021-06-14 12:05 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: auctex, help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tooltip and incremental drop-down menus of automatic completion.
  2021-06-14  9:57   ` Hongyi Zhao
  2021-06-14 12:00     ` Jean Louis
@ 2021-06-14 12:06     ` Basil L. Contovounesios
  1 sibling, 0 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2021-06-14 12:06 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: auctex, help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> On Mon, Jun 14, 2021 at 4:22 PM Jean Louis <bugs@gnu.support> wrote:
>>
>> * Hongyi Zhao <hongyi.zhao@gmail.com> [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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-14 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-14  7:02 Tooltip and incremental drop-down menus of automatic completion Hongyi Zhao
2021-06-14  8:18 ` Jean Louis
2021-06-14  9:57   ` Hongyi Zhao
2021-06-14 12:00     ` Jean Louis
2021-06-14 12:06     ` Basil L. Contovounesios
2021-06-14 12:05 ` Basil L. Contovounesios

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).