emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move etc/future-bug into etc/JOKES ??


From: Kim F. Storm
Subject: Re: Move etc/future-bug into etc/JOKES ??
Date: Thu, 01 Mar 2007 13:54:45 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> Besides, I strongly doubt many people would browse etc/ for
> interesting stuff - in particular if you use a pre-installed
> emacs not many users would be looking in /usr/share/emacs/22.1/etc
> (or whereever it is located).
>
> That's also why binding C-h j to show the JOKES file would make sense.
>
> And C-h D to show etc/DEBUG for debugging.

Here is a small patch for help.el which provides the following additional
help commands:

C-h C-j  => Display jokes  (JOKES + future-bug + DEVEL.HUMOR)

C-h C-o  => Display other info sources  (MORE.STUFF)

C-h D    => Debugging GNU Emacs  (DEBUG)


It also enables goto-address for all such files, so the ULR's
are properly highlighted and can be activated with the mouse.

BTW, why does MORE.STUFF put "URL:" in front of all URL's ?
goto-address does not need it, and it just looks plain ugly to me.


*** help.el     28 Feb 2007 23:33:46 +0100      1.326
--- help.el     01 Mar 2007 13:43:49 +0100      
***************
*** 50,57 ****
--- 50,59 ----
      (define-key map "\C-d" 'describe-distribution)
      (define-key map "\C-e" 'view-emacs-problems)
      (define-key map "\C-f" 'view-emacs-FAQ)
+     (define-key map "\C-j" 'view-emacs-jokes)
      (define-key map "\C-m" 'view-order-manuals)
      (define-key map "\C-n" 'view-emacs-news)
+     (define-key map "\C-o" 'view-other-info-sources)
      (define-key map "\C-p" 'describe-project)
      (define-key map "\C-t" 'view-todo)
      (define-key map "\C-w" 'describe-no-warranty)
***************
*** 60,65 ****
--- 62,68 ----
      (define-key map "\C-\\" 'describe-input-method)
  
      (define-key map "C" 'describe-coding-system)
+     (define-key map "D" 'view-emacs-debugging)
      (define-key map "F" 'Info-goto-emacs-command-node)
      (define-key map "I" 'describe-input-method)
      (define-key map "K" 'Info-goto-emacs-key-command-node)
***************
*** 178,184 ****
  (defalias 'help-for-help 'help-for-help-internal)
  ;; It can't find this, but nobody will look.
  (make-help-screen help-for-help-internal
!   "a b c C e f F i I k C-k l L m p r s t v w C-c C-d C-f C-n C-p C-t C-w . or 
? :"
    "You have typed %THIS-KEY%, the help character.  Type a Help option:
  \(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] 
to exit the Help command.)
  
--- 181,187 ----
  (defalias 'help-for-help 'help-for-help-internal)
  ;; It can't find this, but nobody will look.
  (make-help-screen help-for-help-internal
!   "Type a help option: [abcCdDefFiIkKlLmprstvw.] C-[cdefjmnoptw] or ?"
    "You have typed %THIS-KEY%, the help character.  Type a Help option:
  \(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] 
to exit the Help command.)
  
***************
*** 192,197 ****
--- 195,201 ----
  d  apropos-documentation.  Type a pattern (a list of words or a regexp), and
        it shows a list of functions, variables, and other items whose
        documentation matches that pattern.  See also the apropos command.
+ D  view-emacs-debugging.  Display information about Emacs debugging.
  e  view-echo-area-messages.  Go to the buffer that logs echo-area messages.
  f  describe-function.  Type a function name and you see its documentation.
  F  Info-goto-emacs-command-node.  Type a command name;
***************
*** 226,236 ****
          in the echo area.
  
  C-c Display Emacs copying permission (GNU General Public License).
! C-d Display Emacs ordering information.
  C-e Display info about Emacs problems.
  C-f Display the Emacs FAQ.
  C-m Display how to order printed Emacs manuals.
  C-n Display news of recent Emacs changes.
  C-p Display information about the GNU project.
  C-t Display the Emacs TODO list.
  C-w Display information on absence of warranty for GNU Emacs."
--- 230,242 ----
          in the echo area.
  
  C-c Display Emacs copying permission (GNU General Public License).
! C-d Display Emacs distribution and ordering information.
  C-e Display info about Emacs problems.
  C-f Display the Emacs FAQ.
+ C-j Display jokes about Emacs, GNU, and hacking.
  C-m Display how to order printed Emacs manuals.
  C-n Display news of recent Emacs changes.
+ C-o Display other sources of information about Emacs.
  C-p Display information about the GNU project.
  C-t Display the Emacs TODO list.
  C-w Display information on absence of warranty for GNU Emacs."
***************
*** 279,300 ****
  
  ;;; `User' help functions
  
  (defun describe-distribution ()
    "Display info on how to obtain the latest version of GNU Emacs."
    (interactive)
!   (view-file (expand-file-name "DISTRIB" data-directory)))
  
  (defun describe-copying ()
    "Display info on how you may redistribute copies of GNU Emacs."
    (interactive)
!   (view-file (expand-file-name "COPYING" data-directory))
!   (goto-char (point-min)))
  
  (defun describe-project ()
    "Display info on the GNU project."
    (interactive)
!   (view-file (expand-file-name "THE-GNU-PROJECT" data-directory))
!   (goto-char (point-min)))
  
  (defun describe-no-warranty ()
    "Display info on all the kinds of warranty Emacs does NOT have."
--- 285,309 ----
  
  ;;; `User' help functions
  
+ (defun view-help-file (file &optional dir)
+   (view-file (expand-file-name file (or dir data-directory)))
+   (goto-address)
+   (goto-char (point-min)))
+ 
  (defun describe-distribution ()
    "Display info on how to obtain the latest version of GNU Emacs."
    (interactive)
!   (view-help-file "DISTRIB"))
  
  (defun describe-copying ()
    "Display info on how you may redistribute copies of GNU Emacs."
    (interactive)
!   (view-help-file "COPYING"))
  
  (defun describe-project ()
    "Display info on the GNU project."
    (interactive)
!   (view-help-file "THE-GNU-PROJECT"))
  
  (defun describe-no-warranty ()
    "Display info on all the kinds of warranty Emacs does NOT have."
***************
*** 397,403 ****
  (defun view-todo (&optional arg)
    "Display the Emacs TODO list."
    (interactive "P")
!   (view-file (expand-file-name "TODO" data-directory)))
  
  (defun view-echo-area-messages ()
    "View the log of recent echo-area messages: the `*Messages*' buffer.
--- 406,412 ----
  (defun view-todo (&optional arg)
    "Display the Emacs TODO list."
    (interactive "P")
!   (view-help-file "TODO"))
  
  (defun view-echo-area-messages ()
    "View the log of recent echo-area messages: the `*Messages*' buffer.
***************
*** 409,416 ****
  (defun view-order-manuals ()
    "Display the Emacs ORDERS file."
    (interactive)
!   (view-file (expand-file-name "ORDERS" data-directory))
!   (goto-address))
  
  (defun view-emacs-FAQ ()
    "Display the Emacs Frequently Asked Questions (FAQ) file."
--- 418,424 ----
  (defun view-order-manuals ()
    "Display the Emacs ORDERS file."
    (interactive)
!   (view-help-file "ORDERS"))
  
  (defun view-emacs-FAQ ()
    "Display the Emacs Frequently Asked Questions (FAQ) file."
***************
*** 421,427 ****
  (defun view-emacs-problems ()
    "Display info on known problems with Emacs and possible workarounds."
    (interactive)
!   (view-file (expand-file-name "PROBLEMS" data-directory)))
  
  (defun view-lossage ()
    "Display last 100 input keystrokes.
--- 429,465 ----
  (defun view-emacs-problems ()
    "Display info on known problems with Emacs and possible workarounds."
    (interactive)
!   (view-help-file "PROBLEMS"))
! 
! (defun view-emacs-debugging ()
!   "Display info on how to debug Emacs problems."
!   (interactive)
!   (view-help-file "DEBUG"))
! 
! (defun view-other-info-sources ()
!   "Display other sources of information about Emacs (MORE.STUFF)."
!   (interactive)
!   (view-help-file "MORE.STUFF"))
! 
! (defun view-emacs-jokes ()
!   "Display jokes about Emacs, the GNU project, and hacking."
!   (interactive)
!   (let ((buf (get-buffer-create "*JOKES*")))
!     (with-current-buffer buf
!       (let ((inhibit-read-only t))
!       (erase-buffer)
!       (insert "* Jokes about Emacs, GNU, and hacking\n\n\n")
!       (insert-file-contents (expand-file-name "JOKES" data-directory))
!       (goto-char (point-max))
!       (insert "\n\n\n* Bug reports\n\n\n")
!       (insert-file-contents (expand-file-name "future-bug" data-directory))
!       (goto-char (point-max))
!       (insert "\n\n\n* Emacs developer list humor\n\n\n")
!       (insert-file-contents (expand-file-name "DEVEL.HUMOR" data-directory))
!       (outline-mode)
!       (view-mode)
!       (goto-char (point-min))))
!     (display-buffer buf)))
  
  (defun view-lossage ()
    "Display last 100 input keystrokes.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]