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

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

[elpa] externals/logos d41217e007 05/25: Tweak documentation and Comment


From: ELPA Syncer
Subject: [elpa] externals/logos d41217e007 05/25: Tweak documentation and Commentary
Date: Fri, 11 Mar 2022 08:58:00 -0500 (EST)

branch: externals/logos
commit d41217e007550ad57def82e30ac64df3be150c4b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Tweak documentation and Commentary
---
 README.org | 14 +++++++++++++-
 logos.el   | 19 ++++++++++++++-----
 2 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/README.org b/README.org
index b393d65a81..c21035586e 100644
--- a/README.org
+++ b/README.org
@@ -105,7 +105,19 @@ buffers (~logos-variable-pitch~).  All these variables are
 buffer-local.
 
 To position the buffer in the center of the window, use the =olivetti=
-package by Paul W. Rankin.
+package by Paul W. Rankin.  Sample glue code:
+
+#+begin_src emacs-lisp
+;; glue code for `logos-focus-mode' and `olivetti-mode'
+(defun my-logos--olivetti-mode ()
+  "Toggle `olivetti-mode'."
+  (if (or (bound-and-true-p olivetti-mode)
+          (null (logos--focus-p)))
+      (olivetti-mode -1)
+    (olivetti-mode 1)))
+
+(add-hook 'logos-focus-mode-hook #'my-logos--olivetti-mode)
+#+end_src
 
 Logos is the familiar word derived from Greek (watch my presentation on
 philosophy about Cosmos, Logos, and the living universe:
diff --git a/logos.el b/logos.el
index 653c0e7ea0..9bcaa59d7b 100644
--- a/logos.el
+++ b/logos.el
@@ -37,10 +37,10 @@
 ;; Logos does not define any key bindings.  Try something like this, if
 ;; you want:
 ;;
-;; (let ((map global-map))
-;;   (define-key map [remap narrow-to-region] #'logos-narrow-dwim)
-;;   (define-key map [remap forward-page] #'logos-forward-page-dwim)
-;;   (define-key map [remap backward-page] #'logos-backward-page-dwim))
+;;     (let ((map global-map))
+;;       (define-key map [remap narrow-to-region] #'logos-narrow-dwim)
+;;       (define-key map [remap forward-page] #'logos-forward-page-dwim)
+;;       (define-key map [remap backward-page] #'logos-backward-page-dwim))
 ;;
 ;; By default those key bindings are: C-x n n, C-x ], C-x [.  The
 ;; `logos-narrow-dwim' is not necessary if you already know how to
@@ -54,7 +54,16 @@
 ;; variables are buffer-local.
 ;;
 ;; To position the buffer in the center of the window, use the
-;; `olivetti' package by Paul W. Rankin.
+;; `olivetti' package by Paul W. Rankin.  Sample glue code:
+;;
+;;     (defun my-logos--olivetti-mode ()
+;;       "Toggle `olivetti-mode'."
+;;       (if (or (bound-and-true-p olivetti-mode)
+;;               (null (logos--focus-p)))
+;;           (olivetti-mode -1)
+;;         (olivetti-mode 1)))
+;;     
+;;     (add-hook 'logos-focus-mode-hook #'my-logos--olivetti-mode)
 ;;
 ;; Logos is the familiar word derived from Greek (watch my presentation
 ;; on philosophy about Cosmos, Logos, and the living universe:



reply via email to

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