all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* applescript maximize emacs
@ 2015-05-11 20:44 Ramesh Thulasiram
  2015-05-11 20:55 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 2+ messages in thread
From: Ramesh Thulasiram @ 2015-05-11 20:44 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using emacs on my mac, and I have to always maximize it when i open it. so I added the following to my .emacs file adding a shortcut for maximizing, but it doesn't seem to work. does anyone one know what is the problem here?


(defun mac-maximize ()
  (interactive)
  (do-applescript "try
    click button 2 of window 1
end try"))
(global-set-key (kbd "C-c r x") 'mac-maximize)


Thanks,
ramesh


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

* Re: applescript maximize emacs
  2015-05-11 20:44 applescript maximize emacs Ramesh Thulasiram
@ 2015-05-11 20:55 ` Pascal J. Bourguignon
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal J. Bourguignon @ 2015-05-11 20:55 UTC (permalink / raw)
  To: help-gnu-emacs

Ramesh Thulasiram <ramesh10dulkar@gmail.com> writes:

> I'm using emacs on my mac, and I have to always maximize it when i
> open it. so I added the following to my .emacs file adding a shortcut
> for maximizing, but it doesn't seem to work. does anyone one know what
> is the problem here?
>
>
> (defun mac-maximize ()
>   (interactive)
>   (do-applescript "try
>     click button 2 of window 1
> end try"))
> (global-set-key (kbd "C-c r x") 'mac-maximize)

No, don't do that.  Use emacs!
cf. full-frame from 
https://gitlab.com/com-informatimago/emacs/blob/master/pjb-emacs.el#L1224

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


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

end of thread, other threads:[~2015-05-11 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 20:44 applescript maximize emacs Ramesh Thulasiram
2015-05-11 20:55 ` Pascal J. Bourguignon

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.