Sorry,
I found the real situation that  cause by  this function:
  (shell-command "ibus engine xkb:us::eng English")
to result  issue 2 after test again.
It change gnome's keyboard setting of <MENU> key.

For issue 2, it seem due to xwayland server problem,  from cmd line return message:
 'WARNING: Running setxkbmap against an XWayland server'
I added extra line to cover this, it was solved:
         (shell-command "xkbcomp ~/.config/xkb/myxkb_keymap.xkb $DISPLAY")

so issue 2  of  last mail is cause by gnome's version change, not emacs or hydra.
my previous thought and test is not good enough.

than this report letter will only one issue of when gnome resuem from power standby,
foregrond-color setting became to reset to origin color: white.


send from Kevin

Jiang, xia jiang <aiselcce@outlook.com> 於 2023年2月7日 週二 上午4:06寫道:
--text follows this line--

Hi,
1.
I found foreground color reset to origin value,
if re-active moniter after powersaving dimed screen and moniter poweroff than it became stadby mode.
because i have a simple function used when i feel font too bright,
than i press the hotkey to made font darker:
(defun fctest ()
  "For font color changing only."
  (interactive)
  (set-foreground-color "grey72")
  )
but after resume to system, font in emacs became previous status again.
so reported this situation.
Could anyone know this issue due to gnome or emacs?


2.
I found my function of shell cmd in package hydra could make gnome's keyboard disfunction.
i used gnome-tweak to set  <RWIN> to level3:ISO_Level3_Shift , <MENU> to level5:ISO_Level5_Latch key,
but if  i executed such hydra function below,  it will cause keysetting of gnome broken not only in emacs,
the keysetting of  level5 key <MENU> resume to origin <MENU>  key funciton in gnome :
 ;; tested in emacs -q , loaded  hydra
 ;; == hydra start == 
  (defhydra hydra-wl-key (:color pink
                  :hint nil
                  :pre (my-shell-command-to-ascii)
                  :post (my-shell-command-to-inputm)
                  :idle 4
                  :timeout 0.7
                  )

    ("C-q" nil nil)
    )
  (global-set-key (kbd "<f12>") #'hydra-wl-key/body)

  (defun my-shell-command-to-ascii ()
    "with ibus cmd, toggle input method when needed"
    (let ((inhibit-message t))
      (shell-command "ibus engine xkb:us::eng English 2&> /dev/null")
      ))
  (defun my-shell-command-to-inputm ()
    "with ibus cmd, toggle input method when needed"
    (let ((inhibit-message t))
      (shell-command "ibus engine rime - Rime 2>& /dev/null")
      ))
 ;; == hydra end ==

the function in :pre and :post  is because  i know when i pressed some keybinding,
i must not need to use ibus to input Chinese, so i used shell cmd to turn off ibus input,
after hydra fuction done,  used shell cmd  go back to origin status.

just recently this function work normally in emacs 29.05
but when i reinstall arch linux and install emacs 29.06 (source file of 29.05 also missed, i can't tested) ,
this issue happend.

Could anyone know how to solved this situation?

Thans before.

send from Kevin

In GNU Emacs 29.0.60 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.17.6) of 2023-02-05 built on lpc
Repository revision: b40a929a3f238d48213c75f6a7613cdeaec14686
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Arch Linux
GNOME 43.2 xwayland

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM
XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8

Major mode: ELisp

Minor modes in effect:
  async-bytecomp-package-mode: t
  which-key-posframe-mode: t
  dimmer-mode: t
  default-text-scale-mode: t
  vertico-mode: t
  ivy-rich-mode: t
  counsel-mode: t
  recentf-mode: t
  ivy-mode: t
  winner-mode: t
  windmove-mode: t
  elisp-slime-nav-mode: t
  paredit-mode: t
  aggressive-indent-mode: t
  highlight-quoted-mode: t
  display-line-numbers-mode: t
  rainbow-delimiters-mode: t
  symbol-overlay-mode: t
  bug-reference-prog-mode: t
  goto-address-prog-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  global-anzu-mode: t
  anzu-mode: t
  company-box-mode: t
  global-company-mode: t
  company-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  flymake-mode: t
  savehist-mode: t
  electric-pair-mode: t
  delete-selection-mode: t
  global-auto-revert-mode: t
  global-so-long-mode: t
  mode-line-bell-mode: t
  global-page-break-lines-mode: t
  page-break-lines-mode: t
  whole-line-or-region-global-mode: t
  whole-line-or-region-local-mode: t
  hes-mode: t
  which-key-mode: t
  global-whitespace-cleanup-mode: t
  whitespace-cleanup-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  projectile-mode: t
  ipretty-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  auto-compile-mode: t
  immortal-scratch-mode: t
  server-mode: t
  diredfl-global-mode: t
  popper-echo-mode: t
  popper-mode: t
  marginalia-mode: t
  override-global-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  shell-dirtrack-mode: t
  display-time-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  hs-minor-mode: t

Load-path shadows:
/home/kevinfis/.emacs.d/elpa-29.0/opencc-20170722.816/opencc hides /home/kevinfis/.emacs.d/site-lisp/emacs-opencc/opencc
/home/kevinfis/.emacs.d/elpa-29.0/posframe-20221220.544/posframe hides /home/kevinfis/.emacs.d/site-lisp/sdcv/posframe
/home/kevinfis/.emacs.d/elpa-29.0/valign-3.1.1/valign hides /home/kevinfis/.emacs.d/site-lisp/valign.git/valign

Features:
(shadow sort mail-extr emacsbug ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util nroff-mode
mc-hide-unmatched-lines-mode mc-mark-more mc-cycle-cursors
multiple-cursors-core misearch multi-isearch misc avy crm tramp-archive
tramp-gvfs tramp-cache time-stamp zeroconf help-fns radix-tree cl-print
helm-rg helm-files image-dired image-dired-tags image-dired-external
image-dired-util helm-buffers helm-occur helm-tags helm-locate helm-grep
helm-regexp helm-utils helm-help helm-types esqlite pcsv sdcv opencc
metapost-mode+ helm helm-global-bindings helm-easymenu helm-core
async-bytecomp helm-source helm-multi-match helm-lib transpar
powerthesaurus request company-english-helper
company-english-helper-data company-graphviz-dot graphviz-dot-mode
load-theme-buffer-local move-dup flycheck-aspell fanyi fanyi-longman
fanyi-etymon fanyi-youdao-thesaurus fanyi-haici chart fanyi-base
which-key-posframe youdao-dictionary popup chinese-word-at-point
rainbow-mode tramp-sh tramp tramp-loaddefs trampver tramp-integration
tramp-compat ls-lisp em-unix em-term term ehelp em-script em-prompt
em-ls em-hist em-pred em-glob em-extpipe em-cmpl em-dirs esh-var
em-basic em-banner em-alias esh-mode eshell esh-cmd esh-ext esh-opt
esh-proc esh-io esh-arg esh-module esh-groups esh-util files-x posframe
mule-util embark-consult consult-vertico consult bookmark embark-org
embark ffap dired-subtree dired-hacks-utils cus-edit cus-start cus-load
dimmer face-remap default-text-scale orderless vertico ivy-rich counsel
swiper recentf tree-widget ivy ivy-faces ivy-overlay colir winner
windswap windmove org-download org-attach async diff-hl-dired sql view
cc-awk yaml-mode lua-mode sh-script smie executable
add-node-modules-path js c-ts-common slime-fancy slime-indentation
slime-cl-indent cl-indent slime-trace-dialog slime-fontifying-fu
slime-package-fu slime-references slime-compiler-notes-tree
slime-scratch slime-presentations bridge slime-macrostep slime-mdot-fu
slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-repl slime-parse slime apropos arc-mode archive-mode hyperspec
flymake-cc ggtags macrostep-c cmacexp macrostep checkdoc elisp-slime-nav
paredit aggressive-indent highlight-quoted package-lint-flymake
package-lint let-alist imenu finder hideshow display-line-numbers
rainbow-delimiters symbol-overlay vc-hg vc-bzr vc-src vc-sccs vc-svn
vc-cvs vc-rcs vc-git bug-reference goto-addr company-quickhelp pos-tip
anzu company-ispell ispell company-elisp company-abbrev
company-yasnippet company-box company-box-doc frame-local
company-box-icons company-oddmuse company-keywords company-etags etags
fileloop xref company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company yasnippet-snippets yasnippet
disp-table vc-darcs org-bullets image-file image-converter
flymake-flycheck flycheck flymake-proc flymake warnings org-indent
oc-basic org-element org-persist org-id org-refile avl-tree generator
ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum shr pixel-fill kinsoku url-file svg gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
nnoo parse-time gnus-spec gnus-int gnus-range message sendmail
yank-media rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util mail-utils range wid-edit ol-docview doc-view
image-mode exif ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi
org-link-doi tabify savehist elec-pair delsel autorevert filenotify
so-long mode-line-bell page-break-lines whole-line-or-region
highlight-escape-sequences which-key whitespace-cleanup-mode whitespace
diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode
projectile lisp-mnt grep compile text-property-search ibuf-ext ibuffer
ibuffer-loaddefs thingatpt jka-compr ipretty auto-compile
immortal-scratch uptimes server init init-local init-font-conf cl
define-word rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln
nxml-rap tagedit dash sgml-mode facemenu dom nxml-util nxml-enc xmltok
url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm puny amx s mybigword dictionary
dictionary-connection find-lisp dired-x man dired-aux diredfl dired
dired-loaddefs popper-echo popper marginalia hydra lv edmacro kmacro
general use-package-bind-key bind-key diminish undo-tree diff queue
use-package-diminish ob-lua ob-C cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-css ob-js
ob-lisp ob-awk org-tempo tempo ob-calc calc-store calc-trail calc-ext
calc calc-loaddefs rect calc-macs ob-sqlite ob-sql ob-shell shell
ob-ruby ob-python python project compat pcase treesit ob-plantuml
ob-octave ob-latex ob-gnuplot ob-dot ob-ditaa ob-R org-clock org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint
org-pcomplete pcomplete comint ansi-osc ring org-list org-footnote
org-faces org-entities time-date noutline outline icons ob-emacs-lisp
ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys
oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat
org-macs format-spec my-init-org time use-package-ensure
use-package-core cl-extra init-locales session
sanityinc-tomorrow-bright-theme color-theme-sanityinc-tomorrow color
init-direnv init-ledger init-dash init-folding init-misc
init-common-lisp init-clojure-cider init-clojure init-slime init-lisp
init-paredit init-docker init-yaml init-sql init-python reformatter
ansi-color init-http init-haml init-css init-html init-nxml init-org
init-php init-javascript easy-mmode init-csv init-markdown init-textile
init-crontab init-compile init-projectile init-github init-git
init-darcs init-vc init-whitespace init-editing-utils init-mmm mmm-auto
mmm-vars mmm-utils mmm-compat init-sessions desktop frameset
init-windows init-ivy init-company init-hippie-expand init-minibuffer
init-recentf init-eglot init-flymake init-ibuffer ibuf-macs
init-uniquify init-grep init-isearch init-dired init-gui-frames
init-osx-keys init-themes init-xterm init-frame-hooks init-exec-path
exec-path-from-shell init-elpa fullframe consult-eglot-autoloads
orderless-autoloads pcre2el-autoloads lua-mode-autoloads
dimmer-autoloads switch-window-autoloads unfill-autoloads
auto-compile-autoloads package-lint-flymake-autoloads
symbol-overlay-autoloads restclient-autoloads company-box-autoloads
crontab-mode-autoloads csv-mode-autoloads json-mode-autoloads rx
packed-autoloads mmm-mode-autoloads popper-autoloads
which-key-posframe-autoloads info-colors-autoloads sqlformat-autoloads
color-theme-sanityinc-tomorrow-autoloads reformatter-autoloads
coffee-mode-autoloads expand-region-autoloads envrc-autoloads
textile-mode-autoloads smarty-mode-autoloads prettier-js-autoloads
paredit-autoloads org-ref-autoloads hydra-autoloads
company-quickhelp-autoloads package-lint-autoloads frame-local-autoloads
multiple-cursors-autoloads undo-fu-autoloads alert-autoloads
which-key-autoloads cljsbuild-mode-autoloads
exec-path-from-shell-autoloads consult-flycheck-autoloads
php-mode-autoloads js-comint-autoloads elpa-mirror-autoloads
helm-autoloads helm-core-autoloads xref-js2-autoloads
gnu-elpa-keyring-update-autoloads rime-autoloads beacon-autoloads
valign-autoloads citeproc-autoloads string-inflection-autoloads
js2-mode-autoloads ibuffer-vc-autoloads slime-autoloads
macrostep-autoloads docker-compose-mode-autoloads yaml-mode-autoloads
dired-subtree-autoloads flymake-flycheck-autoloads
json-snatcher-autoloads ledger-mode-autoloads
color-theme-sanityinc-solarized-autoloads typescript-mode-autoloads
counsel-autoloads affe-autoloads company-autoloads
youdao-dictionary-autoloads pp names edebug debug backtrace help-mode
find-func names-autoloads advice chinese-word-at-point-autoloads
pos-tip-autoloads popup-autoloads vc-darcs-autoloads
dockerfile-mode-autoloads relint-autoloads marginalia-autoloads
embark-consult-autoloads consult-autoloads embark-autoloads
elein-autoloads flycheck-clojure-autoloads cider-autoloads
sesman-autoloads clojure-mode-autoloads finder-inf vertico-autoloads
rg-autoloads sudo-edit-autoloads git-link-autoloads fanyi-autoloads
forge-autoloads yaml-autoloads markdown-mode-autoloads magit-autoloads
git-commit-autoloads closql-autoloads emacsql-sqlite-autoloads
emacsql-autoloads ox-pandoc-autoloads ht-autoloads projectile-autoloads
aggressive-indent-autoloads bibtex-completion-autoloads biblio-autoloads
f-autoloads parsebib-autoloads posframe-autoloads with-editor-autoloads
ivy-yasnippet-autoloads yasnippet-autoloads ivy-autoloads
git-timemachine-autoloads org-download-autoloads async-autoloads
spinner-autoloads graphviz-dot-mode-autoloads parseedn-autoloads
parseclj-autoloads flycheck-autoloads pkg-info-autoloads epl-autoloads
diff-hl-autoloads request-autoloads magit-section-autoloads
avy-autoloads biblio-core-autoloads ghub-autoloads treepy-autoloads
gnuplot-autoloads docker-autoloads transient-autoloads compat-autoloads
tablist-autoloads s-autoloads info dash-autoloads aio-autoloads
diminish-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp
byte-compile url-vars init-site-lisp cl-seq init-utils init-benchmarking
cl-loaddefs cl-lib derived early-init rmc iso-transl tooltip cconv eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
emacs)

Memory information:
((conses 16 6172937 1050992)
 (symbols 48 90400 20)
 (strings 32 783059 241119)
 (string-bytes 1 17076427)
 (vectors 16 133218)
 (vector-slots 8 2523828 837110)
 (floats 8 2099 2048)
 (intervals 56 905622 2921)
 (buffers 976 61))