all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs help from terminal
@ 2022-06-13 22:43 carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-14  4:51 ` tomas
  0 siblings, 1 reply; 37+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-06-13 22:43 UTC (permalink / raw)
  To: Help Gnu Emacs


How can I use emacs help from a terminal rather than from the gui?


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

* Re: Emacs help from terminal
  2022-06-13 22:43 Emacs help from terminal carlmarcos--- via Users list for the GNU Emacs text editor
@ 2022-06-14  4:51 ` tomas
  2022-06-14 10:11   ` Emanuel Berg
  2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 37+ messages in thread
From: tomas @ 2022-06-14  4:51 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Tue, Jun 14, 2022 at 12:43:43AM +0200, carlmarcos--- via Users list for the GNU Emacs text editor wrote:
> 
> How can I use emacs help from a terminal rather than from the gui?

I assume that you are running Emacs in a terminal, want to
access help from there and are missing the GUI menu.

Then just type C-h C-h (that is, holding the CONTROL key,
type twice "h".

You will get a menu whose entries you can activate with
key presses.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs help from terminal
  2022-06-14  4:51 ` tomas
@ 2022-06-14 10:11   ` Emanuel Berg
  2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-14 10:11 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> How can I use emacs help from a terminal rather than from
>> the gui?
>
> I assume that you are running Emacs in a terminal, want to
> access help from there and are missing the GUI menu.

Start by starting the terminal by typing the terminal's name
in a terminal and RET.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-14  4:51 ` tomas
  2022-06-14 10:11   ` Emanuel Berg
@ 2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-14 13:56     ` Samuel Banya
                       ` (2 more replies)
  1 sibling, 3 replies; 37+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-06-14 13:38 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs



Jun 14, 2022, 04:51 by tomas@tuxteam.de:

> On Tue, Jun 14, 2022 at 12:43:43AM +0200, carlmarcos--- via Users list for the GNU Emacs text editor wrote:
>
>>
>> How can I use emacs help from a terminal rather than from the gui?
>>
>
> I assume that you are running Emacs in a terminal, want to
> access help from there and are missing the GUI menu.
>
> Then just type C-h C-h (that is, holding the CONTROL key,
> type twice "h".
>
> You will get a menu whose entries you can activate with
> key presses.
>
I use 

emacs -nw

Thanks, can access the help now.

Would you know how to quit later, and get back to the terminal?


> Cheers
> -- 
> t
>



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

* Re: Emacs help from terminal
  2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
@ 2022-06-14 13:56     ` Samuel Banya
  2022-06-14 14:03       ` Emanuel Berg
  2022-06-14 13:57     ` tomas
  2022-06-14 14:00     ` Emanuel Berg
  2 siblings, 1 reply; 37+ messages in thread
From: Samuel Banya @ 2022-06-14 13:56 UTC (permalink / raw)
  To: Emanuel Berg

I'm not sure how to detach from an Emacs instance that's currently running.

I think if you're trying to quit from it to come back to it later, you would probably need to be running Emacs server daemon client, or use a terminal multiplexer like 'tmux' to detach from it.

Just some ideas.

Sincerely,

Sam

On Tue, Jun 14, 2022, at 9:38 AM, carlmarcos--- via Users list for the GNU Emacs text editor wrote:
> 
> 
> Jun 14, 2022, 04:51 by tomas@tuxteam.de:
> 
> > On Tue, Jun 14, 2022 at 12:43:43AM +0200, carlmarcos--- via Users list for the GNU Emacs text editor wrote:
> >
> >>
> >> How can I use emacs help from a terminal rather than from the gui?
> >>
> >
> > I assume that you are running Emacs in a terminal, want to
> > access help from there and are missing the GUI menu.
> >
> > Then just type C-h C-h (that is, holding the CONTROL key,
> > type twice "h".
> >
> > You will get a menu whose entries you can activate with
> > key presses.
> >
> I use 
> 
> emacs -nw
> 
> Thanks, can access the help now.
> 
> Would you know how to quit later, and get back to the terminal?
> 
> 
> > Cheers
> > -- 
> > t
> >
> 
> 


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

* Re: Emacs help from terminal
  2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-14 13:56     ` Samuel Banya
@ 2022-06-14 13:57     ` tomas
  2022-06-14 14:05       ` Emanuel Berg
  2022-06-14 14:00     ` Emanuel Berg
  2 siblings, 1 reply; 37+ messages in thread
From: tomas @ 2022-06-14 13:57 UTC (permalink / raw)
  To: carlmarcos; +Cc: help-gnu-emacs

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

On Tue, Jun 14, 2022 at 03:38:34PM +0200, carlmarcos@tutanota.com wrote:
> 
> 
> Jun 14, 2022, 04:51 by tomas@tuxteam.de:
> 
> > On Tue, Jun 14, 2022 at 12:43:43AM +0200, carlmarcos--- via Users list for the GNU Emacs text editor wrote:
> >
> >>
> >> How can I use emacs help from a terminal rather than from the gui?
> >>
> >
> > I assume that you are running Emacs in a terminal, want to
> > access help from there and are missing the GUI menu.
> >
> > Then just type C-h C-h (that is, holding the CONTROL key,
> > type twice "h".
> >
> > You will get a menu whose entries you can activate with
> > key presses.
> >
> I use 
> 
> emacs -nw
> 
> Thanks, can access the help now.

\o/

> Would you know how to quit later, and get back to the terminal?

Try "q". I'm not 100% sure it'll help in all situations, but it'll
do in most.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs help from terminal
  2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-14 13:56     ` Samuel Banya
  2022-06-14 13:57     ` tomas
@ 2022-06-14 14:00     ` Emanuel Berg
  2022-06-14 14:13       ` carlmarcos--- via Users list for the GNU Emacs text editor
  2 siblings, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-14 14:00 UTC (permalink / raw)
  To: help-gnu-emacs

carlmarcos--- via Users list for the GNU Emacs text editor wrote:

> Would you know how to quit later, and get back to
> the terminal?

There are several ways to do it, e.g.

  M-x kill-emacs RET

But unlike many programs the thought is you don't quit Emacs,
when you are done with something, you just start some other
thing from the same Emacs instance.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-14 13:56     ` Samuel Banya
@ 2022-06-14 14:03       ` Emanuel Berg
  0 siblings, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-14 14:03 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Banya wrote:

> I'm not sure how to detach from an Emacs instance that's
> currently running.
>
> I think if you're trying to quit from it to come back to it
> later, you would probably need to be running Emacs server
> daemon client, or use a terminal multiplexer like 'tmux' to
> detach from it.

Sure, but it is easier to have one dedicated terminal or tmux
plane for Emacs ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-14 13:57     ` tomas
@ 2022-06-14 14:05       ` Emanuel Berg
  0 siblings, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-14 14:05 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> Would you know how to quit later, and get back to
>> the terminal?
>
> Try "q". I'm not 100% sure it'll help in all situations, but
> it'll do in most.

? What do you mean?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-14 14:00     ` Emanuel Berg
@ 2022-06-14 14:13       ` carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-14 14:37         ` Michael Heerdegen
  0 siblings, 1 reply; 37+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-06-14 14:13 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs



Jun 14, 2022, 14:00 by incal@dataswamp.org:

> carlmarcos--- via Users list for the GNU Emacs text editor wrote:
>
>> Would you know how to quit later, and get back to
>> the terminal?
>>
>
> There are several ways to do it, e.g.
>
>  M-x kill-emacs RET
>
Ok it kills it and I get back to terminal

But unlike many programs the thought is you don't quit Emacs,

> when you are done with something, you just start some other
> thing from the same Emacs instance.
>
I do not quit emacs, it quits on me.


> -- 
> underground experts united
> https://dataswamp.org/~incal
>



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

* Re: Emacs help from terminal
  2022-06-14 14:13       ` carlmarcos--- via Users list for the GNU Emacs text editor
@ 2022-06-14 14:37         ` Michael Heerdegen
  2022-06-14 21:52           ` Jean Louis
  0 siblings, 1 reply; 37+ messages in thread
From: Michael Heerdegen @ 2022-06-14 14:37 UTC (permalink / raw)
  To: help-gnu-emacs

carlmarcos--- via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Ok it kills it and I get back to terminal
>
> But unlike many programs the thought is you don't quit Emacs,

C-z suspends Emacs - but I don't know how that works when using a
terminal emulator.

Or maybe you want to use Emacs as a server?

  (info "(emacs) Emacs Server")


Michael.




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

* Re: Emacs help from terminal
  2022-06-14 14:37         ` Michael Heerdegen
@ 2022-06-14 21:52           ` Jean Louis
  2022-06-14 22:47             ` Emanuel Berg
  2022-06-15 10:22             ` Michael Heerdegen
  0 siblings, 2 replies; 37+ messages in thread
From: Jean Louis @ 2022-06-14 21:52 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

* Michael Heerdegen <michael_heerdegen@web.de> [2022-06-14 17:40]:
> carlmarcos--- via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
> 
> > Ok it kills it and I get back to terminal
> >
> > But unlike many programs the thought is you don't quit Emacs,
> 
> C-z suspends Emacs - but I don't know how that works when using a
> terminal emulator.

It just works. User comes back to terminal shell, and may revivew
Emacs with 

$ fg


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Emacs help from terminal
  2022-06-14 21:52           ` Jean Louis
@ 2022-06-14 22:47             ` Emanuel Berg
  2022-06-15  5:29               ` Jean Louis
  2022-06-15 10:22             ` Michael Heerdegen
  1 sibling, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-14 22:47 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

> It just works. User comes back to terminal shell, and may
> revivew Emacs with
>
> $ fg

That doesn't work here,

  no job control in this shell

We had a very long discussion about this, it must have been
under a very bad period for me because I don't remember
anything except it was very long, anyway to prevent Emacs from
suspending by mistake which can happen because of the
keystrokes location (and after that 'fg' will give you the
above message and nothing will bring it/you back), put this in
an initialization file near you:

  (put #'suspend-frame 'disabled t)

Case closed.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-14 22:47             ` Emanuel Berg
@ 2022-06-15  5:29               ` Jean Louis
  2022-06-15  8:52                 ` Emanuel Berg
  0 siblings, 1 reply; 37+ messages in thread
From: Jean Louis @ 2022-06-15  5:29 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg <incal@dataswamp.org> [2022-06-15 01:48]:
> Jean Louis wrote:
> 
> > It just works. User comes back to terminal shell, and may
> > revivew Emacs with
> >
> > $ fg
> 
> That doesn't work here,
> 
>   no job control in this shell

Of course that suspending will only work in shell which does have job
control.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Emacs help from terminal
  2022-06-15  5:29               ` Jean Louis
@ 2022-06-15  8:52                 ` Emanuel Berg
  2022-06-15 17:00                   ` Tomas Hlavaty
  0 siblings, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15  8:52 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

>> That doesn't work here,
>> 
>>   no job control in this shell
>
> Of course that suspending will only work in shell which does
> have job control.

And in what shells will that be useful?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-14 21:52           ` Jean Louis
  2022-06-14 22:47             ` Emanuel Berg
@ 2022-06-15 10:22             ` Michael Heerdegen
  2022-06-15 10:26               ` Emanuel Berg
  1 sibling, 1 reply; 37+ messages in thread
From: Michael Heerdegen @ 2022-06-15 10:22 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> > C-z suspends Emacs - but I don't know how that works when using a
> > terminal emulator.
>
> It just works. User comes back to terminal shell, and may revivew
> Emacs with 
>
> $ fg

Depends on the shell here: works for me with bash, but not with the
elvish shell.  Seems the shell has to implement job control for that to
work, or something like that.

Michael.




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

* Re: Emacs help from terminal
  2022-06-15 10:22             ` Michael Heerdegen
@ 2022-06-15 10:26               ` Emanuel Berg
  2022-06-15 14:06                 ` Samuel Banya
  0 siblings, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15 10:26 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Heerdegen wrote:

>>> C-z suspends Emacs - but I don't know how that works when
>>> using a terminal emulator.
>>
>> It just works. User comes back to terminal shell, and may
>> revivew Emacs with
>>
>> $ fg
>
> Depends on the shell here: works for me with bash, but not
> with the elvish shell. Seems the shell has to implement job
> control for that to work, or something like that.

The dark elves just have to enable it but they don't know if
the wood elves even have it actually ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15 10:26               ` Emanuel Berg
@ 2022-06-15 14:06                 ` Samuel Banya
  2022-06-15 14:15                   ` Robert Pluim
  0 siblings, 1 reply; 37+ messages in thread
From: Samuel Banya @ 2022-06-15 14:06 UTC (permalink / raw)
  To: Emanuel Berg

Wow, that's awesome, I never knew this about 'C-z' and 'fg' keybinding commands to be able to suspend Emacs.

That's super cool, thanks for this, putting this in my notes as I usually use GUI Emacs but this would be cool on headless terminal boxes.

On Wed, Jun 15, 2022, at 6:26 AM, Emanuel Berg wrote:
> Michael Heerdegen wrote:
> 
> >>> C-z suspends Emacs - but I don't know how that works when
> >>> using a terminal emulator.
> >>
> >> It just works. User comes back to terminal shell, and may
> >> revivew Emacs with
> >>
> >> $ fg
> >
> > Depends on the shell here: works for me with bash, but not
> > with the elvish shell. Seems the shell has to implement job
> > control for that to work, or something like that.
> 
> The dark elves just have to enable it but they don't know if
> the wood elves even have it actually ...
> 
> -- 
> underground experts united
> https://dataswamp.org/~incal
> 
> 
> 


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

* Re: Emacs help from terminal
  2022-06-15 14:06                 ` Samuel Banya
@ 2022-06-15 14:15                   ` Robert Pluim
  2022-06-15 15:16                     ` Emanuel Berg
                                       ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Robert Pluim @ 2022-06-15 14:15 UTC (permalink / raw)
  To: Samuel Banya; +Cc: Emanuel Berg

