Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Alexander Fu Xi fuxialexander

💭
I may be slow to respond.
Block or report user

Report or block fuxialexander

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fuxialexander
fuxialexander / gist:67ce2d87543a8ec8f76a4868ea93e5b7
Created Aug 13, 2019
brew emacs-plus formula with xwidget
View gist:67ce2d87543a8ec8f76a4868ea93e5b7
class EmacsPlus < Formula
desc "GNU Emacs text editor"
homepage "https://www.gnu.org/software/emacs/"
url "https://ftp.gnu.org/gnu/emacs/emacs-26.2.tar.xz"
mirror "https://ftpmirror.gnu.org/emacs/emacs-26.2.tar.xz"
sha256 "151ce69dbe5b809d4492ffae4a4b153b2778459de6deb26f35691e1281a9c58e"
bottle do
root_url "https://dl.bintray.com/d12frosted/emacs-plus"
rebuild 2
@fuxialexander
fuxialexander / new_xwidget_patch.patch
Last active Aug 12, 2019
New xwidget patch against emacs HEAD 2019-07-26
View new_xwidget_patch.patch
diff --git a/src/nsxwidget.h b/src/nsxwidget.h
new file mode 100644
index 0000000000..6af5fe5a4d
--- /dev/null
+++ b/src/nsxwidget.h
@@ -0,0 +1,80 @@
+/* Header for NS Cocoa part of xwidget and webkit widget.
+
+Copyright (C) 2011-2017 Free Software Foundation, Inc.
+
@fuxialexander
fuxialexander / pdumper_master.patch
Created Jun 13, 2018
pdumer patch against emacs master
View pdumper_master.patch
From cfcd0ab61c8c84d41095a9b08fbf588f7c8c391c Mon Sep 17 00:00:00 2001
From: fuxialexander <fuxialexander@gmail.com>
Date: Sat, 26 May 2018 22:45:28 +0800
Subject: [PATCH] Add: add pdumper: Squashed commit of the following:
commit faaaeceec4a9f199942bd35b1b83e0345c828d82
Author: Alan Third <alan@idiocy.org>
Date: Sat Mar 31 10:49:59 2018 +0100
Copy pdmp file to Emacs.app
View magit_popup.el
(set! :popup "^\\(?: ?\\*\\)?magit.*: "
'((slot . -1) (side . right) (size . 80))
'((select . t) (quit . nil)))
(set! :popup "^\\*magithub-dash\\*"
'((slot . -3) (side . right) (window-height . 20))
'((select . t)))
(def-modeline-segment! magithub-buffer-info-simple
"striped magithub buffer name"
(substring (buffer-name) 11 -1))
@fuxialexander
fuxialexander / 0_all_webkit.patch
Last active Oct 7, 2018
One-stop patch for Emacs NS-port xwidget (by @veshboo)
View 0_all_webkit.patch
From 2063aad860376419d899d1ae06ccb7daf56ef9ef Mon Sep 17 00:00:00 2001
From: Jaesup Kwak <veshboo@gmail.com>
Date: Mon, 4 Dec 2017 21:23:19 +0900
Subject: [PATCH] Support xwidget webkit for macOS X
Add xwidget webkit support for macOS X / NS Cocoa and accompanying
changes.
Squash changes for comments from Alan Third in Bug#29565.
@fuxialexander
fuxialexander / ob-ipython-hack.el
Created Apr 11, 2018
ob-ipython remote kernel hack
View ob-ipython-hack.el
(use-package ob-ipython
:after (org ob)
:config (setq ob-ipython-resources-dir ".ob-ipython-resrc/")
(defvar jupyter-local-runtime-dir (substring (shell-command-to-string (concat "jupyter --runtime-dir")) 0 -1))
(defun ob-ipython-generate-local-path-from-remote (session host params)
"Copy remote config to local, start a jupyter console to generate a new one."
(let* ((runtime-dir (substring (shell-command-to-string
(concat "ssh " host " jupyter --runtime-dir")) 0 -1))
(runtime-file (concat runtime-dir "/" "kernel-" session ".json"))
(tramp-path (concat "/ssh:" host ":" runtime-file))
@fuxialexander
fuxialexander / katex.el
Last active Apr 12, 2018
Instant latex preview in org mode
View katex.el
;; (org-inside-LaTeX-fragment-p)
(require 'xwidget)
(defvar katex-url "file:///PATH/TO/katex.html?")
(defvar katex-buffer nil)
(defvar katex-xw nil)
(setq katex-buffer (get-buffer-create "*xwidget webkit: Katex *"))
(defun org-katex-latex-fragment-maybe (&optional arg)
"TODO"
(if (org-inside-LaTeX-fragment-p)
View org-date-hack.el
(setq org-ts-regexp-both-braket "\\([[<]\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]
\n>]*?\\)\\([]>]\\)")
(defun *org-set-font-lock-defaults ()
"Set font lock defaults for the current buffer."
(let* ((em org-fontify-emphasized-text)
(lk org-highlight-links)
(org-font-lock-extra-keywords
(list
;; Call the hook
'(org-font-lock-hook)
View karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@fuxialexander
fuxialexander / helm-child-frame-display.el
Last active Mar 29, 2018
Override helm function to use child-frame
View helm-child-frame-display.el
(defun my-helm-display-child-frame (buffer &optional resume)
"Display `helm-buffer' in a separate frame.
Function suitable for `helm-display-function',
`helm-completion-in-region-display-function'
and/or `helm-show-completion-default-display-function'.
See `helm-display-buffer-height' and `helm-display-buffer-width' to
configure frame size."
(if (not (display-graphic-p))
You can’t perform that action at this time.