help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Fwd: How do I go about debugging my Elisp code?


From: Jean Louis
Subject: Re: Fwd: How do I go about debugging my Elisp code?
Date: Fri, 14 Jan 2022 16:46:25 +0300
User-agent: Mutt/2.1.5+104 (cd3a5c8) (2022-01-09)

* Davin Pearson <davin.pearson@gmail.com> [2022-01-13 04:27]:
> http://davinpearson.nz/binaries/dmp-padderise2.el

After the first review of that file, I can see "Copyright" related to
your name. However, that makes the software proprietary. Because it
does change the Emacs, such software is incompatible with the Emacs
License. If it would be internal only, that would be fine. But as soon
as you publish it, you would need to comply to the license so that
your software becomes compatible legally.

One good way to comply is the package I made for friend from Sweden:

your hjälpsam Package Header Assistant
https://hyperscope.link/3/7/7/3/0/Your-hjälpsam-Package-Header-Assistant-37730.html

You may as well look into almost every ELPA package to find how
package header should look like.

Another way to understand it is to invoke C-h C-c and search for terms
"How to Apply These Terms to Your New Programs" as that is the Emacs
license.

Thanks for your patience and I hope for your insight into this matter.

In relation to technical assistance and related to your package, you
wrote "bugs: none" but I am not sure about it. Don't rush. Bugs they
come.

I have done M-x emacs-lisp-byte-compile on your file and result is
below. I recommend looking into those warnings. And I can assure you
that file may be compiled without any warnings. So try to minimize
those warnings.


Compiling file /home/data1/protected/tmp/mozilla_admin0/dmp-padderise2.el at 
Fri Jan 14 16:39:25 2022

In zippy:
dmp-padderise2.el:44:5: Warning: reference to free variable ‘calamansi’

In dmp-padderise--inside-comment-or-string-p:
dmp-padderise2.el:63:51: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.

In dmp-padderise--inside-comment-p:
dmp-padderise2.el:86:15: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.

In dmp-padderise--deletes-comment-lines:
dmp-padderise2.el:153:31: Warning: assignment to free variable
    ‘dmp-comment-line-regexp’
dmp-padderise2.el:153:13: Warning: reference to free variable
    ‘dmp-comment-line-regexp’

In dmp-padderise--deletes-hash-lines:
dmp-padderise2.el:176:25: Warning: ‘incf’ is an obsolete alias (as of 27.1);
    use ‘cl-incf’ instead.

In dmp-padderise--comment-hash-lines:
dmp-padderise2.el:204:56: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:212:15: Warning: assignment to free variable ‘p0’
dmp-padderise2.el:216:15: Warning: assignment to free variable ‘p1’
dmp-padderise2.el:218:24: Warning: reference to free variable ‘p0’
dmp-padderise2.el:218:27: Warning: reference to free variable ‘p1’

In dmp-padderise--uncomment-hash-lines:
dmp-padderise2.el:230:11: Warning: assignment to free variable ‘count’
dmp-padderise2.el:234:135: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:247:4: Warning: reference to free variable ‘condition-case’
dmp-padderise2.el:247:19: Warning: reference to free variable ‘err4’
dmp-padderise2.el:250:18: Warning: reference to free variable ‘old-ptr’
dmp-padderise2.el:250:26: Warning: reference to free variable ‘new-ptr’
dmp-padderise2.el:251:18: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:253:48: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:255:32: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:255:48: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.

In dmp-gulp-code--safe:
dmp-padderise2.el:264:21: Warning: reference to free variable ‘old-ptr’
dmp-padderise2.el:264:29: Warning: reference to free variable ‘new-ptr’
dmp-padderise2.el:268:51: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.

In dmp-padderise--inside-symbol:
dmp-padderise2.el:286:38: Warning: ‘block’ is an obsolete alias (as of 27.1);
    use ‘cl-block’ instead.
dmp-padderise2.el:314:24: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:305:36: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:312:22: Warning: ‘return’ is an obsolete alias (as of 27.1);
    use ‘cl-return’ instead.
dmp-padderise2.el:318:20: Warning: ‘return’ is an obsolete alias (as of 27.1);
    use ‘cl-return’ instead.

In dmp-padderise--turn-one-line-to-many-lines:
dmp-padderise2.el:328:43: Warning: reference to free variable
    ‘*dmp-defun-outer-regexp*’
