groff_out

Simple commands:

  • 1 letter
  • Fixed # of arguments

They are:

  • f – set font (by number)
  • m – set color
  • N,C,c – print glyph
  • t – print word (several glyphs)
  • H,h – move point horizontally
  • V,v – move point vertically
  • p – new page
  • n – new line

Graphics command:

  • Starts with D
  • 1-2 letter command follows D
  • Fixed or variable # of arguments

They are:

  • Dl – line
  • Da – arc
  • D~ – B-spline
  • Dc/DC – circle/with fill
  • De/DE – ellipse/with fill
  • Dp/DP – polygon/with fill
  • DFx – set color of x

Device control commands:

  • Starts with x
  • x followed by 1 letter or w_ord – ‘ord’ always truncated

They are:

  • xT/xF – set device/file name
  • xi – initialize device
  • xs – stop
  • xf – bind a font name to the number
  • xH – set character height
  • xr – resolution
  • xS – set slant
  • xX – set string as is to device

Example:


shell> echo "hell world" | groff -Z -T ps
x T ps
x res 72000 1 1
x init
p1
x font 5 TR
f5
s10000
V12000
H72000
thell
wh2500
tw
H96620
torld
n12000 0
x trailer
V792000
x stop

emacs dired + tmux navigating

The problem is following:

  • 1 window in tmux has running emacs, with died navigation,
  • 2 window in tmux has a bash,

and I want to have a possibility for quick navigate in bash to emacs’s dired dir.

The following lines I added to .emacs:

;; copy current dir
;;    from dired mode
;;    to   external file ~/.emacs.d/cwd
(require 'dired)
(define-key dired-mode-map "c" 'dired-export-cwd)
(defun dired-export-cwd ()
  (interactive)
  (with-temp-file "~/\.emacs\.d/cwd"
    (insert default-directory)))

And I’ve added the following to .profile:

alias c='eval cd `cat ~/.emacs.d/cwd`'

So when I’m pressing ‘c’ in emacs – the current dir saved, the I pressed a ‘c’ in bash, this dir is loaded.