From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Elena Newsgroups: gmane.emacs.help Subject: Re: "Anything" package requires w3m command... Date: Mon, 20 Dec 2010 05:42:40 -0800 (PST) Organization: http://groups.google.com Message-ID: <14da5ebc-0d52-4812-a532-9842fc839dd2@q18g2000vbm.googlegroups.com> References: <80ipzazi33.fsf@missioncriticalit.com> <87d3picyah.fsf@fh-trier.de> <804oar16qv.fsf@missioncriticalit.com> <9e2a7518-2fc7-43dc-8dac-195805205968@k38g2000vbc.googlegroups.com> <80oc8ksa83.fsf@missioncriticalit.com> <0cc97c59-70f0-4b7a-8508-3e943544e73b@y3g2000vbm.googlegroups.com> <80vd2ohb1m.fsf@missioncriticalit.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1292856133 16225 80.91.229.12 (20 Dec 2010 14:42:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Dec 2010 14:42:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 20 15:42:09 2010 Return-path: Envelope-to: geh-help-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 1PUgvB-0001hq-T1 for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Dec 2010 15:42:09 +0100 Original-Received: from localhost ([127.0.0.1]:37621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUguV-0005u3-ON for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Dec 2010 09:40:23 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!q18g2000vbm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 233 Original-NNTP-Posting-Host: 89.96.190.244 Original-X-Trace: posting.google.com 1292852560 17669 127.0.0.1 (20 Dec 2010 13:42:40 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 20 Dec 2010 13:42:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q18g2000vbm.googlegroups.com; posting-host=89.96.190.244; posting-account=AFCLjAoAAABJAOf_HjgEEEi3ty-lG5m2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:183452 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77702 Archived-At: On Dec 20, 12:40=A0pm, S=E9bastien Vauban wrote: > Hi Elena and Thierry, > > Thanks Elena for having gone ahead with this thread... and contacted Thie= rry. > > Regarding `w3m-bookmark', I indeed saw such messages in the past. It must= be > related to the problem. > > --8<---------------cut here---------------start------------->8--- > Debugger entered--Lisp error: (error "Install w3m command in `exec-path' = or set `w3m-command' variable correctly") > =A0 signal(error ("Install w3m command in `exec-path' or set `w3m-command= ' variable correctly")) > =A0 error("Install w3m command in `exec-path' or set `w3m-command' variab= le correctly") > =A0 (progn (error "Install w3m command in `exec-path' or set `w3m-command= ' variable correctly")) > =A0 (if (not (stringp w3m-command)) (progn (error "Install w3m command in= `exec-path' or set `w3m-command' variable correctly"))) > =A0 (when (not (stringp w3m-command)) (error "Install w3m command in `exe= c-path' or set `w3m-command' variable correctly")) > =A0 eval-buffer(#> nil "c:/home/sva/src/emacs-w3m/w3m= .el" nil t) =A0; Reading at buffer position 11512 > =A0 load-with-code-conversion("c:/home/sva/src/emacs-w3m/w3m.el" "c:/home= /sva/src/emacs-w3m/w3m.el" nil t) > =A0 orig-require(w3m nil nil) > =A0 (let ((my/require-depth ...)) (orig-require feature filename noerror)= ) > =A0 (cond ((member feature features) (message "%sRequiring `%s' (already = loaded)" ... feature)) (t (message "%sRequiring `%s'" ... feature) (let ...= ...) (message "%sRequiring `%s'...done" ... feature))) > =A0 require(w3m) > =A0 eval-buffer(#> nil "c:/home/sva/src/emacs-w3m/w3m= -bookmark.el" nil t) =A0; Reading at buffer position 1346 > =A0 load-with-code-conversion("c:/home/sva/src/emacs-w3m/w3m-bookmark.el"= "c:/home/sva/src/emacs-w3m/w3m-bookmark.el" t t) > =A0 orig-require(w3m-bookmark nil t) > =A0 (let ((my/require-depth ...)) (orig-require feature filename noerror)= ) > =A0 (cond ((member feature features) (message "%sRequiring `%s' (already = loaded)" ... feature)) (t (message "%sRequiring `%s'" ... feature) (let ...= ...) (message "%sRequiring `%s'...done" ... feature))) > =A0 require(w3m-bookmark nil t) > =A0 (progn (require (quote w3m-bookmark) nil t)) > =A0 (eval-when-compile (require (quote w3m-bookmark) nil t)) > =A0 eval-buffer(# nil "c:/home/sva/Downloads/emacs/site= -lisp/anything-config/anything-config.el" nil t) =A0; Reading at buffer pos= ition 176537 > =A0 load-with-code-conversion("c:/home/sva/Downloads/emacs/site-lisp/anyt= hing-config/anything-config.el" "c:/home/sva/Downloads/emacs/site-lisp/anyt= hing-config/anything-config.el" nil t) > =A0 orig-require(anything-config nil nil) > =A0 (let ((my/require-depth ...)) (orig-require feature filename noerror)= ) > =A0 (cond ((member feature features) (message "%sRequiring `%s' (already = loaded)" ... feature)) (t (message "%sRequiring `%s'" ... feature) (let ...= ...) (message "%sRequiring `%s'...done" ... feature))) > =A0 require(anything-config) > --8<---------------cut here---------------end--------------->8--- Yes, that's the same problem. I think a fix would be to add "emacs- w3m" directory only when "w3m-command" is defined and available, like this (snippet not tested, I'm busy right now): ;; Add emacs-w3m path to load-path only when w3m-command is available. (when w3m-command (if (executable-find w3m-command) (add-to-list 'load-path "/path/to/emacs-w3m") (warn "Executable %s not found, emacs-w3m package not added to load- path." w3m-command)) > > Now, following Thierry's advice, I've git pull'ed `anything' just 10 min = ago, > and tried to relaunch my Emacs. > > I now have a different error (maybe hiding the above one, from a previous > run): > > --8<---------------cut here---------------start------------->8--- > Warning (initialization): An error occurred while loading `c:/home/sva/.e= macs': > > error: No buffer named *anything* > > To ensure normal operation, you should investigate and remove the > cause of the error in your initialization file. =A0Start Emacs with > the `--debug-init' option to view a complete error backtrace. > --8<---------------cut here---------------end--------------->8--- > > and the following backtrace: > > with the following lines in my `.emacs': > > --8<---------------cut here---------------start------------->8--- > =A0;; open anything > =A0(when (require 'anything) > > =A0 =A0(defun my/anything () > =A0 =A0 =A0(interactive) > =A0 =A0 =A0(anything :sources > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'( > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0anything-c-source-buffers > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0anything-c-source-file-name-history > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; anything-c-source-info-pages > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 ; get rid of messages echo'ed in > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 ; minibuffer prompt > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0anything-c-source-info-elisp > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0anything-c-source-man-pages > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0anything-c-source-locate > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0anything-c-source-emacs-commands > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0:buffer " *my/anything*")) > > =A0 =A0;; select anything > =A0 =A0(global-set-key (kbd "") 'my/anything)) > > =A0(setq anything-command-map-prefix-key "") > > =A0(when (require 'anything-config) > > =A0 =A0(require 'anything-c-yasnippet) > > =A0 =A0;; source of candidates for anything > =A0 =A0(anything-set-sources > =A0 =A0 `( > =A0 =A0 =A0 ,anything-c-source-buffers > =A0 =A0 =A0 ,anything-c-source-file-name-history > =A0 =A0 =A0 ,anything-c-source-files-in-current-dir > =A0 =A0 =A0 ,anything-c-source-man-pages > =A0 =A0 =A0 ,anything-c-source-recentf > =A0 =A0 =A0 ,anything-c-source-bookmarks > =A0 =A0 =A0 ,anything-c-source-locate =A0 =A0 =A0; find files everywhere > =A0 =A0 =A0 ,anything-c-source-emacs-functions > =A0 =A0 =A0 ,anything-c-source-info-cl > =A0 =A0 =A0 ,anything-c-source-info-elisp > =A0 =A0 =A0 )) > > =A0 =A0;; do not show more candidates than this limit from individual > =A0 =A0;; sources > =A0 =A0(setq anything-candidate-number-limit 999) > > =A0 =A0;; the user has to be idle for this many seconds, before candidate= s > =A0 =A0;; from *delayed* sources are collected (useful for sources involv= ing > =A0 =A0;; heavy operations, so that candidates from the source are not > =A0 =A0;; retrieved unnecessarily if the user keeps typing) > =A0 =A0(setq anything-idle-delay 0.9) ; 1.3 works nicely > > =A0 =A0;; the user has to be idle for this many seconds, before ALL > =A0 =A0;; candidates are collected (also effective for *non-delayed* > =A0 =A0;; sources) > =A0 =A0(setq anything-input-idle-delay 0.4) ; 0.6 works nicely > > =A0 =A0;; uses the current window to show the candidates > =A0 =A0(setq anything-samewindow t) > > =A0 =A0;; candidates separator of `multiline' source > =A0 =A0(setq anything-candidate-separator > =A0 =A0 =A0 =A0 =A0(propertize "--separator------------------------------= -" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'face 'separator-face)) > > =A0 =A0;; suppress displaying sources which are out of screen at first > =A0 =A0(setq anything-quick-update t) > > =A0 =A0;; don't save history information to file > =A0 =A0(remove-hook 'kill-emacs-hook 'anything-c-adaptive-save-history)) > --8<---------------cut here---------------end--------------->8--- > > Do you have an idea why this is occurring? I've read something about this issue, but I don't remember what the fix was. If I'm not mistaken, creating "*anything*" buffer in advance fixed the issue. Sorry for not being able to provide definitive answers right now. > > Best regards, > =A0 Seb > > PS- By far, what I really want `anything' for is the `locate' stuff... > > PS2- My `require' is wrapped to output debug messages: > > --8<---------------cut here---------------start------------->8--- > =A0 =A0 =A0 =A0 =A0;; REPLACES ORIGINAL in `C source code' (dumped) > =A0 =A0 =A0 =A0 =A0;; redefine require to leave a trace of packages being= loaded > =A0 =A0 =A0 =A0 =A0(if (not (fboundp 'orig-require)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0(fset 'orig-require (symbol-function 'require)= ) > =A0 =A0 =A0 =A0 =A0 =A0(message "The code to redefine `require' should no= t be loaded twice")) > > =A0 =A0 =A0 =A0 =A0(defvar my/require-depth 0) > > =A0 =A0 =A0 =A0 =A0(defun require (feature &optional filename noerror) > =A0 =A0 =A0 =A0 =A0 =A0"Leave a trace of packages being loaded." > =A0 =A0 =A0 =A0 =A0 =A0(cond ((member feature features) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (message "%sRequiring `%s' (already l= oaded)" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(concat (make-stri= ng (* 2 my/require-depth) ? ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"+= -> ") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0feature)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(t > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (message "%sRequiring `%s'" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(concat (make-stri= ng (* 2 my/require-depth) ? ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"+= -> ") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0feature) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (let ((my/require-depth (+ 1 my/requi= re-depth))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (orig-require feature filename no= error)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (message "%sRequiring `%s'...done" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(concat (make-stri= ng (* 2 my/require-depth) ? ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"+= -> ") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0feature)))))) > --8<---------------cut here---------------end--------------->8--- This is a very useful snippet of code! Thanks for sharing.