Emacs: Select Line, Block, in Quote, Extend Selection (minor update)
emacs magit tip. press C-u S to stage also untracked files.
see also Emacs: magit-mode Tutorial
new emacs tutorial is out. Major update since past 2 months is addition of navigation sidebar, for emacs and elisp pages. The updated version will be sent out to supporters this weekend.
Buy, retweet. Thanks. Buy Xah Emacs Tutorial
Emacs: Byte Compile Elisp Files (updated)
Emacs: Find/Replace in Pure Elisp xah-find.el (added a regex find/replace screenshot)
i do regex find/replace on 5 thousand html files every week, for the past decade. The above, is the best method.
Emacs Lisp: Run Current File (updated, to include golang)
emacs lisp pages now have navigation side panel. See Practical Emacs Lisp
tutorial page navigation sidebar
now the tutorial has side panel for easy navigation. See Practical Emacs
Elfeed Not Support Xhtml? here's a test
if this content shows, then it means, i must use the CDATA thing and it doesn't support xhtml.
Update: yes, elfeed now fixed it! fixed on , see https://github.com/skeeto/elfeed/issues/112
by the way, elfeed is a RSS/Atom feed reader, for emacs, written in elisp. It's excellent. https://github.com/skeeto/elfeed, also on MELPA.
by the way, reddit is also switching to atom. https://www.reddit.com/r/changelog/comments/428vdq/upcoming_reddit_change_switching_from_rss_20_to/
if your blog is using RSS, you should switch to Atom, because RSS is garbage, by Dave Winer. (i think Dave Winer is one of those guys in computing industry i regard is charlatan, but i haven't ascertained my own opinion yet. (charlatan, y'know? like, those selling you snake oil, the gurus, they spread gospels and people buy it. In fact, typically a lot followers. Larry Wall, Martin Fowler, are prime examples. Typically, these guys, their golden touch, is never technical (say, a math theorem), such as say Knuth. But, they rely heavily on social things. It is via social, they get their kicks. In particular, their weapon of choice is fuzzy and cozy and mythical jargons, Unix Philosophy, KISS, defensive programing! (remember that?)! laziness is virtue of programer! (remember that?) Design Patterns! eXtreme Programing, Agile, SCRUM! Idioms! Pythonic!)) (disclaimer: this is all opinion only.)
see also Voodoo of Software Engineering
Emacs Lisp: Get User Input (updated)
how to open a info file
If you have a info file, you can open it in info by first call
universal-argument 【Ctrl+u】 then
info【Ctrl+h i】. Emacs will prompt for a path.
Emacs: View Info Page Tutorial (updated)
this is useful when you have a 3rd party package that has info doc.
superior method to insert any type of bracket/quote by pair
on reddit, someone asked a question about inserting curly quotes and brackets in pairs.
Here's my explanation, i believe this is superior to any. https://www.reddit.com/r/emacs/comments/41i156/using_smartquotes_with_the_electric_pair_mode/cz2ro2s
Emacs: How to Install Packages Using ELPA, MELPA (minor update)
Emacs: Auto Save
see also Microsoft Natural Ergonomic Keyboard 4000 Review
Disable Ubuntu New/Overlay Scrollbar
Emacs Lisp: Insert Random Number / Hexadecimal (updated)
Which Lisp Should You Learn? (old article. repost)
Emacs Lisp: Regex Patterns and Syntax Table
is it worthwhile to use abbrevs for most used English words?
Emacs Abbrev for Most Used English Words?
Which Mouse to Get for Emacs
someone asked about which mouse to get for emacs
most gaming mouse have onboard memory, such that you set the buttons once, then plug in any computer it'll work. The software is usually Windows only, so you need a windows machine. (or, a virtual box might work)
but if you really want a mouse with linux api, i hear that ROCCAT mouse is famous for that.
roccat has many models. This one i think is physically/functionally best. ROCCAT Tyon Mouse
other models are ROCCAT Gaming Mouse with Linux Support
but i've not used them.
myself recommend plain logitech. I recommend any of the following, up to your preference in size, number of buttons, and whether it has spin wheel.
- Logitech G602 Wireless Gaming Mouse
- Logitech G502 Proteus Mouse
- Logitech G700s Mouse Review
- Logitech MX Master Wireless Mouse
- Logitech G600 Gaming Mouse Review
most mouses, as long as they are standard usb devices, one can also program the various buttons in X11 without the mouse itself providing means, but it's a huge hassel. One'll spend weeks and weeks reading the many many half-written how-tos.
also, a warning. Some gaming mouse REQUIRES installing and registering their “cloud” software for every computer you use the mouse in order for the button config to be remembered. Notably Razer Orbweaver Keypad. So, i generally stay away from anything Razer.
new Common Lisp book: 〈Common Lisp Recipes〉
〔Common Lisp Recipes: A Problem-Solution Approach By Edmund Weitz. @ amazon〕
wow, a new Common Lisp book. A Chinese friend, Chun Tian (binghe) https://twitter.com/binghe_lisp, who i regard as one of the top Common Lisp expert, highly regarded the book.
KBC Poker 3 Keyboard. Now, this one, is for programers. It features physical key activated programing. So, you just press keys to start record key macros. No need for software!
Atreus62 Keyboard ⌨
for keyboard hackers, someone custom build a Atreus keyboard by fixing one of its problem of too few keys. The result is beautiful. See updated: Atreus Keyboard ⌨ (refresh page)
emacs reddit gem: Flexible isearch without a package
;; make isearch treat space dash underscore newline as same (setq search-whitespace-regexp "[-_ \n]")
Reddit, on emacs undo
in summary, once a month or two, you tried to undo but unable, because something's broken.
see also Emacs Undo and Emacs Cult Problem
Emacs's Key Syntax Explained (updated)
See also: Emacs Keys Overview
Implementing Queue in Lisp
someone asked me about how to implement queue. He showed a code using list as data structure and lisp macros and stuff that's just totally wrong.
if you don't know, a “queue” is data structure that's “first-in-first-out”. It's like when you go to a restaurant, you have to wait in line. You can only add to the end, and remove from front.
A naive solution is simply to use a list, by popping front and appending to end. The problem is that doing anything to the end of list is expensive.
Here's a article that shows how to implement queue properly.
〔FIFO Queues in Scheme and Lisp By jcs. @ http://irreal.org/blog/?p=40〕
for lisp beginners, see:
JetBrain, IntelliJ, WebStorm, and keyboard
here's a incredible article. The article is about the reaction time the moment you press a key on your keyboard, to the moment it shows up on screen.
Seems silly and useless, but, it went over so many interesting aspects, with hard data and tens of links to other articles, and, specifically, measure some 10 editors/IDEs with data diagrams. Here it is:
〔Typing with pleasure By Pavel Fatin. @ https://pavelfatin.com/typing-with-pleasure/〕
It will take me days to go over the article! He took my arena! I've read the article quickly, and many remarks it says by the wayside, ranging from details of the working of emacs to details of the working of keyboard, i can see it's spot on! Very well researched! Yet it covers so many other things i have no idea of. I need to go over every of its claims and tens of links in detail. Days.
it's written by a JetBrain employee.
a new command, “xah-toggle-previous-letter-case”. See updated Emacs: Toggle/Cycle Letter Case
Free Software Foundation, How Much Donation They Get?
Emacs Lisp: How to Write a Toggle/Cycle Command (major rewrite)
Emacs: toggle-word-wrap (on its own page)
for those of you really interested in keyboards. Stenotype Machine
Sacha Chua Interview New Emacs Maintainer John Wiegley
The video is 50 minutes.
The first 23 minutes, is really a demo about gnus, a very old, powerful, package in emacs for reading newsgroup, mailing list, and mails.
The rest, is about John's experience as the new emacs maintainer, and GNU Emacs directions.
One thing particular that John emphasizes is that, there are a lot emacs devs, who haven't been involved in emacs core development, but now it's time for you perhaps to join again, and John welcomes you very much, and will workout any issues you might have, as he sees this as even more important than emacs technical issues.
You can find the video topics break down at Sacha's site at http://sachachua.com/blog/2015/12/2015-12-10-emacs-chat-john-wiegley-maintaining-emacs-can-help/, or a voice recording version to download. (you won't miss much without video, for this one.)
Atreus Keyboard ⌨ (on its own page)
by Phil Hagelberg, who is a major coder of emacs and clojure. Now you can buy it.
new command, xah-open-in-terminal. See bottom at Emacs Lisp: Open File in External App
new version of emacs tutorial is out. Buy Xah Emacs Tutorial. Buy it. Thanks.
Emacs Lisp: Single Key to Copy/Paste from Register (updated)
FSF GNU Emacs Link Dead Problem 2015
Emacs: Set Default Browser
turn the scroll bar off not
in emacs culture, often you'll hear hacker type that says to turn off scroll bar. They consider it useless, and they look at the percentage in the mode line instead.
this is, the most idiotic advice. It is why am often agaist these hacker types or emacs advocate's opinions.
The visual scroll bar, is more effective at indicating the cursor position within a file, and it also gives you a hint of how vertically long is the file. The bigger the file, the scroll bar becomes smaller.
Visual scroll bar is also in your peripheral vision. You don't need to look at it, yet info is convey'd to you.
The percentage in the mode line, needs to go thru a brain cycle to decipher, also, you need to gaze down to the bottom to look at it. Also bad, is that it changes to “Top” when it is 0%, and changes to “Bot” when cursor is at the bottom. The jarring change to “Top”/“Bot” is Extremely bad User Interface. (i wrote a bug report (suggestion) few years ago. Of course, the emacs dev hacker types, will have none of it. In fact, add injury to insult, they “fixed” a bug that relates to how the percentage is calculated.) 〔➤ Emacs's Mode Line Suggestions〕
Also, sometimes they say turning off scroll bar saves you screen space. Well yes, it saves 2 to 3 char's width. (and exactly these hacker types will insist that lines be only 70 chars long, so you waste 10 chars worth of space)
Part of the issue the hacker types do these things is that, turning off the scroll bar, doesn't matter if it is technically good move or bad, it is nevertheless a expression of being advanced user. As in, “real programer don't use the mouse”, “real programer uses command line only”, “real programer codes in C”…. This phenomenon, of one-upmanship, superiority, is with us, in any field of mostly males.
Emacs Lisp: Replace HTML Entities (updated code.)
curly quotes in emacs lisp inline doc
btw, recently (about 2 months ago), emacs dev introduced curly quotes in inline doc. (of actually using the unicode curly quotes “”). All is implemented and done in the development branch, by Paul Eggert. Then, it got hundreds of debates, many want nothing except ASCII in code. The maintainer was still Stefan Monnier. He didn't turn it down as far as i know. But, rms, eventually, just make a remark and it is reverted (under heavy pressure). I am really annoyed by that. rms, although isn't maintainer, but he exercise significant clout on decisions, even purely non-political issues. The list is pretty much a opinion war ground. Louder and numerousness wins. I hoped what whoever rms select as maintainer, will be absolute dictator for his term. I think that'd be better.
tangential discussion from reddit https://www.reddit.com/r/emacs/comments/3v19uj/is_there_anything_emacs_cant_do/
append-to-buffer to accumulate text. Updated at Emacs: Copy/Paste and kill-ring History
Emacs Lisp: Copy File Path of Current Buffer (code updated. Now, result is always full path)
Past Articles by Date
• 2015-11 • 2015-10 • 2015-09 • 2015-08 • 2015-07 • 2015-06 • 2015-05 • 2015-04 • 2015-03 • 2015-02 • 2015-01 • 2014-12 • 2014-11 • 2014-10 • 2014-09 • 2014-08 • 2014-07 • 2014-06 • 2014-05 • 2014-04 • 2014-03 • 2014-02 • 2014-01 • 2013-12 • 2013-11 • 2013-10 • 2013-09 • 2013-08 • 2013-07 • 2013-06 • 2013-05 • 2013-04 • 2013-03 • 2013-02 • 2013-01 • 2012-12 • 2012-11 • 2012-10 • 2012-09 • 2012-08 • 2012-07 • 2012-06 • 2012-05 • 2012-04 • 2012-03 • 2012-01 • 2011-12 • 2011-11 • 2011-10 • 2011-07 • 2011-05 • 2011-01 • 2010-10 • 2010-06 • 2009-12