Xah Emacs Blog

Tips & Tricks for emacs and emacs lisp.

Emacs and Unicode

reddit asks: https://www.reddit.com/r/emacs/comments/4q8abm/how_to_solve_the_problem_of_emacs_displaying/

solution:

emacs unicode symbola font 2016-06-28 36662
🍕🍌🍰🍺

Download symbola here Download Free Unicode Fonts

unicode search cake beer 2016-06-28 75662
Unicode search here: Unicode Characters ☯ ☭ ⚡ → ∑ ♀ ♂ ♥ 😄

Emacs: Switch Buffer, ido-mode (updated. See new screenshot of ido vertical)

User Interface design: navigation panel, with scrollbar or no?

which you prefer?

side panel UI static-s
static panel. Scroll with page.
side panel UI scrollbar-s
with its own scrollbar.

vote on twitter at https://twitter.com/xah_lee/status/747375376616165376

or vote on Google Plus at https://plus.google.com/+XahLee/posts/MebjN6pPy5T

the favored result will be used on emacs pages too. e.g. at Practical Emacs

thanks.

Emacs's Mode Line Suggestions, 2008. Emacs's Mode Line Suggestions

emacs original modeline debate, 2008 https://lists.gnu.org/archive/html/help-gnu-emacs/2008-11/threads.html#00494

Emacs Lisp: Call Function in Replacement String (minor rewrite)

That's one of the first elisp tutorial, written back in 2007. Was a new feature too, for emacs 22, wow, exciting.

Emacs Lisp: Run Elisp Code When File Opens (repost)

Emacs: Running Emacs in GUI vs Terminal, Pros and Cons (updated)

Emacs: What's Minor Mode? (new)

Emacs: Effective Windows Management (updated)

11 Years of Writing About Emacs

Emacs: Save Split Windows Configuration (updated.)

There are about 6 hundred pages of tutorials on this site. About 140 pages are emacs tutotial, 100 are elisp language tutorial, 70 are elisp commands or scripts tutorial, and the rest 300 are tutorials on keybinding, essays on keyboard, on Repetitive Strain Injury, my packages, bug reports/records/fixes, emacs modernization suggestions, commentaries and essays on emacs, emacs community, etc, such as:

emacs M-x donuts 2012-09-15
M-x Donuts 〔➤see Emacs Related Essays

I update them about daily. What's to update? lots of things.

I started to blog about emacs back in 2005. Now, it's 11 years.

xah emacs tutorial 2006 screenshot
here's my emacs tutorial back in 2006 Feb. https://web.archive.org/web/20060221050036/http://xahlee.org/emacs/emacs.html

What Tools Are Used to Build This Site?

emacs, of course. The following i use daily, and are the main tools to create this site:

and lots of personal emacs commands in my init file.

I basically write it manually, or semi-manually, with lots of help of custom emacs commands. In the very beginning, every html tag is typed manually, char by char. Now, set of tags are inserted by emacs command on demand.

Though, i must say, I think my system is faster, less keystrokes, more flexible, more efficient — in a scientifically verifiable way, than any content management system or publishing system out there. org, markdown, wordpress, jekyll, zen, what-have-you.

(actually, the above is not too surprising. Because, if you know a subject well, deeply customized system is far more efficient than any off-the-shelf system, and also, you have precise control.)

Emacs: Split Windows Basics (updated. Improved writing, moved resize command here.)

elfeed is a superb rss/atom reader. Now it supports xml:base (that is, relative links), and also uses curl to fetch, so it's much faster.

get it from melpa or at https://github.com/skeeto/elfeed

To subscribe my blogs, put the following in your init.

(when (fboundp 'elfeed)
  (setq elfeed-feeds
        '(
          "http://ergoemacs.org/emacs/blog.xml"
          "http://xahlee.info/comp/blog.xml"
          "http://xahlee.info/js/blog.xml"
          "http://xahlee.info/math/blog.xml"
          "http://wordyenglish.com/lit/blog.xml"
          )))

then call elfeed.

Emacs: Close Buffer, Open Last Closed (updated code)

Emacs: Next/Previous User Buffer (updated code. Now, there's a function by itself xah-user-buffer-q that determines what's user buffer. You can override it.)

emacs describe-function which see 2016-06-18
emacs “which see” phrase.

Anyone annoyed by this?

The “which see” phrase, started sometimes in emacs ~24.5. bug or intentional?

Emacs: Copy/Cut Current Line If No Selection (code updated. Press the copy key will keep append-copy next line. (fixed a bug))

another Repetitive Strain Injury story

“In the end my RSI became so serious that I had hard time lifting a pack of water.”

How Kinesis Advantage keyboard changed my life By Damiano Venturin. @ https://medium.com/@damko/how-kinesis-advantage-keyboard-changed-my-life-f80a84c559a0

see also, alternatives to kinesis. Best Keyboard for Emacs

Emacs: Jump to Previous Position (updated. Simpler, easier to follow.)

emacs M-x customize, defcustom, good or bad?

Clément Pit-Claudel gave a great answer about why pulling stuff out of custom-set-variables to setq may not work. See comment at Emacs: Stop Cursor Going into Minibuffer Prompt#comment-2734992432

also see comment by bhyde at Emacs's Customization Tutorial#comment-2663524352

the bottom line is that, if you pull out lines from custom-set-variables and change it to setq, it may not work.

i wasn't too pleased about this. This means, the defcustom is more complex than otherwise acting as defvar with a User Interface.

on this subject, there's the question about whether emacs's customize system is a good thing. (it was controversial). I think it's a mixed bag.

There's elisp, which is the core of all emacs and all customization. Why should we add a layer? Now, there are 2 ways to do the same thing. Also, the Graphical User Interface layer isn't complete, as not all customization can be done with it. (e.g. hooks, which is rather quite common and basic.) On the other hand, it does provide a explicit structure to declare what variables are user preference related, and with it, a text based graphical user interface.

but, it isn't a full system, and is not required nor enforced in packages. The consequence of this is that, there's inconsistency.

in general, coding in elisp is full of slack. There's no API, nothing is enforced, and you can do something low level or high level or whichever way. This is intentional from rms. XEmacs had packages since 1991 or so. rms refused it, till recently. I think rms believes this shapelessness helps propagate FSF free software. As in, it forces people to dig into code, and thwarts black box API.

Emacs's Customization Tutorial (major update)

Emacs: Stop Cursor Going into Minibuffer Prompt (updated. The previous code didn't work for emacs 25.x for some reason.)

emacs custom-set-variables vs setq

Something strange is going on. It seems, pulling things out of the custom-set-variables no longer works?

Here's the test. Put the following in your init, nothing but just the following:

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(minibuffer-prompt-properties
   (quote
    (read-only t cursor-intangible t face minibuffer-prompt))))

Restart emacs. Then, M-x query-replace and hold left arrow key to see if cursor went over the prompt. Cursor will not move into the prompt.

Now, delete that init, and use the following instead:

(setq minibuffer-prompt-properties (quote (read-only t cursor-intangible t face minibuffer-prompt)))

Restart emacs.

But now, it doesn't work?

This is emacs GNU Emacs 25.0.90.1

please comment and let me know what happens on your machine, and emacs version. M-x version.

comment on blogger above, or ping me on twitter. thx.

Keyboard Page Key

new index pages.

Emacs Lisp Command Examples

and

Emacs Lisp Script Examples Index

Emacs: Bind Number Pad Keys (minor update)

xah emacs losssage xah fly keys 2016-06-10
emacs 25 M-x view-lossage 【Ctrl+h l】 + Xah Fly Keys

lisp apostrophe quote '(a b c) came from MacLisp

xah emacs tutorial on github?

am thinking to put my emacs tutorial on github. That is, this entire website ergoemacs.org's content.

2 things might happen.

if nothing happens, then i might as well not do it.

but why would i want people to download it? hard to say, but i guess it's basic human thing. I enjoy it when being helpful, it feels good to see results, and there's also the implicit thought that people will buy/pay for my tutorial more, or donate.

Now, a separate question: “you have written a lot tutorials, many seems good, why isn't your tutorial popular?”

I took a walk and asked myself about putting on github, and thus talked to myself for 20 minutes of logical analysis of the above and subsequent related questions, which prompted me to write it out now.

First, note that my tutorial is somewhat popular but probably could've been far more popular. For example, many free tutorial stuff on github has tens of thousands or hundreds of thousands stars or forks. So, if i put mine out to github, why am i struggling for even 1k stars?

I think the short answer is: i'm offensive.

i don't give a fk to tradition, convention, organization, and i feel free to howl the most blunt criticisms sprinkled with four language thru-out. Oh, and i don't stick to English writing convention, nor programing conventions, because i think they are —if you disregard traditions, and dip into detail— stupid.

and, for example, on reddit there's a section of tutorial links. I do not expect, nor will i ever ask, people to put mine there. I NEVER, do marketing. (well in recent years i've tried a bit, but it's like asking water to churn out fire.)

since my life have faltered in late years, it feels uncomfortable to be myself, in my writings, as i've ask for donation, and many, many, have helped. There are few individuals i really like to thank, and there are quite many in total too. And, so, sorry if i sounded arrogant here for a moment.

in the past 5 years, i've mellowed out. Partly because of getting old, i think. When you no longer have it, you don't brag about it anymore. e.g. Ali, Tyson, Madonna. Time moved on.

also, coming out to beg money, was not a good thing. I'm sure, am now remembered by younger generation, as that programer who begged money to survive.

ok, back to the upload to github question. In the above, we just explored the related question of popularity.

Now, on the question of if put on github, will it get over 1k stars/download? It's hard to say. Possibly it might, or it might not.

If i don't promote it, like, starting to say nice thing, positive things, think of ways to tweet stuff, create emacs puzzles, etc, things like that, and do nothing as much as i do now, i think it will not get over 1k stars on github. Probably just few hundred quiet downloads.

ok, so far we've analyzed the situation. The 2 possible outcomes, the likely one, and why. But now, what about, what do i want?

recently i feel like just putting it out on github and not caring about anything else, only the fact the whole's a easy download. (by the way, it has been that way, of a zip file, for few years in the beginning, 2008 or so. And there was not any ads. The ads are added 2013 or so.)

PS this bit is addressing my readers, not talking to myself: Xah Lee's emacs tutorial, is best emacs tutorial out there, in depth, in breadth, in quality, in the ratio you can learn vs time for majority of people, as can be tested by scientific means, by far of any existing emacs tutorial out there, even all of them combined.

I put out a vote, on twitter and Google Plus here:

emacs tips aside, room for rent near google

1 room for rent. 1 mile from Googleplex or downtown Mountain View. San Francisco Bay area. $800. 2 bedroom + 1 bath apartment. contact xahlee@gmail.com , let your friends and co-worker know. Thanks.

Richard Stallman playing flute. The song is Darude Sandstorm. 〔➤see Darude ♪ Sandstorm

New emacs tutorial is out. Now the Keybinding, Keyboard section has navigation panel on the side. The updated version will be sent out to supporters this weekend.

Buy, retweet. Thanks. Buy Xah Emacs Tutorial

Emacs Lisp: Write Emacs Commands Using Python, Ruby, … (rewritten. Chopped off verbiage.)

Emacs Lisp: Delete Repeated Empty Lines (minor update. Fixed a bug where if the repeated space is at last line.)

Using Piano to Type Text , more efficient than steno machine. For emacs keybinding too.

Kinesis Savant Elite2 Foot Pedal review, and how to use it with emacs.

one old keyboard rant hit hacker news. https://news.ycombinator.com/item?id=11611635

i don't seem to be able to see who submitted it. But thanks to whoever did it.

starting a dedicated keyboard blog. See

Xah keyboard Blog

Subscribe there. I'll not duplicate keyboard stuff here. Thanks.

mouse use in emacs, reddit

https://www.reddit.com/r/emacs/comments/4f2iee/efficient_use_of_multibutton_mice_with_emacs/d260em2

the following pages are updated.

Emacs: How to Set Mouse Buttons (updated)

Emacs: Add Web Browser Back Key/Button to Info mode

Emacs: View Info Page. New, on its own page.

Mouse Buying Guide

Kite, a New Era in Coding

check out, a new editor tool.

Kite - Your programming copilot

It signifies a new era in coding, where, instead manually searching stackoverflow etc to help code, the tool auto displays docs and code examples etc as you type. It's like name completion to the next level.

I helped develop the emacs plugin. 😸

Check out the site at https://kite.com/

Emacs Lisp: Traverse Directory

Emacs: What's Hook? (on its own page)

see also Emacs: How to Bind Keys for Major Mode?

see also Emacs: Avoid Lambda in Hook

List of Emacs Lisp Variables

List of Emacs Hooks

the supremum of keybinding

recently had to work on a Mac laptop. So, that forced many improvements to xah fly keys. Now, it works on laptop out of the box. Emacs: Xah Fly Keys

you should use xah-fly-keys or ergoemacs-mode http://ergoemacs.github.io/ Matt's been working on ergoemacs-mode all this time. If you have a issue, post on github, he responds and fixes usually within a day.

