all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What's the best way to write complex emacs extension
@ 2014-11-01 23:25 scopeview .
  2014-11-02  4:12 ` Stephen J. Turnbull
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: scopeview . @ 2014-11-01 23:25 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

Hi all,

When I wrote my simple extension, pure elisp code is ok. But I found it is
hard to write complex elisp extension. Because when elisp predication
failed (for example stringp) it hard to find out the failed predication
place. (no file:function:line_number or backtrace)

So my complex extension is elisp + c++ code and I make elisp as simple
as possible. We can link c code to emacs binary, but I don't think it's a
good solution. In xemacs, we can extend elisp by writing c/c++ shared
library and load it dynamicly. If emacs has this feature, my complex emacs
extension can be much simpler.

Does there any other good way to extend emacs?
How about other emacs-alike editor like Hemlock written in common lisp
which can use many mature and complex common lisp library? Does anybody use
it?
I think xemacs's c/c++ shared library is more suitable. But it seems that
xemacs had stop its development.


following link is a simple extension of mine
http://www.emacswiki.org/emacs/dir-list

[-- Attachment #2: Type: text/html, Size: 1135 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* What's the best way to write complex emacs extension
  2014-11-01 23:25 What's the best way to write complex emacs extension scopeview .
@ 2014-11-02  4:12 ` Stephen J. Turnbull
  2014-11-02  5:27 ` Stefan Monnier
  2014-11-02 11:52 ` Stephen Leake
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen J. Turnbull @ 2014-11-02  4:12 UTC (permalink / raw)
  To: scopeview .; +Cc: emacs-devel

scopeview . writes:

 > failed (for example stringp) it hard to find out the failed predication
 > place. (no file:function:line_number or backtrace)

edebug.  XEmacs has a native Lisp debugger as well (maybe Emacs does too).

 > But it seems that xemacs had stop its development.

The rumors of our death are greatly exaggerated, but this is not the
place to discuss that.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What's the best way to write complex emacs extension
  2014-11-01 23:25 What's the best way to write complex emacs extension scopeview .
  2014-11-02  4:12 ` Stephen J. Turnbull
@ 2014-11-02  5:27 ` Stefan Monnier
  2014-11-04  0:16   ` scopeview .
  2014-11-02 11:52 ` Stephen Leake
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2014-11-02  5:27 UTC (permalink / raw)
  To: scopeview .; +Cc: emacs-devel

> When I wrote my simple extension, pure elisp code is ok. But I found it is
> hard to write complex elisp extension. Because when elisp predication
> failed (for example stringp) it hard to find out the failed predication
> place. (no file:function:line_number or backtrace)

Options => Enter Debugger on Error


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What's the best way to write complex emacs extension
  2014-11-01 23:25 What's the best way to write complex emacs extension scopeview .
  2014-11-02  4:12 ` Stephen J. Turnbull
  2014-11-02  5:27 ` Stefan Monnier
@ 2014-11-02 11:52 ` Stephen Leake
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2014-11-02 11:52 UTC (permalink / raw)
  To: emacs-devel

"scopeview ." <scopeview126@gmail.com> writes:

> So my complex extension is elisp + c++ code and I make elisp as simple
> as possible. We can link c code to emacs binary, but I don't think it's a
> good solution. In xemacs, we can extend elisp by writing c/c++ shared
> library and load it dynamicly. If emacs has this feature, my complex emacs
> extension can be much simpler.

This is being worked on, in the branch at
https://github.com/aaptel/emacs-dynamic-module

Note that Emacs is transitioning to use git for the main repository
soon, so this branch will change to use that soon.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What's the best way to write complex emacs extension
  2014-11-02  5:27 ` Stefan Monnier
@ 2014-11-04  0:16   ` scopeview .
  2014-11-04  2:59     ` Alexis
  0 siblings, 1 reply; 6+ messages in thread
From: scopeview . @ 2014-11-04  0:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

Thanks

I have used edebug for developing my elisp extension.

I just feel elisp + XML + c binary for complex extension is not so
convenient. Even with edebug, when some predication failed, I should guess
where it could be then set edebug function entry.

On Sun, Nov 2, 2014 at 1:27 PM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > When I wrote my simple extension, pure elisp code is ok. But I found it
> is
> > hard to write complex elisp extension. Because when elisp predication
> > failed (for example stringp) it hard to find out the failed predication
> > place. (no file:function:line_number or backtrace)
>
> Options => Enter Debugger on Error
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 1147 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What's the best way to write complex emacs extension
  2014-11-04  0:16   ` scopeview .
@ 2014-11-04  2:59     ` Alexis
  0 siblings, 0 replies; 6+ messages in thread
From: Alexis @ 2014-11-04  2:59 UTC (permalink / raw)
  To: emacs-devel


scopeview . writes:

> I have used edebug for developing my elisp extension.
>
> I just feel elisp + XML + c binary for complex extension is not so
> convenient. Even with edebug, when some predication failed, I should guess
> where it could be then set edebug function entry.

Are you already aware of the `debug-on-message` variable?

    Documentation:
    If non-nil, debug if a message matching this regexp is displayed.

It would let you do something like:

    (setq debug-on-message "Wrong type argument: stringp")


Alexis.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-04  2:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-01 23:25 What's the best way to write complex emacs extension scopeview .
2014-11-02  4:12 ` Stephen J. Turnbull
2014-11-02  5:27 ` Stefan Monnier
2014-11-04  0:16   ` scopeview .
2014-11-04  2:59     ` Alexis
2014-11-02 11:52 ` Stephen Leake

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.