all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Is Emacs very alive, active and improving?
Date: Fri, 30 Aug 2013 04:22:03 +0200	[thread overview]
Message-ID: <87wqn3udcr.fsf@nl106-137-194.student.uu.se> (raw)
In-Reply-To: mailman.998.1377825809.10748.help-gnu-emacs@gnu.org

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


  parent reply	other threads:[~2013-08-30  2:22 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 22:43 Is Emacs very alive, active and improving? Jorge Peixoto de Morais Neto
2013-08-27  0:05 ` Perry Smith
2013-08-27  0:25   ` Jorge Peixoto de Morais Neto
2013-08-27  9:07 ` Peter Dyballa
2013-08-27 23:52 ` Suvayu Ali
2013-08-28  3:03   ` Yagnesh Raghava Yakkala
2013-08-29  0:39     ` Suvayu Ali
2013-08-28 20:19 ` Ken Goldman
2013-08-29  0:25   ` Stefan Monnier
     [not found] ` <mailman.904.1377721211.10748.help-gnu-emacs@gnu.org>
2013-08-28 20:53   ` Emanuel Berg
2013-10-03 19:25     ` Ken Goldman
     [not found]     ` <mailman.3330.1380828355.10748.help-gnu-emacs@gnu.org>
2013-10-03 19:58       ` Emanuel Berg
2013-08-28 21:09 ` W. Greenhouse
     [not found] ` <mailman.907.1377724222.10748.help-gnu-emacs@gnu.org>
2013-08-28 21:55   ` Emanuel Berg
2013-08-29  2:04     ` Kevin Montuori
     [not found]     ` <mailman.935.1377741861.10748.help-gnu-emacs@gnu.org>
2013-08-29  2:55       ` Emanuel Berg
2013-08-29  3:06         ` Emanuel Berg
2013-08-29  7:59     ` W. Greenhouse
     [not found]     ` <mailman.943.1377763221.10748.help-gnu-emacs@gnu.org>
2013-08-29 20:53       ` Emanuel Berg
2013-08-29 21:05         ` Drew Adams
     [not found]         ` <mailman.992.1377810361.10748.help-gnu-emacs@gnu.org>
2013-08-29 21:24           ` Emanuel Berg
2013-08-29 23:37             ` Drew Adams
     [not found]             ` <mailman.996.1377819467.10748.help-gnu-emacs@gnu.org>
2013-08-30  0:25               ` Emanuel Berg
2013-08-29 22:47           ` Emanuel Berg
2013-08-30  6:09         ` Eli Zaretskii
2013-08-30  1:32     ` MBR
     [not found]     ` <mailman.999.1377826390.10748.help-gnu-emacs@gnu.org>
2013-08-30  2:26       ` Emanuel Berg
2013-08-30 11:58         ` Stefan Monnier
2013-08-30 12:21     ` Ludwig, Mark
2013-08-30 13:28       ` Eli Zaretskii
2013-08-29 23:50 ` Jorge Peixoto de Morais Neto
     [not found] ` <mailman.997.1377820262.10748.help-gnu-emacs@gnu.org>
2013-08-30  0:28   ` Emanuel Berg
2013-08-30  1:23     ` Jorge
     [not found]     ` <mailman.998.1377825809.10748.help-gnu-emacs@gnu.org>
2013-08-30  2:22       ` Emanuel Berg [this message]
2013-08-30  6:31         ` Eli Zaretskii
2013-08-30 16:24         ` Jorge
2013-10-04 11:30 ` Luca Ferrari
2013-10-04 21:59   ` Jude DaShiell
2013-10-04 23:16     ` Bob Proulx
     [not found]     ` <mailman.3434.1380928592.10748.help-gnu-emacs@gnu.org>
2013-10-04 23:35       ` Emanuel Berg
2013-10-06 12:07         ` Rustom Mody
2013-10-06 21:50           ` Evans Winner
2013-10-09 19:41             ` Emanuel Berg
2013-10-10  4:27               ` Teemu Likonen
     [not found]               ` <mailman.3736.1381379296.10748.help-gnu-emacs@gnu.org>
2013-10-10  5:25                 ` Rustom Mody
2013-10-10  8:24                   ` Andreas Röhler
2013-10-10 22:18                     ` Bob Proulx
2013-10-11 10:39                       ` Andreas Röhler
2013-10-10 10:36                   ` Phillip Lord
2013-10-10 11:00                     ` Rainer M Krug
2013-10-10 15:16                       ` Peter Dyballa
2013-10-11 11:06                       ` Phillip Lord
2013-10-12 22:01                         ` Christopher Ritsen
2013-10-14 11:04                           ` Phillip Lord
2013-10-14 16:50                             ` Stefan Monnier
2013-10-14 19:25                             ` Christopher Ritsen
2013-10-15 11:30                               ` Phillip Lord
     [not found]                               ` <mailman.4032.1381836640.10748.help-gnu-emacs@gnu.org>
2013-10-15 17:56                                 ` Emanuel Berg
     [not found]                             ` <mailman.3989.1381778782.10748.help-gnu-emacs@gnu.org>
2013-10-14 21:54                               ` Emanuel Berg
2013-10-15  6:27                                 ` Bob Proulx
     [not found]                                 ` <mailman.4022.1381818464.10748.help-gnu-emacs@gnu.org>
2013-10-15 17:50                                   ` Emanuel Berg
2013-10-16  4:56                                     ` Rustom Mody
2013-10-17  1:45                                       ` Emanuel Berg
     [not found]                         ` <mailman.3906.1381619521.10748.help-gnu-emacs@gnu.org>
2013-10-13  2:36                           ` Rustom Mody
2013-10-10 13:04                   ` Carson Chittom
     [not found]                   ` <mailman.3784.1381425760.10748.help-gnu-emacs@gnu.org>
2013-10-10 20:44                     ` Emanuel Berg
     [not found]                   ` <mailman.3742.1381393368.10748.help-gnu-emacs@gnu.org>
2013-10-10 20:57                     ` Emanuel Berg
2013-10-11 10:56                       ` Andreas Röhler
2013-10-11 19:06                         ` Bob Proulx
2013-10-12  7:48                           ` Andreas Röhler
     [not found]                           ` <mailman.3875.1381563966.10748.help-gnu-emacs@gnu.org>
2013-10-12 20:24                             ` Emanuel Berg
2013-10-10 23:54                   ` Emanuel Berg
2013-10-11  0:05                     ` Emanuel Berg
2013-10-11  5:58                       ` Thien-Thi Nguyen
     [not found]                       ` <mailman.3818.1381470912.10748.help-gnu-emacs@gnu.org>
2013-10-11 17:20                         ` Emanuel Berg
2013-10-09 19:31           ` Emanuel Berg
2013-10-10  2:28             ` Rustom Mody
2013-10-09 21:30         ` Tom Davey
     [not found]         ` <mailman.3718.1381354235.10748.help-gnu-emacs@gnu.org>
2013-10-09 21:51           ` Emanuel Berg
2013-10-10 16:24         ` henry atting
2013-10-11  5:19         ` Eric Abrahamsen
     [not found] ` <mailman.3391.1380886224.10748.help-gnu-emacs@gnu.org>
2013-10-04 17:45   ` Emanuel Berg
2013-10-04 19:28     ` Thien-Thi Nguyen
     [not found]     ` <mailman.3429.1380914709.10748.help-gnu-emacs@gnu.org>
2013-10-04 20:18       ` Emanuel Berg
2013-10-08 11:36     ` Rustom Mody
2013-10-09 19:43       ` Emanuel Berg
     [not found] ` <mailman.815.1377561963.10748.help-gnu-emacs@gnu.org>
2013-10-13 14:47   ` Eric Brown
2013-10-13 15:08     ` Emanuel Berg
2013-10-13 17:52       ` Eric Brown
2013-10-13 18:13     ` Alex Schroeder
2013-10-13 19:23       ` Emanuel Berg
     [not found] <mailman.811.1377557346.10748.help-gnu-emacs@gnu.org>
2013-08-27  1:44 ` Rustom Mody
2013-08-27 23:59 ` Emanuel Berg
2013-08-28  0:20   ` Marko Vojinovic
2013-08-28  1:56     ` Stefan Monnier
     [not found]     ` <mailman.880.1377655035.10748.help-gnu-emacs@gnu.org>
2013-08-28  1:59       ` Emanuel Berg
2013-08-28  0:35   ` Marc Weber
     [not found]   ` <mailman.874.1377650119.10748.help-gnu-emacs@gnu.org>
2013-08-28  1:08     ` Emanuel Berg
2013-08-28  3:25       ` Marc Weber
     [not found]       ` <mailman.883.1377660293.10748.help-gnu-emacs@gnu.org>
2013-08-28  4:08         ` Rustom Mody
2013-08-28 20:48           ` Emanuel Berg
2013-08-28 20:37         ` Emanuel Berg
2013-08-28  1:39   ` Jorge
2013-10-12 13:39 ` Kai Grossjohann
2013-10-12 15:30   ` Drew Adams
2013-10-12 20:39   ` Emanuel Berg
2013-10-12 20:57     ` Kai Grossjohann
2013-10-12 20:58     ` Emanuel Berg
     [not found]   ` <mailman.3883.1381591837.10748.help-gnu-emacs@gnu.org>
2013-10-12 21:01     ` Kai Grossjohann
2013-10-12 21:14       ` Drew Adams
2013-10-12 21:15       ` Emanuel Berg
2013-10-13 13:33         ` Kai Großjohann
     [not found]         ` <mailman.3924.1381671200.10748.help-gnu-emacs@gnu.org>
2013-10-13 15:25           ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqn3udcr.fsf@nl106-137-194.student.uu.se \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.