From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.help Subject: Re: What are Emacs best uses? Date: Tue, 13 Aug 2013 14:34:00 +0100 Message-ID: References: <8761van5mv.fsf@informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1376400857 5403 80.91.229.3 (13 Aug 2013 13:34:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Aug 2013 13:34:17 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Pascal J. Bourguignon" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 13 15:34: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 1V9Ejq-0007hd-KG for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Aug 2013 15:34:18 +0200 Original-Received: from localhost ([::1]:55125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9Ejq-0006DT-6D for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Aug 2013 09:34:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9Ejd-0006DL-06 for help-gnu-emacs@gnu.org; Tue, 13 Aug 2013 09:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9EjZ-0007Yc-U9 for help-gnu-emacs@gnu.org; Tue, 13 Aug 2013 09:34:04 -0400 Original-Received: from mail-vb0-x236.google.com ([2607:f8b0:400c:c02::236]:52815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9EjZ-0007YU-Ly for help-gnu-emacs@gnu.org; Tue, 13 Aug 2013 09:34:01 -0400 Original-Received: by mail-vb0-f54.google.com with SMTP id q14so5761055vbe.13 for ; Tue, 13 Aug 2013 06:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=MSnSr/trpWG/sS+s+wnVmwuO/xmooIZXxdxnPmsYfAQ=; b=XVkV7heooWemoJ6IZdSYVZWJ6W4cWmj9Sd8Y8twgwJcT/bJRM4fol5qd+Os49rqFkO 1v1hhvhObg1ZVI4zNU4fdr1SLv968XILuW19u73+fdci1Nm/fE+HXy8Bp2EQQZ4XmRaw M+mV8jl/bCU5ZHYTwo+jDk/wPvtVM75rU/5OVcu4VRG6i+gdVSWU5Bm+H+0OZr7n3rTe oujk/5N68tSOkf1SCSJLSXr781M8x9mabiBKujaQqdcKhiCpHmUzGkWz2RRsj+kPgwwO IMoLIFB8IhHoA6lksO/VdItU8AyUw6u8JHB+f0d55dhrebucFuVy1CX8f3StWjOTcwOg E/vQ== X-Received: by 10.221.49.8 with SMTP id uy8mr88874vcb.65.1376400840701; Tue, 13 Aug 2013 06:34:00 -0700 (PDT) Original-Received: by 10.58.197.72 with HTTP; Tue, 13 Aug 2013 06:34:00 -0700 (PDT) In-Reply-To: <8761van5mv.fsf@informatimago.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c02::236 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:92839 Archived-At: On Mon, Aug 12, 2013 at 7:08 PM, Pascal J. Bourguignon wrote: > Ok, so let's see what other programs beside emacs I use, perhaps that'll > give us a hint at what emacs is bad: Nice! And, going the other direction, here are a few files that I've had a reason to use (or create, or customize) when working on my thesis or day job, or just for fun, over the last year or so. I hope the titles are explanatory enough. To concur with Pascal's point about personal modifications: most of these aren't published anywhere. "Miscellaneous" - quick coding for fun and profit loccur.el litable.el cards.el toki-pona.el wc-mode.el hide-lines.el randomize-region.el tex-mode.el calendar.el caps-mode.el mal-mode.el dash.el extract-examples.el greek-mode.el toki-pona-hack.el loop-throwaway.el monthly-mode.el power-laws.el "Research" - programmatic and idiosyncratic text mangling as well as interaction with external programs premixx.el contributing-users.el alternate-formulation.el general-utilities= .el run-through-top-100-users.el apm-analysis.el more-encyclopedia-analysis.el forum-analysis-client.el convert-to-tims-format.el run-through-top-100-users-variant1.el emacs-spine.el minimal-arxana.el authors-uniq.el linkwords-long.el more-forum-analysis.el seconds-converter.el apm-terms.el computing-entropy.el linked-words.el forum-analysis.el emacs-spine-revised.el filter-data.el linkwords.el extract-math-terms.el emacs-parse-preamble.el git-log-extractor.el corrections-analysis.el top-100.el encyclopedia-analysis.el committers.el ess.el "Work" - more text mangling (e.g. tab-separated columns instead of spreadsh= eets) recombinant.el recombinant2.el delete-stopwords.el swap-two-columns.el freebaseize.el unique-fields.el delete-first-column.el delete-doubles.el extractor2.el extractor3.el turn-freebase-data-into-rdf.el postprocess.el extractor.el zip-two-buffers-together.el "General usability" - useful compatibility layer magit.el markdown-mode.el all.el php-mode.el ... and to continue with an extract from my ~/.emacs -- I'm finding the calendar quite useful, but only after relatively *extensive* customizations (copied below). (require 'diary-lib) (require 'calendar) (setq calendar-view-diary-initially-flag t ;; =ABThis variable does not affect the diary display with the `d' ;; command from the calendar; in that case, the prefix argument ;; controls the number of days of diary entries displayed.=BB ;; -- description of `diary-number-of-entries' diary-number-of-entries 7) ;;; DIARY bindings ;; This lets you close the diary and redisplay changes (define-key diary-mode-map (kbd "C-c C-c") '(lambda () (interactive) (widen) (quit-window) (calendar))) (define-key diary-mode-map (kbd "C-c C-d") '(lambda () (interactive) (goto-char (line-end-position= )) (insert " DONE") )) (define-key diary-mode-map (kbd "C-c C-w") '(lambda () (interactive) (widen) )) (define-key diary-mode-map (kbd "C-o") '(lambda () (interactive) (goto-char (line-end-position)) (open-line 1) (forward-line 1) (insert " "))) (define-key diary-mode-map (kbd "C-o") '(lambda () (interactive) (goto-char (line-end-position)) (open-line 1) (forward-line 1) (insert " "))) ;;; CALENDAR bindings ;; This lets you insert entries into the diary directly from the ;; calendar in a nicer way than the usual i-d command, since it ;; collates with previously existing entries, by date. (define-key calendar-mode-map "ie" (lambda () (interactive) (let ((date (calendar-date-string (calendar-cursor-to-date t) t t))) (other-window 1) (find-file diary-file) (widen) (goto-char (point-min)) (if (search-forward date nil t) (when (search-forward-regexp "^[A-Z]" nil t) (backward-char 1) (insert " \n") (backward-char 1)) (goto-char (point-max)) (backward-char 1) (if (looking-at "\n") (progn (forward-char) (insert (concat date "\n "))) (forward-char) (insert (concat "\n" date "\n "))))))) ;;; DIARY DISPLAY binding ;; This lets you edit specific entries from the fancy diary display (add-hook 'diary-fancy-display-mode-hook '(lambda () (local-set-key (kbd "e") '(lambda () (interactive) (let (date) (if (looking-at (diary-fancy-date-pattern= )) (setq date (match-string 0)) (re-search-backward (diary-fancy-date-pattern)) (setq date (match-string 0))) (find-file "~/diary") (widen) (goto-char (point-min)) ;; needs some coding improvements in case matches aren't found (when (search-forward (replace-regexp-in-string "^[^ ]* \\(...\\)[^ ]* " "\\1 " date) nil t) (let* ((beg (line-beginning-position)) (next (search-forward-regexp "^[A-Z]" nil t)) (end (if next (- next 1) (point-max)))) (narrow-to-region beg end) (goto-char (point-min))))))))) ; The alternative is: diary-simple-display, that can be used alternately see below (setq diary-display-function 'diary-fancy-display) (define-key calendar-mode-map "n" (lambda () (interactive) (let ((diary-display-function 'diary-simple-display) ;; Setting this explicitly was important ;; to get around what otherwise looked like a bug (diary-number-of-entries 1)) (diary-view-entries)))) (add-hook 'today-visible-calendar-hook 'calendar-mark-today) (add-hook 'diary-fancy-display-mode-hook '(lambda () (alt-clean-equal-signs))) (add-hook 'diary-fancy-display-mode-hook '(lambda () (setq selective-display 3 selective-display-ellipses nil))) (defface calendar-tag-face '((t (:foreground "red" :weight bold))) "Used for tags in the calendar.") (defface calendar-keyword-face '((t (:foreground "Cyan1" :weight bold))) "Used for super special keywords in the calendar.") ;; display org-like tags in the diary (four or more capital letters in a ro= w) (add-hook 'diary-fancy-display-mode-hook '(lambda () (font-lock-add-keywords nil '(("\\<[A-Z]\\{4,\\}\\>" . 'calendar-tag-face))))) (add-hook 'diary-mode-hook '(lambda () (font-lock-add-keywords nil '(("\\<[A-Z]\\{4,\\}\\>" . 'calendar-tag-face))))) (add-hook 'diary-fancy-display-mode-hook '(lambda () (font-lock-add-keywords nil '(("\\<\\(DONE\\)\\>" 1 'calendar-keyword-face prepend))))) (add-hook 'diary-mode-hook '(lambda () (font-lock-add-keywords nil '(("\\<\\(DONE\\)\\>" 1 'calendar-keyword-face prepend))))) (defun alt-clean-equal-signs () "This function makes lines of =3D signs invisible." (goto-char (point-min)) (let ((state buffer-read-only)) (when state (setq buffer-read-only nil)) (while (not (eobp)) (search-forward-regexp "^=3D+$" nil 'move) (add-text-properties (match-beginning 0) (match-end 0) '(invisible t))) (when state (setq buffer-read-only t)))) ;; As far as I can tell, sorting doesn't actually work - is this a bug? ;; jac July 31, 2013 (add-hook 'diary-list-entries-hook 'diary-sort-entries t) (setq diary-list-include-blanks t) ;;; Start it on load - but after thing are properly set up (setq inhibit-startup-screen t) (add-hook 'after-init-hook (lambda () (progn (calendar) (diary-mark-entries)))) (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) ; (add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files) (defun calendar-view-all () (interactive) (add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files) (save-window-excursion (find-file "~/diary") (goto-char (point-min)) (insert "&")) (calendar) (remove-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files) (save-window-excursion (find-file "~/diary") (goto-char (point-min)) (delete-char 1))) (setq diary-comment-start "=A1") (setq diary-comment-end "!") (require 'appt) (appt-activate 1) ;; See also: appt-warning-time-regexp (setq appt-message-warning-time 10) (setq appt-display-format 'echo) (setq appt-display-mode-line t)