LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-01-2019, 09:45 PM   #1
Sufferin' Succotash
LQ Newbie
 
Registered: Feb 2019
Location: ON, Canada
Distribution: Slackware
Posts: 27

Rep: Reputation: Disabled
Talking Used to Emacs? Don't want to open a new instance for small edits in root? Answer: JOE -> jmacs!


Hi again,

Just wanted to share my love for another new software discovery thanks to Slackware's pre-installed package set: the JOE editor.

Personally, between Emacs and Vim, I ended up picking Emacs (Vim is great too - that's not what this post is), but I wanted to use the power I had with learning it's keybindings everywhere I needed to edit files, even for small edits as root in the terminal or tty session, without opening a whole new instance of it every time I wanted to do so (which isn't a problem on modern hardware, but to me it seems odd) or invoking an emacs daemon as root only for it to be used once.

Well, JOE is a text editor comes in multiple executables that affect the keybindings that it uses. One of these is called jmacs that uses, you guessed it, Emacs keybindings. I tried them - they work.

So, I created a /root/.bashrc that contains the following:

Code:
export EDITOR="jmacs" # takes care of the default editor that the shell invokes, such as in visudo
alias edit="jmacs" # my own variable
alias view="jmacs -rdonly" # "view" is an alias that's set up to use Vim as default - this is the jmacs equivalent command
And there you go. I wanted to post this because there doesn't seem to be very many posts out there on the web for JOE, especially praising it, even though it's been around for a very long time and seems to be pretty great.

Thus, here's a +1 from me.
 
Old 10-02-2019, 01:20 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,470

Rep: Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813
https://www.gnu.org/software/tramp/
 
2 members found this post helpful.
Old 10-03-2019, 11:46 AM   #3
ttk
Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 878
Blog Entries: 27

Rep: Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225Reputation: 1225
JOE is a great little editor :-) my father uses it on his Slackware system (as "jstar", since he's accustomed to Wordstar key bindings). He loves it.

I'm partial to jove, which like JOE is also a lightweight text editor with Emacs key bindings, which ships with Slackware. Been using jove almost exclusively since 1999.
 
1 members found this post helpful.
Old 10-04-2019, 04:12 PM   #4
Sufferin' Succotash
LQ Newbie
 
Registered: Feb 2019
Location: ON, Canada
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ttk View Post
JOE is a great little editor :-) my father uses it on his Slackware system (as "jstar", since he's accustomed to Wordstar key bindings). He loves it.

I'm partial to jove, which like JOE is also a lightweight text editor with Emacs key bindings, which ships with Slackware. Been using jove almost exclusively since 1999.
Cool - looks like that and another one called Jed are both even smaller than JOE. They both seem pretty neat.
 
1 members found this post helpful.
Old 10-06-2019, 12:55 PM   #5
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, OpenBSD
Posts: 150

Rep: Reputation: Disabled
Thanks for the tip. I'd been using mg (there's an SBo slackbuild named mg-openbsd), but with your post have decided to uninstall that and use jmacs instead.

jed looks interesting too, but trying it I immediately hit keybinding pain when pressing alt-f wanting forward word and got to the file menu instead. This is the problem I have with mini-emacsen. The keybindings are always a bit off.

mg is pretty close but incremental search isn't quite right, the behaviour when you press enter when you've found what you want. jmacs gets closer, but seems to leave the cursor at the beginning of the match. But after brief usage it seems at least as good mg in its bindings. So I'll try it from now on, when I want to go this way.

Honestly though after installing mg-openbsd a couple months back I've since switched to vi for editing as root. If the key bindings are going to differ I guess I want them completely different.
 
1 members found this post helpful.
Old 10-06-2019, 12:59 PM   #6
hitest
Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 5,936

Rep: Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132Reputation: 2132
Smile

Quote:
Originally Posted by thirdm View Post
Honestly though after installing mg-openbsd a couple months back I've since switched to vi for editing as root.
Vi! I also like Vi a lot, and I'll use nano too. I was a BSD users for years. Made the switch back to all Linux.
 
Old 10-06-2019, 02:19 PM   #7
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 415

Rep: Reputation: 267Reputation: 267Reputation: 267
Quote:
Originally Posted by thirdm View Post
jed looks interesting too, but trying it I immediately hit keybinding pain when pressing alt-f wanting forward word and got to the file menu instead.
You can fix this by uncommenting
Code:
%  () = evalfile("emacs");           % Emacs-like bindings
in /usr/share/jed/lib/jed.rc. Or maybe copy the file to ~/.jedrc and uncomment it there.
 
1 members found this post helpful.
Old 10-07-2019, 09:13 PM   #8
Sufferin' Succotash
LQ Newbie
 
Registered: Feb 2019
Location: ON, Canada
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Petri Kaukasoina View Post
You can fix this by uncommenting
Code:
%  () = evalfile("emacs");           % Emacs-like bindings
in /usr/share/jed/lib/jed.rc. Or maybe copy the file to ~/.jedrc and uncomment it there.
Thanks for posting that - that's awesome!
 
Old 10-07-2019, 10:15 PM   #9
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, OpenBSD
Posts: 150

Rep: Reputation: Disabled
I also commented out enable_menu_keys (); and uncommented enable_top_status_line (0);

With that jed is quite interesting. Maybe I'll try this before jmacs. It's small and quick but if I'm not mistaken not so very minimal feature-wise. E.g. I can view man and info pages in it. Give it a dired equivalent and make it extensible with picolisp, maybe I'd drop GNU emacs.

Slackware's jed doesn't have xjed built? I wonder what that's like.

(Update: Hmmm. looking further jmacs has more tasteful syntax highlighting colours. OTH jed will let me move the cursor with the mouse, which I'm not finding in joe's man page.)

Last edited by thirdm; 10-07-2019 at 10:29 PM. Reason: update
 
Old 10-08-2019, 01:24 AM   #10
Lockywolf
Member
 
Registered: Jul 2007
Posts: 257

Rep: Reputation: 72
My goodness, guys, learn emacsclient -a "" -c -nw
 
1 members found this post helpful.
Old 10-08-2019, 07:43 AM   #11
Sufferin' Succotash
LQ Newbie
 
Registered: Feb 2019
Location: ON, Canada
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Lockywolf View Post
My goodness, guys, learn emacsclient -a "" -c -nw
Running emacs --daemon isn't something that I really want to do as root though, since I'd have to kill it manually after I leave "su"
 
1 members found this post helpful.
Old 10-08-2019, 07:45 AM   #12
Lockywolf
Member
 
Registered: Jul 2007
Posts: 257

Rep: Reputation: 72
I am ready to bet that there is an elpa package which does exactly that.
 
Old 10-11-2019, 11:53 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,470

Rep: Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813
Quote:
Originally Posted by Sufferin' Succotash View Post
Running emacs --daemon isn't something that I really want to do as root though, since I'd have to kill it manually after I leave "su"
Use tramp to access files as root.
 
3 members found this post helpful.
Old 10-12-2019, 12:24 PM   #14
Sufferin' Succotash
LQ Newbie
 
Registered: Feb 2019
Location: ON, Canada
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
Use tramp to access files as root.
Oooh, okay, I'll check it out. Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix multiple instance only default instance work Dante K Linux - Server 0 09-05-2017 09:45 AM
LXer: Joe Danger & Joe Danger 2 To Come To Steam For Linux LXer Syndicated Linux News 0 11-19-2013 03:01 AM
[SOLVED] Switch to instance instead of creating a new instance of a program javascriptninja Linux - Newbie 8 01-28-2012 03:39 PM
How can I get emacs -nw when I call emacs from a terminal but GUI emacs elsewhere? Blackened Justice Linux - Newbie 4 09-08-2011 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration