Skip to content

Commit

Permalink
README: tiny enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
c committed Nov 17, 2024
1 parent 7f94b02 commit ae33208
Showing 1 changed file with 55 additions and 7 deletions.
62 changes: 55 additions & 7 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,19 @@ prefix them with =<insert>=. Example: =<insert>-= inserts a =-= and
To draw a rectangle in one shot, select a rectangular region with
=C-SPC= or =C-x SPC= and move the cursor.

You may also use =S-<arrow>= (=<arrow>= beeing any of the 4
directions) to extend the selection. The buffer grows as needed with
white spaces to accomodate the selection. Selection extension mode is
active when =shift-select-mode= is non-nil.

If needed, change the brush with any of
=- + = # <delete>=

then hit
- =    r= to draw a rectangle inside the selection
- =  S-R= to draw a rectangle ouside the selection
- =  S-R= to draw a rectangle outside the selection
- =  C-r= to overwrite a rectangle inside the selection
- =C-S-R= to overwrite a rectangle ouside the selection
- =C-S-R= to overwrite a rectangle outside the selection

[[file:images/draw-rectangle.png]]

Expand Down Expand Up @@ -556,14 +561,51 @@ Why activate =whitespace-mode= while in =uniline-mode=? Because
=uniline-mode= creates a lot of white-spaces to implement an infinite
buffer. And it is funny to look at this activity.

To make them fully compatible, disable the newline visualization:
To make =uniline-mode= and =whitespace-mode= fully compatible, disable
the newline visualization:

- =M-x customize-variable whitespace-style=
- uncheck =(Mark) NEWLINEs=

This is due to a glitch in =move-to-column= when a visual property is
attached to newlines. And =uniline-mode= makes heavy use of =move-to-column=.

** Compatibility with Org Mode
You may want to customize the shift extension mode in =Org Mode=. This
is because =Org Mode= preempts =shift-select-mode= for other useful
purposes. Just type:

#+begin_example
M-x customize-variable org-support-shift-select
#+end_example

and choose "when outside special context", which sets it to =t=.

You then get the shift-selection from =Org Mode=, not from =Uniline=. The
difference is that the =Uniline='s one handles the infinite-ness of the
buffer.

Other than that, =Uniline= is compatible with =Org Mode=

** What about =\t= tabs?
Some files may contain tabs (the character =\t=). Those include
programming code (Python, Perl, C++, D, Rust, JavaScript and so on).

When =Uniline= draws something in the middle of a tab, it first
converts it to spaces, then proceeds as usual. This process is
invisible. So be cautious if tabs have a special meaning in the file.

One way to see what is going on, is to activate the =whitespace-mode=.

** What about =^L= page separation?
=Uniline= does not work well with =^L= (page separation)
character. Nore with similar characters, like =^T=. When trying to
draw a line over such a character, the cursor may get stuck. This is
because those characters occupy twice the width of a normal character.

Just try to get away from =^L=, =^T= and such when drawing with
=Uniline=.

* Exotic environments
** Emacs on the Linux console
Linux consoles are the 7 non-graphic screens which can be accessed
Expand Down Expand Up @@ -598,13 +640,13 @@ for =C-<insertchar>=, for example with =use-package= in your
#+end_example

** Emacs on Windows
On Windows the only native monospaced fonts are Lucida Console and
Courier New. They are not monospaced for the Unicodes used by
On Windows the only native monospaced fonts are =Lucida Console= and
=Courier New=. They are not monospaced for the Unicodes used by
=Uniline=.

Often, the Cosolas font is present on Windows. It supports quite well
Often, the =Consolas= font is present on Windows. It supports quite well
the required Unicodes to draw lines. A few glyphs produce unaligned
result though. They should be avoided under Consolas: =△▶▹◇◆=
result though. They should be avoided under =Consolas=: =△▶▹◇◆=

Of course, other fonts may be installed. It is quite easy.

Expand Down Expand Up @@ -703,6 +745,12 @@ In this example, =C-<insert>= was choosen. You can use whatever keys combination
- =ibm-box-drawing-hydra.el=: keyboard interface to insert UNICODE
box-drawing characters one at a time

- =org-excalidraw=: integrate SVG images generated by excalidraw into
Org Mode

- =rcd-box=: create tables surrounded by box-drawing characters from
Lisp descriptions

* Author, contributors
- Thierry Banel, author
- Joost Kremers https://github.com/joostkremers found a bug in the
Expand Down

0 comments on commit ae33208

Please sign in to comment.