Notes on Emacs

Introduction

I have been using personal information technology for a long time now.
system based on org-modebuilt in EmacsA lot has been accumulated
useful information. Addresses, various notes, diaries, links,
TODO-shki and so on.

The first incarnation of the system included the actual directory with .org
files and repository Git on rented hosting. This system
allowed to have it on several workstations in local and
sync them using Git.

And everything was fine, but mobile phones came along and
tablets. I wanted to have access to information using devices on
Android. After some fiddling, something came out. I'm posting the result on
court of public opinion.

Iron

The system is used on the following devices:

  • Workstations under Linux (PC And Raspberry Pi). I think it is possible to use it on Windows or Macyou just need to install Emacs And Git.

  • Mobile phone (Android).

  • Tablet (Android).

Possibilities

  • Works with local files, the Internet is needed only for synchronization.

  • Synchronizing local files via repository GitI think it can be used as a storage GitHub.

  • The information system itself works on the basis of org-mode emacs. You can use all its features, such as tables, TODO lists, tables, links to files and links to Internet sites.

Example: screenshot from the tablet screen under Android. In the screenshot
launched Emacs with the dashboard of the information system in
Android/Termux.

Software used

On Linux we use traditional software: Emacs, Git, SSH.

On Android devices we use the same thing, but installed in
Termux.

A quick explanation for those who have never dealt with TermuxThis
such a terminal emulator for Android. In fact, it is much
more than a terminal emulator. In fact, in terms of
user, it's a kind of unique distribution Linux,
surface mounted Android. It uses the kernel Linux from Android,
on which it is installed. There are repositories with packages for it,
similar to the usual distributions. Details can be found
look at their website: https://termux.dev/en/

One more note on Termux. It needs to be installed with
F-Droid. Termux can be found in Play Storebut the version is old and not
is being updated, problems may occur.

On Android I use another app, viewer .org
files Orgro. This is a paid app, it costs $4.99. I tried it and
others, free, but they turned out to be not so convenient and in
finally decided it was easier to pay. I use Orgro For
quick access to some notes via shortcuts on the desktop
table. To create shortcuts, use Total Commander.

Creating a system

Creating a basic system

Let's open Emacs and create a hierarchy on the base workstation .org
files with cross-references. We make the structure of directories and files
based on our tastes and needs. For example, let's do
the root of our system $HOME/my_info.

Creating a Git Repository

At the root of our hierarchy we connect Git as usual:

cd $HOME
mkdir my_info
cd my_info
git init
git touch .gitignore
git add .
git commit -am"Initial commit"
mkdir /tmp/git
cd /tmp/git
git clone --bare $HOME/my_info my_info.git

Copy my_info.git to your hosting with configured SSH and we do:

cd $HOME
mv my_info my_info_bkp
git clone username@hosting.domain:/home/username/my_info.git

Now we have a directory in our home directory my_info,
connected via git to the repository
hosting.domain:/home/username/my_info.git.

Note 1: The paths and names of directories and files are provided for
example, they should be chosen at your own discretion.

Note 2: As a repository hosting you can choose GitHub
or something similar.

Getting a copy from a repository on another Linux workstation

Well, here, actually, we act as described a little above:

cd $HOME
git clone username@hosting.domain:/home/username/my_info.git

Configuring the system on Android

WITH Android a little more fuss.

First of all, we install and configure Termux. Let me remind you that
it needs to be installed with F-Droidnot with Play Store.

Next we install it in Termux required software:

pkg upgrade
pkg install openssh
pkg install emacs
pkg install git

Now we clone our system:

cd $HOME
git clone username@hosting.domain:/home/username/my_info.git

That's it, you can start it. Emacs in the terminal and use it.

Describe in detail the work with Termux I won't, there are enough on the net
materials.

A couple of comments. It is quite possible to use it this way
tablet, especially with an external one connected BT keyboard. External mouse
practically not needed, because Emacs the terminal is designed for a keyboard,
and when necessary, you can use the touchscreen instead of a mouse.

Use on mobile

Work from a mobile phone in terminal mode on Emacsnot that,
so that it is completely impossible, but you can’t call such work convenient either.

On my mobile phone I mainly use the system to access
small notes in reading mode. I use Orgro – file reader
For Android. I create shortcuts for the necessary documents on the desktop
table. And you can use it.

Here is a screenshot of the mobile phone screen with the app open Orgro document.

Menu system – Yadirmenu

If on the workstation Linux what has been described is actually sufficient for
use, then on Android It's not really possible to use the bare system
comfortable.

To improve the convenience of performing frequently repeated actions
actions a menu system for scripts was developed called
Yadirmenu.

In short, this menu system turns a directory tree with files
scripts into the corresponding menu system. Of course, on Android/Termux
can be used Termux-widgetBut I really don't want to do all this.
manually on each new device. And with such a system you can simply
install the script and copy the script tree and everything works.

The main features of the menu system:

For example, a screenshot from a mobile phone Yadirmenuworking in Termux in mode Dialogue.

And this is a screenshot from the workstation Linux With Yadirmenuin mode Tkinter.

The menu system can be installed with GitHub: Yadirmenu.

What didn't work

For Android I would really like to have a user-friendly interface in the form of
desktop shortcut to call Termux with a launched lightweight
file viewer .org well or at least less and with and without an open file
start of the on-screen keyboard. It didn't work to do something like that,
had to use Orgro. And so it would be possible to solve everything
with the help of free applications and without leaving the text mode.

Maybe the community has some ideas?

Opening a .gpg file in Termux

I have passwords stored in one of the system files. The file is encrypted when
help GPG. Everything works, one problem, when opening the file .gpg
It is almost impossible to enter a password. To enter one character you need to press
press 5 times or more. Considering that when entering passwords
the symbols are not displayed on the terminal, the task becomes non-trivial.

Options

I think as a storage instead Git it is quite possible to use DropBox or
similar things, but I haven't tried it, it doesn't matter to me Git standard.

Links

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *