Skip to content

KarimAziev/momentary-popup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

momentary-popup

The package provides functions similar to momentary-string-display but inside popup windows.

Installation

Download the repository and add it to your load-path.

(add-to-list 'load-path "/path/to/momentary-popup/")

(require 'momentary-popup)

(define-key momentary-popup-switch-keymap (kbd "C-c C-o") 'momentary-popup-open-inspector)

Or with use-package and straight-use-package:

(use-package momentary-popup
 :straight (:repo "KarimAziev/momentary-popup" :type git :host github)
 :hook ((momentary-popup-mode . visual-line-mode)
        (momentary-popup-inspect-mode . visual-line-mode))
 :bind ((:map momentary-popup-switch-keymap
              ("C-c o" . momentary-popup-open-inspector))
        (:map momentary-popup-inspect-keymap
              ("C-c C-o" . momentary-popup-maybe-find-file))))

Main functions and commands:

  • momentary-popup (content &rest setup-args)

Momentarily display CONTENT in popup window.

Display remains until next event is input.

To persist popup type key binding from momentary-popup-switch-keymap for command momentary-popup-open-inspector (by default (kbd “C-c C-o”) and (kbd “C-c o”)).

SETUP-ARGS can includes keymaps, syntax table, filename and function.

  • momentary-popup-file (file)

Momentarily display content of the FILE in popup window.

Display remains until next event is input.

  • momentary-popup-open-inspector

Open or restore popup in a buffer `momentary-popup-inspect-buffer-name’.

Keymaps:

  • momentary-popup-switch-keymap

Keymap with commands to execute just before quiting momentary popup. Defaults:

Default KeyCommand
C-c C-oopen content in inspect buffer
  • momentary-popup-inspect-keymap Inspect buffer uses momentary-popup-inspect-keymap with next defaults:
Default KeyCommand
C-c C-ofind existing file from setup args
C-x 0kill inspect buffer
qif inspect buffer is readonly kill it, else it self-insert-command

Keymap with commands to execute just before quiting momentary popup. Defaults:

About

Display momentary popup in emacs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published