From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: require basic stuff from specific packages Date: Sat, 16 Jul 2016 09:07:18 +0200 Organization: Aioe.org NNTP Server Message-ID: <868tx2rrh5.fsf@student.uu.se> References: <864m8671sy.fsf@student.uu.se> <86y45glxpy.fsf@student.uu.se> <86lh16i94u.fsf@student.uu.se> <86vb09hd10.fsf@student.uu.se> <86mvllh68i.fsf@student.uu.se> <867fcpgx43.fsf@student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468653039 20480 80.91.229.3 (16 Jul 2016 07:10:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2016 07:10:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 16 09:10:39 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 1bOJkD-000183-IT for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jul 2016 09:10:37 +0200 Original-Received: from localhost ([::1]:36238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOJk7-0000Kr-LL for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jul 2016 03:10:31 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-NNTP-Posting-Host: EoOtCC1fCYcttx6jjhWUlA.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Mail-Copies-To: never X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:8K6y7adO8C1uTqD+r1RJwi5iPYc= Original-Xref: usenet.stanford.edu gnu.emacs.help:218561 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:110872 Archived-At: Here is another approach, namely to abandon the Emacs documentation and help interface and instead operate directly on the source with shell tools, i.e. grep. The advantage is that it works, and even better perhaps; there is no unsafe `require' just to get function definitions; and, it is much faster. There is also the ease of use advantage because you can get all Elisp in the world and just pour it into a directory and there won't be any conflicts or problems loading or whatever as it'll just be a bunch of dead text! All in all, an unusually good solution - as usual! (yeah - how *do* you get *all* MELPA and GNU ELPA code?) Here is the function: double-grep () { local first=$1 # e.g., trim (most unusual concept first!) local second=$2 # string (the the more usual...) local context=$3 # 0 => no context: hits must be on same line local results=$4 # 10 => show max 10 (double) hits local -a files files=($@[5,-1]) # e.g., ~/sw/emacs24-24.4+1/lisp/**/*.el grep --color=always -C $context $first $files \ | grep --color=always $second \ | head -n $results # invocation example: # # $ cd ~/sw/emacs24-24.4+1/lisp/ # $ double-grep trim string 0 10 **/*.el } -- underground experts united .... http://user.it.uu.se/~embe8573 Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic - so far: 58 Blogomatic articles -