all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Insert one of the flags automatically with tab completion.
@ 2021-10-23  5:07 Hongyi Zhao
  2021-10-23  6:10 ` Hongyi Zhao
  0 siblings, 1 reply; 9+ messages in thread
From: Hongyi Zhao @ 2021-10-23  5:07 UTC (permalink / raw)
  To: help-gnu-emacs

I noticed the following function defined here[1]:

(defun pw-ATOMIC_POSITIONS ()
  (interactive)
  (let ((flag (read-string "Flags: { alat | bohr | angstrom | crystal
| crystal_sg } ")))
    (insert "ATOMIC_POSITIONS " flag))
  (newline 1)
  )

The above function can only prompt the user to insert one of the flags
manually. But I want to insert one of the flags automatically with tab
completion. Any hints for achieving this enhancement?

[1] https://github.com/QEF/q-e/blob/03a7fa640903173662b24e4c30e520c9beaba16d/GUI/QE-modes/qe-modes/qe-funcs.el#L1966

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

end of thread, other threads:[~2021-10-26  5:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-23  5:07 Insert one of the flags automatically with tab completion Hongyi Zhao
2021-10-23  6:10 ` Hongyi Zhao
2021-10-23 19:23   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 14:50     ` Hongyi Zhao
2021-10-24 15:09       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26  2:38         ` Hongyi Zhao
2021-10-26  5:14           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26  5:22             ` Hongyi Zhao
2021-10-24 14:53     ` Hongyi Zhao

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.