emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: pareto optimal <pareto.optimal@mailfence.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: RFC on implementation adding buttons beside headings
Date: Mon, 20 Feb 2023 13:23:25 +0000	[thread overview]
Message-ID: <87edqkeaia.fsf@localhost> (raw)
In-Reply-To: <292424133.47705.1676856972523@fidget.co-bxl>

[ Adding Org ML back to CC ]

pareto optimal <pareto.optimal@mailfence.com> writes:

> Do you mean something like extending https://github.com/alphapapa/org-sidebar to have these instead of directly in the org document?

A bit different.
What I have in mind is something like

(defun yant/insert-interative-button (text window command)
  "Create button named TEXT running COMMAND in WINDOW."
  (insert-button
   text
   'face '(:box t :height 2.0)
   'follow-link t
   'action
   `(lambda (_)
      (select-window ,window)
      (call-interactively #',command))))

(defun yant/demo-buttons ()
  "Demo of a buffer with touch screen-compatible buttons."
  (interactive)
  (unless (derived-mode-p 'org-mode)
    (user-error "Must be in Org mode buffer"))
  (let ((org-window (selected-window)))
    (switch-to-buffer-other-window (get-buffer-create "*Touch buttons*"))
    (with-silent-modifications
      (erase-buffer))
    (yant/insert-interative-button
     "Next heading" org-window 'org-next-visible-heading)
    (insert "\n")
    (yant/insert-interative-button
     "Previous heading" org-window 'org-previous-visible-heading)
    (read-only-mode t)))

> The context menus are great! However it seems some people have a hard time thinking of emacs as a gui applicaiton and right clicking even after I tell them :)

It will be more natural on Android.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


      parent reply	other threads:[~2023-02-20 13:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18 16:00 RFC on implementation adding buttons beside headings pareto optimal
2023-02-18 16:01 ` pareto optimal
2023-02-20 19:17   ` Bruno Barbier
2023-02-19 11:04 ` Ihor Radchenko
2023-02-19 22:57   ` Samuel Wales
     [not found]   ` <292424133.47705.1676856972523@fidget.co-bxl>
2023-02-20 13:23     ` Ihor Radchenko [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=87edqkeaia.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=pareto.optimal@mailfence.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).