An open API service indexing awesome lists of open source software.

https://github.com/sav/emacs-pushbullet

Pushbullet client for Emacs: send notes, regions, clipboard and browse/manage pushes
https://github.com/sav/emacs-pushbullet

emacs pushbullet

Last synced: 4 months ago
JSON representation

Pushbullet client for Emacs: send notes, regions, clipboard and browse/manage pushes

Awesome Lists containing this project

README

          

#+TITLE: emacs-pushbullet

A comprehensive Pushbullet client for GNU Emacs that allows you to send and manage pushes directly from your editor.

* Features

- *Interactive UI*: Browse and manage your pushes in a dedicated Emacs buffer
- *Send Notes*: Send text notes to Pushbullet with custom titles
- *Region Pushing*: Push selected text regions to your devices
- *Clipboard Integration*: Send clipboard contents to Pushbullet
- *Pagination Support*: Load multiple pages of pushes efficiently
- *Export*: Export Pushes to Org-Mode

* Installation

** Using straight.el

#+BEGIN_SRC elisp
(use-package pushbullet
:straight (:type git :host github :repo "sav/emacs-pushbullet"))
#+END_SRC

** Using Doom Emacs

#+BEGIN_SRC elisp
(package! pushbullet :recipe (:host github :repo "sav/emacs-pushbullet"))
#+END_SRC

** Manual Installation

1. Clone this repository:
#+BEGIN_SRC bash
git clone https://github.com/sav/emacs-pushbullet.git
#+END_SRC

2. Add the following to your =~/.emacs.d/init.el=:
#+BEGIN_SRC elisp
(add-to-list 'load-path "~/path/to/emacs-pushbullet")
(require 'pushbullet)
#+END_SRC

* Configuration

** Required Setup

1. Get your Pushbullet API token:
- Go to https://www.pushbullet.com/#settings/account
- Copy your "Access Token"

2. Configure the token in Emacs:
#+BEGIN_SRC elisp
(setq pushbullet-api-token "your-api-token-here")
#+END_SRC
Or use =M-x customize-variable RET pushbullet-api-token=

3. Alternatively, just add an entry for `pushbullet.com` (lower-case) in your `.authinfo.gpg`:
#+BEGIN_SRC authinfo
machine pushbullet.com password "your-api-token-here"
#+END_SRC

** Optional Configuration

#+BEGIN_SRC elisp
;; Number of pushes to fetch per request
(setq pushbullet-api-limit 50)

;; Default title for pushes
(setq pushbullet-default-title "My Emacs")

;; Maximum columns for text wrapping
(setq pushbullet-columns 100)

;; Enable debug logging (default: nil)
(setq pushbullet-debug t
pushbullet-api-debug t)
#+END_SRC

* Usage

** Interactive Commands

| Command | Description |
|----------------------------+----------------------------------------------------------------------+
| =M-x pushbullet= | Opens or switches to the main Pushbullet UI buffer. |
| =M-x pushbullet-send= | Prompts for a title and text to send a new note push. |
| =M-x pushbullet-send-text= | Prompts for text to send a new note push, using a default title. |
| =M-x pushbullet-region= | Sends the active region's content as a note push. |
| =M-x pushbullet-yank= | Sends the latest kill-ring entry (clipboard content) as a note push. |
| =M-x pushbullet-export= | Exports currently fetched pushes to an Org-mode buffer. |

** Key Bindings in Pushbullet Buffer

| Key | Function |
|-----------|--------------------------------------------|
| =C-c C-u= | Fetch more pushes. |
| =C-c C-e= | Export pushes to Org-mode. |
| =C-c C-o= | Open a URL at the current cursor position. |
| =q= | Close the Pushbullet buffer. |

** Examples

*** Open the Interactive UI
#+BEGIN_SRC elisp
(pushbullet) ; Opens the main Pushbullet buffer
#+END_SRC

*** Send a Quick Note
#+BEGIN_SRC elisp
(pushbullet-send "Meeting Reminder" "Don't forget the team meeting at 3 PM")
#+END_SRC

*** Send Selected Text
1. Select a region in any buffer
2. Run =M-x pushbullet-region=
3. The selected text will be sent with the buffer name as the title

*** Send Clipboard Contents
#+BEGIN_SRC elisp
(pushbullet-yank) ; Sends current kill-ring contents
#+END_SRC

* API Reference

** Customization Variables

*** =pushbullet-api-token=
Your Pushbullet API access token (required).

*** =pushbullet-api-limit=
Number of pushes to fetch per request (default: =20=).

*** =pushbullet-default-title=
Default title for pushes (default: ="GNU Emacs "=).

*** =pushbullet-columns=
Maximum columns for text wrapping (default: =70=).

*** =pushbullet-show-send-forms=
Whether to display the send form in the Pushbullet UI (default: =t=).

*** =pushbullet-debug=
Enable debug logging (default: =nil=).

*** =pushbullet-api-debug=
Enable debug logging for the API requests (default: =nil=).

** Interactive Functions

*** =(pushbullet)=
Open the Pushbullet application buffer.

*** =(pushbullet-send title body &optional url)=
Send a note to Pushbullet using the given title, message body, and, optionally, a URL.

*** =(pushbullet-send-text text)=
Send a note with the default title and specified text.

*** =(pushbullet-region start end)=
Push the selected region to Pushbullet. The buffer name is used as the title.

*** =(pushbullet-yank)=
Push the current kill-ring (clipboard) contents to Pushbullet.

*** =(pushbullet-export)=
Export the list of Pushes to Org-Mode.

* Dependencies

This package requires the following packages:
- =emacs= ~(>= 29.1)~
- =all-the-icons= ~(>= 5.0.0)~
- =request= ~(>= 0.3.3)~
- =json= ~(>= 1.5)~
- =auth-source= ~(>= 2.3.1)~

* License

This project is licensed under the GNU General Public License v3.0 - see the [[file:LICENSE][LICENSE]] file for details.

* Version

Current version: 1.0.1

* Changelog

** 1.0.1
- New UI with new features and a form for submitting pushes
- Deletion of a single push or all pushes at once
- Export pushes to Org-Mode
- Show image and files URLs

** 1.0.0
- Initial release
- Basic push sending functionality
- Interactive Buffer
- Region and clipboard integration
- Pagination support