From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.bugs Subject: bug#5831: 23.1.94; htmlfontify's `hfy-which-etags' not finding etags "standalone" Date: Sat, 3 Apr 2010 14:41:40 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1270320967 4545 80.91.229.12 (3 Apr 2010 18:56:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 3 Apr 2010 18:56:07 +0000 (UTC) To: 5831@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 03 20:56:03 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ny8Vm-0008UI-Bp for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Apr 2010 20:56:02 +0200 Original-Received: from localhost ([127.0.0.1]:35454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ny8Vl-0002Vh-Eo for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Apr 2010 14:56:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ny8Vg-0002VW-NP for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:55:56 -0400 Original-Received: from [140.186.70.92] (port=55931 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ny8Ve-0002VF-GA for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:55:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ny8Vd-0000cG-8z for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:55:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45559) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ny8Vd-0000c6-5g for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:55:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ny8IE-00046I-9o; Sat, 03 Apr 2010 14:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MON KEY Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Apr 2010 18:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 5831 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.127032011415754 (code B ref -1); Sat, 03 Apr 2010 18:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Apr 2010 18:41:54 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ny8I5-000463-Lt for submit@debbugs.gnu.org; Sat, 03 Apr 2010 14:41:53 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ny8I3-00045y-OC for submit@debbugs.gnu.org; Sat, 03 Apr 2010 14:41:52 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:39964) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ny8Hz-0006lN-Ln for submit@debbugs.gnu.org; Sat, 03 Apr 2010 14:41:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ny8Hz-0000cK-0K for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:41:47 -0400 Original-Received: from [140.186.70.92] (port=44465 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ny8Hx-0000c4-O8 for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:41:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ny8Ht-00088K-SF for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:41:45 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:58762) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ny8Ht-000882-PX for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2010 14:41:41 -0400 Original-Received: by gwb15 with SMTP id 15so2494160gwb.0 for ; Sat, 03 Apr 2010 11:41:40 -0700 (PDT) Original-Received: by 10.150.91.6 with HTTP; Sat, 3 Apr 2010 11:41:40 -0700 (PDT) X-Google-Sender-Auth: 29a15702a374c8c3 Original-Received: by 10.150.120.33 with SMTP id s33mr4394772ybc.50.1270320100823; Sat, 03 Apr 2010 11:41:40 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 03 Apr 2010 14:42:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35898 Archived-At: `hfy-which-etags' fails when the etags executable in path is of type "standalone" (not sure if this w32 specific): (shell-command-to-string (concat hfy-etags-bin " --version")) (executable-find hfy-etags-bin) ;=> "/emacs-23.1.94/bin/etags.exe" (executable-find "etags") ;=> "/emacs-23.1.94/bin/etags.exe" (equal (executable-find hfy-etags-bin) (executable-find "etags")) ;=> t (shell-command-to-string (concat hfy-etags-bin " --version"))) ;=> "etags (standalone 17.38.1.4) ; | Copyright (C) 2010 Free Software Foundation, Inc. ; | This program is distributed under the terms in ETAGS.README" Its unlikey we wouldn't have an etags in path... On a GNU/Linux evaluating same I get: (shell-command-to-string (concat hfy-etags-bin " --version")) ;=> "etags (GNU Emacs 23.1.90) ; | Copyright (C) 2009 Free Software Foundation, Inc. ; | This program is distributed under the terms in ETAGS.README" and `hfy-which-etags' conditional _does_ match this etags exectuable. `hfy-which-etags' conditional string-match evaluations should have a rule to match a ``standalone'' etags. The problem is that when `hfy-which-etags' returns false it causes `hfy-etags-cmd' to fail: (cdr (assoc (hfy-which-etags) hfy-etags-cmd-alist)) ;=> nil if we add a new rule to `hfy-which-etags' conditional: ((string-match "standalone" v) "emacs etags") then we get the appropriate shell script template: (cdr (assoc (hfy-which-etags) hfy-etags-cmd-alist)) ;=> for src in `find . -type f`; ; | do ; | ETAGS=%s; ; | { ... lots more ellided ... } This won't change htmlfontify's reliance on a POSIX friendly shell (nor should it). However, the user shouldn't be restricted from using this library _because_ she is using the executable distributed _with_ her local Emacs... Patch follows: ;;; ============================== *** lisp/htmlfontify.el 2010-03-10 20:20:34.000000000 -0500 --- buffer-content-3664ZIc 2010-04-03 14:28:32.493000000 -0400 *************** *** 391,397 **** (defun hfy-which-etags () "Return a string indicating which flavour of etags we are using." (let ((v (shell-command-to-string (concat hfy-etags-bin " --version")))) ! (cond ((string-match "exube" v) "exuberant ctags") ((string-match "GNU E" v) "emacs etags" )) )) (defcustom hfy-etags-cmd --- 391,398 ---- (defun hfy-which-etags () "Return a string indicating which flavour of etags we are using." (let ((v (shell-command-to-string (concat hfy-etags-bin " --version")))) ! (cond ((string-match "standalone" v) "exuberant ctags") ! ((string-match "exube" v) "exuberant ctags") ((string-match "GNU E" v) "emacs etags" )) )) (defcustom hfy-etags-cmd ;;; ============================== /s_P\