//
archives

Archive for

Delete blank lines with flush-lines

Sometimes after I copy-paste code snippets from web page into emacs buffer I get text with superfluous blank lines delimiting code. Marking region and running M-x flush-lines RET ^$ RET quickly makes it better by removing those pesky blank lines. This is, of course, makes sense only if pasted code doesn’t contain blank lines you … Continue reading

Incremental search forward

Well-known incremental search forward(isearch-forward Lisp function) which is invoked with C-s has also additional useful key-bindings which I use often to instruct what to search. After you pressed C-s in buffer they are: C-w to yank next word or character in buffer onto the end of the search string, and search for it. You can … Continue reading

align-regexp

This interactive Emacs Lisp function was very handy for me during some log files analysis. You mark region, invoke function, provide regexp and voila – your region is aligned. Example data from align-regexp help: Fred (123) 456-7890 Alice (123) 456-7890 Mary-Anne (123) 456-7890 Joe (123) 456-7890 Let’s say we want to align region on “(” … Continue reading

Erlang for Python programmers: Part IV

Previous parts: Intro, Part I, Part II and Part III Funs – sequel Continuing previous post about functions let’s remember about Fun. I already mentioned it in Part I and promised to show its advanced forms. So, here we go. Fun with one clause: 1> Double = fun(X) -> X * 2 end. #Fun<erl_eval.6.56006484> 2> … Continue reading

Creating tables in Emacs

Sometimes I need to create tables in Emacs as it was in post describing comparison and arithmetic operations in Python and Erlang. Over time I became aware of several means to create tables and export them in different formats in Emacs(at the moment I’m personally interested in plain ASCII and HTML): Excellent org-mode has built-in … Continue reading

Categories