dmp-padderise2.el:331:30: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:331:30: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.

In dmp-padderise--wrap-spaces-around-inner-sexps:
dmp-padderise2.el:416:53: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:442:27: Warning: assignment to free variable
    ‘keyword-symbol’
dmp-padderise2.el:447:20: Warning: reference to free variable ‘keyword-symbol’

In dmp-padderise--re-search-forward:
dmp-padderise2.el:735:25: Warning: assignment to free variable ‘done’
dmp-padderise2.el:487:47: Warning: reference to free variable
    ‘*dmp-defun-outer-regexp*’
dmp-padderise2.el:532:41: Warning: reference to free variable ‘points-list’
dmp-padderise2.el:558:37: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:632:36: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:661:23: Warning: assignment to free variable ‘p0’
dmp-padderise2.el:665:23: Warning: assignment to free variable ‘p1’
dmp-padderise2.el:667:49: Warning: reference to free variable ‘p0’
dmp-padderise2.el:667:52: Warning: reference to free variable ‘p1’
dmp-padderise2.el:669:35: Warning: assignment to free variable ‘str’
dmp-padderise2.el:669:35: Warning: reference to free variable ‘str’
dmp-padderise2.el:745:25: Warning: reference to free variable ‘done’

In dmp-padderise--adder-whitespace-before-symbol:
dmp-padderise2.el:773:55: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:785:30: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’

In dmp-splat-symbol-sexp:
dmp-padderise2.el:807:23: Warning: ‘end-of-buffer’ is for interactive use
    only; use ‘(goto-char (point-max))’ instead.

In dmp-padderise--king-splodge:
dmp-padderise2.el:828:17: Warning: assignment to free variable ‘ket’
dmp-padderise2.el:836:19: Warning: assignment to free variable ‘bra’
dmp-padderise2.el:837:21: Warning: reference to free variable ‘bra’
dmp-padderise2.el:837:25: Warning: reference to free variable ‘ket’

In dmp-padderise--create-hashcodes:
dmp-padderise2.el:889:12: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:887:82: Warning: ‘incf’ is an obsolete alias (as of 27.1);
    use ‘cl-incf’ instead.

In dmp-padderise--add-gaps-to-m4-stuff:
dmp-padderise2.el:954:8: Warning: ‘beginning-of-buffer’ is for interactive use
    only; use ‘(goto-char (point-min))’ instead.
dmp-padderise2.el:995:17: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:995:17: Warning: ‘beginning-of-buffer’ is for interactive
    use only; use ‘(goto-char (point-min))’ instead.

In dmp-padderise--bra+ket:
dmp-padderise2.el:1044:12: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.
dmp-padderise2.el:1044:12: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.
dmp-padderise2.el:1044:12: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.
dmp-padderise2.el:1044:12: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.

In dmp-padderise--skip-based-on-keyword--defun:
dmp-padderise2.el:1055:17: Warning: assignment to free variable ‘p0’
dmp-padderise2.el:1078:16: Warning: reference to free variable ‘p0’
dmp-padderise2.el:1116:17: Warning: assignment to free variable ‘endy’
dmp-padderise2.el:1061:37: Warning: reference to free variable
    ‘*dmp-defun-inner-regexp*’
dmp-padderise2.el:1063:24: Warning: assignment to free variable ‘skip’
dmp-padderise2.el:1066:17: Warning: reference to free variable ‘skip’
dmp-padderise2.el:1066:17: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.
dmp-padderise2.el:1106:15: Warning: assignment to free variable ‘count’
dmp-padderise2.el:1112:17: Warning: reference to free variable ‘count’

In dmp-padderise--doit:
dmp-padderise2.el:1130:11: Warning: assignment to free variable ‘ptr2’
dmp-padderise2.el:1139:11: Warning: assignment to free variable ‘ptr’
dmp-padderise2.el:1139:16: Warning: ‘remove-if-not’ is an obsolete function
    (as of 27.1); use ‘cl-remove-if-not’ instead.
dmp-padderise2.el:1146:23: Warning: reference to free variable ‘ptr’
dmp-padderise2.el:1156:13: Warning: assignment to free variable ‘*file-name*’

In dmp-padderise--endy:
dmp-padderise2.el:1201:6: Warning: dmp-padderise--re-search-forward called
    with 3 arguments, but accepts only 1

