From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: Help debugging a backtrace Date: Mon, 02 May 2016 04:20:50 +0000 Message-ID: References: <87wpniyiy6.fsf@gmail.com> <87mvoccdht.fsf@web.de> <87r3dl3ljs.fsf@web.de> <87mvo93lbf.fsf@web.de> <87twihbj7d.fsf@web.de> <167d27f3-4442-49be-8919-376dc1f1c7ab@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1462162926 22490 80.91.229.3 (2 May 2016 04:22:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 May 2016 04:22:06 +0000 (UTC) Cc: Bruce Connor , help-gnu-emacs@gnu.org To: Drew Adams , Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 02 06:22:05 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 1ax5Mx-0000qL-Ce for geh-help-gnu-emacs@m.gmane.org; Mon, 02 May 2016 06:22:03 +0200 Original-Received: from localhost ([::1]:35223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ax5Mt-0000U9-0L for geh-help-gnu-emacs@m.gmane.org; Mon, 02 May 2016 00:21:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ax5Mb-0000FK-HJ for help-gnu-emacs@gnu.org; Mon, 02 May 2016 00:21:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ax5MF-0004fN-N6 for help-gnu-emacs@gnu.org; Mon, 02 May 2016 00:21:36 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:32851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ax5ME-0004d8-D0 for help-gnu-emacs@gnu.org; Mon, 02 May 2016 00:21:19 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id v145so144137047oie.0 for ; Sun, 01 May 2016 21:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yD76djXm9qxKbaalsVx5M4Eo4WWRvFlI2dc5frEO4mg=; b=B7ITWQ0y0ghw6qgusZQ1QtMfFhOo3FI8uPK/4HjvISciWch9MxcRQyQ4ZmYsSn7pEF BT0kuUiJNheIxA4enmUXrYeD5UEpeTYUxwc1D4FOiD8/Vq920vr/2xtL5DA1nY1JAQBh qJ4FlDU6CJiNlt2D3RFcROiw9B4QWnyTJSlz8/sVdIACJL+wQEhfLB4rnlZjvdsxQYp+ ybateDEoiNHKxX8z1U6qlBFHmzPx/tFd8iItDC40ZsMPaWAWyNS2mrnJNmhSR3WQMlkK ds4f3V8lBOUvCsH0l4WtxdEJXDFPTXjRmmbKWZFXEzJ+tDpeQn/VEbw6QG2SxZ3Otb2w yGsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yD76djXm9qxKbaalsVx5M4Eo4WWRvFlI2dc5frEO4mg=; b=F6ySiTDDTcRCoeM2IGfM67mS/Ks60uD9HqC4SRlU8G/0he+KJALvQtG4BDgFuRvHq4 8H9T6aSqt0uVMw7oclLYH99iiVXm82V20H9JUnD4o8phOp76YBgMMc5tK+zhqKDk1krQ T0qnzHpeEqFn4tb24a4jd8ioCFID1VptRBV0sLQcUVq+qKuq1FpaB1P9Jx8O5xY1PbHq oPKWAUXh0kljDsYkUyY8CT1tzLTwfDcrrMx3VEOFio9F3FkVKGqPw0j25JP1ydRkhOAj KAyB8OyWV9ENXC/fqDFsopYtboaOcFBurzyYk0ygNn0zbHMZWsc+Koi7GIeT0QIsEH6x 2RyQ== X-Gm-Message-State: AOPr4FXmgUecamifM+IhpOwRkVygNAuxJEporfi6mtM+Md282Wp0BYzOLjrScac3V5JGfmkRlApENL9n73Nfqg== X-Received: by 10.157.7.225 with SMTP id 88mr13694921oto.185.1462162860744; Sun, 01 May 2016 21:21:00 -0700 (PDT) In-Reply-To: <167d27f3-4442-49be-8919-376dc1f1c7ab@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22e X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:109853 Archived-At: > > 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) package--build-compatibility-table() package-initialize() eval-buffer(# nil "/data/data/com.termux/files/home/.emacs.d/my-package-setup.el" nil t) ; Reading at buffer position 21 load-with-code-conversion("/data/data/com.termux/files/home/.emacs.d/my-package-setup.el" "/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(# nil "/data/data/com.termux/files/home/.emacs.d/init.el" nil t) ; Reading at buffer position 758 load-with-code-conversion("/data/data/com.termux/files/home/.emacs.d/init.el" "/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 \312Q\202?\313\307\314\315#\203*\316\202?\313\307\314\317#\203>\320\321\322!D\nB \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]() command-line() normal-top-level() eval((normal-top-level)) load("loadup.el") ===== 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 messages. ===== ;; (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": https://gist.github.com/kaushalmodi/debb736534728df7482d4bc1487f2c3e Here are the relevant lines from that: ===== Loading /data/data/com.termux/files/usr/share/emacs/25.0.93/lisp/leim/leim-list.el (source)...done Finding pointers to doc strings...done feature: finder-inf load-file-name: "/data/data/com.termux/files/home/.emacs.d/my-package-setup.el" filename: nil --- feature: finder-inf load-file-name: "/data/data/com.termux/files/usr/share/emacs/25.0.93/lisp/loadup.el" 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: https://github.com/termux/termux-packages/tree/master/packages/emacs 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 ~/.emacs.d/init.el"? -- -- Kaushal Modi