Giter Site home page Giter Site logo

posframe's Introduction

Pop a posframe (just a frame) at point

GNU ELPA GNU-devel ELPA MELPA

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?

./snapshots/posframe-1.png

Installation

(require 'posframe)

Usage

Create a posframe

Simple way

(when (posframe-workable-p)
  (posframe-show " *my-posframe-buffer*"
                 :string "This is a test"
                 :position (point)))

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)))

Arguments

C-h f posframe-show

Hide a posframe

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

Hide all posframes

M-x posframe-hide-all

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*")
        

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.

posframe-arghandler

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

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)

posframe's People

Contributors

tumashu avatar stepnem avatar dgutov avatar tarsius avatar taquangtrung avatar conao3 avatar aaronjensen avatar manateelazycat avatar tttuuu888 avatar randomwangran avatar akirak avatar treymerkley avatar declantsien avatar ericdallo avatar yyoncho avatar jjpandari avatar kiennq avatar hexmode avatar tsuu32 avatar nofmysfk avatar raxod502 avatar yangsheng6810 avatar celeritascelery avatar wuubolin avatar jingqi avatar defaultxr avatar yqrashawn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.