From: David Reitter <david.reitter@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: TUTORIAL.gz
Date: Sun, 16 Oct 2005 15:52:57 +0100 [thread overview]
Message-ID: <7DD3FE7A-06BE-4D1C-9B2F-0B3B976FF11D@gmail.com> (raw)
In-Reply-To: <E1EQ9Q6-0007LJ-KX@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
On 13 Oct 2005, at 21:11, Richard M. Stallman wrote:
> I would like to suggest to enable help-with-tutorial to load .gz
> files. This would allow site maintainers to compress the files,
> saving around 600K in installs of binary distributions. (info
> has no
> problems with gzipped files, which is very nice.)
>
> It sounds good to me. Would you like to write the patch?
>
OK. In addition to applying the patch below, someone might want to
change the Makefile to gzip the appropriate files on non-Windows
machines. I have no intuition about how to do that.
2005-10-15 David Reitter <david.reitter@gmail.com>
* help-fns.el (help-with-tutorial): Allow tutorial files to be
compressed with gzip.
* help.el (describe-*): Allow read files to be compressed with
gzip.
(view-possibly-compressed-file): new function to read a compressed
file.
(describe-extra-packages): moved here from menu-bar.el
* menu-bar.el (menu-bar-help-extra-packages): moved to help.el.
[-- Attachment #2: compress-help.patch --]
[-- Type: application/octet-stream, Size: 9230 bytes --]
Index: lisp/help.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help.el,v
retrieving revision 1.284
diff -c -r1.284 help.el
*** lisp/help.el 6 Aug 2005 22:13:43 -0000 1.284
--- lisp/help.el 16 Oct 2005 14:50:25 -0000
***************
*** 282,305 ****
(setq sym (intern-soft (match-string 1 str)))
(and (fboundp sym) sym)))))))
\f
;;; `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 ()
--- 282,321 ----
(setq sym (intern-soft (match-string 1 str)))
(and (fboundp sym) sym)))))))
+ (defun view-possibly-compressed-file (file)
+ (let ((auto-compression-mode t))
+ (view-file
+ (if (and
+ (not (file-exists-p file))
+ (file-exists-p (concat file ".gz")))
+ (concat file ".gz")
+ file))))
+
\f
;;; `User' help functions
(defun describe-distribution ()
"Display info on how to obtain the latest version of GNU Emacs."
(interactive)
! (view-possibly-compressed-file (expand-file-name "DISTRIB" data-directory)))
+ (defun describe-extra-packages ()
+ "Display info on some additional packages available for GNU Emacs."
+ (interactive)
+ (let (enable-local-variables)
+ (view-possibly-compressed-file (expand-file-name "MORE.STUFF" data-directory))
+ (goto-address)))
+
(defun describe-copying ()
"Display info on how you may redistribute copies of GNU Emacs."
(interactive)
! (view-possibly-compressed-file (expand-file-name "COPYING" data-directory))
(goto-char (point-min)))
(defun describe-project ()
"Display info on the GNU project."
(interactive)
! (view-possibly-compressed-file (expand-file-name "THE-GNU-PROJECT" data-directory))
(goto-char (point-min)))
(defun describe-no-warranty ()
***************
*** 329,340 ****
;; run describe-prefix-bindings.
(setq prefix-help-command 'describe-prefix-bindings)
(defun view-emacs-news (&optional arg)
"Display info on recent changes to Emacs.
With argument, display info only for the selected version."
(interactive "P")
(if (not arg)
! (view-file (expand-file-name "NEWS" data-directory))
(let* ((map (sort
(delete-dups
(apply
--- 345,357 ----
;; run describe-prefix-bindings.
(setq prefix-help-command 'describe-prefix-bindings)
+
(defun view-emacs-news (&optional arg)
"Display info on recent changes to Emacs.
With argument, display info only for the selected version."
(interactive "P")
(if (not arg)
! (view-possibly-compressed-file (expand-file-name "NEWS" data-directory))
(let* ((map (sort
(delete-dups
(apply
***************
*** 365,371 ****
res)
(if (not file)
(error "No news is good news")
! (view-file (expand-file-name file data-directory))
(widen)
(goto-char (point-min))
(when (re-search-forward
--- 382,388 ----
res)
(if (not file)
(error "No news is good news")
! (view-fileview-possibly-compressed-file (expand-file-name file data-directory))
(widen)
(goto-char (point-min))
(when (re-search-forward
***************
*** 390,396 ****
(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.
--- 407,413 ----
(defun view-todo (&optional arg)
"Display the Emacs TODO list."
(interactive "P")
! (view-possibly-compressed-file (expand-file-name "TODO" data-directory)))
(defun view-echo-area-messages ()
"View the log of recent echo-area messages: the `*Messages*' buffer.
***************
*** 402,408 ****
(defun view-order-manuals ()
"Display the Emacs ORDERS file."
(interactive)
! (view-file (expand-file-name "ORDERS" data-directory))
(goto-address))
(defun view-emacs-FAQ ()
--- 419,425 ----
(defun view-order-manuals ()
"Display the Emacs ORDERS file."
(interactive)
! (view-possibly-compressed-file (expand-file-name "ORDERS" data-directory))
(goto-address))
(defun view-emacs-FAQ ()
***************
*** 414,420 ****
(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.
--- 431,437 ----
(defun view-emacs-problems ()
"Display info on known problems with Emacs and possible workarounds."
(interactive)
! (view-possibly-compressed-file (expand-file-name "PROBLEMS" data-directory)))
(defun view-lossage ()
"Display last 100 input keystrokes.
Index: lisp/help-fns.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help-fns.el,v
retrieving revision 1.75
diff -c -r1.75 help-fns.el
*** lisp/help-fns.el 13 Sep 2005 14:58:35 -0000 1.75
--- lisp/help-fns.el 16 Oct 2005 14:50:25 -0000
***************
*** 52,68 ****
(if (get-language-info current-language-environment 'tutorial)
current-language-environment
"English")))
! file filename)
(setq filename (get-language-info lang 'tutorial))
(setq file (expand-file-name (concat "~/" filename)))
(delete-other-windows)
(if (get-file-buffer file)
(switch-to-buffer (get-file-buffer file))
! (switch-to-buffer (create-file-buffer file))
(setq buffer-file-name file)
(setq default-directory (expand-file-name "~/"))
(setq buffer-auto-save-file-name nil)
- (insert-file-contents (expand-file-name filename data-directory))
(hack-local-variables)
(goto-char (point-min))
(search-forward "\n<<")
--- 52,73 ----
(if (get-language-info current-language-environment 'tutorial)
current-language-environment
"English")))
! file filename)
(setq filename (get-language-info lang 'tutorial))
(setq file (expand-file-name (concat "~/" filename)))
(delete-other-windows)
(if (get-file-buffer file)
(switch-to-buffer (get-file-buffer file))
! (setq file (expand-file-name filename data-directory))
! (unless (file-exists-p file)
! (if (file-exists-p (concat file ".gz"))
! (setq file (concat file ".gz"))
! (error "%s does not exist" file)))
! (let ((auto-compression-mode t))
! (find-file file))
(setq buffer-file-name file)
(setq default-directory (expand-file-name "~/"))
(setq buffer-auto-save-file-name nil)
(hack-local-variables)
(goto-char (point-min))
(search-forward "\n<<")
Index: lisp/menu-bar.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.273
diff -c -r1.273 menu-bar.el
*** lisp/menu-bar.el 10 Sep 2005 10:55:14 -0000 1.273
--- lisp/menu-bar.el 16 Oct 2005 14:50:28 -0000
***************
*** 1356,1371 ****
'(menu-item "Getting New Versions" describe-distribution
:help "How to get latest versions of Emacs"))
(define-key menu-bar-help-menu [more]
! '(menu-item "Find Extra Packages"
! menu-bar-help-extra-packages
:help "Where to find some extra packages and possible updates"))
- (defun menu-bar-help-extra-packages ()
- "Display help about some additional packages available for Emacs."
- (interactive)
- (let (enable-local-variables)
- (view-file (expand-file-name "MORE.STUFF"
- data-directory))
- (goto-address)))
(define-key menu-bar-help-menu [about]
'(menu-item "About Emacs" display-splash-screen
:help "Display version number, copyright info, and basic help"))
--- 1356,1363 ----
'(menu-item "Getting New Versions" describe-distribution
:help "How to get latest versions of Emacs"))
(define-key menu-bar-help-menu [more]
! '(menu-item "Find Extra Packages" describe-extra-packages
:help "Where to find some extra packages and possible updates"))
(define-key menu-bar-help-menu [about]
'(menu-item "About Emacs" display-splash-screen
:help "Display version number, copyright info, and basic help"))
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2005-10-16 14:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 23:39 TUTORIAL.gz David Reitter
2005-10-13 20:11 ` TUTORIAL.gz Richard M. Stallman
2005-10-14 9:16 ` TUTORIAL.gz Werner LEMBERG
2005-10-14 10:07 ` TUTORIAL.gz David Kastrup
2005-10-14 10:51 ` TUTORIAL.gz Werner LEMBERG
2005-10-15 16:13 ` TUTORIAL.gz Richard M. Stallman
2005-10-16 14:52 ` David Reitter [this message]
2005-10-17 8:34 ` TUTORIAL.gz Juri Linkov
2005-10-17 14:46 ` TUTORIAL.gz Stefan Monnier
2005-10-17 16:03 ` TUTORIAL.gz David Reitter
2005-10-17 16:20 ` TUTORIAL.gz David Kastrup
2005-10-17 17:48 ` TUTORIAL.gz Stefan Monnier
2005-10-17 18:47 ` TUTORIAL.gz Lennart Borgman
2005-10-17 19:08 ` TUTORIAL.gz Stefan Monnier
2005-10-17 19:33 ` TUTORIAL.gz Lennart Borgman
2005-10-18 8:04 ` TUTORIAL.gz Juri Linkov
2005-10-17 14:59 ` TUTORIAL.gz Eli Zaretskii
2005-10-17 15:22 ` TUTORIAL.gz Romain Francoise
-- strict thread matches above, loose matches on Subject: below --
2005-10-14 11:25 TUTORIAL.gz LENNART BORGMAN
2005-10-15 12:43 ` TUTORIAL.gz Eli Zaretskii
2005-10-15 19:19 ` TUTORIAL.gz David Kastrup
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7DD3FE7A-06BE-4D1C-9B2F-0B3B976FF11D@gmail.com \
--to=david.reitter@gmail.com \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).