all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Toggling the reverse frame parameter
@ 2011-03-19 19:09 Ben Key
  2011-03-26  8:33 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Key @ 2011-03-19 19:09 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Hello,

I like the reverse video mode of Emacs sometimes, but not always.  I would
like to have a way of toggling this property without having to restart Emacs
(right now the only way of setting this property is to start Emacs with or
without the -rv command line argument).  I have tried M-:
(set-frame-parameter (selected-frame) 'reverse t) to turn it on and
(set-frame-parameter
(selected-frame) 'reverse nil) and M-: (set-frame-parameter (selected-frame)
'reverse nil) to turn it off, but this does not work.

Does anyone have any suggestions or is the reverse video effect something
that can only be specified at start up?

Thanks.

[-- Attachment #2: Type: text/html, Size: 746 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Toggling the reverse frame parameter
       [not found] <mailman.13.1300561820.13615.help-gnu-emacs@gnu.org>
@ 2011-03-26  1:04 ` Pascal J. Bourguignon
  0 siblings, 0 replies; 4+ messages in thread
From: Pascal J. Bourguignon @ 2011-03-26  1:04 UTC (permalink / raw)
  To: help-gnu-emacs

Ben Key <bkey76@gmail.com> wrote:
> Hello,
> 
> I like the reverse video mode of Emacs sometimes, but not always.  I
> would like to have a way of toggling this property without having to
> restart Emacs (right now the only way of setting this property is to
> start Emacs with or without the -rv command line argument).  I have tried
> M-: (set-frame-parameter (selected-frame) 'reverse t) to turn it on and
> (set-frame-parameter (selected-frame) 'reverse nil) and M-:
> (set-frame-parameter (selected-frame) 'reverse nil) to turn it off, but this does not work.
> 
> Does anyone have any suggestions or is the reverse video effect something
> that can only be specified at start up?
> 
> Thanks.


I don't have access to emacs right now, so I would suggest a way to find
out by yourself: use the sources Luke!

Fetch the sources of emacs from
ftp://ftp.gnu.org/gnu/emacs/emacs-23.3.tar.gz
extract them from the archive, search for the main function, follow it to
the processing of the command line argument -rv. Identify the action
realised (setting of some variable or call to a function to configure the
reverse), and then grep the sources to see if this variable or function is
used somewhere else and if you can call it from an emacs lisp function.

It is possible that the last step is not implemented.  Then you can add it,
add an emacs lisp builtin function to toggle the reverse from lisp, and
compile the new emacs.



-- 
__Pascal J. Bourguignon__


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Toggling the reverse frame parameter
  2011-03-19 19:09 Ben Key
@ 2011-03-26  8:33 ` Eli Zaretskii
  2011-03-26  8:51   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-03-26  8:33 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Ben Key <bkey76@gmail.com>
> Date: Sat, 19 Mar 2011 15:09:55 -0400
> 
> I like the reverse video mode of Emacs sometimes, but not always.  I would
> like to have a way of toggling this property without having to restart Emacs
> (right now the only way of setting this property is to start Emacs with or
> without the -rv command line argument).  I have tried M-:
> (set-frame-parameter (selected-frame) 'reverse t) to turn it on and
> (set-frame-parameter
> (selected-frame) 'reverse nil) and M-: (set-frame-parameter (selected-frame)
> 'reverse nil) to turn it off, but this does not work.
> 
> Does anyone have any suggestions or is the reverse video effect something
> that can only be specified at start up?

It can only be specified at startup.  I don't think it was ever
possible to do this from inside a running Emacs session.  That's why
you won't find the 'reverse frame parameter documented, neither in the
Emacs User Manual nor in the ELisp Manual.

(Note that currently, i.e. in Emacs 23, even the -rv command-line
argument is broken.  I guess not many people actually use it.)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Toggling the reverse frame parameter
  2011-03-26  8:33 ` Eli Zaretskii
@ 2011-03-26  8:51   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2011-03-26  8:51 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 26 Mar 2011 10:33:14 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Ben Key <bkey76@gmail.com>
> > Date: Sat, 19 Mar 2011 15:09:55 -0400
> > 
> > I like the reverse video mode of Emacs sometimes, but not always.  I would
> > like to have a way of toggling this property without having to restart Emacs
> > (right now the only way of setting this property is to start Emacs with or
> > without the -rv command line argument).  I have tried M-:
> > (set-frame-parameter (selected-frame) 'reverse t) to turn it on and
> > (set-frame-parameter
> > (selected-frame) 'reverse nil) and M-: (set-frame-parameter (selected-frame)
> > 'reverse nil) to turn it off, but this does not work.
> > 
> > Does anyone have any suggestions or is the reverse video effect something
> > that can only be specified at start up?
> 
> It can only be specified at startup.  I don't think it was ever
> possible to do this from inside a running Emacs session.  That's why
> you won't find the 'reverse frame parameter documented, neither in the
> Emacs User Manual nor in the ELisp Manual.
> 
> (Note that currently, i.e. in Emacs 23, even the -rv command-line
> argument is broken.  I guess not many people actually use it.)

While the above is mostly true, there _is_ a way of toggling the
reverse video mode from a running Emacs session:

  M-: (x-handle-reverse-video (selected-frame) '((reverse . t))) RET

in GUI sessions and

  M-: (tty-handle-reverse-video (selected-frame) '((reverse . t))) RET

on a TTY.

Please note that (a) these are internal functions that can change
their interfaces or even disappear from Emacs without prior notice,
and (b) they might not always work (in particular, the tty variety is
currently broken on many builds, the only exception known to me being
the MS-DOS build).

The official way of setting the reverse video is only when a frame is
created, e.g.

  M-: (make-frame '((reverse . t))) RET



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-26  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.13.1300561820.13615.help-gnu-emacs@gnu.org>
2011-03-26  1:04 ` Toggling the reverse frame parameter Pascal J. Bourguignon
2011-03-19 19:09 Ben Key
2011-03-26  8:33 ` Eli Zaretskii
2011-03-26  8:51   ` Eli Zaretskii

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.