~sebasmonia/emacs-utils

Small Emacs utilities. They might be the starting point of future packages, or be good enough as they are.
Add ghcli-pr-view to show some PR details locally
bc4be454 — Sebastián Monía a month ago
Add pyvenv documentation to README
cc4fdf7e — Sebastián Monía a month ago
Add pyvenv as a proper package, document it in README

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

#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

--Untested--
An older set of commands that I haven't revisited yet.
It wraps the GitHub CLI and parses some of its output. As it is now, it is more of a proof of concept.
Writing this was much easier than trying to use the GH API, which is what I guess I should have done :)

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