[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help debugging a backtrace

From: Kaushal Modi
Subject: Re: Help debugging a backtrace
Date: Mon, 02 May 2016 04:20:50 +0000

> Typo: You probably mean `featurep', not `feature'.

feature is correct here; it's just the argument name.

@Michael Thanks for that help. Here's more info.

Here is what I got in my backtrace:

Debugger entered: nil
  (progn (debug))
  (if (or (eq feature (quote finder-inf)) (and (stringp filename)
(string-match-p "finder-inf" filename))) (progn (debug)))
  (lambda (feature &optional filename _noerror) (if (or (eq feature (quote
finder-inf)) (and (stringp filename) (string-match-p "finder-inf"
filename))) (progn (debug))) (message "feature: %S" feature) (message
"filename: %S" filename))(finder-inf nil t)
  apply((lambda (feature &optional filename _noerror) (if (or (eq feature
(quote finder-inf)) (and (stringp filename) (string-match-p "finder-inf"
filename))) (progn (debug))) (message "feature: %S" feature) (message
"filename: %S" filename)) (finder-inf nil t))
  require(finder-inf nil t)
  eval-buffer(#<buffer  *load*-296204> nil
"/data/data/com.termux/files/home/.emacs.d/my-package-setup.el" nil t)  ;
Reading at buffer position 21

"/data/data/com.termux/files/home/.emacs.d/my-package-setup.el" nil t)
  load("~/.emacs.d/my-package-setup.el" nil :nomessage)
  eval-buffer(#<buffer  *load*> nil
"/data/data/com.termux/files/home/.emacs.d/init.el" nil t)  ; Reading at
buffer position 758

"/data/data/com.termux/files/home/.emacs.d/init.el" t t)
  load("/data/data/com.termux/files/home/.emacs.d/init" t t)
  #[0 " \205\266 \306=\203 \307 \310Q\202? \311=\204 \307
\323\202?\316\324 \325 \324\211#\210 \324=\203e\326\327\330\307
\331Q!\"\325 \324\211#\210 \324=\203d \210 \203\247\332
!\333\232\203\247\334 !\211\335P\336 !\203\201\211\202\214\336 !\203\213
\202\214\314\262 \203\245\337 \"\203\243\340\341 #\210\342\343!\210 \266
\f?\205\264\314 \325\344\324\211#)\262 \207" [init-file-user system-type
delayed-warnings-list user-init-file inhibit-default-init
inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs"
directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs"
"^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file
is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name
"init" file-name-as-directory "/.emacs.d" file-name-extension "elc"
file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message
"Warning: %s is newer than %s" sit-for 1 "default"] 7]()


I see a call to package--build-compatibility-table() in my backtrace
whereas it's not present in yours.

Then I slightly tweaked your require advice, and replaced (debug) with


;; (package-initialize) ; Do NOT delete this comment
;;   In emacs 25+, the `package-initialize' call is auto-added to the top of
;; init.el unless the user already has a commented or uncommented
;; `(package-initialize)' line present in their init.el.
;;   I call this function in setup-packages.el and so am keeping the
;; commented out version here so that package.el does not add it again.

(advice-add 'require :before
   (lambda (feature &optional filename _noerror)
     (when (or (eq feature 'finder-inf)
(and (stringp filename)
    (string-match-p "finder-inf" filename)))
;; (debug)
(message "feature: %S" feature)
(message "load-file-name: %S" load-file-name)
(message "filename: %S" filename)
(message "---"))))

(load (locate-user-emacs-file "my-package-setup.el") nil :nomessage)


Here's the full *Messages* buffer output when running "emacs":

Here are the relevant lines from that:


Finding pointers to doc strings...done
feature: finder-inf
filename: nil
feature: finder-inf
filename: nil
For information about GNU Emacs and the GNU system, type C-h C-a.


When running "emacs", the finder-inf is required twice: once by
my-setup-package.el and second time by loadup.el.

When running "emacs -Q -l init.el" or "emacs -q -l init.el", finder-inf is
required just once, by my-setup-package.el.

Also, here are the patches needed to be done to few .el files for emacs to
work in Termux:

I realized one important piece of info (I think) while reviewing those;
that emacs is running undumped. Could that be a source of this issue? Would
that explain the difference in behavior between "emacs" and "emacs -q -l

Kaushal Modi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]