summaryrefslogtreecommitdiff
path: root/itches/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'itches/emacs')
-rw-r--r--itches/emacs/tracker.org58
1 files changed, 58 insertions, 0 deletions
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: