summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2023-03-26 20:12:21 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2023-03-26 20:12:21 +0200
commit7d580cd6bf25f1f81761b099aa0fc8f5669f7f49 (patch)
treed675b4116d1c2c69c5ac207a07458385c11626ef
parent04c7e6c6f51035d1d208f89a0d94d24fd71540d0 (diff)
downloadmemory-leaks-7d580cd6bf25f1f81761b099aa0fc8f5669f7f49.tar.xz
Note down a couple of itches with forge
-rw-r--r--guides/emacs/development.org29
-rw-r--r--itches/emacs/tracker.org58
2 files changed, 87 insertions, 0 deletions
diff --git a/guides/emacs/development.org b/guides/emacs/development.org
index eeb9ec5..143f102 100644
--- a/guides/emacs/development.org
+++ b/guides/emacs/development.org
@@ -63,3 +63,32 @@ a symbol -- Selects the test that the symbol names, signals an
and returns non-nil if it is selected.
#+end_quote
+* Third-party packages
+** forge
+*** build
+Use =config.mk= to set =LOAD_PATH=:
+#+begin_src makefile
+find-lib = $(dir $(shell emacs -Q -batch \
+ -eval "(require 'find-func)" \
+ -eval "(package-initialize)" \
+ -eval "(require '$(1))" \
+ -eval "(princ (find-library-name \"$(1)\"))"))
+
+sources = ~/src/emacs/magit/lisp
+
+elpa = \
+ closql \
+ compat \
+ dash \
+ emacsql \
+ ghub \
+ markdown-mode \
+ transient \
+ treepy \
+ with-editor \
+ yaml
+elpa_dirs = $(foreach d,$(elpa),$(call find-lib,$(d)))
+
+LOAD_PATH = $(addprefix -L ,$(elpa_dirs) $(sources))
+#+end_src
+
diff --git a/itches/emacs/tracker.org b/itches/emacs/tracker.org
index 985badb..8617e23 100644
--- a/itches/emacs/tracker.org
+++ b/itches/emacs/tracker.org
@@ -772,6 +772,64 @@ Eventually reported back to Emacs core in [[bug:41584]] and fixed by Eli.
:TestAdded: t
:END:
* MELPA
+** forge
+*** TODO Delete source branch when GitLab MR is merged
+:PROPERTIES:
+:Role: author
+:END:
+IOW set =remove_source_branch= (resp. =should_remove_source_branch=)
+when submitting (resp. merging) the request. Possible solutions:
+
+- Elisp option
+- Git config variable
+- Transient infix argument
+*** TODO Let ~forge-post-author~ and ~forge-post-date~ have foregrounds
+:PROPERTIES:
+:Role: author
+:END:
+Currently not possible because:
+
+1. for regular notes, ~forge-topic-refresh-buffer~ uses
+ ~add-face-text-property~; using ~font-lock-append-text-property~
+ would solve this;
+
+2. for the note at point, forge sets ~heading-highlight-face~ to
+ ~magit-diff-hunk-heading-highlight~, which has a foreground;
+ magit-section applies the ~heading-highlight-face~ via overlays, so
+ it will always have more priority than text properties.
+*** TODO Wash emoji codes
+:PROPERTIES:
+:Role: author
+:END:
+Emoji sent by forges to be received as =:short_codes:=. Kludge:
+#+begin_src elisp
+(defun my/emoji-translate-code ()
+ (save-excursion
+ (with-silent-modifications
+ (let ((inhibit-read-only t)
+ (old-input-method current-input-method))
+ (set-input-method "emoji")
+ (while (re-search-forward ":[a-z_]*:" nil t)
+ (when-let*
+ ((beg (match-beginning 0))
+ (end (match-end 0))
+ (code (match-string 0))
+ (translation
+ (or (quail-lookup-key code)
+ (and (string-match ":\\([a-z]*\\)_\\([a-z]*\\):" code)
+ (quail-lookup-key
+ (format
+ ":%s-%s:"
+ (match-string 2 code) (match-string 1 code)))))))
+ (let ((emoji-string
+ (pcase (car translation)
+ ((pred integerp) (string (car translation)))
+ (_ (mapconcat 'identity (cdar translation))))))
+ (message "replacing %s with %s" code emoji-string)
+ (add-text-properties beg end `(display ,emoji-string)))))
+ (set-input-method old-input-method)))))
+#+end_src
+
** magit
*** DONE Helping ~magit-ediff-dwim~ read my mind
:PROPERTIES: