Categories: geek » emacs

RSS - Atom - Subscribe via email

2021-07-19 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar and emacs-devel.

View or add comments

2021-07-12 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar and emacs-devel.

View or add comments

2021-07-05 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar and emacs-devel.

View or add comments

2021-06-28 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar and emacs-devel.

View or add comments

Emacs steno interface so far

| emacs

2021-06-28: Added completion with stroke info.

So here's what I have so far:

  • a stroke log (using plover-websocket)
  • Clippy suggestions (using inotify to watch clippy.txt)
  • a scratch pad that I can quickly add the Clippy suggestions to

    Screenshot_20210623_005114.png

    Figure 1: stroke log, suggestions, scratch pad

  • cheatsheets that pop up with a stroke and pass the next keystroke through so that I can just keep typing

    Screenshot_20210623_005824.png

    Figure 2: Emily's modifiers cheatsheet

  • frequency-sorted word completion with stroke information

    Screenshot_20210628_020933.png

    Figure 3: This should make fingerspelling easier.

  • briefing with Briefpedia suggestions, conflicts, and alternatives for the conflicting entry.

    Screenshot_20210623_010154.png

    Figure 4: briefing

  • steno practice that runs off Org tables or word lists, displays hints, and doesn't require me to star out misstrokes (although I can if I want)

    Screenshot_20210623_010517.png

    Figure 5: suggestions, phrases

    Screenshot_20210623_010825.png

    Figure 6: Afterwards, there's a simple review list that includes the entry before the misstroked one.

  • word-based commands

    Screenshot_20210623_014231.png

    Figure 7: I can use friendly names and a custom order for commands, still be able to access all the other commands by name, and have a specific action handle input that doesn't match any of the completions.

  • defining briefs from Org Mode tables
  • automatically toggling dictionaries for types of prompts (ex: reading outlines)
  • automatically toggling modes and removing extra dashes/spaces for things like defining a function
  • outlines for toggling Emacs (raising or lowering the window) and other matching windows
  • and a plugin that allows dictionary entries such as:
    • {plover:emacs_mx:my/plover-brief-with-check}
    • {plover:emacs_key:M-RET}
    • {plover:emacsclient_current:(my/org-edit-special-dwim)}

It probably won't work for other people yet, but maybe I can play around with ideas and we can try to get some working on other people's computers. Some of the code is in the Plover section of my config (https://sachachua.com/dotemacs#plover), if you want to explore!

View or add comments

2021-06-21 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Hacker News, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar and emacs-devel.

View or add comments

Using inotify to add Plover Clippy suggestions into Emacs

| emacs

Update 2021-06-19: Changed to a vertical layout, added extra notes.

I don't have a lot of screen space on my laptop, so I don't usually have the Plover suggestion window open as I type. I came up with a Plover plugin to let me flash the last Plover Clippy suggestion as a temporary notification. It went by too quickly, though, so I wrote something that uses inotify to monitor the clippy.txt log and put it an Emacs buffer instead. It results in text like this:

Clippy
KHREUP PEU
added
ATD
Extra notes go here
(defvar my/clippy-recent-suggestions nil "Recent suggestions, limited by `my/clippy-recent-suggestions-limit`.")
(defvar my/clippy-recent-suggestions-limit 3 "Keep this many suggestions.")
(defvar my/clippy-extra-notes nil "Extra notes to add at the end.")
(defun my/clippy-last ()
  (let ((value (string-trim (shell-command-to-string "tail -1 ~/.config/plover/clippy.txt | cut -c 23-"))))
    (when (string-match "^\\(.*?\\)[ \t]+|| .*? -> \\(.+\\)" value)
      (cons (match-string 1 value) (match-string 2 value)))))

(defun my/clippy-show (&rest _)
  (interactive)
  (with-current-buffer (get-buffer-create "*Clippy*")
    (let ((last (my/clippy-last)))
      (unless (member last my/clippy-recent-suggestions)
        (setq my/clippy-recent-suggestions (seq-take (cons last my/clippy-recent-suggestions) my/clippy-recent-suggestions-limit)))
      (erase-buffer)
      (insert (mapconcat (lambda (o) (format "%s\n%s\n" (car o) (cdr o))) my/clippy-recent-suggestions "")
              (or my/clippy-extra-notes "")))))

(defvar my/clippy-monitor nil)
(defun my/clippy-toggle-monitor ()
  (interactive)
  (if (inotify-valid-p my/clippy-monitor)
      (progn
        (message "Turning off")
        (inotify-rm-watch my/clippy-monitor))
    (message "Turning on")
    (setq my/clippy-monitor
          (inotify-add-watch
           (expand-file-name "~/.config/plover/clippy.txt") 'modify
           #'my/clippy-show))))

(defun my/clippy-org-subtree-to-notes ()
  "Copy this subtree's text to `my/clippy-extra-notes'."
  (interactive)
  (save-excursion
    (unless (org-at-heading-p) (org-previous-visible-heading 1))
    (setq my/clippy-extra-notes
          (substring-no-properties
           (org-agenda-get-some-entry-text
            (point-marker)
            most-positive-fixnum)))
    (my/clippy-show)))

(defun my/clippy-add-note (string)
  (interactive "MNote: ")
  (setq my/clippy-extra-notes (concat (string-trim string) "\n" (or my/clippy-extra-notes "")))
  (my/clippy-show))
This is part of my Emacs configuration.
View or add comments