help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Insert one of the flags automatically with tab completion.


From: Hongyi Zhao
Subject: Insert one of the flags automatically with tab completion.
Date: Sat, 23 Oct 2021 13:07:06 +0800

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]