~sebasmonia/emacs-utils

Small Emacs utilities. They might be the starting point of future packages, or be good enough as they are.
ghcli - don't use external function to completing-read branch names
Use different fix for crypto warning handling (probably fixed in another commit?)
Comment Python crypto warning search in one more place

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
  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

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.