From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: How to find when a feature was introduced Date: Fri, 08 Jul 2016 16:33:05 +0000 Message-ID: References: <831t34k4uj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1467995656 14006 80.91.229.3 (8 Jul 2016 16:34:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 16:34:16 +0000 (UTC) To: Eli Zaretskii , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 18:34:12 2016 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 1bLYjD-0007Iu-1e for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 18:34:11 +0200 Original-Received: from localhost ([::1]:46725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLYjC-0004Uq-8G for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 12:34:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLYiO-0004So-Rj for help-gnu-emacs@gnu.org; Fri, 08 Jul 2016 12:33:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLYiN-00085D-4v for help-gnu-emacs@gnu.org; Fri, 08 Jul 2016 12:33:20 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:33491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLYiJ-000845-MS; Fri, 08 Jul 2016 12:33:15 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id u201so65366532oie.0; Fri, 08 Jul 2016 09:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=mChIXsL9qsJPhb3Nr30qXU4ZYCz7QrBzWnn1C1TmWVg=; b=CIPe53rDkcLyhkFTn4yeKF8KRqJhIZYQho/udLb8/r7ed+cKziTo9QOrjraLZcaCl0 9aW3e0QJoICVGYLh/5p0fLXxt99BSErTfPObf2MBg0MgQuPFkIcaWlWuiJ5kKy0K27u+ VvVeaQp8UL0qftEiRe7BmwymG/BP+quwekAiW+NVMWZGPOcbwXL4sh03luz0qO0wNYjD DTrWKwswkkFeUEYVefJBvDba+EYXOV6OBVFJYn8s9qV02/agvSCQA4yZgxWbrRhBG9wh ioCxRRX9MrzJssfK4MW0cGhX+XHPwcYD42w0qep4XFO76REnSFvrhbdKdBE1dgpK/kDJ ux3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=mChIXsL9qsJPhb3Nr30qXU4ZYCz7QrBzWnn1C1TmWVg=; b=jYUtnfc6fxsG5gukJw897NLTwUKB5z9+SM9Q8n3nexcosxL0Tf2Mh3pwjwXd7S9rQs FXa4OjyAO5+prr8kVQFh7c+Zb+1P3QqHUVEW9nE6K6CSfoeG2Aqz9/0DhH7MJVRxgQgp 8WYsjaO8SUloax3oovyR1zRtHp4bmj2+XvpxDZBGvJW9zRMgc8PUmsrXQp+NAlqGlO4t wYNKFiCmAPvTFrOtvRrFotuHgDGGd8nyO69ImSSUd7Molx828iWLRWjqF1/TPeVdiW7A FE/fNvQpved2ONDpRcIPLMfQ/d/tOtFv3jHA/A2wYb4zzlT28C5oGqcsVKQPE3vQhplc k//w== X-Gm-Message-State: ALyK8tJbRFOVQUFvENwfMx39o4VfhVQ+Z8psYyYulmt7HRxWbshfd2lUMaaxJ0qa/Qu8+uHPTQHrLyEqJpQtRw== X-Received: by 10.202.207.81 with SMTP id f78mr3694021oig.52.1467995594769; Fri, 08 Jul 2016 09:33:14 -0700 (PDT) In-Reply-To: <831t34k4uj.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22e X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:110733 Archived-At: Rustom's question inspired me to come up with this little counsel function to quickly search through *all* NEWS files. The dependencies are the 'counsel' package and 'ag' executable (below can be adapted to use grep instead of ag if desired). It looks like this: http://i.imgur.com/GYT7gln.png Below code is derived from the counsel-ag implementation in counsel.el: https://github.com/abo-abo/swiper/blob/4dbd8c30d5bf0bf7154ca39712bf66ab6f580de7/counsel.el#L1442-1476 ===== ;; NEWS search (defun counsel-news-function (regexp) "Search in all NEWS files for REGEXP." (if (< (length regexp) 3) (counsel-more-chars 3) (let ((default-directory data-directory) (regex (counsel-unquote-regex-parens (setq ivy--old-re (ivy--regex regexp))))) (counsel--async-command (format (concat counsel-ag-base-command " -G '/NEWS.*'") (shell-quote-argument regex))) nil))) (defun counsel-news (&optional initial-input) "Grep for a pattern in regr*list files using ag. INITIAL-INPUT can be given as the initial minibuffer input." (interactive) (require 'counsel) (setq counsel--git-grep-dir data-directory) (ivy-read "Search NEWS: " 'counsel-news-function :initial-input initial-input :dynamic-collection t :history 'counsel-git-grep-history :action #'counsel-git-grep-action :unwind (lambda () (counsel-delete-process) (swiper--cleanup)) :caller 'counsel-news)) ===== I have bound counsel-news to C-h n. Full code: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-news.el On Fri, Jul 8, 2016 at 2:44 AM Eli Zaretskii wrote: > > Date: Thu, 7 Jul 2016 21:28:06 -0700 (PDT) > > From: Rusi > > > > So now I need to tell my students gnu-apl-mode will not run in emacsen > less than > > version X > > > > How to find out X? > > First, try the NEWS method that someone else pointed to. > > If that doesn't work, and the symbol is a defcustom, it should have a > :version tag (if it isn't, report that as a bug). > > If that doesn't work either, or is inapplicable, the most elaborate > method that _always_ works is this: > > . C-h f SOMETHING or C-h v SOMETHING > . note the place in the sources where SOMETHING is defined > . go to the nearest Emacs Git repository and use Git facilities to > find out the date on which the code was added > . consult etc/HISTORY to see which Emacs release the date > corresponds to > > Notes: > (1) The Git facilities are "git annotate" and "git log -L". > (2) Due to branching before the release, a date that is before a > release doesn't necessarily mean the feature was in that release, you > will have to see when the release branch was cut; there should be a > Git tag at the branch point. > > -- -- Kaushal Modi