emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anders Johansson <mejlaandersj@gmail.com>
To: hugo@heagren.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Suggestion: convert dispatchers to use transient
Date: Mon,  7 Feb 2022 16:37:05 +0100	[thread overview]
Message-ID: <20220207153704.104259-1-mejlaandersj@gmail.com> (raw)
In-Reply-To: <8c364693bf6856e60cdd3e8b63ab0c9284d16733.camel@heagren.com>


I agree that transient dispatchers would be great and consistent. What is not so great with transient currently is it’s lacking support for lisp-variable/option workflows. Transient is good for command-line arguments, but setting options for emacs functions is not as streamlined (this would be relevant for the export dispatcher for example). 

Some new classes for these types of options would probably need to be defined, since the default infix-classes assume all options are strings.

I recently did try to implement a transient dispatcher this for my orgqda package:
https://gitlab.com/andersjohansson/orgqda/-/blob/main/orgqda-transient.el

Partly inspired by org-ql:
https://github.com/alphapapa/org-ql/blob/048de35b07d8d29fc6fa49c34d7ba1fd1c912011/org-ql-view.el#L501

I now store the options as plists in buffer-local-variables, which I am not sure is optimal and perhaps goes against the idea of saving options with transient. So still some work to do there.

By the way. Getting started with transient is way easier with this tutorial than with the rather abstract info pages:
https://github.com/magit/transient/wiki/Developer-Quick-Start-Guide

Best,
Anders Johansson


      parent reply	other threads:[~2022-02-07 16:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 11:59 Suggestion: convert dispatchers to use transient Hugo Heagren
2022-02-03  8:54 ` Tom Gillespie
2022-02-03 10:07 ` Tim Cross
2022-02-03 17:51   ` Jim Porter
2022-02-03 21:30     ` Tim Cross
2022-02-04  1:13       ` Jim Porter
2022-02-04  5:37       ` Christopher M. Miles
2022-02-05 20:18       ` João Pedro de Amorim Paula
2022-02-06  1:49         ` Samuel Wales
2022-02-06  3:28           ` João Pedro de Amorim Paula
2022-02-07 15:37 ` Anders Johansson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207153704.104259-1-mejlaandersj@gmail.com \
    --to=mejlaandersj@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hugo@heagren.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).