Xah Emacs Blog Archive 2018-10

emacs lisp coding style, multi line setq

emacs lisp just did a refactoring. combine multiline setq into 1 line. e.g. (setq $p1 (region-beginning)) (setq $p2 (region-end)) to (setq $p1 (region-beginning) $p2 (region-end))

the syntactic grouping helps indicate semantic unit of code. Simmilarly, i tend to add (progn) even when not necessary.

see diff at https://github.com/xahlee/xah-fly-keys/commit/9f122c3d680f66416c12a87db7db7a0844505120

over the years, my elisp coding style changed slightly. Before, i never put value in let. e.g. (let (x y) (setq x 3) … ) but now i do (let ((x 3) y) … ) when x is meant to not change value.

This form (let (x y) … ) is simpler and more readable. Simplicity is the king in coding. Putting value in let doesn't do anything semantically, and elisp isn't typed. You can't declare constants. Now, i put constant in let. It helps a little to indicate intention of not changing the var. (note, this is problematic, because it's also common to initialize a value in let. So, the advantage of intention being a constant is gone, depending whose code you are reading)

these days i almost never type shift key. I just type then call emacs command to upcase them.

using palm to hit control

using palm to hit control https://www.reddit.com/r/emacs/comments/9sov0h/anyone_here_uses_left_side_of_palm_to_press_ctrl/

See also: How to Avoid Emacs Pinky

Emacs: Command Frequency Statistics (old. repost)

Understand ASCII Control Characters

here's ASCII Characters

as scientific programer, I wasn't too familiar with it for the first 10 years coding with Mathematica, in 1990s. Then from 1998 to ~2007, i did java, perl, python, php. Still don't know ascii control sequence much, except line feed (aka newline), form feed, horizontal tab, carriage return.

But as you code more or touch low level issues, you have to know it well. e.g. even in JavaScript golang

why is ascii important? because when you do networking, protocols, terminal, IO, file encoding, or even syntax detail of programing languages, understanding ASCII control sequences becomes critical.

Stack Overflow offline 2011-08-06 6Kx45
Stack Overflow offline 2011-08-06 6Kx45

here's some issues related to ASCII.

note, ASCII is part of Unicode. In utf8 encoding, any file in ASCII encoding is 100% same with utf8, if the file does not contain non-ascii chars such as ∑ α → 😂

note that, the need to understand ASCII is one thing, meanwhile, there are lots programers, typically mono-lang American, who have phobia towards any non-ascii character. They insist, that programing language source code should not contain ANY char that keyboard cannot type directly.

[see Problems of Symbol Congestion in Computer Languages; ASCII Jam vs Unicode]

emacs dev Alan Mackenzie is one such person, and many others in emacs dev list. They, resulted a damage to emacs around 2016. So that now emacs function doc string has the complexity of going thru transformation, instead of “curly quote” directly.

see Emacs Lisp Doc String Curly Quote Controversy (2015)

Emacs Halloween Pumpkin

is there some kindred spirit carving up a emacs related pumpkin this year?

Emacs Halloween Pumpkin

The New Left Review and RICHARD STALLMAN

RICHARD STALLMAN, TALKING TO THE MAILMAN. 2018-10. Interview by Rob Lucas https://newleftreview.org/II/113/richard-stallman-talking-to-the-mailman

also be sure to read

History of LISP, Emacs, Symbolics (Daniel Weinreb Rebut Richard Stallman)

curiously, that interview article is from New Left Review 113.

who is this “New Left Review”, and what's “New Left”?

The New Left Review is a bimonthly political academic journal covering world politics, economy, and culture which was established in 1960. In 2003, the magazine ranked 12th by impact factor on a list of the top 20 political science journals in the world.[1]

[2018-10-28 New Left Review]

i looked up one of the guy who wrote an article on that issue, Göran Therborn, is a retired socialist professor.

all the other article titles in the issue, sound too much like post modernism stuff.

new left review 113 2018-10 0ea5e
new left review 113 2018-10

basically, the mag is communist's mag.

it's interesting that in the 1990s, when linux, apache, perl, rose to stardom, Free Software Foundation and Open Source advocates deny any association with communism.

but, on the eve of election in 2016, jwz wrote a sinister article disclosing that the logo of mozilla is explicitly intented to mimic communism theme. (Mozilla was the first big open source house. It was formed when Netscape lost the browser war.)

and now, many left in usa openly fly hammer and sickle flag (example: antifa in Berkeley, Portland, NYC). And, i think, to many open source or fsf fans but absolutely anti communism, anti post-modernsim, anti sj gang, it's a annoying realization.

see old articles Netscape Crap and Communism, American, and Open Source

Importance of ASCII Control Characters

short article at my programing plog.

Xah Programing Blog

go there and subscribe the RSS feed.

Emacs: Xah Fly Keys for Russian Layout

new. thanks to TechiBech.

if any russian layout user can confirm that it works well, much appreciated. Should i add it into xah-fly-keys? let me know.

