unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Combine 2 commands in a toggle-function
Date: Sat, 13 Oct 2012 15:19:38 +0200	[thread overview]
Message-ID: <50796A6A.9070506@easy-emacs.de> (raw)
In-Reply-To: <5079667D.3040809@mkblog.org>

Am 13.10.2012 15:02, schrieb Martin Butz:
> Hello Andreas,
>
> thanks for the code!
>
> Am 13.10.2012 13:46, schrieb Andreas Röhler:
>> (defvar my-toggled-commands-p nil
>>    "When switched on, commands are run ")
>>
>> (defun my-commands-toggle ()
>>    (interactive)
>>    (if my-toggled-commands-p
>>        (progn
>>          (setq my-toggled-commands-p nil)
>>          (message "%s" "my-toggled-commands-p switched off"))
>>      (message "%s" "Running my-toggled-commands")
>>      (setq my-toggled-commands-p t)
>>      (funcall 'FIRST)
>>      (funcall 'SECOND)))
>
>> WRT the the function called, you might need to figure out the details, which arguments to pass etc.
>
> Yes. This way 'kill-buffer-other-window does obviously not know, which frame/buffer to kill. I will have to start learning lisp to stand on my own feet.
>
> Thanks
> Martin
>

maybe someone at

emacs-orgmode@gnu.org

will figure it out for the moment.

Good luck,

Andreas




      reply	other threads:[~2012-10-13 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13  9:06 Combine 2 commands in a toggle-function Martin Butz
2012-10-13  9:19 ` Peter Dyballa
2012-10-13  9:54 ` Martin Butz
2012-10-13 11:46   ` Andreas Röhler
2012-10-13 13:02     ` Martin Butz
2012-10-13 13:19       ` Andreas Röhler [this message]

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=50796A6A.9070506@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --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).