In dmp-padderise--split-el-files:
dmp-padderise2.el:1209:12: Warning: assignment to free variable ‘ptr’
dmp-padderise2.el:1213:25: Warning: reference to free variable ‘ptr’

In dmp-padderise--scan-for-vspaces:
dmp-padderise2.el:1296:20: Warning: assignment to free variable
    ‘dmp-padderise--listing*’
dmp-padderise2.el:1268:12: Warning: assignment to free variable ‘ptr’
dmp-padderise2.el:1270:22: Warning: reference to free variable ‘ptr’
dmp-padderise2.el:1300:53: Warning: assignment to free variable ‘buf’
dmp-padderise2.el:1296:10: Warning: reference to free variable ‘buf’
dmp-padderise2.el:1274:18: Warning: reference to free variable
    ‘*dmp-padderise--listing*’
dmp-padderise2.el:1292:49: Warning: assignment to free variable ‘p’
dmp-padderise2.el:1290:32: Warning: reference to free variable ‘p’
dmp-padderise2.el:1302:17: Warning: assignment to free variable ‘str’
dmp-padderise2.el:1302:17: Warning: reference to free variable
    ‘dmp-padderise--listing*’
dmp-padderise2.el:1300:41: Warning: reference to free variable ‘str’

In dmp-padderise--delete-hash-comments:
dmp-padderise2.el:1321:16: Warning: ‘remove-if’ is an obsolete function (as of
    27.1); use ‘cl-remove-if’ instead.
dmp-padderise2.el:1333:42: Warning: assignment to free variable ‘regexp-inner’
dmp-padderise2.el:1333:42: Warning: reference to free variable ‘regexp-inner’
dmp-padderise2.el:1355:35: Warning: assignment to free variable ‘regexp-outer’
dmp-padderise2.el:1373:22: Warning: reference to free variable ‘regexp-outer’
dmp-padderise2.el:1375:10: Warning: ‘incf’ is an obsolete alias (as of 27.1);
    use ‘cl-incf’ instead.

In buffer->sexp:
dmp-padderise2.el:1446:13: Warning: assignment to free variable ‘ptr’
dmp-padderise2.el:1442:21: Warning: assignment to free variable ‘done’
dmp-padderise2.el:1442:21: Warning: reference to free variable ‘done’
dmp-padderise2.el:1436:48: Warning: assignment to free variable ‘str’
dmp-padderise2.el:1436:65: Warning: assignment to free variable ‘form’
dmp-padderise2.el:1443:17: Warning: reference to free variable ‘str’
dmp-padderise2.el:1444:17: Warning: reference to free variable ‘form’
dmp-padderise2.el:1446:27: Warning: reference to free variable ‘ptr’
dmp-padderise2.el:1453:67: Warning: assignment to free variable ‘result-pairs’
dmp-padderise2.el:1453:27: Warning: reference to free variable ‘result-pairs’
dmp-padderise2.el:1453:44: Warning: assignment to free variable
    ‘output-of-string->sexp’
dmp-padderise2.el:1453:8: Warning: assignment to free variable
    ‘result-delve-deep’

In delve-deep:
dmp-padderise2.el:1460:10: Warning: assignment to free variable ‘ptr’
dmp-padderise2.el:1462:20: Warning: reference to free variable ‘ptr’
dmp-padderise2.el:1469:33: Warning: assignment to free variable ‘car’
dmp-padderise2.el:1469:33: Warning: reference to free variable ‘car’
dmp-padderise2.el:1465:15: Warning: assignment to free variable ‘comment’
dmp-padderise2.el:1469:15: Warning: assignment to free variable ‘code’
dmp-padderise2.el:1472:34: Warning: reference to free variable ‘code’
dmp-padderise2.el:1472:11: Warning: assignment to free variable ‘result’
dmp-padderise2.el:1476:8: Warning: assignment to free variable ‘result’

In delve-deep-str:
dmp-padderise2.el:1491:12: Warning: assignment to free variable ‘ptr’
dmp-padderise2.el:1495:22: Warning: reference to free variable ‘ptr’
dmp-padderise2.el:1501:9: Warning: assignment to free variable
    ‘**dmp-padderise--bra-less-bra-ket**’
