* Re: deskheight.el v0.2 [not found] ` <r3WZ9.158$Of4.435215@twister.nyc.rr.com> @ 2003-01-30 18:26 ` Kevin Rodgers [not found] ` <b2YZ9.720$KG1.459890@twister.nyc.rr.com> 1 sibling, 0 replies; 4+ messages in thread From: Kevin Rodgers @ 2003-01-30 18:26 UTC (permalink / raw) Bruce Ingalls wrote: > ;;Not sure why interactive mode does not return a value, while compiled > mode > ;;does. What is "interactive mode"? Usually it would mean executing `M-x desktop-height-approx', but then you contrast it to "compiled mode" so I assume you are compiling it into a .elc. Did you compile and load it into a non-customized emacs (i.e. emacs -q --no-site-file)? > ;;;;;; desktop-height-approx v0.2 You posted this as "deskheight.el v0.2", but it has a "desktop-height-approx v0.2" comment and defines a function called desktop-height-approx. Please be consistent. > ;;Use this, by calling the following in your .emacs: > ;; (setq use-height desktop-height-approx) That is wrong: desktop-height-approx is a function, not a variable. > ;; (if (string-match "XEmacs" (emacs-version)) > ;; (setq frame-initial-frame-plist `(height ,use-height)) > ;; (setq default-frame-plist `(height . ,use-height))) ;Else Emacs > ;;__________________________________________________________________________ -- <a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a> ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <b2YZ9.720$KG1.459890@twister.nyc.rr.com>]
* Re: deskheight.el v0.3 [not found] ` <b2YZ9.720$KG1.459890@twister.nyc.rr.com> @ 2003-01-30 18:35 ` Kevin Rodgers 2003-01-30 23:52 ` Bruce Ingalls 0 siblings, 1 reply; 4+ messages in thread From: Kevin Rodgers @ 2003-01-30 18:35 UTC (permalink / raw) Bruce Ingalls wrote: > ;;Not sure why interactive mode does not return a value, while compiled > mode > ;;does. Do you mean batch mode? > ;;LINES environment variable is not available to Emacs. If the LINES environment variable is defined, then surely Emacs can access its value via getenv. > ;;This is not intended > ;;to be run in tty mode; hard 24 is the only sane result for such. A tty may be an terminal window running under a window system, and may be able to change in size. -- <a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: deskheight.el v0.3 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 0 siblings, 1 reply; 4+ messages in thread From: Bruce Ingalls @ 2003-01-30 23:52 UTC (permalink / raw) 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 > If the LINES environment variable is defined, then surely Emacs can access > its value via getenv. On my standard RH 8 Linux box, LINES is defined in all my shells, but is not inherited into the `process-environment' variable. > A tty may be an terminal window running under a window system, and may be > able to change in size. In this case, `window-system' is nil, and my results in modifying variations of default-frame-plist or initial-frame-alist were either no effect, or disaster. Emacs or XEmacs can modify itself, but not the parent xterm nor rxvt that it runs in. Thanks for the critique on the comments, these are being fixed. The last issue I need to resolve, is if kicker or gnome-panel is running on the top or bottom, or on one of the sides. I reckon that the answer can be found by grepping the configuration files in your home directory, but 1) this assumes grep is in your path 2) I am too lazy for this release. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: deskheight.el v0.3 2003-01-30 23:52 ` Bruce Ingalls @ 2003-01-31 18:54 ` Kevin Rodgers 0 siblings, 0 replies; 4+ messages in thread From: Kevin Rodgers @ 2003-01-31 18:54 UTC (permalink / raw) 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:<kevin.rodgers@ihs.com>">Kevin Rodgers</a> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-31 18:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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
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.