all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: deskheight.el v0.3
Date: Fri, 31 Jan 2003 11:54:41 -0700	[thread overview]
Message-ID: <3E3AC671.4090302@ihs.com> (raw)
In-Reply-To: JUi_9.1108$KG1.884394@twister.nyc.rr.com

Bruce Ingalls wrote:

> Kevin Rodgers wrote:
> 
>> Bruce Ingalls wrote:
>>
>>> ;;Not sure why interactive mode does not return a value, while 
>>> compiled mode does.
>>
>> Do you mean batch mode?
> 
> er, yes. I took this notation from another author (of which.el?), and 
> assumed that
> the standard Emacs parlance was "interactive mode" for M-x, and 
> "compiled mode"
> for C-x e


That author and now yourself are very confused.


Batch mode refers to emacs started with the -batch command line argument,
which sets the `noninteractive' variable.

There is no compiled mode.  An Emacs Lisp function may be compiled (as may
forms aka symbolic expressions in general), which is what happens when you byte-
compile a .el file into a .elc file.

A function whose definition contains an interactive spec is called a command,
which can be invoked interactively via `M-x' (execute-extended-command) whether
it has been compiled or not.

Any form can be evaluated via `C-x e'.

I just fooled around and find that `M-x' does return the result of the

interactively executed command:


(setq foo (execute-extended-command nil)) C-x e C-x C-f /tmp/foo RET
; returns:
#<buffer foo>

Perhaps you mean that `M-x desktop-height-approx' doesn't report anything to

the user.  I think what you want is something like:


(let ((deskheight ...))
  (if (interactive-p)			; called via M-x
      (message "%d" deskheight)
    deskheight))


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

      reply	other threads:[~2003-01-31 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <dhCZ9.130$KG1.7841@twister.nyc.rr.com>
     [not found] ` <r3WZ9.158$Of4.435215@twister.nyc.rr.com>
2003-01-30 18:26   ` deskheight.el v0.2 Kevin Rodgers
     [not found]   ` <b2YZ9.720$KG1.459890@twister.nyc.rr.com>
2003-01-30 18:35     ` deskheight.el v0.3 Kevin Rodgers
2003-01-30 23:52       ` Bruce Ingalls
2003-01-31 18:54         ` Kevin Rodgers [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

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

  git send-email \
    --in-reply-to=3E3AC671.4090302@ihs.com \
    --to=kevin.rodgers@ihs.com \
    /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.
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.