unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Renato Pontefice <renato.pontefice@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to add button to emacs that play a elisp code
Date: Fri, 12 Sep 2014 00:44:07 -0700 (PDT)	[thread overview]
Message-ID: <502fc1bf-a994-4ad5-9c8d-2f90d1ca66a9@googlegroups.com> (raw)
In-Reply-To: <87sijxtwuu.fsf@debian.uxu>

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


  reply	other threads:[~2014-09-12  7:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  7:44 how to add button to emacs that play a elisp code Renato Pontefice
2014-09-11  8:08 ` Gian Uberto Lauri
2014-09-11  8:40   ` Gian Uberto Lauri
2014-09-11 12:17     ` Stefan Monnier
2014-09-11 12:22       ` Gian Uberto Lauri
2014-09-11 12:35         ` Stefan Monnier
2014-09-11 12:46           ` Gian Uberto Lauri
     [not found]         ` <mailman.8685.1410439222.1147.help-gnu-emacs@gnu.org>
2014-09-11 21:15           ` Emanuel Berg
2014-09-11 23:42             ` Pascal J. Bourguignon
2014-09-12  0:05               ` Emanuel Berg
2014-09-12  0:23                 ` Michael Heerdegen
     [not found]                 ` <mailman.8717.1410481417.1147.help-gnu-emacs@gnu.org>
2014-09-12  0:50                   ` Emanuel Berg
2014-09-12  1:19                     ` Michael Heerdegen
2014-09-12 14:52                       ` Drew Adams
     [not found]                     ` <mailman.8719.1410484774.1147.help-gnu-emacs@gnu.org>
2014-09-12  2:07                       ` Emanuel Berg
2014-09-12  7:44                         ` Renato Pontefice [this message]
2014-09-12 10:15                           ` Renato Pontefice
2014-09-12 19:33                             ` Emanuel Berg
2014-09-13 21:28                 ` Pascal J. Bourguignon
2014-09-14  2:30                   ` Rusi
2014-09-14  4:18                     ` Rusi
2014-09-14 18:16                     ` Emanuel Berg
2014-09-14 18:11                   ` Emanuel Berg
2014-09-15  5:48                     ` Alex Kost
     [not found]                     ` <mailman.8874.1410760111.1147.help-gnu-emacs@gnu.org>
2014-09-15 22:45                       ` Emanuel Berg
2014-09-16  4:55                         ` Alex Kost
     [not found]                         ` <mailman.8956.1410843332.1147.help-gnu-emacs@gnu.org>
2014-09-16 22:27                           ` Emanuel Berg
     [not found]   ` <mailman.8671.1410424828.1147.help-gnu-emacs@gnu.org>
2014-09-11 21:06     ` Emanuel Berg
     [not found] ` <mailman.8670.1410422963.1147.help-gnu-emacs@gnu.org>
2014-09-11  8:24   ` Renato Pontefice
2014-09-11 16:00 ` Pascal J. Bourguignon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502fc1bf-a994-4ad5-9c8d-2f90d1ca66a9@googlegroups.com \
    --to=renato.pontefice@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).