From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Submitting Dslide to Non-GNU ELPA Date: Thu, 20 Jun 2024 08:05:39 +0000 Message-ID: <874j9o599o.fsf@posteo.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6048"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Psionic K Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 20 10:06:35 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sKCoV-0001Ka-Fn for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jun 2024 10:06:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKCnq-0006OR-HQ; Thu, 20 Jun 2024 04:05:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKCno-0006OC-63 for emacs-devel@gnu.org; Thu, 20 Jun 2024 04:05:52 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKCnk-0001YW-OK for emacs-devel@gnu.org; Thu, 20 Jun 2024 04:05:51 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 5CEA6240103 for ; Thu, 20 Jun 2024 10:05:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718870744; bh=WSGUi0uCraTnkMSMKExNp+pcYSQZFb3kw+9554zp01c=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=Ut4f1CtebDxTUKqvUE4M+mPQAZ/8oc7q6BMkzdh7FCjtw6gLlU2iZ3mj95PF2D9eg sQOeD/MzG1lniUVK9l0ZwROY/Z//AmE7e7z4mqrRnsBBzKnv32MWuOHzKloq2eseJJ bcJljboQob17I2OEt+dSGRSJeW0kDz+N2vFemOWXhVaV7u+Y1deQoNFcDt5qGEVxFv 2e441KabNqqoGZBcY7bnfSfn5EUjyi91HveY3Q/vfM1wikZW9KTluO5pSViCvLBLOS kCckpEXYaUyJmp/HxmFQZRdwc5dPYPtWLeR1zk8k2+yvV9Z96mC9v41HUrewIghXtf Xt/U/JuWhwngQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W4Y2Z0rkjz9rxT; Thu, 20 Jun 2024 10:05:40 +0200 (CEST) In-Reply-To: (Psionic K.'s message of "Thu, 20 Jun 2024 15:02:03 +0900") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320314 Archived-At: --=-=-= Content-Type: text/plain Psionic K writes: > Dslide, a re-write of org-tree-slide focusing on programmable > presentations, is approaching 1.0. Release notes (0.5.2) here: > https://github.com/positron-solutions/dslide/releases > > I want to go through the Non-GNU ELPA process, partly to make the > package as available as possible, and partly for whatever coincidental > quality gains result from the submission process. > > I have not done anything with Non-GNU ELPA yet. Please advise. > > Source available here: git@github.com:positron-solutions/dslide.git > Direct github link: https://github.com/positron-solutions/dslide Here are a few comments: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/dslide.el b/dslide.el index 6c4db0f5c5..aece6917d2 100644 --- a/dslide.el +++ b/dslide.el @@ -105,8 +105,7 @@ (defcustom dslide-base-follows-slide t "Non-nil moves the base buffer point to the current slide. This happens whether the buffer is visible or not." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-start-from 'point "When starting, begin at `point' `first' slide. @@ -126,8 +125,7 @@ If you just want to navigate slides with the point, you= should use the contents mode by calling `dslide-deck-start' in a presentation that is already started." :type '(choice (const :tag "First slide" first) - (const :tag "Slide at point" point)) - :group 'dslide) + (const :tag "Slide at point" point))) =20 (defcustom dslide-start-function #'dslide-display-slides "When starting the mode, this is the default starting function. @@ -135,58 +133,49 @@ It should usually call `dslide-display-slides' or `dslide-display-contents'. You can build commands that use `let' binding to temporarily set this variable in order to start with a specific starting function." - :type 'function - :group 'dslide) + :type 'function) =20 (defcustom dslide-header t "The status of displaying the slide header." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-header t "Display header in contents buffer. When this is disabled, the keywords for title etc will remain visible, albeit scrolled away because of how `org-overview' works." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-header-author t "Show the email in the header. If there is a #+author: keyword, it will be used." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-header-email t "Show the email in the header. If there is a #+email: keyword, it will be used." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-header-date t "Show the date in the header. If there is a #+date: keyword, it will be used. The current time will be used as a fallback." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-margin-title-above 0.5 "Margin between header title and the top of the window. Can be a float or integer." - :type 'number - :group 'dslide) + :type 'number) =20 (defcustom dslide-margin-title-below 0.5 "Margin between title and other header info. Can be a float or integer." - :type 'number - :group 'dslide) + :type 'number) =20 (defcustom dslide-margin-content 1.5 "Margin between the slide header and its content. Can be a float or integer." - :type 'number - :group 'dslide) + :type 'number) =20 (defcustom dslide-slide-in-effect t "Using a visual effect of slide-in for displaying trees." @@ -195,16 +184,15 @@ Can be a float or integer." =20 (defcustom dslide-slide-in-blank-lines 15 "Line height of the slide-in effect." - :type 'number - :group 'dslide) + :type 'natnum) =20 (defcustom dslide-feedback-messages - '(:start "Start! =E2=96=B6" - :forward "Forward =E2=9E=A1" - :backward "=E2=AC=85 Backward" - :contents "Contents =E2=98=B0" - :stop "Stop =E2=96=A0" - :after-last-slide "No more slides!") + '( :start "Start! =E2=96=B6" + :forward "Forward =E2=9E=A1" + :backward "=E2=AC=85 Backward" + :contents "Contents =E2=98=B0" + :stop "Stop =E2=96=A0" + :after-last-slide "No more slides!") "Feedback messages for slide controls. Turn off by setting to nil. Plist keys and where they are used: =20 @@ -219,53 +207,49 @@ Turn off by setting to nil. Plist keys and where the= y are used: - :stop `dslide-deck-stop' =20 - :after-last-slide: see `after-last-slide-hook'" - :type 'plist - :group 'dslide) + :options '((:start string) + (:forward string) + (:backward string) + (:contents string) + (:stop string) + (:after-last-slide string))) =20 (defcustom dslide-breadcrumb-face '(:inherit org-level-8) "Face added to the list of faces for breadcrumbs. This can be a face name symbol or an anonymous face spec. It will be added to the face list, meaning it the original face's properties remain unless shadowed." - :type 'face - :group 'dslide) + :type 'face) =20 (defface dslide-header-overlay-face '((t :inherit default)) - "Face for `dslide--header-overlay'." - :group 'dslide) + "Face for `dslide--header-overlay'.") =20 (defcustom dslide-breadcrumb-separator " =F0=9F=A2=92 " "Delimiter for breadcrumbs or nil to turn off breadcrumbs." :type '(choice (const :tag "Don't display breadcrumbs" nil) - (string :tag "Delimiter")) - :group 'dslide) + (string :tag "Delimiter"))) =20 (defcustom dslide-breadcrumbs-hide-todo-state t "If non-nil, hide TODO states in the breadcrumbs." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defcustom dslide-animation-duration 1.0 "How long slide in takes." - :type 'number - :group 'dslide) + :type 'number) =20 (defcustom dslide-animation-frame-duration (/ 1.0 60.0) "Length between updates. Increase if your so-called machine has trouble drawing." - :type 'number - :group 'dslide) + :type 'number) =20 (defcustom dslide-start-hook nil "Runs after the slide buffer is created but before first slide. Buffer is widened and fully visible." - :group 'dslide :type 'hook) =20 (defcustom dslide-stop-hook nil "Runs in the base buffer after stopping." - :group 'dslide :type 'hook) =20 (defcustom dslide-narrow-hook nil @@ -273,12 +257,10 @@ Buffer is widened and fully visible." Use this hook for behaviors that affect the displayed region. Slides and sequences that do not display themselves or only affect display in another buffer will not trigger this hook." - :group 'dslide :type 'hook) =20 (defcustom dslide-contents-hook nil "Runs last after switching to contents." - :group 'dslide :type 'hook) =20 (defcustom dslide-after-last-slide-hook '() @@ -288,7 +270,6 @@ Consider using `dslide-push-step' and writing a callbac= k that only reacts to the `forward' state. This callback will then only run if the user immediately calls `dslide-deck-forward' again. `dslide-deck-stop' is another good choice." - :group 'dslide :type 'hook) =20 (defcustom dslide-default-slide-action #'dslide-slide-action-child @@ -301,8 +282,7 @@ You can configure this per-heading by setting the SLIDE_ACTION keyword. You can configure it for the document default by adding an SLIDE_ACTION keyword." - :type 'function - :group 'dslide) + :type 'function) =20 ;; TODO test the use of plist args (defcustom dslide-default-actions '(dslide-action-hide-markup) @@ -319,8 +299,7 @@ list in order to have default behaviors for some org el= ements. You can configure this per-heading by setting the DSLIDE_ACTIONS keyword. You can configure it for the document default by adding an DSLIDE_ACTIONS keyword." - :type '(list function) - :group 'dslide) + :type '(repeat function)) =20 (defcustom dslide-default-class 'dslide-slide "A class to more deeply modify slide behavior. @@ -331,8 +310,7 @@ Consider upstreaming changes. You can configure this per heading by setting the DSLIDE_CLASS property. You can configure it for the document default by adding an DSLIDE_CLASS keyword." - :type 'symbol - :group 'dslide) + :type 'symbol) =20 (defcustom dslide-default-deck-class 'dslide-deck "A class to more deeply modify overall deck behavior. @@ -340,8 +318,7 @@ Value should be a custom class extending symbol `dslide= -deck'. Use this to modify the root-level behaviors, including switching to children and finding siblings. You can configure this for the document by adding the DSLIDE_ROOT_CLASS keyword." - :type 'symbol - :group 'dslide) + :type 'symbol) =20 (defcustom dslide-default-filter #'dslide-built-in-filter "A function used to call next on children. @@ -352,8 +329,7 @@ return nil if it should be skipped. You can configure this per heading by setting the DSLIDE_FILTER keyword. You can configure it for the document default by adding an DSLIDE_FILTER keyword." - :type 'function - :group 'dslide) + :type 'function) =20 ;; TODO can also probably be objects. Use case? (defcustom dslide-hide-markup-types '(comment @@ -363,8 +339,7 @@ an DSLIDE_FILTER keyword." keyword) "Default types to be hidden by `dslide-action-hide-markup'. Can be any element in `org-element-all-elements'." - :type '(list symbol) - :group 'dslide) + :type '(repeat symbol)) =20 (defcustom dslide-contents-selection-highlight t "Show a highlight on the selected headline. @@ -372,29 +347,24 @@ This is useful if you have some subtle cursor feature= enabled for your presentation and wouldn't otherwise know what line you are on in the contents view. The default is also just a way more obvious display style." - :type 'boolean - :group 'dslide) + :type 'boolean) =20 (defface dslide-contents-selection-face '((t :inherit org-level-1 :inverse-video t :extend t)) - "Face for highlighting the current slide root." - :group 'dslide) + "Face for highlighting the current slide root.") =20 (defface dslide-highlight '((t :inherit hl-line)) "Face used in base buffer to highlight progress. -See `dslide-base-follows-slide'." - :group 'dslide) +See `dslide-base-follows-slide'.") =20 (defface dslide-babel-success-highlight '((t :inherit hl-line)) - "Temporarily highlight babel blocks that succeeded." - :group 'dslide) + "Temporarily highlight babel blocks that succeeded.") =20 (defface dslide-babel-error-highlight '((t :inherit error)) - "Temporarily highlight babel blocks that failed." - :group 'dslide) + "Temporarily highlight babel blocks that failed.") =20 (defvar dslide--debug nil "Set to t for logging slides and actions.") @@ -834,7 +804,7 @@ Class can be overridden to affect root behaviors. See (cl-defmethod dslide--choose-slide ((obj dslide-deck) how) "Set the current slide of OBJ, according to HOW." ;; TODO apply filter when choosing starting slide - (cond ((eq how 'first) + (cond ((eq how 'first) ;looks like something you could `pcase' as well.= do you know that how has to be one of these cases? (oset obj slide (dslide--make-slide (dslide--document-first-heading)))) ((eq how 'contents) @@ -866,7 +836,7 @@ return nil so that it is only run for effects." (let ((window-config (current-window-configuration))) (dslide-push-step (lambda (_) (prog1 step - (set-window-configuration window-config)))))) + (set-window-configuration window-config)))))) =20 (defun dslide-push-step (fun) "Run FUN as next step. @@ -909,6 +879,9 @@ the slide object coordinates this overlap. It delegate= s the order.") =20 (cl-defmethod dslide-begin ((obj dslide-slide)) + ;; documentation would be nice in methods like these, because I + ;; don't know if it makes sense to evaluate the rest of the prog1 if + ;; slides-action is bound to nil... (prog1 (when-let ((slide-action (oref obj slide-action))) (dslide-begin slide-action)) (mapc #'dslide-begin (oref obj section-actions)))) @@ -1032,16 +1005,10 @@ Many optional ARGS. See code." dslide-default-actions)) (section-actions (mapcar - (lambda (c) (when c - (if (consp c) - (apply (car c) - :begin begin - :marker (copy-marker begin) - (append args (cdr c))) - (apply c - :begin begin - :marker (copy-marker begin) - args)))) + (lambda (c) (and c (apply (if (consp c) (car c) c) + :begin begin + :marker (copy-marker begin) + (append args (cdr-safe c))))) section-action-classes)) =20 (filter @@ -2122,11 +2089,7 @@ PREDICATE should accept an ELEMENT argument and retu= rn non-nil." found)))) =20 (defun dslide--list-item-contains (item loc) - (when item - (let ((beg (car item)) - (end (car (last item)))) - (and (>=3D loc beg) - (< loc end))))) + (and item (<=3D (car item) loc (+ (car (last item)))))) =20 (defun dslide-type-p (element-or-type type) "Check element TYPE. @@ -2206,9 +2169,9 @@ Each predicate should take one argument, an org eleme= nt." (lambda (element) (seq-reduce (lambda (begin pred) - (when (or (not pred) - (and begin (funcall pred begin))) - begin)) + (and (or (not pred) + (and begin (funcall pred begin))) + begin)) predicates element))) =20 ;; * Slide Header @@ -2275,17 +2238,17 @@ assumes the buffer is restricted and that there is = a first tree." (concat (dslide--margin-lines dslide-margin-title-above) (propertize title 'face 'org-document-title) (dslide--margin-lines dslide-margin-title-below) - (when (and dslide-header-date date) - (dslide--info-face (concat date " "))) - (when (and dslide-header-author author) - (dslide--info-face (concat author " "))) - (when (and dslide-header-email email) - (dslide--info-face (concat email " "))) - (when (and (not no-breadcrumbs) - dslide-breadcrumb-separator) - (concat (dslide--info-face "\n") - (dslide--get-parents - dslide-breadcrumb-separator))) + (and dslide-header-date date + (dslide--info-face (concat date " "))) + (and dslide-header-author author + (dslide--info-face (concat author " "))) + (and dslide-header-email email + (dslide--info-face (concat email " "))) + (and (not no-breadcrumbs) + dslide-breadcrumb-separator + (concat (dslide--info-face "\n") + (dslide--get-parents + dslide-breadcrumb-separator))) (dslide--margin-lines dslide-margin-content))) =20 (overlay-put dslide--header-overlay 'before-string @@ -2545,7 +2508,7 @@ ensure that the slide buffer is visible." =20 (defun dslide--keyword-value (key) "Get values like #+KEY from document keywords." - (cadr (assoc-string key (org-collect-keywords `(,key))))) + (cadr (assoc-string key (org-collect-keywords (list key))))) =20 (defun dslide--feedback (key) "Show feedback message for KEY. @@ -2553,7 +2516,7 @@ See `dslide-feedback-messages'. This provides Explic= it feedback for commands without visible side effects." (when-let ((feedback (plist-get dslide-feedback-messages key))) - (let ((message-log-max nil)) + (let ((message--max nil)) (message "%s" feedback)))) =20 ;; TODO these could check for inheritance from some base class, which woul= d save @@ -2578,8 +2541,8 @@ for commands without visible side effects." =20 (defun dslide--filter (filter-name) "FILTER-NAME is a string that might contain a filter name." - (when-let ((symbol (or (when (symbolp filter-name) - filter-name) + (when-let ((symbol (or (and (symbolp filter-name) + filter-name) (intern-soft filter-name)))) (if (functionp symbol) symbol @@ -2685,10 +2648,7 @@ the caller." ;;;###autoload (define-minor-mode dslide-mode "A presentation tool for Org Mode." - :init-value nil :interactive nil - :keymap dslide-mode-map - :group 'dslide :global t (unless (eq 'org-mode (buffer-local-value 'major-mode (current-buffer))) @@ -2889,8 +2849,7 @@ video or custom actions." (dslide--choose-slide dslide--deck 'contents) (dslide-display-slides))) (dslide--ensure-slide-buffer t)) - (let ((dslide-start-function - #'dslide-display-slides)) + (let ((dslide-start-function #'dslide-display-slides)) (dslide-mode 1)))) =20 ;; TODO @@ -2899,8 +2858,7 @@ video or custom actions." "Show both the base and slide buffer." (interactive) (let ((major-mode (buffer-local-value 'major-mode (current-buffer)))) - (unless (or (dslide-live-p) - (eq 'org-mode major-mode)) + (unless (or (dslide-live-p) (derived-mode-p '(org-mode))) (user-error "Not an org buffer and no other live presentation")) (if (dslide-live-p) ;; show the correct buffers @@ -2943,3 +2901,7 @@ video or custom actions." (provide 'dslide) =20 ;;; dslide.el ends here + +;; Local Variables: +;; outline-regexp: ";; \\(*+\\)" +;; End: --=-=-= Content-Type: text/plain > 4m video demo for 0.5.1 https://youtu.be/8vkymxjSrK0 It would be a nice if you could host this video somewhere without non-free JS (and without having to use something like youtube-dl). > I was going to just add some features to org-tree-slide but realized > it could do so much more with Elisp integration in order to program > actions into the presentations. So it's a nearly full re-write, at > least 90%. License is GPL3. Source history descends from > org-tree-slide. Has development stopped on org-tree-slide? Or is this a proper fork? > For an overview of markup and capabilities, the org document which is > used both for testing and demonstration, can be viewed here: > https://raw.githubusercontent.com/positron-solutions/dslide/master/test/demo.org -- Philip Kaludercic on peregrine --=-=-=--