From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Emanuel Berg <moasenwood@zoho.eu>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Embedded list selection with ido-completing-read.
Date: Sun, 24 Oct 2021 11:11:16 +0800 [thread overview]
Message-ID: <CAGP6POL8a=fu3m7Z=_GkaMBimDeRP-h4skZ0sJZHo2CNcfVPWQ@mail.gmail.com> (raw)
In-Reply-To: <CAGP6POKSxohmczDny3DfnvOLjLGHxvy82nG19yvTrd37y48rjA@mail.gmail.com>
On Sun, Oct 24, 2021 at 10:28 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> BTW, my ultimate purpose it to implement the in-buffer company-mode
> [1] completion support for QE-modes [2], which is the main reason why
> I ask this question. And I’ve got some useful advice here [3-5].
>
> [1] https://github.com/company-mode/company-mode
> [2] http://pwtk.ijs.si/qe-modes.html
> [3] https://github.com/company-mode/company-mode/discussions/1247#discussioncomment-1525332
> [4] https://github.com/company-mode/company-mode/blob/master/CONTRIBUTING.md#guidelines-for-third-party-packages
> [5] https://github.com/company-mode/company-mode/blob/master/CONTRIBUTING.md#backend-integration
>
> It seems that I still have a long way to go to achieve this goal.
I describe the outline of my final goal as follows [1]:
The ultimate purpose of [`QE-modes`](http://pwtk.ijs.si/qe-modes.html)
package is to facilitate the generation of [`Quantum
ESPRESSO`](http://www.quantum-espresso.org/) input files. Therefore,
the content to be automatically completed here may not be the same as
ordinary automatic completion. Let me use [the following
example](https://github.com/QEF/q-e/blob/master/test-suite/cp_h2o/h2o-mt-blyp-1.in)
to illustrate some of the technical difficulties that need to be
resolved.
```
&control
title = ' Water Molecule ',
calculation = 'cp',
restart_mode = 'from_scratch',
ndr = 51,
ndw = 51,
nstep = 100,
iprint = 100,
isave = 100,
tstress = .TRUE.,
tprnfor = .TRUE.,
dt = 5.0d0,
etot_conv_thr = 1.d-9,
ekin_conv_thr = 1.d-4,
prefix = 'h2o'
verbosity = 'medium'
/
&system
ibrav = 14,
ce
celldm(1) = 12.0,
celldm(2) = 1.0,
celldm(3) = 1.0,
celldm(4) = 0.0,
celldm(5) = 0.0,
celldm(6) = 0.0,
nat = 3,
ntyp = 2,
nbnd = 4,
ecutwfc = 80.0,
/
&electrons
emass = 400.d0,
emass_cutoff = 2.5d0,
electron_dynamics = 'damp',
electron_damping = 0.2
/
&ions
orthogonalization = 'ortho',
ion_dynamics = 'none',
ion_radius(1) = 0.8d0,
ion_radius(2) = 0.8d0,
/
ATOMIC_SPECIES
O 16.0d0 O.blyp-mt.UPF
H 1.00d0 H.blyp-vbc.UPF
ATOMIC_POSITIONS (bohr)
O 0.0099 0.0099 0.0000 0 0 0
H 1.8325 -0.2243 -0.0001 1 1 1
H -0.2243 1.8325 0.0002 1 1 1
```
The input file specification of the above example is located
[here](https://www.quantum-espresso.org/Doc/INPUT_CP.html). The main
problems I want to solve are:
1. When I try to input one namelist, hinting all possible namelists at
the point with drop-down frame; once I select the namelist, say,
`&CONTROL`, then insert it corresponding to the specification as
follows, and put the point in the middle of it, denoted by `|`:
```
&control
|
/
```
2. When I try to input one CARD, hinting all possible CARDs at the
point with drop-down frame; once I select the CARD, say,
`ATOMIC_SPECIES`, then insert it corresponding to the specification as
follows, and put the point in the middle of it, denoted by `|`:
```
ATOMIC_SPECIES
|
```
3. When I try to input one variable with the point located in certain
namelist, hinting all possible variables belonging to the given
namelist at the point with drop-down frame. Say, for the namelist
`&control`, only [the following
variables](https://www.quantum-espresso.org/Doc/INPUT_CP.html#idm4)
should be used to construct the candidates list:
` calculation | title | verbosity | isave | restart_mode | nstep |
iprint | tstress | tprnfor | dt | outdir | saverho | prefix | ndr |
ndw | tabps | max_seconds | etot_conv_thr | forc_conv_thr |
ekin_conv_thr | disk_io | memory | pseudo_dir | tefield `
4. After I have completed an input of one CARD, inserting an example
usage of the CARD, say, the following one:
```
ATOMIC_POSITIONS (bohr)
O 0.0099 0.0099 0.0000 0 0 0
```
[1] https://github.com/company-mode/company-mode/discussions/1247#discussioncomment-1526576
HZ
next prev parent reply other threads:[~2021-10-24 3:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-23 7:33 Embedded list selection with ido-completing-read Hongyi Zhao
2021-10-23 8:43 ` Hongyi Zhao
2021-10-23 19:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 0:28 ` Hongyi Zhao
2021-10-24 1:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 2:28 ` Hongyi Zhao
2021-10-24 3:11 ` Hongyi Zhao [this message]
2021-10-24 3:21 ` Hongyi Zhao
2021-10-24 5:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 5:36 ` Hongyi Zhao
2021-10-24 5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 6:57 ` Hongyi Zhao
2021-10-24 7:00 ` Hongyi Zhao
2021-10-24 9:42 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 15:05 ` Hongyi Zhao
2021-10-24 15:12 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 15:18 ` Hongyi Zhao
2021-10-24 15:25 ` Hongyi Zhao
2021-10-24 17:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 17:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 15:21 ` Hongyi Zhao
2021-10-24 16:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 2:52 ` Hongyi Zhao
2021-10-26 5:19 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 8:44 ` Hongyi Zhao
2021-10-26 11:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 12:31 ` Hongyi Zhao
2021-10-26 12:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 12:55 ` Hongyi Zhao
2021-10-26 13:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 14:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 15:07 ` Hongyi Zhao
2021-10-26 22:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGP6POL8a=fu3m7Z=_GkaMBimDeRP-h4skZ0sJZHo2CNcfVPWQ@mail.gmail.com' \
--to=hongyi.zhao@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.