all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Subject: Re: Should we move 20.x related stuff out of NEWS ?
Date: Sat, 17 Apr 2004 17:09:59 +0300	[thread overview]
Message-ID: <878yguae6g.fsf@mail.jurta.org> (raw)
In-Reply-To: <8765c0njem.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "16 Apr 2004 09:28:28 -0400")

>>> Well, customize-variable could also record the two last Emacs minor
>>> and major Emacs versions valid on each change, and then the NEWS file
>>> gets narrowed accordingly by C-h n.

I really wouldn't want to make a mountain out of a molehill,
but I think an idea to automatically narrow O?NEWS.([1-9])?
to the selected release is very good for Emacs users.

I propose to replace the function `view-emacs-news' (whose
current numeric argument has no sense) by the following function.
It allows the user to select a release number, finds it among
different news files, and narrows the buffer to the selected
release.

(defun view-emacs-news (&optional release map)
  "Display info on recent changes to Emacs."
  (interactive
   (let* ((map (sort
                (delete-dups
                 (mapcan
                  (lambda (file)
                    (with-temp-buffer
                      (insert-file-contents
                       (expand-file-name file data-directory))
                      (let (res)
                        (while (re-search-forward
                                "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\.[0-9]+\\)?\\)"
                                nil t)
                          (setq res (cons (list (match-string-no-properties 1) file) res)))
                        res)))
                  (append '("NEWS" "ONEWS")
                          (directory-files data-directory nil
                                           "^ONEWS\\.[0-9]+$" nil))))
                (lambda (a b)
                  (string< (car b) (car a)))))
          (release (caar map)))
     (list (completing-read
            (format "Read NEWS for the release (default %s): " release)
            (mapcar 'car map) nil nil nil nil release)
           map)))
  (let* ((file (cadr (assoc release map))))
    (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
             (concat "Changes in \\(?:Emacs\\|version\\)?[ \t]*" release)
             nil t)
        (beginning-of-line)
        (narrow-to-region
         (point)
         (save-excursion
           (while (or (and (or
                            (re-search-forward
                             "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\.[0-9]+\\)?\\)"
                             nil t)
                            (re-search-forward
                             "For older news, see the file ONEWS"
                             nil t))
                           (equal (match-string-no-properties 1) release))))
           (beginning-of-line)
           (point)))))))

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2004-04-17 14:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-15 17:40 Should we move 20.x related stuff out of NEWS ? Kim F. Storm
2004-04-15 18:55 ` Juri Linkov
2004-04-16  1:31   ` Miles Bader
2004-04-16  2:08     ` David Kastrup
2004-04-16  2:33       ` Miles Bader
2004-04-16 13:28         ` Stefan Monnier
2004-04-17 14:09           ` Juri Linkov [this message]
2004-04-18 21:47             ` Richard Stallman
2004-04-17  7:15   ` Richard Stallman
2004-04-17  8:42   ` Alan Mackenzie
2004-04-17 14:09     ` Juri Linkov
2004-04-18 14:35       ` Alan Mackenzie
2004-04-18 17:10         ` Adrian Aichner
2004-04-18 17:21           ` Adrian Aichner
2004-04-18 21:39         ` Kim F. Storm
2004-04-19  6:58           ` Kai Grossjohann
2004-04-19 10:26           ` Alan Mackenzie
2004-04-22  3:18             ` Juri Linkov
2004-04-22 23:38               ` Kim F. Storm
2004-04-25  4:55                 ` Juri Linkov
2004-04-25 23:36                   ` Richard Stallman
2004-04-26  4:59                     ` Juri Linkov
2004-04-26  6:18                       ` Miles Bader
2004-04-26 14:10                       ` Richard Stallman
2004-04-22  2:54         ` isearch (was: Re: Should we move 20.x related stuff out of NEWS ?) Juri Linkov
2004-04-23 17:21           ` Richard Stallman
2004-04-23 17:44             ` Stefan Monnier
2004-04-23 18:35               ` Drew Adams
2004-04-16 18:08 ` Should we move 20.x related stuff out of NEWS ? Richard Stallman

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=878yguae6g.fsf@mail.jurta.org \
    --to=juri@jurta.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.