Fix annoying bug of possible multiple inserts
Now the sprint and inserts are better.
This commit is contained in:
parent
3b1427a8db
commit
990cc577dc
5 changed files with 6 additions and 70 deletions
|
@ -523,9 +523,11 @@ And since I'll be associating snippets with new files all over my configuration,
|
|||
"Autofill file buffer matching FILENAME-RE regular expression.
|
||||
The contents inserted from the YAS SNIPPET-NAME."
|
||||
;; The define-auto-insert takes a regular expression and an ACTION:
|
||||
;; ACTION may also be a vector containing successive single actions.
|
||||
(define-auto-insert filename-re
|
||||
(vector snippet-name 'ha-autoinsert-yas-expand)))
|
||||
;; ACTION may also be a vector containing _successive_ single actions.
|
||||
;; This means running this twice results in two repeated expansions, so:
|
||||
(unless (assoc filename-re auto-insert-alist 'equal)
|
||||
(define-auto-insert filename-re
|
||||
(vector snippet-name 'ha-autoinsert-yas-expand))))
|
||||
#+end_src
|
||||
|
||||
As an example of its use, any Org files loaded in /this project/ should insert my config file:
|
||||
|
|
|
@ -30,7 +30,7 @@ At the beginning of each Sprint, I create a new org file dedicated to it. This w
|
|||
|
||||
I want a single keybinding that always displays the current Sprint note file, regardless of the Sprint. This means, I need to have functions that can calculate what this is.
|
||||
|
||||
To have the Org Capture features to be able to write to correct locations in the current file, I need each file to follow a particular format. I create a [[file:snippets/org-mode/__sprint.org][sprint note template]] that will be automatically expanded with a new sprint.
|
||||
To have the Org Capture features to be able to write to correct locations in the current file, I need each file to follow a particular format. I create a [[file:templates/sprint.org][sprint note template]] that will be automatically expanded with a new sprint.
|
||||
|
||||
This template needs the following functions:
|
||||
- =sprint-current-name= to be both the numeric label as well as the nickname
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: sprint
|
||||
# key: __sprint
|
||||
# --
|
||||
#+TITLE: `(sprint-current-name)`
|
||||
#+AUTHOR: `user-full-name`
|
||||
#+EMAIL: `user-mail-address`
|
||||
#+DATE: `(sprint-date-range)`
|
||||
#+CATEGORY: sprint
|
||||
#+FILETAGS: :work:
|
||||
|
||||
* Work Issues
|
||||
$0
|
||||
|
||||
* Onboarding Work
|
||||
See [[file:Onboarding-Work.org][Onboard-Work]] for all details.
|
||||
|
||||
* Distractions and Support
|
||||
Anything that doesn't fit the above goes here.
|
||||
|
||||
* Meeting Notes :meeting:
|
||||
* Scrum Status :status:
|
||||
|
||||
* Sprint Demonstration
|
||||
New approach for giving presentations. First create [[file:`(file-name-sans-extension (buffer-name))`-demo.org][`(file-name-sans-extension (buffer-name))`-demo.org]], and then add the bits to the code below.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :results silent
|
||||
(defun org-present-file (filename)
|
||||
(find-file (filename))
|
||||
(delete-other-windows)
|
||||
(org-present))
|
||||
|
||||
(demo-it-create :advanced-mode :single-window
|
||||
(org-present-file "`(file-name-sans-extension (buffer-name))`-demo.org")
|
||||
(org-present-next)
|
||||
(osx-browse-url-forwork "https://...")
|
||||
(demo-it-load-fancy-file "~/work/wpc4/wpc/dashboards/wpc4/hypervisor.yml" :line 116 133)
|
||||
;; ...
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
Have fun and start the show: =demo-it-start= and hit ~F5~.
|
||||
* Notes for Next Sprint
|
||||
|
||||
|
||||
#+DESCRIPTION: Notes taken during Sprint #`(sprint-number)`
|
||||
#+PROPERTY: header-args: :results drawer :tangle no :eval no-export :comments org
|
||||
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil skip:nil author:nil email:nil creator:nil timestamp:nil ^:nil
|
||||
|
||||
# Local Variables:
|
||||
# eval: (org-content 2)
|
||||
# End:
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: example-block
|
||||
# key: <e
|
||||
# --
|
||||
#+begin_example
|
||||
$0
|
||||
#+end_example
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: quote-block
|
||||
# key: <q
|
||||
# --
|
||||
#+BEGIN_QUOTE
|
||||
$0
|
||||
#+END_QUOTE
|
Loading…
Reference in a new issue