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

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

Re: how to add button to emacs that play a elisp code


From: Renato Pontefice
Subject: Re: how to add button to emacs that play a elisp code
Date: Fri, 12 Sep 2014 03:15:19 -0700 (PDT)
User-agent: G2/1.0

Il giorno venerdì 12 settembre 2014 09:44:07 UTC+2, Renato Pontefice ha scritto:
> Il giorno venerdì 12 settembre 2014 04:07:37 UTC+2, Emanuel Berg ha scritto:
> 
> > Michael Heerdegen <michael_heerdegen@web.de> writes:
> 
> > 
> 
> > 
> 
> > 
> 
> > > You may argue that you can avoid destructive
> 
> > 
> 
> > > operations like `nconc' in your code to prevent that
> 
> > 
> 
> > > problem.
> 
> > 
> 
> > 
> 
> > 
> 
> > I was just about to say that - almost. While I don't
> 
> > 
> 
> > think side effects are bad by definition, and I
> 
> > 
> 
> > disklike the whole functional paradigm crusade with the
> 
> > 
> 
> > Haskell hysteria and all, in practise it makes sense
> 
> > 
> 
> > most of the time.
> 
> > 
> 
> > 
> 
> > 
> 
> > But that is more related to your specific example than
> 
> > 
> 
> > to the problem, right?
> 
> > 
> 
> > 
> 
> > 
> 
> > > But that isn't enough either: when you pass your list
> 
> > 
> 
> > > to some function you didn't define yourself (e.g. a
> 
> > 
> 
> > > function that is part of Emacs), it is passed as
> 
> > 
> 
> > > reference (as usual in Lisp), and it may be modified
> 
> > 
> 
> > > by that function by side effect, so that your program
> 
> > 
> 
> > > "changes" too.
> 
> > 
> 
> > >
> 
> > 
> 
> > > If you are not aware of that problem, it probably
> 
> > 
> 
> > > won't bite you often, but when it does, you'll need a
> 
> > 
> 
> > > lot of time to find out what's actually going on.
> 
> > 
> 
> > >
> 
> > 
> 
> > > BTW, this "effect" can also be used constructively,
> 
> > 
> 
> > > it's not "harmful" per se.
> 
> > 
> 
> > 
> 
> > 
> 
> > No, I have lots of quoted, and even backquoted stuff,
> 
> > 
> 
> > which would have showed its harmful side by now, so I
> 
> > 
> 
> > suppose I have been using it either "constructively" or
> 
> > 
> 
> > where it doesn't matter which.
> 
> > 
> 
> > 
> 
> > 
> 
> > By the way - computer science silly buzzword:
> 
> > 
> 
> > idempotence, or "referential transparency".
> 
> > 
> 
> > 
> 
> > 
> 
> > -- 
> 
> > 
> 
> > underground experts united
> 
> 
> 
> Hi,
> 
> I've read he most part of the thread, but, 
> 
> as one who does not know elisp,I got lost in the debate :-(
> 
> wich is the prob on the execution of my (your) code, pressing the key:
> 
> 
> 
> (global-set-key (kbd "M-A") 'backward-word) ; Alt+Shift+a
> 
> (while (and (not (eobp))
> 
>             (search-forward "[-" nil 'move))
> 
>   (skip-chars-forward "A-Z")
> 
>   (unless (looking-at "-]")
> 
>     (message "Problem found, please fix and hit C-M-c to continue")
> 
>     (recursive-edit))))
> 
> 
> 
> ?
> 
> 
> 
> thank you
> 
> 
> 
> Renato

Hi, Ive found, that maybe, there is another parenthesis / maybe the last one,

I-ve erased it and emacs start without error, but if I press Alt/Shift/ A, 
nothing happens.

What-s wrong? 

Renato


reply via email to

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