Xah Emacs Blog Archive 2021-01

Richard Stallman Says He's Back in FSF

added to Richard Stallman Resigned from FSF, 2019-09-16

XahTV 2021-03-27 Emacs Undo Drama, Emacs Lore, Lisp Warr, rms, and Who's Who in Gnu Emacs

Run Emacs in Terminal vs GUI updated.

updated.

Emacs: Key Notation <return> vs RET

Elisp: load, load-file, autoload
minor update

Emacs: Mouse Config minor update

Emacs: Font Setup updated.

XahTV 2021-03-17 Xah Tries Doom Emacs

Emacs: Xah Fly Keys xah-beginning-of-line-or-block, xah-end-of-line-or-block now works with visual line mode

Interview doom emacs author Henrik Lissner. He used vim for 14 years.

About Emacs, Doom, Vim, Lisp and Games - with Henrik Lissner. 2021-03-16. Jakub Neander (Zaiste) [https://twitter.com/zaiste ].

XahTV 2021-03-13 Ergonomics, Mechanical Keyboard. and Artificial Intelligence

Testimonial on Xah Emacs Tutorial thanks to Daniel

xah fly keys start in command mode when emacs start as daemon

Emacs: Xah Fly Keys Customization
added code to fix the problem of: when emacs start as daemon, xah fly keys is not in command mode. thx to David Wilson (daviwil)

Emacs: Visual Line Mode

Elisp: Get User Input
minor update.

xahlee ergoemacs site stat 2010 2021
xahlee ergoemacs site stat 2010 to 2021

minor update.

Xah Fly Keys Testimonial
more addition. Thanks to xah fly keys users.

XahTV 2021-03-02. Q and A. Emacs Init for Windows. Why Interest in Math?

Testimonial on Xah Emacs Tutorial
New. Thank You Winny.

teco_manual_1990_emily_swmSt-s250
TECO Manual

Emacs: Xah Fly Keys
new command xah-reformat-to-sentence-lines

Emacs: Xah Fly Keys now supports pt-nativo layout (for Portuguese). Thanks to xavierpinho. [see Ergonomic Keyboard Layout for Portuguese: pt-Nativo]

updated.

updated

Emacs: Open File in External App updated xah-open-in-external-app better on Windows, thanks to cutechservices https://github.com/xahlee/xah-fly-keys/issues/114

From an old friend, jcs. Better yet, the emacs lisp master Christopher Wellons gave a tip. [(goto-char 1) vs. (goto-char (point-min)) By jcs. At https://irreal.org/blog/?p=9478#disqus_thread ]

emacs 66k lines 2021-02-13
66k files in my web git, and in emacs eshell buffer

great explanation of Gap Buffers

emacs gap buffers multi cursors chris wellons 2021-02-13
[Gap Buffers Are Not Optimized for Multiple Cursors By Chris Wellons. At https://nullprogram.com/blog/2017/09/07/ ]

i never seen a emacs lisp coder know how editors are implemented in general, and i've been looking in my 20 years of emacsing. Except Chris Wellons! high respect. he also went into why multi-cursor is not so great.

Testimonial on Xah Emacs Tutorial
new addition. Thanks.

updated code.

for why, see

HTML _blank noopener noreferrer Problem

xahlee git commit 2021-02-12
xahlee git commit 2021-02-12

xah fly keys removed C-1 C-2, adde C-t

Emacs: Xah Fly Keys

Emacs Helm Doc Problem

Emacs Misc Index

Emacs: Xah Fly Keys now supports German ergo layouts: neo2, koy, adnw. Thanks to VitruvianVice.

xah fly keys neo2 koy adnw 2021-02-09
xah fly keys neo2 koy adnw 2021-02-09

Elisp: HTML, Update Title updated

Elisp: (goto-char 1) vs (goto-char (point-min))

new page.
Daniel Weinreb on Emacs Keybinding

extracted from Lisp Programer Daniel Weinreb Died (1959 to 2012)

also changed all pages referencing to that:

Emacs: Define Key Sequence
minor update

new. xah-dired-open-in-irfanview in Emacs: xah-dired.el

Karl Voit Xah Lee 2021-02-06
Karl Voit, emacs + org researcher, mentions Xah Lee https://karl-voit.at/2021/01/30/keyboards/

finally finished updating it, after 7 years not using Microsoft Windows.
Emacs in Microsoft Windows FAQ

Problem of Calling Windows Shell in Emacs Lisp added to Emacs Misc Index

Elisp: Association List
minor update.

Explorer /select,path flaky

xah-show-in-desktop on Windows now just show directory. no highlight item.

The Windows Explorer /select,path command seems flaky.

Elisp: Determine OS, Emacs Version, Machine Host Name
minor update

12 years ago, my emacs tutorial was free

12 years ago, my emacs tutorial was free, and under creative commons license. And i was using elisp as my all-weather scripting lang. I hereby make a record of it, and delete that file.

xah emacs tutorial 2008 QNz58
xah emacs tutorial script, year 2008.
; 2008-06-12

; make my website emacs tutorial into a zip for download

; primarily, this script will make a zip file out of a directory and place the zip on a dest dir.
; however, there are few little things that needs to be done when archiving a dir for distribution:
; • remove temp files and dir that isn't supposed to be pulic. Temp are those starting with “xx”
; • remove emacs backup files, osx's “.DS_Store”
; • create a parent dir and add css files and icon files
; • for each file, remove the javascript lines that are Google's web stat bug
; • for each file, fix no longer correct relative links to “http://xahlee.org/...”.

;;;; user parameters

; root dir to work with
(setq webroot "/Users/xah/web/") ; must end in slash

; list of source dirs relative to webroot
(setq sourceDirsList (list "p/time_machine"))

; destination dir path, relative to webroot
(setq destDirRelativePath "diklo")

; dest zip archive name (without the “.zip” suffix)
(setq zipCoreName "time_machine")

; whether to use gzip or zip.
(setq use-gzip-p nil)

;;;;

(setq destRoot (concat webroot destDirRelativePath "/"))
(setq destDir (concat destRoot zipCoreName "/"))

;;;; copy to destination
(mapcar
 (lambda (x)
   (let (fromDir toDir)
     (setq fromDir (concat webroot x))
     (setq toDir
           (xah-drop-last-slash (concat webroot destDirRelativePath "/" zipCoreName "/" x)) )
     (make-directory toDir t)
     (shell-command (concat "cp -R " fromDir " " toDir))
     )
   )
 sourceDirsList)

; copy the style sheets over, and icons dir
(shell-command (concat "cp /Users/xah/web/lang.css " destDir))
(shell-command (concat "cp /Users/xah/web/lbasic.css " destDir))
(shell-command (concat "cp /Users/xah/web/lit.css " destDir))
(shell-command (concat "cp -R /Users/xah/web/ics " destDir))

; remove emacs backup files, temp files, mac os x files, etc.
(shell-command (concat "find " destDir " -name \"*~\"  -exec rm {} \\;"))
(shell-command (concat "find " destDir " -name \"#*#\"  -exec rm {} \\;"))
(shell-command (concat "find " destDir " -type f -name \"xx*\"  -exec rm {} \\;"))
(shell-command (concat "find " destDir " -type f -name \"\\.DS_Store\"  -exec rm {} \\;"))
(shell-command (concat "find " destDir " -type f -empty -exec rm {} \\;"))
(shell-command (concat "find " destDir " -type d -empty -exec rmdir {} \\;"))
(shell-command (concat "find " destDir " -type d -name \"xx*\" -exec rm -R {} \\;"))

;; change local links to “http://” links. Delete the google javascript snippet, and other small fixes.
(setq make-backup-files nil)
(require 'find-lisp)
(mapc (lambda (x)
        (mapc
         (lambda (fPath) (clean-file fPath (concat webroot (substring fPath (length destDir)))))
         (find-lisp-find-files (concat destDir "/" x) "\\.html$"))
        )
      sourceDirsList
)

;; zip the dir
(setq default-directory (concat webroot destDirRelativePath "/"))
(when (equal
       0
       (if use-gzip-p
           (shell-command (concat "tar cfz " zipCoreName ".tar.gz " zipCoreName))
         (shell-command (concat "zip -r " zipCoreName ".zip " zipCoreName))
         ))
  (shell-command (concat "rm -R " destDir))
)

;;----------------------------

; read me text
(setq readMeText "
This is “Xah'S Emacs Tutorial” by Xah Lee.

--------------------------------------------------
The “emacs” dir is emacs and elisp tutorial. The “elisp” dir is elisp manual.

--------------------------------------------------
The tutorial is updated few times a year. The download location is:
http://xahlee.org/diklo/xah_emacs_tutorial.zip

--------------------------------------------------
PERMISSION TO COPY

“Xah'S Emacs Tutorial” is licensed under
“Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.”
available at
http://creativecommons.org/licenses/by-nc-nd/3.0/us/

The elisp manual is licensed under
“GNU Free Documentation License”, available at
http://www.gnu.org/copyleft/fdl.html

")

;; create the read me file.
(find-file (concat destDir "read_me.txt"))
(insert readMeText)
(save-buffer)
(kill-this-buffer)

now on Microsoft Windows, emacs file encoding issues comes up.
Emacs File Encoding FAQ

new version of emacs tutorial out. produced in sparkling PowerShell and golang on Windows! (instead of elisp and python on Mac.) Pick up emacs lisp in 3 hours! Buy it at [ Buy Xah Emacs Tutorial ]

xah-run-current-file now you can customize extensions. Emacs: Run Current File Also in Emacs: Xah Fly Keys

emacs calling windows shell problem

emacs lisp windows cmd powershell 2021-01-20 2mHg4
5 hour spent working on this faak. goal: in emacs lisp, open folder view with the file highlighted. complexities in cmd.exe powershell pwsh 3 levels of string quote escape, and slash backslash faak
emacs_toothpick_2021-01-20_Vb38V
Emacs Lisp Toothpick Syndrome

Xah Emacs Fun Index

Emacs: Move Image File
more code update. now support ShareX screenshot directory.

Emacs: Open File in External App updated

better many commands that call shell on Microsoft Windows: • xah-open-in-external-appxah-show-in-desktopxah-open-in-terminalxah-open-in-vscodexah-show-in-desktop

Marisa_Kirisame_emacs_magic-s250
霧雨 魔理沙 Marisa Kirisame emacs magic

on its own page. and updated Emacs Fun Index Xah Emacs Fun Index

Emacs: Novel Reading Mode
code update. increased space between lines.

Xah Emacs Packages
updated

Emacs: Move Image File
updated

xah fly keys, setup major mode keys

those asking about how to setup key in magit, here's a good solution. Added to:
Emacs: Xah Fly Keys Customization

Emacs go-mode gofmt diff problem

xah-dired.el

Lots update to emacs lisp commands that call shell. Fixed a few that don't work in Microsoft Windows. If you find a problem, tell me in xah discord.

and many more changes.

these commands are now in a package, see Emacs: xah-dired.el

code update Emacs: Move Image File

Emacs: Open Marked Files in Dired

Emacs: Zip Dir in Dired

Emacs: Xah Fly Keys

changed text-scale-increase to

Ctrl+= , was Ctrl++ . modern app use Ctrl+= , instead of the Ctrl+Shift+= (the more logical control with plus, requiring to press shift)

Emacs: HTML Image Path to Img Tag code update

added • xah-html-convert-to-jpgxah-html-resize-img to Emacs: Xah HTML Mode, and major version release. Many key changes.

Emacs: Move Image File

xah-move-image-file code change. now works better on Microsoft Windows when calling optipng and exiftool

minor updates.

XahTV 2021-01-07 emacs delete html tags, workflow, Kinesis Advantage2 keyboard, gaming machine

Elisp: Bracket CAPITALIZED WORDS

RSI stories of Ben Wing, The architect of xemacs

peculiar stories of Ben Wing.

Elisp: Abbrev, Template, for Major Mode
updated formatting.

minor updates.

Emacs: Xah HTML Mode added xah-html-delete-tag-pairCtrl+c u

XahTV 2021-01-03 elisp coding, why golang is easier to learn than python

Emacs: Xah Fly Keys added toggle-truncate-linesSpace n y】 (dvorak notation) qwerty is 【Space l t】. This is a useful command, when you want to see the line structure. I used to just toggle full screen for it. But this is a better solution.

If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial