From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6NxUJ1EI7WHfKgAAgWs5BA (envelope-from ) for ; Sun, 23 Jan 2022 08:48:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yH7aH1EI7WG3QAAAG6o9tA (envelope-from ) for ; Sun, 23 Jan 2022 08:48:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DBA11855B for ; Sun, 23 Jan 2022 08:48:32 +0100 (CET) Received: from localhost ([::1]:58410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBXby-0006Lq-0d for larch@yhetil.org; Sun, 23 Jan 2022 02:48:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBXTs-0006Kt-9Q for emacs-orgmode@gnu.org; Sun, 23 Jan 2022 02:40:10 -0500 Received: from mail-oln040092068047.outbound.protection.outlook.com ([40.92.68.47]:17934 helo=EUR02-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBXTk-0000ne-Et for emacs-orgmode@gnu.org; Sun, 23 Jan 2022 02:40:02 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jZj/XL9WU7Lwd081dUh+pNJ5mVkBZPID09iYlKiPcG/8bViy1y78im2IzOAg6Pvcbo9GlUwhxzDuQtRfsQbh6O+t2vZzoP6p5Ak32CiypxK4kAVHP5kl6TIizjgxZEwY/mdrENlDUVxZvOnB56VPO5OyotpnNZaUqJdgfCdjmB00pxv5PNwffkZlavX4oZpeg6JOe6Z4+vBh1LItEdd0iHyVV/Joi7SxJ/vieZXy12EVXdvSAaaFPQJ8OI11Eh9kTUz5aeVBlwnnz/oZBuUkrlTI7KnpnNVFx9xhYhaBdxHxbOxecfEjW2DEBCYQgJ7A4T1fKLajnoKZdENJsr4TeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IcKYTpeFvw6WBvnyXpJhxyyAXK89Ny1BUffHvy9+ja0=; b=mVLhFcn2x8or7z9G3XFc5m6cHBXrkZI2iMr+4eUqPXBQw/Ma8i1De/jEDbHIonarBoKaqlvbx16JokqLPcdTenF27v/Ye7KXgf9tu2wjjLZP4V50aykeOQ1f8MZjBD3iocl3iXbK2YW1qUKIP77BtLzS7isuDfqiEWkQjqnXiS1YnQcrkgezcpNA06KREAfn///C8VYoKJKyk/9yzIVe6kiZJRYB0T7v950FEAiFU79PghdJf+t0XDQpQFwToxdjkOU2hDZZly0DfmSvfYCo9N/pQlJ4QPVLPx7qxoHV3ZG6+0mOvMpPlhsPnEimuHBJxGlaOJvZIDWMLDOylKo2ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IcKYTpeFvw6WBvnyXpJhxyyAXK89Ny1BUffHvy9+ja0=; b=OA0+64fz8EMfMPvh9t250LPaxb1POKrfidyra4PST4EylqlW1HXdvrxz4nxNV/eFeqHv8baMBdBspwBNGjjAt1uLXrFRAeLtGB+tHe4XUrrof1Nz09pEKpjeb8MehYa7KhesDvkUDmcmNQtB8jTDVCTkSAB+PGJDtrx4GATLvMTegoSU+Zlc6teCCT/EeASCsC3Xz3r8io34SS57p6y2XEUxnyYcZ4tR1+rGQuV1WMCMv0Dup1HZAmc1yksx9jrIZmW/Z0eIBKl/XL79cApgjMaetjTcfa3/7HS9wsSsDtxI16gKhwg5hDkpxIeADtbZjQWb2EPqFa46DhIUe/XrEg== Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by VI1PR09MB2830.eurprd09.prod.outlook.com (2603:10a6:803:e3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Sun, 23 Jan 2022 07:19:14 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b012:5fd9:9447:d64a]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b012:5fd9:9447:d64a%5]) with mapi id 15.20.4909.017; Sun, 23 Jan 2022 07:19:14 +0000 From: Arthur Miller To: emacs-orgmode@gnu.org Subject: Read only org view mode Date: Sun, 23 Jan 2022 08:19:12 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [vl4mUaM9vsdH76HiYU5SvzuqUusDOeD2] X-ClientProxiedBy: HE1PR0301CA0004.eurprd03.prod.outlook.com (2603:10a6:3:76::14) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87pmoirkb3.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8de027b-4ed4-4cb9-a16e-08d9de40a8a2 X-MS-TrafficTypeDiagnostic: VI1PR09MB2830:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Alew9EkWkT46MB4yGUuy16YTrK2KzNxAzzzt1pNdfKoBMKexibBLbAsMbRpMMoxy3w62/vGcBaVF4yzW2jXISCZoQc33dpKieneB2CL9k5q64cCoAjj+kSoOPj5xTKOj4dw6rcNMa3OjpvNe81Nwm1DnS3f/Lh225pkfGOACOwHqN1irMeK7f8mQIUKVDgRz0c5UMP9H/dP64cFPepQOQpA5CIsO6MqBRJBfZt8brqmhNgfbtjY/rET+TzFHQYq4dFgnNGH/JHMu3XhbkkAigs4XAmkCpU/FrkRdJsIVYrneagvVhk7r12k3FZagza5uIiWf9k44YdsStJ/ZQy5K/CwRe+ExKLYYc9qKwjxAnOS4vutG3vptE37HQIRxwVx9q2jS0QT6t+hCJFNVyRRMlckx0i5TSEXSJErg0Lm8BskcNqqXu2P+2Oj8sdVGyEtiCrsO8sESU+p7XpPxABuspFfq2AYh5VDtD8e+/EMpu7+7If7ACpPgFj6GcA0cRD8uixLQbxWERMiyHfB2hdWyusLakliMYdM+YcDyH23X4Cuv13dGbAVBOvtY/5KY6nr6w/c7oKfmvRpdqnS80XMUB2iWhU88kdU4NFackDmZMnqoVvI8UGRUdQ4Dx5D3b+lu X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?c2GtJ5YfzCgOReMsxpNiloBBG8r44coTvn3z24UFOKpZrRtECRa5+HLthslw?= =?us-ascii?Q?n8M62hxfKjgAfi0sL52UE1aAIo3hbAwkhP1AkqcXvIaCJyZatHdgWWMPoOnc?= =?us-ascii?Q?yvYo6X/aPs5NJC3mafNE6D9NWwkTB4zq7JWPdI0eYWg+H70LnK/NLqL10R86?= =?us-ascii?Q?hT7c8BSa+7HzAryl3Dk+OQiWMRWLCQKbHKDasmlJtwnyUoeszPV2tDA1bGEc?= =?us-ascii?Q?APDvSEqqP9AMj1FY2XC+o0b7Ti3t+Byb/YYgQTwMc75roNV/pMKcDDkePuFu?= =?us-ascii?Q?OCEqSmfisN1Ca2tyTVRku8eOJT7cqm57QxS2cYVe5YGRggybh9huZP7Uuj7G?= =?us-ascii?Q?Ca5eDL9c37VO3U0L9L6b7maSaqsHOHfrmbDrATMCTRHRqpIFl50UVYV4zz7p?= =?us-ascii?Q?NjuCGpVE/VX1mvrCgkgsJ0WZGW8cXqGVM+AJHOvhTPJI7PnCiMTERdo2zQf4?= =?us-ascii?Q?t7nqmQMKn18KvT0VWmUpKzsoJYF6LCL0YEa8L1vCkRbayk6u28BIKnn2LwDH?= =?us-ascii?Q?KzF+GtDAe8TEuf4wpGzaab7uM3Oh29pvvDp+MbfKy0T26ArPelrmDwyMpjLf?= =?us-ascii?Q?TuZEszuDItzbd09FHMsF/Bp3saFiivQ5odqGrIdVeWGi6Z2UU21yoqsF5gBf?= =?us-ascii?Q?Rqi+S+2p2+AsJ8PgXI7kf6XF4KfdlPWln19JWahfsFjLOjZ077RioAT8uJxO?= =?us-ascii?Q?7AKYprHhhN2HC/fr3VDPF/i5FfrpgQMzEA5Od+gwuKW0I8KMQHKPYwGCeIF7?= =?us-ascii?Q?ZNkgSn8rRzhL0nqBNMiI9p+wgw8v75+sbLPJCC3RY+hbS+BM0hW0J/ck+BL+?= =?us-ascii?Q?Whve8rLgGTf7tiVwTmEyFW7YOixzHtNqlYmFaEIjL0v70TE6cnG1qQ3ovZi1?= =?us-ascii?Q?qwshH3M40lQ7U/zHmUgYz4dZ3jTr03Smrz1eYJuJvzJ/3bpQHH2k77e/9Igu?= =?us-ascii?Q?xksRNZYXYkJOThBfWnorFw=3D=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: f8de027b-4ed4-4cb9-a16e-08d9de40a8a2 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2022 07:19:14.1420 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR09MB2830 Received-SPF: pass client-ip=40.92.68.47; envelope-from=arthur.miller@live.com; helo=EUR02-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642924113; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IcKYTpeFvw6WBvnyXpJhxyyAXK89Ny1BUffHvy9+ja0=; b=P2JHyBdSgRFvkzRjYZxgHd6GPp4/cVEMT9Ou6KQeiQzeFjgOkLHaHTuzhV1JKK2a6JryJ4 eqqPzV4drz+EuKpNnwBOzqjrH7j6MT+vwscuEMxlKMTxjZVjWjdoCermpYZ1T2WOqnZJKy NMUn/+v6iYgoGqusZnZB2k9uYbWhAYdtW1Wi9RT9hJUgI+3PjEqDov4MKkR+3DF84UJ8pQ yAVsadxvFZg/KOS8ySFeUB0+22hM7tzSJvBs0cRhW6Cgl7Fpfi9c2VNF+MzeqVAWlGU9Q9 PrPtwIbtBuMufVVKvL7TMx5DBvhchEn+oBTLTZbVTvRSPnZaypbPPIuwxScuPQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1642924113; a=rsa-sha256; cv=pass; b=tFtM2/1hi/9ruNNBGrdObWiiNHzH5PJDpMa20U8yaIlbhXoefRp7nkEkh95OCgySW4wQ/U F4AiVHSs3t7KKcKFCR/UC4i+4mNBJPPl66f1KVt4E50oG+0OPUItOK2FV4Pz7aBOYt0fSZ 7Po3TA/nlnqVxZOF5VVzKzVrQlzvNtGDA+SSZhtq4pgjI5+Cle0ueuMdBaninSpSVueLQM bTmj43NHH22hzTCIsBrnPsfA8umMDcVaenb8RvN8MFdCm/QxF+zmn7mXo1Vj9+yCNSEfS+ 9Pg1XHHxztkqZ8V/3PKx8rH5qtPYsL56bj+ifNvrzJhjiijs7DfyiXUZJxdCVw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=OA0+64fz; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=OA0+64fz; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DBA11855B X-Spam-Score: -5.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: v9GfqO9sstnW --=-=-= Content-Type: text/plain Hi mailing list, is something like this of interest to add to org-mode? Attached is a prototype to a read-only view mode. It tries to hide as much of markup as possible to make it more "readable". It uses built-in view-mode to make the buffer read only and enable some common commands. I plan to add more "dired like" movement though. I don't claim it is very well written or efficient; I appreciate input on that regard. To note is that I use minor-modes as "toggles", to make the functionality avialable as "solo pieces" as well as a code generation tool. I am just checking interest here. More info and a screencast are avialable at: https://github.com/amno1/org-view-mode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=org-view-mode.el Content-Transfer-Encoding: quoted-printable ;;; org-view-mode.el --- Read-only viewer with less markup clutter in org m= ode files -*- lexical-binding: t; -*- ;; Copyright (C) 2021 Arthur Miller ;; Author: Arthur Miller ;; Keywords: convenience, outlines, tools ;; 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 ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; Author: Arthur Miller ;; Version: 0.0.1 ;; Keywords: tools convenience ;; Package-Requires: ((emacs "24.1")) ;; URL: https://github.com/amno1/org-view-mode ;;; Commentary: ;; A minor mode to help reduce clutter in org-mode files by ;; hiding/unhiding org-mode markup language ;; ;; To turn it on execute: ;; ;; `M-x org-view-mode'. ;; ;; To turn it off execute the same command. ;;; Issues ;;; Code: (require 'org) (defgroup org-view nil "Hide tags in org-headings." :prefix "org-view-" :group 'org) (defvar-local org-view-center-credentials nil "Whether to align title and author in center or not. Centering is done pixel wise relative to window width.") (defcustom org-view-diminish-mode t "Hide lighters for individual minor modes when org-view-mode is on." :type 'boolean :group 'org-view) (defvar org-view-stars-re "^[ \t]*\\*+" "Regex used to recognize leading stars in org-headings.") (defvar org-view-credentials-re "[ \t]*#\\+\\(TITLE\\|AUTHOR\\):" "Regex used to update author and title lines.") (defun org-view--update-tags (visibility) "Update invisible property to VISIBILITY for tags in the current buffer." (save-excursion (goto-char (point-min)) (with-silent-modifications (while (re-search-forward org-view-stars-re nil t) (goto-char (line-end-position)) (when (re-search-backward org-tag-line-re (line-beginning-position)= t) (put-text-property (match-beginning 1) (match-end 1) 'invisible visibility)) (forward-line))))) (defun org-view--update-keywords (visibility) "Set VISIBILITY for each line starting with a keyword from KEYWORDS list.= " (org-with-wide-buffer (save-excursion (with-silent-modifications (goto-char (point-min)) (while (re-search-forward "^[ \t]*#\\+.*$" nil t) (goto-char (match-beginning 0)) (unless (looking-at-p org-view-credentials-re) (put-text-property (1- (match-beginning 0)) (match-end 0) 'invisible visibility)) (goto-char (match-end 0))))))) (defun org-view--update-properties (visibility) "Set invisible property to VISIBILITY for properties in the current buffe= r." (org-with-wide-buffer (save-excursion (with-silent-modifications (goto-char (point-min)) (while (re-search-forward org-property-drawer-re nil t) (put-text-property (match-beginning 0) (match-end 0) 'invisible visibility)) (goto-char (point-min)) (while (re-search-forward "^[ \t]*#\\+PROPERTY:.*$" nil t) (put-text-property (1- (match-beginning 0)) (1+ (match-end 0)) 'invisible visibility= )))))) (defun org-view--update-stars (visibility) "Update invisible property to VISIBILITY for markers in the current buffe= r." (org-with-wide-buffer (save-excursion (goto-char (point-min)) (with-silent-modifications (while (re-search-forward org-view-stars-re nil t) (put-text-property (match-beginning 0) (match-end 0) 'invisible visibility)))))) (defun org-view--update-credentials (visibility) "Set invisible property to VISIBILITY for export settings." (org-with-wide-buffer (save-excursion (with-silent-modifications (goto-char (point-min)) =20 (while (re-search-forward org-view-credentials-re nil t) (put-text-property (match-beginning 0) (match-end 0) 'invisible visibility) (when org-view-center-credentials (org-view--center-in-window visibility))) (goto-char (point-min)))))) (defun org-view--center-in-window (center) "Center a line in a window pixel wise." (save-excursion (goto-char (line-beginning-position)) (let ((end (line-end-position)) (beg (line-beginning-position))) (if center (let* ((line (buffer-substring beg end)) (length (/ (string-pixel-width line) 2))) (put-text-property beg (1+ beg) 'display `(space :align-to (- center (,length))))= ) (remove-text-properties beg (1+ beg) '(display nil)))))) ;;;###autoload (define-minor-mode org-view-hide-tags-mode "Hide/show tags in org-headings." :global nil :lighter " org-htm" (unless (derived-mode-p 'org-mode) (error "Not in org-mode")) (org-view--update-tags org-view-hide-tags-mode)) ;;;###autoload (define-minor-mode org-view-hide-stars-mode "Hide/show leading stars in org-headings." :global nil :lighter " org-hsm" (unless (derived-mode-p 'org-mode) (error "Not in org-mode")) (org-view--update-stars org-view-hide-stars-mode)) ;;;###autoload (define-minor-mode org-view-hide-keywords-mode "Hide/show leading stars in org-headings." :global nil :lighter " org-hkm" (unless (derived-mode-p 'org-mode) (error "Not in org-mode")) (org-view--update-keywords org-view-hide-stars-mode)) ;;;###autoload (define-minor-mode org-view-hide-properties-mode "Hide/show properties and property drawers." :global nil :lighter " org-hpm" (unless (derived-mode-p 'org-mode) (error "Not in org-mode")) (org-view--update-properties org-view-hide-properties-mode)) ;;;###autoload (define-minor-mode org-view-pretty-credentials-mode "Prettify credentials in org-buffers." :global nil :lighter " org-pcm" (unless (derived-mode-p 'org-mode) (error "Not in org-mode")) (org-view--update-credentials org-view-pretty-credentials-mode)) (defun org-view-quit () (interactive) (org-view-mode -1) (message "org-view mode disabled in current buffer")) (defvar-keymap org-view-mode-map :doc "Keymap for =E2=80=98ORG-view-mode=E2=80=99" "c" #'org-view-quit "C" #'org-view-quit "e" #'org-view-quit "E" #'org-view-quit "q" #'org-view-quit "Q" #'org-view-quit) ;;;###autoload (define-minor-mode org-view-mode "Hide/show babel source code blocks on demand." :global nil :lighter " org-view" :keymap org-view-mode-map (unless (derived-mode-p 'org-mode) (error "Not in org-mode")) (cond (org-view-mode (org-view-hide-tags-mode org-view-mode) (org-view-hide-stars-mode org-view-mode) (org-view-hide-keywords-mode org-view-mode) (org-view-hide-properties-mode org-view-mode) (org-view-pretty-credentials-mode org-view-mode) (when org-view-diminish-mode (dolist (mode '(org-view-hide-tags-mode org-view-hide-stars-mode org-view-hide-keywords-mode org-view-hide-properties-mode org-view-pretty-credentials-mode)) (let ((mode-str (cdr (assq mode minor-mode-alist)))) (setcar mode-str "")))) (view-mode +1)) (t (view-mode -1) (org-view-hide-tags-mode -1) (org-view-hide-stars-mode -1) (org-view-hide-keywords-mode -1) (org-view-hide-properties-mode -1) (org-view-pretty-credentials-mode -1)))) (provide 'org-view-mode) ;;; org-view-mode.el ends here --=-=-=--