unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Autocompletion for partially typesetted stuff in auctex.
@ 2021-06-08  4:40 Hongyi Zhao
  2021-06-08  7:18 ` Jean Louis
  0 siblings, 1 reply; 7+ messages in thread
From: Hongyi Zhao @ 2021-06-08  4:40 UTC (permalink / raw)
  To: help-gnu-emacs

The following description is an excerpt from
<https://www.gnu.org/software/auctex/features.html>:

  There is a completion mechanism for partially written macros
available as well.

But I want to know if it can help to complete the commands/macro names
defined in any packages called in the preamble of the current project
documents.

Any hints will be highly appreciated.

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] 7+ messages in thread

* Re: Autocompletion for partially typesetted stuff in auctex.
  2021-06-08  4:40 Autocompletion for partially typesetted stuff in auctex Hongyi Zhao
@ 2021-06-08  7:18 ` Jean Louis
  2021-06-08  8:17   ` Hongyi Zhao
  0 siblings, 1 reply; 7+ messages in thread
From: Jean Louis @ 2021-06-08  7:18 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

* Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 07:41]:
> The following description is an excerpt from
> <https://www.gnu.org/software/auctex/features.html>:
> 
>   There is a completion mechanism for partially written macros
> available as well.
> 
> But I want to know if it can help to complete the commands/macro names
> defined in any packages called in the preamble of the current project
> documents.
> 
> Any hints will be highly appreciated.

Try M-x pabbrev-mode

It will capture words in many buffers and use such for completion.

-- 
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] 7+ messages in thread

* Re: Autocompletion for partially typesetted stuff in auctex.
  2021-06-08  7:18 ` Jean Louis
@ 2021-06-08  8:17   ` Hongyi Zhao
  2021-06-08 14:29     ` Jean Louis
  2021-06-12  3:07     ` Jean Louis
  0 siblings, 2 replies; 7+ messages in thread
From: Hongyi Zhao @ 2021-06-08  8:17 UTC (permalink / raw)
  To: Hongyi Zhao, help-gnu-emacs

On Tue, Jun 8, 2021 at 3:21 PM Jean Louis <bugs@gnu.support> wrote:
>
> * Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 07:41]:
> > The following description is an excerpt from
> > <https://www.gnu.org/software/auctex/features.html>:
> >
> >   There is a completion mechanism for partially written macros
> > available as well.
> >
> > But I want to know if it can help to complete the commands/macro names
> > defined in any packages called in the preamble of the current project
> > documents.
> >
> > Any hints will be highly appreciated.
>
> Try M-x pabbrev-mode
>
> It will capture words in many buffers and use such for completion.

If I type a command used in the TeX document for the first time, in
this case, it does not appear in any buffers, but only in LaTeX
package definition files. I don't know if your above-mentioned method
applies to this situation also.

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] 7+ messages in thread

* Re: Autocompletion for partially typesetted stuff in auctex.
  2021-06-08  8:17   ` Hongyi Zhao
@ 2021-06-08 14:29     ` Jean Louis
  2021-06-08 15:42       ` Hongyi Zhao
  2021-06-12  3:07     ` Jean Louis
  1 sibling, 1 reply; 7+ messages in thread
From: Jean Louis @ 2021-06-08 14:29 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

* Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 11:18]:
> If I type a command used in the TeX document for the first time, in
> this case, it does not appear in any buffers, but only in LaTeX
> package definition files. I don't know if your above-mentioned method
> applies to this situation also.

I cannot know, what I know is that it applies in almost any buffer. I
just use TAB so much more to complete.

-- 
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] 7+ messages in thread

* Re: Autocompletion for partially typesetted stuff in auctex.
  2021-06-08 14:29     ` Jean Louis
