~sebasmonia/emacs-utils

Small Emacs utilities. They might be the starting point of future packages, or be good enough as they are.
253d6729 — Sebastián Monía a month ago
Change all uses of setfing buffer-read-only to let->inhibit-read-only
d7ea7184 — Sebastián Monía a month ago
Add notification delay and move check for PRs to idle timer
e1de39b8 — Sebastián Monía a month ago
Add GH CLI "pull request waiting for my review" notification

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~sebasmonia/emacs-utils
read/write
git@git.sr.ht:~sebasmonia/emacs-utils

You can also use your local clone with git send-email.

#Emacs Utils

This is a collection of modules and scripts that lived more than expected but aren't full blown packages. They live in this happy middle ground where they are reusable, but not polished nor fully featured.

#Utilities

  1. jira-tools
  2. ghcli-tools
  3. confluence-reader
  4. pyvenv
  5. azcli
  6. wdfiles

#jira-tools

This is simply a quick way to read ticket details from Emacs. Might skip you a trip to the browser, but if you need to add comments or change a ticket status, then you need to jump to Firefox.
The name isn't "jira-viewer" because I might add more features. Once upon a time, this would print a list of the tickets assigned to me for a sprint, but I never bothered to update that for "other companies", I rarely used it.
 
The only command is jira-show-issue, which will prompt for a ticket in the minibuffer. If the symbol under point "looks" like an issue, it will suggest it as input.
You can bookmark a ticket using b while reading it, or q to quit the window.

#Configuration

(use-package jira-tools :load-path "/path/to/this/directory"
  :custom
  (jira-host "thecompany.atlassian.net")
  :commands
  (jira-show-issue))

You need to create a token in JIRA and add it to any auth-source enabled location, for example in your .authinfo or .authinfo.gpg file:

machine thecompany.atlassian.net login youruser@thecompany.com password your-token-here

#ghcli-tools

It wraps the GitHub CLI and parses some of its output. Writing this was much easier than trying to use the GH API, which is what I guess I should have done :)
It supports whatever feature I find convenient for work:

  • Listing repos in an organization
  • Creating and viewing PRs
  • Code search in an org
  • Kicking off and viewing the status of workflows

#confluence-reader

Promoted to a standalone package: https://sr.ht/~sebasmonia/confluence-reader.el/

#pyvenv

Activate a virtual environment inside Emacs, by doing more or less the same things the activate.bat/activate bash script does. It also modifies exec-path so running a Python inferior process goes to the right version of the interpreter.
I could probably use https://github.com/jorgenschaefer/pyvenv, but it is more oriented to virtualenvwrapper and some other tools that I probably won't use. I did look at its code for guidance. This package is much smaller, and also more limited. For example, no auto-switching of venvs, and before activating a second one, you need to deactivate the one currently active.
 
It works for me because I usually work in each project (and venv) for a long stretches :)

#Configuration

(use-package pyvenv :load-path ""/path/to/this/directory""
  :demand t
  :custom
  (pyvenv-root "/path/to/directory/with/.venvs")
  :commands
  (pyvenv-activate pyvenv-deactivate))

#azcli

A wrapper for Azure's CLI, that so far has only commands to deal with Blob storage. Basically what I needed for work.
I like how the file manager side of it works, which is great because I recycled a lot of those pieces for the next tool.

#wdfiles

A WebDAV file downloader/uploader with some very basic directory listing, based on the one I wrote for azcli. I mostly built this to support creating a static site using Fastmail's storage. Or better said, to create a set of tools to build my static site.