Re: Emacs on remote linux box
Re: Emacs on remote linux box
- Subject: Re: Emacs on remote linux box
- From: David L Chopp via X11-users <email@hidden>
- Date: Wed, 19 Apr 2023 20:42:02 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=northwestern.edu; dmarc=pass action=none header.from=northwestern.edu; dkim=pass header.d=northwestern.edu; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2u6HfDSSz0Jrn37XOtyP1FhfJQmdD7NoEGGqld0HrGo=; b=c+k01SOtsTQvLUFZdBVn9dIvSLYn9EiaffKNetoNou3mTX61VwGv7akEKLOrvtPTy5nruaivojBgGkmK7P8bDgKxGFXslHa/iXyPLzgI3de0MpzChy6veqttSr1IlBZFvDlHix8JxLM16IZy2MK7UpPLefyGahfJuyK64ZmWQX4rSiPKSFNyC0PbQpcdJyqoV6GFr8kjHPvQ+eQlfvF/iwApCGmnzStzl3oJbuNk/qIpzV9Dw4MD5WbAqvIXH9UVPzV6FZaB+mEnPCRdJ/eHuVUOWNvAFH3Tf94Kd59otd36IOcIR5IB27DO5G4wWXQmDC8D9Bbmis9c/CJ5pRjGiQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DGEXPKrkSmSmZd18TuL2dxrEbjOIp11DPqQl49ozqJculuSGNz+WsZCppDMKmxsLqfQbgTJo7xv7hcU3XxR3QNqMNk+gfHn87oM3mVEV6T0bvRDj+ySRN9fF7zu1P+/vR9h5AaUbgFF36Cet7HPpCM68GEKJPyOOdITQe/P4/PgrCj0bjGs05D5uDspYyqJSXiqkWiYf6WCYmK5sznT4mLTnIniYBHXT5x0Hv441FMpyy9LRmDfc3JkHTvr2oI8COrkDFeINZ4Gzq0VJ9caRwmoiz9GA4m0wNSnFR3IUqmiiwwA5d8iF/Xe4TK+DcrVUYdLDTFJZm+u9lVG/Tm87RA==
- Thread-topic: Emacs on remote linux box
Thanks to those that made suggestions. Unfortunately, most did not work, but
one came close. For whatever reason, the font seemed to play a role and it
didn’t have to do with size. The example provided by Pascal:
> (progn (set-frame-font "Monaco-16")
> (set-frame-width (selected-frame) 80)
> (set-frame-height (selected-frame) 48)
> (set-frame-position (selected-frame) 64 32 ))
almost worked, but I stumbled onto the realization that the font and the frame
size have to play nice in some mysterious way. There’s room for more
experimentation, but I found I couldn’t use frame width 80 (79 was max) and not
all fonts would work, but I found a mono-spaced font that would work. I dropped
this into the .emacs file on the remote machine and that did well enough:
(progn (set-frame-font "-DAMA-Ubuntu
Mono-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")
(set-frame-width (selected-frame) 79)
(set-frame-height (selected-frame) 48)
(set-frame-position (selected-frame) 10 10))
Thanks again...
Dave
> On Apr 19, 2023, at 2:00 PM, email@hidden wrote:
>
> Send X11-users mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://urldefense.com/v3/__https://lists.apple.com/mailman/listinfo/x11-users__;!!Dq0X2DkFhyF93HkjWTBQKhk!Tm7HiaWkyt-MpSuRTPHcwDqZ0_up7wxbZCBksrlP7QJaD1jC398L5CV3_eqIUijMrJtBbsluBFHPLnz2Cv2b2FcmdwGblvkzvuM$
>
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of X11-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Emacs on remote linux box (Pascal Bourguignon)
> 2. Re: Emacs on remote linux box (Ren? J.V. Bertin)
> 3. Re: Emacs on remote linux box (James K. Lowden)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 18 Apr 2023 21:37:32 +0200
> From: Pascal Bourguignon <email@hidden>
> To: email@hidden
> Subject: Re: Emacs on remote linux box
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Le 18/04/2023 ? 20:57, David L Chopp via X11-users a ?crit?:
>> e the problem, but I haven?t found any solutions that have worked. ?Has
>> anyone encountere
>
> First, emacs will use the Xresources specifying its frame size.
>
> 21:29[pjb@despina org.xquartz:0 ~ 70Gi]$ xrdb -query |grep emacs.geometry
> emacs.geometry: 81x32+0+0
>
>
> But then, the emacs rc files may contain instructions to change the size
> of the frame, and to change the font used for it.
>
> You will have to read these files.
>
> At the end of your emacs rc file, you may just add the following
> instructions to set it like you want.
>
> (progn (set-frame-font "Monaco-16")
> (set-frame-width (selected-frame) 80)
> (set-frame-height (selected-frame) 48)
> (set-frame-position (selected-frame) 64 32 ))
>
> You may also have a look at full-frame in
> https://urldefense.com/v3/__https://gitlab.com/com-informatimago/emacs/-/blob/master/pjb-emacs.el*L1322__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!Tm7HiaWkyt-MpSuRTPHcwDqZ0_up7wxbZCBksrlP7QJaD1jC398L5CV3_eqIUijMrJtBbsluBFHPLnz2Cv2b2FcmdwGbZC2OjDU$
>
>
> If you have a look at my rc files, you will see that I have code that
> scans for the available fonts and when it runs, it changes the size of
> the frame. It doesn't bother me much, because I don't reboot emacs more
> often than the OS...
> https://urldefense.com/v3/__https://gitlab.com/informatimago/rc/__;!!Dq0X2DkFhyF93HkjWTBQKhk!Tm7HiaWkyt-MpSuRTPHcwDqZ0_up7wxbZCBksrlP7QJaD1jC398L5CV3_eqIUijMrJtBbsluBFHPLnz2Cv2b2FcmdwGb8CDN3Kk$
>
> --
> __Pascal Bourguignon__
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 19 Apr 2023 01:08:38 +0200
> From: Ren? J.V. Bertin <email@hidden>
> To: email@hidden
> Subject: Re: Emacs on remote linux box
> Message-ID: <2446957.HzyqCOHXlr@bola>
> Content-Type: text/plain; charset="us-ascii"
>
> On Tuesday April 18 2023 18:57:32 David L Chopp wrote:
>
>> To troubleshoot, I went to a linux box and brought up a remote emacs window
>> and it works as expected, so I think this is an Xquartz issue.
>
> XQuartz, or of the window manager you're running on your Mac. I'm a vi guy
> (which I run in a terminal emulator) so have no idea how I could try to
> reproduce your issue. Remote windows coming up in weird sizes does ring a
> bell, but on the whole the only issues I have with remote X11 windows is that
> more and more applications (Qt-based ones in particular) really aren't meant
> for that kind of situation. So mostly I use tigervnc (including its
> x0vncserver "screen sharing" utility).
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 19 Apr 2023 05:04:51 -0400
> From: "James K. Lowden" <email@hidden>
> To: email@hidden
> Cc: David L Chopp <email@hidden>
> Subject: Re: Emacs on remote linux box
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=US-ASCII
>
> On Tue, 18 Apr 2023 18:57:32 +0000
> David L Chopp via X11-users <email@hidden> wrote:
>
>> When I start emacs on the remote machine, the window pops up on my
>> Mac, for a brief moment sizes to the correct size, and then shrinks
>> to about three lines high.
>
> Confirmed. I see the same behavior. My solution, such as it is:
>
> (defun jkl-frame-height ()
> "Change window height"
> (interactive)
> (set-frame-height (window-frame nil) 60)
> (set-frame-width (window-frame nil) 80))
> (global-set-key (kbd "C-c h") 'jkl-frame-height)
>
> That puts me two keystrokes away from a useful frame size.
> About %0.1 of the time it took to write this message! ;-)
>
> It's definitely *not* a problem with your .emacs file. Proof:
>
> $ ssh -f hostname emacs -Q
>
> exhibits the same behavior. I think it must have something to do with
> XQuartz pixel scaling, or how it reports the vertical screen size to
> the X client. If you really want to dig into it offline, I'm game.
>
> I'm still using
>
> macOS 13.0.1 (22A400)
> XQuartz 2.8.5 (xorg-server 21.1.6)
>
> Btw, the homebrew emacs is pretty good, too. You might want to
> consider using it and tramp mode. I use both, depending on how far
> away the remote is.
>
> --jkl
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> X11-users mailing list
> email@hidden
> https://urldefense.com/v3/__https://lists.apple.com/mailman/listinfo/x11-users__;!!Dq0X2DkFhyF93HkjWTBQKhk!Tm7HiaWkyt-MpSuRTPHcwDqZ0_up7wxbZCBksrlP7QJaD1jC398L5CV3_eqIUijMrJtBbsluBFHPLnz2Cv2b2FcmdwGblvkzvuM$
>
>
>
> ------------------------------
>
> End of X11-users Digest, Vol 20, Issue 8
> ****************************************
------------------------------------------------------------------------------------------------
So if a man's wit be wandering, let him study the mathematics; for in
demonstrations, if his wit be called away never so little, he must begin
again. ~Francis Bacon
------------------------------------------------------------------------------------------------
David Chopp
Engineering Sciences and Applied Mathematics
Northwestern University
E-mail: email@hidden
Phone: (847)-491-8391
Fax: (847)-491-2178
Homepage: http://people.esam.northwestern.edu/chopp
------------------------------------------------------------------------------------------------
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden