emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master e199075 5/5: Update packages/darkroom from upstream


From: João Távora
Subject: [elpa] master e199075 5/5: Update packages/darkroom from upstream
Date: Fri, 15 Mar 2019 18:35:47 -0400 (EDT)

branch: master
commit e199075113a6f3c50146464d8a74d00d78a742c4
Merge: 5c25a7d 30d1b83
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Update packages/darkroom from upstream
    
    Merge subtree commit '30d1b83a8cf7abfad8281f5d063e3316338bdfa4'
---
 packages/darkroom/README.md      |  32 ++++++++++++++++++++++++++++++++
 packages/darkroom/darkroom.el    |   5 +++--
 packages/darkroom/screenshot.png | Bin 0 -> 160486 bytes
 3 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/packages/darkroom/README.md b/packages/darkroom/README.md
new file mode 100644
index 0000000..013709d
--- /dev/null
+++ b/packages/darkroom/README.md
@@ -0,0 +1,32 @@
+Darkroom
+--------
+
+Remove visual distractions and focus on writing.
+
+![screenshot](screenshot.png)
+
+This extension is available on Emacs' own GNU ELPA. Alternatively, put
+`darkroom.el` somewhere in your load-path and `require` it.
+
+The main entrypoints are two minor modes:
+
+* `M-x darkroom-mode`
+
+  `darkroom-mode` makes visual distractions disappear: the mode-line is
+  temporarily elided, text is enlarged and margins are adjusted so that
+  text centered on the window.
+   
+* `M-x darkroom-tentative-mode`
+
+  `darkroom-tentative-mode` is similar, but it only turns on these
+  features if the current buffer occupies the sole window of the
+  Emacs frame (i.e. all other windows are deleted). Whenever the
+  frame is split to display more windows and more buffers, the buffer
+  exits `darkroom-mode`. Whenever they are deleted, the buffer
+  re-enters `darkroom-mode`.
+
+Personally, I always use `darkroom-tentative-mode`.
+
+See also the customization options `darkroom-margins` and
+`darkroom-fringes-outside-margins`, which affect both modes.
+
diff --git a/packages/darkroom/darkroom.el b/packages/darkroom/darkroom.el
index 6542469..8dcfbba 100644
--- a/packages/darkroom/darkroom.el
+++ b/packages/darkroom/darkroom.el
@@ -6,7 +6,7 @@
 ;; Maintainer: João Távora <address@hidden>
 ;; Keywords: convenience, emulations
 ;; Package-Requires: ((cl-lib "0.5"))
-;; Version: 0.1
+;; Version: 0.2
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -47,6 +47,7 @@
 ;;; Code:
 
 (require 'cl-lib)
+(require 'face-remap)
 
 (defgroup darkroom nil
   "Remove visual distractions and focus on writing"
@@ -303,7 +304,7 @@ With optional JUST-MARGINS, just set the margins."
             (set (make-local-variable (car pair)) (cdr pair)))
         darkroom--saved-state)
   (setq darkroom--saved-state nil)
-  (text-scale-decrease darkroom-text-scale-increase)
+  (text-scale-mode -1)
   (mapc #'(lambda (w)
             (with-selected-window w
               (darkroom--reset-margins)))
diff --git a/packages/darkroom/screenshot.png b/packages/darkroom/screenshot.png
new file mode 100644
index 0000000..c8aacbf
Binary files /dev/null and b/packages/darkroom/screenshot.png differ



reply via email to

[Prev in Thread] Current Thread [Next in Thread]