Xah Emacs Blog Archive 2016-06
Emacs and Unicode
reddit asks: https://www.reddit.com/r/emacs/comments/4q8abm/how_to_solve_the_problem_of_emacs_displaying/
Download symbola here Download Free Unicode Fonts
Emacs: Switch Buffer (updated. See new screenshot of ido vertical)
Emacs's Mode Line Suggestions, 2008. Emacs Mode Line Problem
emacs original modeline debate, 2008 https://lists.gnu.org/archive/html/help-gnu-emacs/2008-11/threads.html#00494
Elisp: 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.
Elisp: Run Elisp Code When File Opens (repost)
Emacs: GUI Emacs vs Terminal Emacs (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:
I update them about daily. What's to update? lots of things.
- code update. Lots of them are enhanced commands, which i use and regularly improve. New features, or fix bugs.
- emacs, like every other software, changes. I have to keep up. Command name changes, keys change, packages obsoletion, function obsoletion, new feature to do X. All these happens. For example, lexical scope, CL package, magit keys and commands kept changing, etc.
- Writing improvement. Correct typo, improve sentence, or change style, structure, or rewrite whole. Yes. Many tutorial pages began life as blog from a decade ago. Blog tends to be chatty and potshot, and tends to become obsolete fast. They need to be professionalized as tutorial proper. Covering lots topics, organization, structured.
I started to blog about emacs back in 2005. Now, it's 11 years.
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:
- htmlize.el (for syntax coloring code in html)
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 (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" )))
Emacs: Open Last Closed File (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.)
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. At https://medium.com/@damko/how-kinesis-advantage-keyboard-changed-my-life-f80a84c559a0 , accessed on 2016-06-17 ]
see also, alternatives to kinesis. Best Keyboards 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
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
and change it to
setq, it may not work.
i wasn't too pleased about this. This means, the
is more complex than otherwise
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: M-x customize 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
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, Alt+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)))
But now, it doesn't work?
This is emacs GNU Emacs 220.127.116.11
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
Emacs Lisp Script Examples Index
Emacs: Bind Number Pad Keys (minor update)
lisp apostrophe quote '(a b c) came from MacLisp