>>>>> On Wed, 15 Jun 2022 10:06:23 -0400, "Samuel Banya" <sbanya@fastmail.com> said:

    Samuel> Wow, that's awesome, I never knew this about 'C-z' and 'fg' keybinding
    Samuel> commands to be able to suspend Emacs.

    Samuel> That's super cool, thanks for this, putting this in my notes as I
    Samuel> usually use GUI Emacs but this would be cool on headless terminal
    Samuel> boxes.

Just wait until you realize you can run a shell inside emacs, so you
never need to suspend it :-)

Robert
-- 



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

* Re: Emacs help from terminal
  2022-06-15 14:15                   ` Robert Pluim
@ 2022-06-15 15:16                     ` Emanuel Berg
  2022-06-15 15:52                     ` Samuel Banya
  2022-06-16  5:34                     ` Jean Louis
  2 siblings, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15 15:16 UTC (permalink / raw)
  To: help-gnu-emacs

Robert Pluim wrote:

>> Wow, that's awesome, I never knew this about 'C-z' and 'fg'
>> keybinding commands to be able to suspend Emacs.
>>
>> That's super cool, thanks for this, putting this in my
>> notes as I usually use GUI Emacs but this would be cool on
>> headless terminal boxes.
>
> Just wait until you realize you can run a shell inside
> emacs, so you never need to suspend it :-)

Just wait until you suspend Emacs by accident (happened to me
many times because of that keystroke's position on the
keyboard) and realize you don't have job control and have to
kill it.

Or wait until you realize you can have many parallel terminal
emulator windows (or panes), bare or with tmux, and you can
have one dedicated for Emacs and everything else you can do
either from that Emacs instance or from some of the other
resources available.

Or wait until you realize ... life is now or never.
Forever never comes around. You'll never see me again ...

https://www.youtube.com/watch?v=fOc6Oypog8A
https://www.youtube.com/watch?v=PSQWUZ8a2Ho

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15 14:15                   ` Robert Pluim
  2022-06-15 15:16                     ` Emanuel Berg
@ 2022-06-15 15:52                     ` Samuel Banya
  2022-06-15 15:59                       ` Emanuel Berg
  2022-06-16  7:48                       ` Robert Pluim
  2022-06-16  5:34                     ` Jean Louis
  2 siblings, 2 replies; 37+ messages in thread
From: Samuel Banya @ 2022-06-15 15:52 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Emanuel Berg

Yeah I usually use 'vterm' since even though a lot of people praise 'eshell' for running commands, a lot of the output that is received comes out jenky, and this isn't necessarily for ncurses stuff, but for normal commands. 

I've tried to incorporate popper into my workflow which works fine on Linux (Manjaro) with (M-`) for the keybinding, but on MacOS, it never comes up.

I still have no idea why I can't combine M-` on MacOS in Emacs. I've tried using 'C-h k' but no response with that combo.

Still a mystery to me.

On Wed, Jun 15, 2022, at 10:15 AM, Robert Pluim wrote:
> >>>>> On Wed, 15 Jun 2022 10:06:23 -0400, "Samuel Banya" <sbanya@fastmail.com> said:
> 
>     Samuel> Wow, that's awesome, I never knew this about 'C-z' and 'fg' keybinding
>     Samuel> commands to be able to suspend Emacs.
> 
>     Samuel> That's super cool, thanks for this, putting this in my notes as I
>     Samuel> usually use GUI Emacs but this would be cool on headless terminal
>     Samuel> boxes.
> 
> Just wait until you realize you can run a shell inside emacs, so you
> never need to suspend it :-)
> 
> Robert
> -- 
> 


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

* Re: Emacs help from terminal
  2022-06-15 15:52                     ` Samuel Banya
@ 2022-06-15 15:59                       ` Emanuel Berg
  2022-06-16  7:48                       ` Robert Pluim
  1 sibling, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15 15:59 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Banya wrote:

> I still have no idea why I can't combine M-` on MacOS in
> Emacs. I've tried using 'C-h k' but no response with
> that combo.

Make a combo of those two sentences and the last one should be
the hardest.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15  8:52                 ` Emanuel Berg
@ 2022-06-15 17:00                   ` Tomas Hlavaty
  2022-06-15 17:16                     ` Emanuel Berg
  2022-06-15 19:55                     ` Emanuel Berg
  0 siblings, 2 replies; 37+ messages in thread
From: Tomas Hlavaty @ 2022-06-15 17:00 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

On Wed 15 Jun 2022 at 10:52, Emanuel Berg <incal@dataswamp.org> wrote:
> Jean Louis wrote:
>> Of course that suspending will only work in shell which does have job
>> control.
>
> And in what shells will that be useful?

in any shell that supports job control

for example for running interactive or gui programs on the console:

see framebuffer-fbpdf function
https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#l654

see framebuffer-fbmpv function
https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#l667

or changing console font:

(defun console-font (x)
  (interactive "sfont: ")
  (suspend-emacs (format "setfont %s;fg" x))
  (message (format "font is %s" x)))



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

* Re: Emacs help from terminal
  2022-06-15 17:00                   ` Tomas Hlavaty
@ 2022-06-15 17:16                     ` Emanuel Berg
  2022-06-15 19:55                     ` Emanuel Berg
  1 sibling, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15 17:16 UTC (permalink / raw)
  To: help-gnu-emacs

Tomas Hlavaty wrote:

>>> Of course that suspending will only work in shell which
>>> does have job control.
>>
>> And in what shells will that be useful?
>
> in any shell that supports job control

To do what?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15 17:00                   ` Tomas Hlavaty
  2022-06-15 17:16                     ` Emanuel Berg
@ 2022-06-15 19:55                     ` Emanuel Berg
  2022-06-15 23:40                       ` Tomas Hlavaty
  1 sibling, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15 19:55 UTC (permalink / raw)
  To: help-gnu-emacs

Tomas Hlavaty wrote:

> changing console font:
>
> (defun console-font (x)
>   (interactive "sfont: ")
>   (suspend-emacs (format "setfont %s;fg" x))
>   (message (format "font is %s" x)))

No need to suspend anything to change the font of the
Linux VT, just eval for example

  (shell-command "sudo setfont Lat7-TerminusBold16") ; B)

and then back and forth

  (shell-command "sudo setfont matrix.fnt") ; yuk!

For fonts, /usr/share/consolefonts

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15 19:55                     ` Emanuel Berg
@ 2022-06-15 23:40                       ` Tomas Hlavaty
  2022-06-15 23:52                         ` Emanuel Berg
  0 siblings, 1 reply; 37+ messages in thread
From: Tomas Hlavaty @ 2022-06-15 23:40 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

On Wed 15 Jun 2022 at 21:55, Emanuel Berg <incal@dataswamp.org> wrote:
> Tomas Hlavaty wrote:
>> changing console font:
>>
>> (defun console-font (x)
>>   (interactive "sfont: ")
>>   (suspend-emacs (format "setfont %s;fg" x))
>>   (message (format "font is %s" x)))
>
> No need to suspend anything to change the font of the
> Linux VT, just eval for example
>
>   (shell-command "sudo setfont Lat7-TerminusBold16") ; B)

this requires sudo

without sudo, it works only if emacs is suspended



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

* Re: Emacs help from terminal
  2022-06-15 23:40                       ` Tomas Hlavaty
@ 2022-06-15 23:52                         ` Emanuel Berg
  2022-06-16  5:52                           ` Tomas Hlavaty
  0 siblings, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-15 23:52 UTC (permalink / raw)
  To: help-gnu-emacs

Tomas Hlavaty wrote:

>>> (defun console-font (x)
>>>   (interactive "sfont: ")
>>>   (suspend-emacs (format "setfont %s;fg" x))
>>>   (message (format "font is %s" x)))
>>
>> No need to suspend anything to change the font of the Linux
>> VT, just eval for example
>>
>>   (shell-command "sudo setfont Lat7-TerminusBold16") ; B)
>
> this requires sudo
>
> without sudo, it works only if emacs is suspended

Incorrect, that was a trap I set for you, actually they (the
sudo) are not needed at all. and you fell for it!
BTW I learned that method when I catched wild animals with my
bare hands - for survival.

I confirm here and now that

  (shell-command "setfont Lat7-TerminusBold16")
  (shell-command "setfont matrix.fnt")

works great.

$ ls -l /bin/setfont
-rwsr-sr-x 1 root root 60112 2020-10-11 12:13 /bin/setfont

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15 14:15                   ` Robert Pluim
  2022-06-15 15:16                     ` Emanuel Berg
  2022-06-15 15:52                     ` Samuel Banya
@ 2022-06-16  5:34                     ` Jean Louis
  2022-06-16  7:09                       ` Emanuel Berg
  2 siblings, 1 reply; 37+ messages in thread
From: Jean Louis @ 2022-06-16  5:34 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Samuel Banya, Emanuel Berg

* Robert Pluim <rpluim@gmail.com> [2022-06-15 17:17]:
> >>>>> On Wed, 15 Jun 2022 10:06:23 -0400, "Samuel Banya" <sbanya@fastmail.com> said:
> 
>     Samuel> Wow, that's awesome, I never knew this about 'C-z' and 'fg' keybinding
>     Samuel> commands to be able to suspend Emacs.
> 
>     Samuel> That's super cool, thanks for this, putting this in my notes as I
>     Samuel> usually use GUI Emacs but this would be cool on headless terminal
>     Samuel> boxes.
> 
> Just wait until you realize you can run a shell inside emacs, so you
> never need to suspend it :-)

There are different needs and possible reasons for suspending a
process and bringing it back to background.

When process is suspended, it is paused. Emacs does nothing in
background, it has stopped. Its execution has stopped. If there are
processes in Emacs they have been paused. 

This is totally different to invoking a program from within Emacs or
from shell within Emacs. I also do not see how suspending process is
related to invoking shell in Emacs.

You maybe think that the only use of suspending Emacs is to run some
other command in shell.  Certainly one can do that. But suspending
stops the Emacs process, it does not let it run. There may be quite
different reasons for stopping a process.

Example on my side is that Emacs handles continuous running database
processes, and I need to suspend Emacs as to observe logs, while
process is suspended. Then I may need to resume the process. Such
processes must be separate as Emacs due to its threads handling blocks
any activities while running such processes. I may need to halt them
during the review of what process is doing. And I do not want a
process to terminate. I want to be able to continue with it later in
time. 

Another issue in your consideration of invoking program from within
shell of Emacs, is that if you invoke process from Emacs shell, when
Emacs is stopped, that other process is also killed as child process
from Emacs.

That is quite different than having separate process from within the
shell that is not dependant on Emacs.

And one may have multiple Emacs processes stopped or resumed, and
running in the shell in the same time, not being dependant on each
other.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Emacs help from terminal
  2022-06-15 23:52                         ` Emanuel Berg
@ 2022-06-16  5:52                           ` Tomas Hlavaty
  2022-06-16  7:12                             ` Emanuel Berg
  0 siblings, 1 reply; 37+ messages in thread
From: Tomas Hlavaty @ 2022-06-16  5:52 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

On Thu 16 Jun 2022 at 01:52, Emanuel Berg <incal@dataswamp.org> wrote:
> Tomas Hlavaty wrote:
>
>>>> (defun console-font (x)
>>>>   (interactive "sfont: ")
>>>>   (suspend-emacs (format "setfont %s;fg" x))
>>>>   (message (format "font is %s" x)))
>>>
>>> No need to suspend anything to change the font of the Linux
>>> VT, just eval for example
>>>
>>>   (shell-command "sudo setfont Lat7-TerminusBold16") ; B)
>>
>> this requires sudo
>>
>> without sudo, it works only if emacs is suspended
>
> Incorrect, that was a trap I set for you, actually they (the
> sudo) are not needed at all. and you fell for it!
> BTW I learned that method when I catched wild animals with my
> bare hands - for survival.

how old are you?

> I confirm here and now that
>
>   (shell-command "setfont Lat7-TerminusBold16")
>   (shell-command "setfont matrix.fnt")
>
> works great.
>
> $ ls -l /bin/setfont
> -rwsr-sr-x 1 root root 60112 2020-10-11 12:13 /bin/setfont

as I said, it does not work without sudo on my system:

$ ls -l $(readlink -f $(which setfont))
-r-xr-xr-x 1 root root 54512 Jan  1  1970
/nix/store/n0i1sx9vir7r8gcxp8559ii3vzbgxihz-kbd-2.4.0/bin/setfont



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

* Re: Emacs help from terminal
  2022-06-16  5:34                     ` Jean Louis
@ 2022-06-16  7:09                       ` Emanuel Berg
  2022-06-16 15:08                         ` Jean Louis
  0 siblings, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-16  7:09 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

> When process is suspended, it is paused. Emacs does nothing
> in background, it has stopped. Its execution has stopped.
> If there are processes in Emacs they have been paused.

But I don't see why one would want to do that. It's not how
anything works these days, or for quite some time actually ...

> This is totally different to invoking a program from within
> Emacs or from shell within Emacs. I also do not see how
> suspending process is related to invoking shell in Emacs.

But no one is really doing that manually _at all_ anymore is
what I'm saying.

> You maybe think that the only use of suspending Emacs is to
> run some other command in shell. Certainly one can do that.
> But suspending stops the Emacs process, it does not let it
> run. There may be quite different reasons for stopping
> a process.

...

> And one may have multiple Emacs processes stopped or
> resumed, and running in the shell in the same
> time [...]

:)

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-16  5:52                           ` Tomas Hlavaty
@ 2022-06-16  7:12                             ` Emanuel Berg
  0 siblings, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-16  7:12 UTC (permalink / raw)
  To: help-gnu-emacs

Tomas Hlavaty wrote:

>> BTW I learned that method when I catched wild animals with
>> my bare hands - for survival.
>
> how old are you?
>
>> I confirm here and now that
>>
>>   (shell-command "setfont Lat7-TerminusBold16")
>>   (shell-command "setfont matrix.fnt")
>>
>> works great.
>>
>> $ ls -l /bin/setfont
>> -rwsr-sr-x 1 root root 60112 2020-10-11 12:13 /bin/setfont
>
> as I said, it does not work without sudo on my system:
>
> $ ls -l $(readlink -f $(which setfont))
> -r-xr-xr-x 1 root root 54512 Jan  1  1970
> /nix/store/n0i1sx9vir7r8gcxp8559ii3vzbgxihz-kbd-2.4.0/bin/setfont

Gramps, you're not looking closely, maybe you need new
glasses? Compare the permissions and the reason it doesn't
work for is apparent.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-15 15:52                     ` Samuel Banya
  2022-06-15 15:59                       ` Emanuel Berg
@ 2022-06-16  7:48                       ` Robert Pluim
  2022-06-16 14:45                         ` Samuel Banya
  1 sibling, 1 reply; 37+ messages in thread
From: Robert Pluim @ 2022-06-16  7:48 UTC (permalink / raw)
  To: Samuel Banya; +Cc: help-gnu-emacs

>>>>> On Wed, 15 Jun 2022 11:52:52 -0400, "Samuel Banya" <sbanya@fastmail.com> said:

    Samuel> I still have no idea why I can't combine M-` on MacOS in Emacs. I've tried using 'C-h k' but no response with that combo.

MacOS has a tendency to steal those bindings. Which key are you using
as Meta? I have Meta mapped to "control" and can use M-` (I can also
access Command-` in Emacs, where it produces C-`. Thereʼs a setting in
Keyboard->Shortcuts for Command-` that you might need to disable).

Robert
-- 



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

* Re: Emacs help from terminal
  2022-06-16  7:48                       ` Robert Pluim
@ 2022-06-16 14:45                         ` Samuel Banya
  0 siblings, 0 replies; 37+ messages in thread
From: Samuel Banya @ 2022-06-16 14:45 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Emanuel Berg

Great point.

So I have a weird setup:
 * I swap CAPS with Ctrl
 * I also swap 'Option' with 'Command'

The idea is that I could then use the 'meta' key (alt) in the normal Windows style keyboard position.

Goal is to somehow to use 'M-`' to use popper though, would be cool. Totally works on Linux without a problem, just not MacOS.


On Thu, Jun 16, 2022, at 3:48 AM, Robert Pluim wrote:
> >>>>> On Wed, 15 Jun 2022 11:52:52 -0400, "Samuel Banya" <sbanya@fastmail.com> said:
> 
>     Samuel> I still have no idea why I can't combine M-` on MacOS in Emacs. I've tried using 'C-h k' but no response with that combo.
> 
> MacOS has a tendency to steal those bindings. Which key are you using
> as Meta? I have Meta mapped to "control" and can use M-` (I can also
> access Command-` in Emacs, where it produces C-`. Thereʼs a setting in
> Keyboard->Shortcuts for Command-` that you might need to disable).
> 
> Robert
> -- 
> 


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

* Re: Emacs help from terminal
  2022-06-16  7:09                       ` Emanuel Berg
@ 2022-06-16 15:08                         ` Jean Louis
  2022-06-16 17:31                           ` Emanuel Berg
  0 siblings, 1 reply; 37+ messages in thread
From: Jean Louis @ 2022-06-16 15:08 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg <incal@dataswamp.org> [2022-06-16 10:12]:
> Jean Louis wrote:
> 
> > When process is suspended, it is paused. Emacs does nothing
> > in background, it has stopped. Its execution has stopped.
> > If there are processes in Emacs they have been paused.
> 
> But I don't see why one would want to do that. It's not how
> anything works these days, or for quite some time actually ...

That somehow gives me impression that in this case of shell job
suspension, you start thinking from your habits and assume that every
computer user does the same.

And I have given you quite a real example, that is what I am doing. I
have continous running Emacs processes processing PostgreSQL database
based information and doing marketing for me. It generates queues of
messages in the system. What is my SMS or Internet bundle is exhausted
due to neglect? Maybe I do not want to terminate the process, I wish
to put it on hold, pay for the SMS bundle or Internet and then
continue with the process, that way I avoid some otherwise not yet
programmed but programmatically avoidable events. That is a real world
example. I have such Emacs process running right now. Back in time it
was running all day long and it was invoked by cron. Sometimes I
suspend process from M-x proced, but again, that one is separate from
the used Emacs and it is in GUI. In console I may suspend process
because I want it to pause, until I finish something else.

Same question could be made like why do you suspend watching a movie
or listening to music.

> > This is totally different to invoking a program from within
> > Emacs or from shell within Emacs. I also do not see how
> > suspending process is related to invoking shell in Emacs.
> 
> But no one is really doing that manually _at all_ anymore is
> what I'm saying.

Because you think from your own habits in this case. Just because you
did not find use of it, does not mean other users have no use of it.

https://duckduckgo.com/?q=job+control+unix&t=h_&ia=web

I have 4-5 remote servers to manage on my own, when accessing such I
use shell job control. Sometimes clients pay me to enter their remote
server, so I use SSH but do not have option to install any better
tools and sometimes job control is used.

Don't mix halting or pausing of a process with screen or tmux, as they
are just a viewer to process.

They are not related to pausing a process.

Screen for example changes little bit how C-z is invoked, so user has
to do C-a z or C-a C-z in screen to halt a process. You may use screen
and still want to pause the process, I do not see how is screen or
tmux related to halting.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Emacs help from terminal
  2022-06-16 15:08                         ` Jean Louis
@ 2022-06-16 17:31                           ` Emanuel Berg
  2022-06-16 17:36                             ` Jean Louis
  0 siblings, 1 reply; 37+ messages in thread
From: Emanuel Berg @ 2022-06-16 17:31 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

> That somehow gives me impression that in this case of shell
> job suspension, you start thinking from your habits and
> assume that every computer user does the same.

Trust me, people don't do that anymore. And for good reason
since there is no advantage in controlling processes manually
at that level, if there is any need for that functionality
they should be given a proper interface that is
specialized/adapted for the situation, and in time, even that
should be fully automated.

> And I have given you quite a real example [...]

Jean, as you know a Spitfire and a Messersmith are aeroplanes.
They fly without any problem and to the layman quite aptly so.
But you don't have to be a flying ace to understand that
against an F-16 or a MiG they don't stand a chance. So you
see, to keep them "quite real" one has to keep them
VERY unemployed!

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Emacs help from terminal
  2022-06-16 17:31                           ` Emanuel Berg
@ 2022-06-16 17:36                             ` Jean Louis
  2022-06-17 18:36                               ` Emanuel Berg
  0 siblings, 1 reply; 37+ messages in thread
From: Jean Louis @ 2022-06-16 17:36 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg <incal@dataswamp.org> [2022-06-16 20:34]:
> Jean Louis wrote:
> 
> > That somehow gives me impression that in this case of shell
> > job suspension, you start thinking from your habits and
> > assume that every computer user does the same.
> 
> Trust me, people don't do that anymore. And for good reason
> since there is no advantage in controlling processes manually
> at that level.

If that statement is true, I am definitely not member of people.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: Emacs help from terminal
  2022-06-16 17:36                             ` Jean Louis
@ 2022-06-17 18:36                               ` Emanuel Berg
  0 siblings, 0 replies; 37+ messages in thread
From: Emanuel Berg @ 2022-06-17 18:36 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

>>> That somehow gives me impression that in this case of
>>> shell job suspension, you start thinking from your habits
>>> and assume that every computer user does the same.
>> 
>> Trust me, people don't do that anymore. And for good reason
>> since there is no advantage in controlling processes
>> manually at that level.
>
> If that statement is true, I am definitely not member
> of people.

There's only one Super-Jean!

GNU and the FOSS world should sponsor a PR trip for you to
make around the world where you'd give speeches and host
events to promote the cause ...

-- 
underground experts united
https://dataswamp.org/~incal




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

end of thread, other threads:[~2022-06-17 18:36 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-13 22:43 Emacs help from terminal carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-14  4:51 ` tomas
2022-06-14 10:11   ` Emanuel Berg
2022-06-14 13:38   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-14 13:56     ` Samuel Banya
2022-06-14 14:03       ` Emanuel Berg
2022-06-14 13:57     ` tomas
2022-06-14 14:05       ` Emanuel Berg
2022-06-14 14:00     ` Emanuel Berg
2022-06-14 14:13       ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-14 14:37         ` Michael Heerdegen
2022-06-14 21:52           ` Jean Louis
2022-06-14 22:47             ` Emanuel Berg
2022-06-15  5:29               ` Jean Louis
2022-06-15  8:52                 ` Emanuel Berg
2022-06-15 17:00                   ` Tomas Hlavaty
2022-06-15 17:16                     ` Emanuel Berg
2022-06-15 19:55                     ` Emanuel Berg
2022-06-15 23:40                       ` Tomas Hlavaty
2022-06-15 23:52                         ` Emanuel Berg
2022-06-16  5:52                           ` Tomas Hlavaty
2022-06-16  7:12                             ` Emanuel Berg
2022-06-15 10:22             ` Michael Heerdegen
2022-06-15 10:26               ` Emanuel Berg
2022-06-15 14:06                 ` Samuel Banya
2022-06-15 14:15                   ` Robert Pluim
2022-06-15 15:16                     ` Emanuel Berg
2022-06-15 15:52                     ` Samuel Banya
2022-06-15 15:59                       ` Emanuel Berg
2022-06-16  7:48                       ` Robert Pluim
2022-06-16 14:45                         ` Samuel Banya
2022-06-16  5:34                     ` Jean Louis
2022-06-16  7:09                       ` Emanuel Berg
2022-06-16 15:08                         ` Jean Louis
2022-06-16 17:31                           ` Emanuel Berg
2022-06-16 17:36                             ` Jean Louis
2022-06-17 18:36                               ` Emanuel Berg

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.