@ 2021-06-08 15:42       ` Hongyi Zhao
  0 siblings, 0 replies; 7+ messages in thread
From: Hongyi Zhao @ 2021-06-08 15:42 UTC (permalink / raw)
  To: Hongyi Zhao, help-gnu-emacs

On Tue, Jun 8, 2021 at 10:31 PM Jean Louis <bugs@gnu.support> wrote:
>
> * Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 11:18]:
> > If I type a command used in the TeX document for the first time, in
> > this case, it does not appear in any buffers, but only in LaTeX
> > package definition files. I don't know if your above-mentioned method
> > applies to this situation also.
>
> I cannot know, what I know is that it applies in almost any buffer. I
> just use TAB so much more to complete.

I rechecked its documentation located at here
<https://www.gnu.org/software/auctex/manual/auctex.pdf>, and it seems
that it really can do the thing I mentioned above and even more can be
done. Below are some relevant descriptions:

<quote>
5.3 Automatic Parsing of TEX Files
[...]
TeX-parse-self Parse file after loading it if no style hook is found
for it. [User Option]
TeX-auto-save Automatically save style information when saving the
buffer. [User Option]
[...]
;; Only parse LaTeX class and package information.
(setq-default TeX-auto-regexp-list ’LaTeX-auto-minimal-regexp-list)
;; The class and package information is usually near the beginning.
(setq-default TeX-auto-parse-length 2000)
</quote>

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] 7+ messages in thread

* Re: Autocompletion for partially typesetted stuff in auctex.
  2021-06-08  8:17   ` Hongyi Zhao
  2021-06-08 14:29     ` Jean Louis
@ 2021-06-12  3:07     ` Jean Louis
  2021-06-12  8:14       ` Hongyi Zhao
  1 sibling, 1 reply; 7+ messages in thread
From: Jean Louis @ 2021-06-12  3:07 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

* Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 11:18]:
> On Tue, Jun 8, 2021 at 3:21 PM Jean Louis <bugs@gnu.support> wrote:
> >
> > * Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 07:41]:
> > > The following description is an excerpt from
> > > <https://www.gnu.org/software/auctex/features.html>:
> > >
> > >   There is a completion mechanism for partially written macros
> > > available as well.
> > >
> > > But I want to know if it can help to complete the commands/macro names
> > > defined in any packages called in the preamble of the current project
> > > documents.
> > >
> > > Any hints will be highly appreciated.
> >
> > Try M-x pabbrev-mode
> >
> > It will capture words in many buffers and use such for completion.
> 
> If I type a command used in the TeX document for the first time, in
> this case, it does not appear in any buffers, but only in LaTeX
> package definition files. I don't know if your above-mentioned method
> applies to this situation also.

Please see Emacs package `auctex' and the manual section below:
(info "(auctex) Completion")

As that will give you wanted completion.

Do you use `auctex'?

-- 
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] 7+ messages in thread

* Re: Autocompletion for partially typesetted stuff in auctex.
  2021-06-12  3:07     ` Jean Louis
@ 2021-06-12  8:14       ` Hongyi Zhao
  0 siblings, 0 replies; 7+ messages in thread
From: Hongyi Zhao @ 2021-06-12  8:14 UTC (permalink / raw)
  To: Hongyi Zhao, help-gnu-emacs

On Sat, Jun 12, 2021 at 11:41 AM Jean Louis <bugs@gnu.support> wrote:
>
> * Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 11:18]:
> > On Tue, Jun 8, 2021 at 3:21 PM Jean Louis <bugs@gnu.support> wrote:
> > >
> > > * Hongyi Zhao <hongyi.zhao@gmail.com> [2021-06-08 07:41]:
> > > > The following description is an excerpt from
> > > > <https://www.gnu.org/software/auctex/features.html>:
> > > >
> > > >   There is a completion mechanism for partially written macros
> > > > available as well.
> > > >
> > > > But I want to know if it can help to complete the commands/macro names
> > > > defined in any packages called in the preamble of the current project
> > > > documents.
> > > >
> > > > Any hints will be highly appreciated.
> > >
> > > Try M-x pabbrev-mode
> > >
> > > It will capture words in many buffers and use such for completion.
> >
> > If I type a command used in the TeX document for the first time, in
> > this case, it does not appear in any buffers, but only in LaTeX
> > package definition files. I don't know if your above-mentioned method
> > applies to this situation also.
>
> Please see Emacs package `auctex' and the manual section below:
> (info "(auctex) Completion")
>
> As that will give you wanted completion.
>
> Do you use `auctex'?

I just plain to switch from other TeX editors currently used by me,
say, `TeXstudio', to `auctex'.

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] 7+ messages in thread

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-08  4:40 Autocompletion for partially typesetted stuff in auctex Hongyi Zhao
2021-06-08  7:18 ` Jean Louis
2021-06-08  8:17   ` Hongyi Zhao
2021-06-08 14:29     ` Jean Louis
2021-06-08 15:42       ` Hongyi Zhao
2021-06-12  3:07     ` Jean Louis
2021-06-12  8:14       ` Hongyi Zhao

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