There are many other emacs packages of alt keybinding. If efficiency is the judge, none comes close to xah-fly-keys. Actually, unless there's a system of steno based keybinding, there's none as efficient as xah-fly-keys in human history.

Arrow Keys Layout Efficiency: vi's HJKL vs Inverted-T IJKL (major new discovery. vi is worse!)

Keyboard Layout, Is Inverted Number Row Better? (updated, with graph)

Emacs: Jump to Previous Position

now there's show random link button at Practical Emacs and Practical Emacs Lisp. Enjoy.

Emacs: Xah Fly Keys

major key change. Now, when in command mode, letter i switches to insert mode, and Space key is leader key for all emacs's commands with keys that starts with 【Ctrl+x】.

Now, you no longer need a ▤ Menu key, and now is compatible with any laptop out of the box.

Using magit-status each time or having to type the commands was boring.

So I made a keymap, I tried many solutions, the best one comes from Xah on ErgoEmacs.

from https://www.bjonnh.net/post/20160303_EmacsMagitKeymap/

yay. Thanks to Bjonnh.

List of Keylogging Software

Emacs Cursor Movement Keys Controversy

Stefan Monnier, previous emacs maintainer, doesn't use the {Ctrl+n, Ctrl+p, Ctrl+f, Ctrl+b} keys. See https://lists.gnu.org/archive/html/emacs-devel/2016-03/msg00545.html

by the way, he doesn't touch type neither, nor does Richard Stallman.

the thread began here Why does the tutorial talk about C-n/C-p etc? https://lists.gnu.org/archive/html/emacs-devel/2016-03/msg00402.html

i think the emacs cursor keys should be banished. They are very inefficient. One of the worst keybinding choices. I think they are not much better than random choice of keys as far as design goes.

suppose you are playing pacman. Do you want to use the arrow keys or the {Ctrl+n, Ctrl+p, Ctrl+f, Ctrl+b}? There, is an aspect of efficiency.

People mention about how hands stay on home row. Better is inverted T or vim hjkl. 〔➤see Arrow Keys Layout Efficiency: vi's {H J K L} vs Inverted T {I J K L}

but why people are loud on emacs keys? because:

HABIT is the core of your perception, your judgement, of the external world.

it's not just your muscle memory. But, the wires in your brain.

HABIT, as i learned over the years, plays a role in human life not just in petty software keyboard use, but also User Interface design, in programing practices (functional programing?), programing language perception, … no. Actually, habit is the railroad of behavior, HABIT is this elementary epic particle in human history, culture, political divide, evolution, and human destination. ❕

see also

Emacs Lisp: Exit Loop/Function, catch/throw (updated to include a example for exiting a function)

the first step to learn clojure is Leiningen, and it can be quite confusing for beginners. Here's help to get you started. Clojure Leiningen Tutorial

PS am revamping my draft clojure tutorial.

Emacs Bug Crushing with John Wiegley, San Francisco

emacs meetup in San Francisco. Mark your Calendar. 6:00 PM to 9:00 PM

http://www.meetup.com/Emacs-SF/events/229160319/

emacs: insert a literal tab, literal newline

remember:

Emacs: Find & Replace

in emacs 25.1, saveplace is obsolete. For detail, see updated at Emacs: Save Cursor Position

see also How to Set Emacs's User Interface

download emacs 25: http://alpha.gnu.org/gnu/emacs/pretest/emacs-25.0.90.tar.xz

you need to compile it. See How to Build Emacs on Linux

Emacs: Select Line, between Quotes, Extend Selection (minor update)

emacs magit tip. press C-u S to stage also untracked files.

see also Emacs: magit-mode Tutorial

emacs lisp toothpick syndrome emacs 24.5 reftex-vars.el
Emacs Lisp Toothpick Syndrome

Past Articles by Date

2016-012015-122015-112015-102015-092015-082015-072015-062015-052015-042015-032015-022015-012014-122014-112014-102014-092014-082014-072014-062014-052014-042014-032014-022014-012013-122013-112013-102013-092013-082013-072013-062013-052013-042013-032013-022013-012012-122012-112012-102012-092012-082012-072012-062012-052012-042012-032012-012011-122011-112011-102011-072011-052011-012010-102010-062009-12

Like it? Buy Xah Emacs Tutorial. Thanks.

or, buy something from my keyboard store.