dmp-padderise2.el:1502:9: Warning: assignment to free variable
    ‘**dmp-padderise--bra-plus-bra-ket**’
dmp-padderise2.el:1503:9: Warning: assignment to free variable
    ‘**dmp-padderise--ket**’
dmp-padderise2.el:1504:37: Warning: reference to free variable
    ‘**dmp-padderise--bra-less-bra-ket**’
dmp-padderise2.el:1513:25: Warning: assignment to free variable ‘sexp’
dmp-padderise2.el:1512:8: Warning: reference to free variable ‘sexp’
dmp-padderise2.el:1545:36: Warning: assignment to free variable
    ‘dmp-padderise--list’
dmp-padderise2.el:1536:19: Warning: assignment to free variable ‘p-0’
dmp-padderise2.el:1540:19: Warning: assignment to free variable ‘p-1’
dmp-padderise2.el:1542:21: Warning: reference to free variable ‘p-0’
dmp-padderise2.el:1542:25: Warning: reference to free variable ‘p-1’
dmp-padderise2.el:1554:33: Warning: reference to free variable
    ‘dmp-padderise--list’
dmp-padderise2.el:1556:51: Warning: assignment to free variable ‘popped’
dmp-padderise2.el:1556:51: Warning: reference to free variable ‘popped’
dmp-padderise2.el:1556:51: Warning: ‘decf’ is an obsolete alias (as of 27.1);
    use ‘cl-decf’ instead.
dmp-padderise2.el:1571:7: Warning: ‘assert’ is an obsolete alias (as of 27.1);
    use ‘cl-assert’ instead.
dmp-padderise2.el:1579:15: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.
dmp-padderise2.el:1595:16: Warning: ‘assert’ is an obsolete alias (as of
    27.1); use ‘cl-assert’ instead.
dmp-padderise2.el:1602:30: Warning: assignment to free variable ‘match’
dmp-padderise2.el:1602:30: Warning: reference to free variable ‘match’
dmp-padderise2.el:1614:18: Warning: assignment to free variable ‘p0’
dmp-padderise2.el:1618:18: Warning: assignment to free variable ‘p1’
dmp-padderise2.el:1620:22: Warning: reference to free variable ‘p0’
dmp-padderise2.el:1620:25: Warning: reference to free variable ‘p1’

In dmp-padderise--doit:
dmp-padderise2.el:1640:8: Warning: function ‘dmp-padderise--doit’ defined
    multiple times in this file
dmp-padderise2.el:1747:3: Error: Invalid read syntax: ")", 1747, 3


To run that file alone is impossible as it gives me error:

cons: Symbol’s function definition is void: dmp-canonicalise

I am invoking your file M-x eval-buffer as there is no other
recommended way.

You have (progn) statement at beginning, and I recommend putting that
statement in a function, and that function to become (interactive) so
that it may be invoked. 

Recommended reading and recommended to apply:
(info "(elisp) Packaging Basics") <---- evaluate here to reach to info
file.

Some other notes related to your package:
;; Keywords: Cull Size Quota

Keywords cannot be just any keywords, those shall be keywords as
listed by function M-x finder-list-keywords, such as following:

abbrev        abbreviation handling, typing shortcuts, and macros
bib           bibliography processors
c             C and related programming languages
calendar      calendar and time management tools
comm          communications, networking, and remote file access
convenience   convenience features for faster editing
data          editing data (non-text) files
docs          Emacs documentation facilities
emulations    emulations of other editors
extensions    Emacs Lisp language extensions
faces         fonts and colors for text
files         file editing and manipulation
frames        Emacs frames and window systems
games         games, jokes and amusements
hardware      interfacing with system hardware
help          Emacs help systems
hypermedia    links between text or other media types
i18n          internationalization and character-set support
internal      code for Emacs internals, build process, defaults
languages     specialized modes for editing programming languages
lisp          Lisp support, including Emacs Lisp
local         code local to your site
maint         Emacs development tools and aids
mail          email reading and posting
matching      searching, matching, and sorting
mouse         mouse support
multimedia    images and sound
news          USENET news reading and posting
outlines      hierarchical outlining and note taking
processes     processes, subshells, and compilation
terminals     text terminals (ttys)
tex           the TeX document formatter
tools         programming tools
unix          UNIX feature interfaces and emulators
vc            version control
wp            word processing


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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