xtodo emacs

emacs xtodo

xtodo
(when (eq system-type 'windows-nt)
  ;; 2025-07-01 thanks to
  ;; https://emacselements.com/getting-spelling-to-work-on-windows.html
  (require 'ispell)
  (progn
    ;; make sure hunspell is in system environment variable PATH
    (setq ispell-program-name "d:/bin/ezwinports/bin/hunspell.exe")
    (setq ispell-local-dictionary "en_US")
    (setq ispell-local-dictionary-alist
          '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8)))

    (when (boundp 'ispell-hunspell-dictionary-alist)
      (setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist))
    ;; (setq hunspell-default-dict "en_US")
    ))
xtodo
;; determine if a elisp function is written in C vs not.

(defvar xah-elisp-symbols-c nil "Lisp function written in C")
(defvar xah-elisp-symbols-not-c nil "Lisp function defined in lisp")

(mapcar
 (lambda (x)
   (if (subrp (symbol-function (intern-soft x)))
       (progn
         (push x xah-elisp-symbols-c))
     (progn (push x xah-elisp-symbols-not-c))))
 xah-elisp-all-symbols)

(length xah-elisp-all-symbols)
27324

(length xah-elisp-symbols-c)
9319

(length xah-elisp-symbols-not-c)
18005
xtodo
xtodo
  • pcomplete destructure, pattern matching
  • 2022-02-18 emacs lisp look into pcomplete-completions-at-point
xtodo
(set-language-environment "utf-8")
;; current-language-environment

(set-default-coding-systems 'utf-8)

(set-terminal-coding-system 'utf-8)
;; default-terminal-coding-system

(set-keyboard-coding-system 'utf-8)
xtodo
xtodo
xtodo
xtodo
xtodo

Open File as Hexadecimal

Alt+x hexl-find-file. If the file is already opened, Alt+x hexl-mode.

xtodo
xtodo
;; this works

(defun ff ()
  "
Created: 2025-04-13
Version: 2025-04-13
"
  (interactive)
  (let (xmenu xresult)
    (setq xmenu (list "aa" "bb" "cc"))
    (setq xresult (completing-read "Pick one:" xmenu nil t))
    (insert xresult)))

;; need more test

;; (ido-completing-read "Pick CSS keyword:" xah-css-all-keywords nil t xword)
xtodo
;; -*- coding: utf-8; lexical-binding: t; -*-

;; (defun my-number-to-binary (xnum)
;;   "Convert a number xnum to its binary representation as a string."
;;   (if (< xnum 0)
;;       (error "Negative numbers are not supported")
;;     (let ((xresult ""))
;;       (while (> xnum 0)
;;         (setq xresult (concat (number-to-string (mod xnum 2)) xresult))
;;         (setq xnum (/ xnum 2)))
;;       (if (string-empty-p xresult)
;;           "0"
;;         xresult))))

(defun xah-convert-number-base (xint xradix)
  "Convert a number xint to a list of digits in base xradix"
  (when (< xint 0) (error "negative not supported"))
  (when (not (integerp xint)) (error "float number not supported"))
  (let ((xresult (list)))
    (while (> xint 0)
      (push (mod xint xradix) xresult)
      (setq xint (/ xint xradix)))
    xresult))

(xah-convert-number-base -2 2)

(xah-convert-number-base 3.5 2)

(xah-convert-number-base 39 16)
;; (2 7)

;; (defun my-number-to-binary-string (xnum)
;;   "return a string of binary representation of number xnum.
;; Created: 2025-07-24
;; Version: 2025-07-24"
;;   (require 'calc-bin)
;;   (let ((calc-number-radix 2))
;;     (math-format-radix xnum)))

;; (my-number-to-binary-string 3)
;; "11"
xtodo
xtodo
xtodo
xtodo
;; why some have double paren
  (setq font-lock-defaults '((xah-css-font-lock-keywords)))
  (setq font-lock-defaults '(xah-css-font-lock-keywords))

;; should this be nil
font-lock-maximum-decoration

xah html mode command changes:

This command was named xah-html-wrap-p-tag. Changed around 2021-08-17.

work on emacs lisp

emacs lisp XahEmacs key design

2021-08-08 notes. designing a key system for whole XahEmacs

now, with XahEmacs, several packages, with xah-fly-keys system, there needs to be a scheme for the leader keys. For example, gnu emacs has Emacs Keys Overview. I needd a scheme for XahEmacs, so the whole is consistant, as a secondary requirement to key efficiency and ergonomics.

here's outline of current xah-fly-keys

..[hilight]  p.replace       g.close c.[open]
e.[insert] u.switchBuff     h.[help] t.[edit]
j.copyAll k.pasteOrPrev     m.diredJump w.[eval/del]

xtodo
xtodo