Code Monkey home page Code Monkey logo

casual-bookmarks's Introduction

https://melpa.org/packages/casual-bookmarks-badge.svg

Casual Bookmarks

An opinionated Transient-based porcelain for the Emacs Bookmark list.

docs/images/casual-bookmarks-screenshot.png

Motivation

While highly functional, the Emacs bookmark list (list-bookmarks) has a steep learning curve as it has a very diverse command set. Menus are a user interface (UI) affordance that offer users discoverability and recall that can lower its learning curve. While menus are commonly associated with mouse-driven UI, the inclusion of Transient in Emacs core allows for a menu UI that is keyboard-driven. Casual Bookmarks endeavors to offer this as many Emacs users prefer keyboard-driven workflows.

Goals

  • To provide a keyboard-driven menu UI for editing bookmarks.
  • To provide casual access to the Bookmark list command set.

Non-Goals

  • Full coverage of all bookmark list commands. Casual Bookmarks is not intended to be a power user tool.
  • Strict adherence to bookmark list command naming. While Casual Bookmarks is mostly in alignment with bookmark list command naming, there are cases where it will make an opinionated change if the name is deemed too vague or idiomatic.
  • UX Stability (for now). Given that Casual Bookmarks is early in its life-cycle, expect changes to its user experience in terms of menu hierarchy and keybinding choices in future releases.

Requirements

Casual Bookmarks has been verified with the following configuration.

  • Emacs 29.4 (macOS 14.5, Ubuntu Linux 22.04.4 LTS)

Asks

As Casual Bookmarks is new, we are looking for early adopters! Your feedback is welcome as it will likely impact Casual Bookmarks’s evolution, particularly with regards to UI.

Install

If installed via MELPA then add these lines to your Emacs initialization file with your binding of preference.

(require 'casual-bookmarks) ;; optional
(keymap-set bookmark-bmenu-mode-map "C-o" #'casual-bookmarks-tmenu)

If you use use-package, here is the recipe for installing it.

(require 'bookmarks)
(use-package casual-bookmarks
  :ensure t
  :bind (:map bookmark-bmenu-mode-map
              ("C-o" . casual-bookmarks-tmenu)))

Casual requires Emacs 29.1+.

Configuration

Use these keybindings to configure bookmark list to be consistent with keybindings used by Casual Bookmarks.

(keymap-set bookmark-bmenu-mode-map "J" #'bookmark-jump)

Casual Bookmarks also includes the keymap casual-bookmarks-main-menu which inserts a Bookmarks menu into the main menu bar as shown below.

docs/images/bookmarks-main-menu.png

To enable this, add the following configuration to your initialization file.

(easy-menu-add-item global-map '(menu-bar)
                    casual-bookmarks-main-menu
                    "Tools")

While not necessary, having the current bookmark highlighted is convenient. Enable hl-line-mode for the bookmark list as shown below.

(require 'hl-line)
(add-hook 'bookmark-bmenu-mode-hook #'hl-line-mode)

Finally, customize the variable bookmark-save-flag to the value 1 to ensure that your bookmark changes are always saved.

The above guidance largely extends the work done in the blog post Using Bookmarks in Emacs like you do in Web Browsers.

Usage

Unicode Symbol Support

docs/images/casual-bookmarks-unicode-screenshot.png

By enabling “Use Unicode Symbols” from the Settings menu, Casual Bookmarks will use Unicode symbols as appropriate in its menus. The following mapping is shown in the table below:

NamePlainUnicode
:previousPrevious
:nextNext
:jumpJump🚀
:beginning-of-bufferBeginning
:end-of-bufferEnd
:backwardBackward
:forwardForward
:narrowNarrow→←
:widenWiden←→

Common Menu Actions

Casual Bookmarks is built using Transient menus and as such adopts much of its default behavior.

Each menu item has a key and a label. The key is what is typed by the user to select the menu item. A key can be prefixed with a meta (M-) or control (C-) key.

Dismissing a menu regardless of how deep you are in sub-menus can be done by entering C-q. A menu can also be dismissed by entering C-g, but this will return you to the parent menu.

If a mouse is available, a menu item can be selected by moving the mouse cursor over its label and pressing down button 1.

Pressing the ? key will toggle help for all the menu items. Press the key of interest to get help for it.

When a Transient menu is raised, a prefix argument (C-u) can be entered before selecting a menu item.

Development

For users who wish to help contribute to Casual Bookmarks or personally customize it for their own usage, please read the developer documentation.

Sponsorship

If you enjoy using Casual Bookmarks, consider making a modest financial contribution to help support its development and maintenance.

docs/images/default-yellow.png

See Also

Casual Bookmarks is part of a suite of porcelains for different Emacs packages.

To get all current and future Casual porcelains, please install Casual Suite from MELPA.

Porcelains currently supported by Casual are listed below:

Users who prefer finer grained control over package installation can install each porcelain above individually.

Acknowledgments

A heartfelt thanks to all the contributors to Bookmarks and Transient. Casual Bookmarks would not be possible without your efforts.

casual-bookmarks's People

Contributors

kickingvegas avatar

Stargazers

Pavel Popov avatar chris montgomery avatar Shane avatar Lukas C. Bossert avatar Linas Vidziunas avatar Jürgen Hötzel avatar  avatar yorisilo avatar stardiviner avatar Abdelhak Bougouffa avatar  avatar

Watchers

 avatar

Forkers

emacsmirror

casual-bookmarks's Issues

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.