GNU-devel ELPA - posframe

posframe

Description
Pop a posframe (just a frame) at point
Latest
posframe-1.1.7.0.20220124.85925.tar, 2022-Jan-24, 140 KiB
Maintainer
Feng Shu <tumashu@163.com>
Website
https://github.com/tumashu/posframe
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package, run in Emacs:

M-x package-install RET posframe RET

Full description

GNU ELPA GNU-devel ELPA MELPA

1 What is posframe?

Posframe can pop up a frame at point, this posframe is a child-frame connected to its root window's buffer.

The main advantages are:

  1. It is fast enough for daily usage :-)
  2. It works well with CJK languages.

NOTE:

  1. For MacOS users, posframe needs Emacs version >= 26.0.91
  2. GNOME users with GTK3 builds need Emacs 27 or later. See variable `posframe-gtk-resize-child-frames' which auto-detects this configuration.

    More details:

    1. Fix some problems with moving and resizing child frames
    2. Emacs's set-frame-size can not work well with gnome-shell?

posframe-1.png

2 Installation

(require 'posframe)

3 Usage

3.1 Create a posframe

3.1.1 Simple way
(when (posframe-workable-p)
  (posframe-show " *my-posframe-buffer*"
                 :string "This is a test"
                 :position (point)))
3.1.2 Advanced way
(defvar my-posframe-buffer " *my-posframe-buffer*")

(with-current-buffer (get-buffer-create my-posframe-buffer)
  (erase-buffer)
  (insert "Hello world"))

(when (posframe-workable-p)
  (posframe-show my-posframe-buffer
                 :position (point)))
3.1.3 Arguments
C-h f posframe-show

3.2 Hide a posframe

(posframe-hide " *my-posframe-buffer*")

3.3 Hide all posframes

M-x posframe-hide-all

3.4 Delete a posframe

  1. Delete posframe and its buffer

    (posframe-delete " *my-posframe-buffer*")
    
  2. Only delete the frame

    (posframe-delete-frame " *my-posframe-buffer*")
    

3.5 Delete all posframes

M-x posframe-delete-all

Note: this command will delete all posframe buffers. You probably shouldn't use it if you are sharing a buffer between posframe and other packages.

3.6 posframe-arghandler

posframe-arghandler feature has been removed from posframe-1.1, user can use advice feature instead.

3.7 Mouse banish

Default setting will work well in most case, but for EXWM user, suggest use the below config.

(setq posframe-mouse-banish-function #'posframe-mouse-banish-simple)

Old versions

posframe-1.1.6.0.20220110.42242.tar.lz2022-Jan-1076.3 KiB
posframe-1.1.5.0.20220107.235001.tar.lz2022-Jan-0876.2 KiB
posframe-1.1.4.0.20220107.130709.tar.lz2022-Jan-0776.3 KiB
posframe-1.1.2.0.20211221.85736.tar.lz2021-Dec-2176.0 KiB
posframe-1.0.4.0.20211103.93619.tar.lz2021-Nov-0375.8 KiB
posframe-1.0.3.0.20210604.64715.tar.lz2021-Jun-0475.6 KiB
posframe-1.0.2.0.20210423.22014.tar.lz2021-Apr-2375.4 KiB
posframe-1.0.0.0.20210410.52855.tar.lz2021-Apr-1075.4 KiB
posframe-0.9.0.0.20210409.62740.tar.lz2021-Apr-0975.4 KiB
posframe-0.8.8.0.20210311.93757.tar.lz2021-Mar-1174.6 KiB