43

Helpful: One Year On

 6 years ago
source link: https://www.tuicool.com/articles/hit/32IRniZ
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

It’s been a year since the first release ofHelpful! It’s gained a ton of new features, and I’d love to share the highlights with you.

Tool Integration

vyAJn2q.png!web

Emacs has some excellent built-in debugging tools that I wanted to expose within Helpful. These tools missed the first release, but I’ve now had the chance to build them.

From a Helpful buffer, you can now toggle edebug on a function. This allows you to easily step through code.

You can also toggle tracing. Tracing is an underrated built-in feature of Emacs. You can use it to confirm functions have the inputs and outputs you’re expecting. It’s really useful when exploring unfamiliar code.

fuaq6vr.png!web

In this example, I’ve enabled tracing on projectile-project-root to see when it’s called, and what values it’s returning.

Summaries

After some great user feedback, Helpful buffers now start with a summary of what you’re looking at.

YzIVZ3r.png!web

Users often want a direct link to the source code, so this is included in the summary. Helpful also mentions if a function is interactive or autoloaded, just like describe-function . If a user doesn’t know what that means, those words now link to the relevant part of the Emacs manual!

Aliases

Helpful tries to show all relevant information for the current thing. I’ve overhauled aliases with this in mind.

NzEzq2j.png!web

For example, if you view make-hash-table , you can now see that there is another alias of this function, but it’s now deprecated.

Modifying Variables

beeMR33.png!web

It’s now possible to set variables directly from Helpful buffers. This was inspired by counsel-set-variable , which has an excellent similar feature.

If a variable is a defcustom , then Helpful also includes a link to the relevant part of Customize.

Even Better Docstrings

Helpful now handles all Emacs docstring syntax. It handles references to keybindings, keymaps, and even supports the obscure features like \<foo-map> and \=' .

RFfUJju.png!web

fortran-mode is a great example of a docstring that uses a lot of Emacs docstring features.

Recent versions of Helpful try even harder to save you keystrokes. URLs are now automatically converted to links.

Finally, my favourite new feature is Info manual links. If a docstring mentions a section of the manual, Helpful converts it to a link.

URnIjyn.png!web

Even better, if a symbol is documented in the Emacs manual, Helpful automatically adds a link at the bottom of the docstring! This hugely helps discoverability.

ARNbayV.png!web

Installing It

Helpful is available on MELPA and MELPA stable . It’s become an indispensable part of my Emacs workflow, and I’m sure it will benefit you too.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK