From: MON KEY <monkey@sandpframing.com>
To: 5831@debbugs.gnu.org
Subject: bug#5831: 23.1.94; htmlfontify's `hfy-which-etags' not finding etags "standalone"
Date: Sat, 3 Apr 2010 14:41:40 -0400 [thread overview]
Message-ID: <u2id2afcfda1004031141w89ab1e7fwa81eb8b86e6eb6d1@mail.gmail.com> (raw)
`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)
;=> "<MY-W32-PATH>/emacs-23.1.94/bin/etags.exe"
(executable-find "etags")
;=> "<MY-W32-PATH>/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\
next reply other threads:[~2010-04-03 18:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-03 18:41 MON KEY [this message]
2012-05-31 17:40 ` bug#5831: 23.1.94; htmlfontify's `hfy-which-etags' not finding etags "standalone" Glenn Morris
2012-05-31 17:56 ` Eli Zaretskii
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=u2id2afcfda1004031141w89ab1e7fwa81eb8b86e6eb6d1@mail.gmail.com \
--to=monkey@sandpframing.com \
--cc=5831@debbugs.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).