* Emacs Bluetooth Mode

  This package provides a simple Bluetooth mode that can be used to manage
  Bluetooth devices on GNU/Linux using GNU Emacs.

  Implemented features are:
  - (un-)pairing devices
  - (dis-)connecting devices or single profiles of devices
  - discovery mode
  - setting device properties (alias, blocked, trusted)
  - setting adapter properties (powered, discoverable, pairable)
  - showing device information (alias, address, RSSI, class, services)
  - Imenu integration

  The implementation is based on the Bluez DBus interface (see
  [[https://www.bluez.org]]).

** Usage

   To install it, invoke =M-x package-install-file= on  =bluetooth.el=
   and then  use it with =M-x bluetooth-list-devices=.

   The mode assumes availability of Bluez on D-Bus.  Depending on the system
   configuration, Bluez may use the =:system= bus or the =:session= bus.  This
   can be configured by using =M-x customize= to set the =bluetooth-bluez-bus=
   variable in the =Communication/Bluetooth= menu to either the symbol
   =:system= or =:session=, as appropriate.

*** Key bindings

    The following table lists the default key bindings:
    | Key         | Command                                                                                                |
    |-------------+--------------------------------------------------------------------------------------------------------|
    | P           | pair with a device                                                                                     |
    | c           | connect to a device (may start pairing procedure); with a prefix argument, connect to a single profile |
    | d           | disconnect a device; with a prefix argument, disconnect a single profile                               |
    | a           | set or reset a device's alias                                                                          |
    | t           | toggle the trusted property of a device                                                                |
    | b           | toggle the blocked property of a device (disconnects connected device)                                 |
    | k           | remove a device (will disconnect and unpair)                                                           |
    | i           | show device information, such as RSSI value, device class and services                                 |
    | A           | show host adapter information                                                                          |
    | r           | start discovery (scan) mode                                                                            |
    | R           | stop discovery (scan) mode                                                                             |
    | D           | toggle the discoverable property of the adapter                                                        |
    | x           | toggle the pairable property of the adapter                                                            |
    | s           | toggle the power supply of the adapter                                                                 |
    | n           | next line                                                                                              |
    | p           | previous line                                                                                          |
    | <           | go to the beginning of the list                                                                        |
    | >           | go to the end of the list                                                                              |
    | g           | revert the buffer; this queries the bus for accessible devices                                         |
    | S           | sort list by column at point                                                                           |
    | h or ?      | describe the mode                                                                                      |
    | q           | bury the buffer                                                                                        |
    | =M-x imenu= | invoke imenu to select a device                                                                        |

*** Notes

    - Discoverable mode is usually deactivated after 3 minutes, as configured
      in the =bluetoothd= configuration file (e.g. =/etc/bluetooth/main.conf=.)
    - Blocking a connected device will disconnect it.
    - If a device is trusted, authorisation of services is not required when
      connecting; devices are not trusted automatically.
    - Adapter commands always use the first adapter found in the system
      (i.e. reported by Bluez.)
