From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Is Emacs very alive, active and improving? Date: Fri, 30 Aug 2013 04:22:03 +0200 Organization: Aioe.org NNTP Server Message-ID: <87wqn3udcr.fsf@nl106-137-194.student.uu.se> References: <87eh9cuilg.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1377829517 22662 80.91.229.3 (30 Aug 2013 02:25:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Aug 2013 02:25:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 30 04:25:20 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VFEOl-0002id-Ch for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Aug 2013 04:25:19 +0200 Original-Received: from localhost ([::1]:46912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFEOk-0006Fr-VV for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Aug 2013 22:25:18 -0400 X-Received: by 10.180.189.3 with SMTP id ge3mr224669wic.4.1377829349605; Thu, 29 Aug 2013 19:22:29 -0700 (PDT) Original-Path: usenet.stanford.edu!n6no1729217wix.1!news-out.google.com!v3ni1608wiv.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 140 Original-NNTP-Posting-Host: VVbyYd/iFZoeWNmD9i++cQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:/d07eckvkQp3Sq8mQbJfc5x6qUo= Original-Xref: usenet.stanford.edu gnu.emacs.help:200900 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93168 Archived-At: Jorge <1gato0a@gmail.com> writes: > I already use it, to edit LaTeX, configuration files, general > text files (I should learn org mode to organize my text files), > C++ and Bash source code, and compose emails. (Warning. Long post. Don't be in a rush to read it.) That sounds great! If you do lots of configuration, like me, you'll notice that it is a circus of the same files being edited, over and over. I found this help me a lot - you may use another keystroke than C-j, though J, K, L, and ; on the right hand, as requiring no reaching whatsoever, will make for ultra fast transitions. Note that the register names are mnemonic - 'a' for "aptitude", etc. Also, the shortcuts are case sensitive, so there are quite a lot of them, for lots of configuration. Last, note how to get superuser access to files not in your PATH - namely, once set up, by using the C-j IF exactly the same way :) (global-set-key (kbd "C-j") 'jump-to-register) (set-register ?a (cons 'file "/sudo::/etc/apt/sources.list")) (set-register ?C (cons 'file "/sudo::/etc/default/console-setup")) (set-register ?D (cons 'file "~/.emacs-man")) (set-register ?d (cons 'file "~/.emacs-dired")) (set-register ?K (cons 'file "/sudo::/etc/console-setup/remap.inc")) (set-register ?k (cons 'file "/sudo::/etc/default/keyboard")) ; etc. etc; (set-register ?x (cons 'file "~/.xinitrc")) (set-register ?X (cons 'file "~/.Xresources")) (set-register ?Z (cons 'file "~/.zprofile")) (set-register ?z (cons 'file "~/.zshrc")) Another great function for configuration, that I did in collaboration with a guy here on GEH, is su-edit: (defun su-edit () "Edit the current buffer file as superuser." (interactive) (let ((window-start (window-start)) (point (point)) (mark (if mark-active (region-beginning) nil)) ) (find-alternate-file (format "/sudo::%s" (buffer-file-name))) (if mark (set-mark mark)) (goto-char point) (set-window-start nil window-start) ; nil - the selected window )) It even keeps the region - but for some reason, it gets invisible... Last, often in documentation, in the man pages, or on the web (if you use W3M), you find paths and file names - like, "Configure this /important/file to get a gorgeous interface", then, simply place point at the beginning of the path, and use (defun goto-file () (interactive) (let*((file (thing-at-point 'filename)) (in-home (string= "~" (car (split-string file "/")))) (final-file (if in-home file (format "%s%s" "/sudo::" file) ))) (find-file final-file) )) To make config files more pleasant to watch when editing, you may use any of two different methods to the buffers in a certain modes - it is not so picky what mode it is, actually, as long as you get highlighting (and not too unorthodox shortcuts, shadowing those you are used to). The methods are - either by filename extension (e.g., the "txt" in diary.txt), *or* by a comment, at the top of the file (a hashbang - sort of). (add-to-list 'auto-mode-alist '("\\.inc\\'" . conf-unix-mode)) (add-to-list 'magic-mode-alist '("# conf" . conf-mode)) There you have some new toys to try out :) > Currently I use compose emails in Emacs and copy/paste them into > gmail. Maybe in the future I will configure Emacs as a proper > mil client. I did the same when I was active on the Linux/Unix Q&A site. It worked for a long time but I stopped, it was just to boring, no matter how many shorthands I set up (like Emacs always to a particular file, etc.). To find a "proper mail client" in Emacs isn't the easiest of tasks, I'm afraid. The send part - with the Message-mode - try it with `C-x m' just to feel its power - is the best part. I made it even better, if I may, by writing a function that lets you iterate the headers with the TAB and backtab keys, that you may find here [1] - along with this little darling, that'll save all outgoing mails: (defun save-sent-mail () "Save sent messages." (write-file (format-time-string "~/Mail/sent/%Y-%m-%d_%T.m") nil) ) (add-hook 'message-sent-hook 'save-sent-mail) Also, a system for aliases, as well as a signature (in a file), are features that are very handy and practical (and in particular the aliases). I wrote about this at gnu.emacs.gnus, if you are on that group. *Reading* mail, though, is another ball game. Getting Gnus to do it would probably be the best. Right now, I use rmail, and it doesn't do HTML that well, there are no threads, and sometimes you cannot quit it because the "wrong" message is highlighted. It seems that case-sensitive search breaks rmail. Also, rmail saves all mails in *one* huge file (called RMAIL), so you cannot get to them by you precious batch CLI-tools. Apart from those minor distractions, that are a-typical for Emacs, rmail is great, and especially compared to the web-UIs everyone else uses for mail. > I am a beginner; although I have been using Emacs for years, I > have never learned all its power - I only read the tutorial and > the beginning of the reference manual, I have much more to read. While it is great that you read, perhaps it is time to grab the bull by his horns, and twist his neck? Just do it. Instead of reading tutorials, you can just observe - how does this work? do I want it like this? if not, can I remedy it by setting some variable, or even rewriting (part of) it myself? The most important thing is not that you read one page or even one chapter every day, the most important thing is that you are active with what you do - and each day learn a new command, a new shortcut, how two thing stick together, and so on. Do it every day for a year, you'll have 365 new pieces of knowledge. Good luck! [1] http://user.it.uu.se/~embe8573/gnus/index.html -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573