URL Percent Decode/Encode

ELisp: URL Percent Decode/Encode (elisp tutorial. updated)

Emacs: URL Percent Decode/Encode (on its own page. emacs commands.)

Emacs: Xah Fly Keys Customization

updated: Make a Key do x Depending on Major Mode

patreon me update

just wrote a profile on my patreon https://www.patreon.com/xahlee thank you all for putting $ there

there's a keyboard meetup in San Francisco Bay Area, November 10th 2018. see Xah keyboard Blog

notes on Emacs-SF meetup 2018-10-24

had a great time at today's emacs meetup in Mountain View. Thanks to Gaurav J , https://twitter.com/JaafarTrullhttps://twitter.com/howardabrams for setting it up. we had almost 20 people, plus 4 from Portland via video.

Follow Emacs-SF event at https://www.meetup.com/Emacs-SF/

next emacs-SF meetup is Nov 14th. Same place. also, we have a github page https://github.com/Emacs-SF/

special thx to George @eludom for Xah Fly Keys demo.

1 thing i saw a demo of is emacs ipython notebook. https://tkf.github.io/emacs-ipython-notebook/ Basically, you run ipython in emacs, including plots. Very nice.

perhaps comparable to @johnkitchin 's https://github.com/jkitchin/scimax ?

best package for java dev in emacs


lsp java https://github.com/emacs-lsp/lsp-java/

ELisp: Line Number Problem

emacs new video. Implementing grep

emacs lisp. Implementing grep. This is half demo, half workflow, half programing problem, and half emacs lisp tutorial!

also, the package has been updated with the added feature. Emacs: Xah Find Replace (xah-find.el)

A Synopsis of Dan Weinrebs Undergrad Thesis A Real-Time Display-Oriented Editor for the Lisp Machine

to read

A Synopsis of Dan Weinrebs Undergrad Thesis A Real-Time Display-Oriented Editor for the Lisp Machine


[Evolution of Emacs Lisp By Stefan Monnier (Previous Gnu Emacs Leader) And Michael Sperber. At http://www.iro.umontreal.ca/~monnier/hopl-4-emacs-lisp.pdf ]

to read, and must read

via John Kitchin [ https://twitter.com/johnkitchin/status/1053997653959282688 accessed: 2018-10-21]

elisp tutorial video and real time lecture

i've just recored a emacs lisp tutorial intro. 35 min. completely idiotic. stutters n disorganized unpleasant to listen to and incoherent. gawd it takes some skill to do presentation. not sure gonna upload it. but will probably retry util it's ok.

also, teaching a lang in real time takes some skill and experience. harder than i thought. the issue is to convey what you know in a structured and coherent and smooth manner and in the right order of topics.

1 solution of teaching real time is basically read the text book style. but that's the worst, as student's minds r split between reading it themselfs or listening to u reading it. Same problem with presentation with slides, when the slides became the main dish.

emacs am doing another video today or tomorrow. Let me know what topic you like.

vote at [ https://twitter.com/ErgoEmacs/status/1053000368915853312 accessed: 2018-10-18]

emacs meetup, Mountain View


Wednesday, October 24, 2018 6:30 PM to 8:30 PM

see you there

Lisp Celebrities and Computing History from “Worse Is Better”

xah-fly-keys, someone provides code solution for russian layout users. https://www.reddit.com/r/xahflykeys/comments/9mb3qw/welcome/e7vc7qh/ thx to techibech

minor updates

new video. emacs keyboard macro demo

emacs keyboard macro demo

Emacs: Keyboard Macro

Emacs: Run Current File 🚀

code update. Now, for golang file, if press C-u first, it'll build the file.

How to stop emacs from creating .#lock file links?

Emacs: Turn Off Auto Backup~

solution found. see above link. refresh page

subtle problems of using JavaScript to syntax color source code on your blog.

Google Code Prettify and Ampersand Encoding

emacs video, lines to html list, lines to dt

Famous Emacs Users

created a subreddit for xah-fly-keys

created a subreddit for Xah Fly Keys https://www.reddit.com/r/xahflykeys/

it's for public discussion.

i have my site Emacs: Xah Fly Keys and pages there you can comment, if you have a question about something discussed on my page.

however, we don't have a public discussion forum, where people can post their own blogs about Xah Fly Keys, or wishlist or comparison to other packages etc. So, that's what this this new sub reddit is for.

Emacs Keys: Change Major Mode Keys (minor update)

Emacs: Show Copy History (kill-ring) 🚀

code update. Now uses FORM FEED character for divider, and changed output buffer name, that does not offer save.

demo of using google code prettify js, and showing alternative in emacs, and workflow, text processing on html.

Sacha Chua interviews Thierry Volpiatto


it's a text version interview, with one photo.

Thierry Volpiatto is the guy who maintained helm mode.

very interesting read. Turns out, he wasn't a professional programer. He only started in 2006. (but to write helm, i'd say it's not easy.) and he's 55 years old, and his professional job is guide people rock climbing mountains!