all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra
@ 2022-04-17 14:43 Samuel Banya
  2022-04-17 15:32 ` Samuel Banya
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Samuel Banya @ 2022-04-17 14:43 UTC (permalink / raw)
  To: Emanuel Berg

Hey there,

So I have several Hydras and other very config centric keybindings throughout my Emacs config, to the point where I often forget about these until I view them in my Org Mode based config.

I tried to create a related Hydra as more of a 'reminder', but its now complaining since the actual keybindings aren't valid.

Is there a better method of displaying a reminder for custom keybindings so that I can personally choose how I want to present the entire buffer with reminders?

Here's what I have so far, but I've since commented it out because all I receive are warnings that the keybindings present aren't valid, which is understandable since the Hydra itself is looking for the user to actually hit the keybindings themselves, even though I'm only showing them to the user for reminder purposes:

FROM CONFIG:
#+begin_src emacs-lisp
  (defhydra hydra-remindkeys (:color pink
:hint nil)
    "
  ^Keybindings^
  ^^^^^^^^^^-----------------------------
  _C-M-z_: Enable 'evil' and 'evil-collection' for Vim keybindings
  _S-Return_: launch 'vterm'
  _C-x w_: launch 'ranger.el'
  _f12_: toggle full screen for Macbook workaround
  _C-=_: rotate buffers
  _f7 and S-f7_: start 'org-tree-slide-mode' for Org Mode based presentations, and stop them
  _f6_: insert YouTube video link, and return the YouTube video name into pasted buffer
  _C-x b_: enable iBuffer to check available buffers
  _C-x C-b_: enable 'helm-buffers-list' to check list of available buffers to switch to via a Helm Mode prompt
  _f2_: enable zoom-based Hydra to zoom in and out of available Emacs buffer
  _C-c a_: enable 'Org-Agenda' to view agenda of tasks
  _C-!_: enable color-theme based Hydra to change color themes on the fly
  _M-s_: jump to a specific word in a buffer with the 'avy-goto-word-0' function
  _M-l_: jump to a specific line in a buffer with the 'avy-goto-line' function
  _M-y_: view the copy and paste clipboard via 'popup-kill-ring' package
  _C-s_: search in a buffer with Counsel or Swiper via the 'counsel-grep-or-swiper' function
  _C-c q_: first mark a section of a buffer, and then enable this to see where the highlighted section appears next to edit all instances simultaneously
  _C-q_: enables 'expand-region' to expand a given region of text
  _C-c C-0_: enables multiple cursors with 'mc/edit-lines' function
  _C->_: while 'mc/edit-lines' is enabled, go to the next line
  _C-<_: while 'mc/edit-lines' is enabled, go to the previousline
  _C-c C-<_: while 'mc/edit-lines' is enabled, mark all of the lines that are like this
  _C-M-s-k_: kill all buffers with 'kill-all-buffers' function, useful for end-of-day buffer cleanup
  _C-c w l_: copy the entire line of text with 'copy-whole-line' function
  _C-x k_: kill the current buffer with the 'kill-current-buffer' function
  _s-e_: edit the buffer as the 'sudo' user with the 'sudo-edit' function
  _C-c w w_: kill an entire word with the 'kill-whole-word' function
  _C-$_: enable desktop based hydra to save, clear, or revert the current desktop of Emacs buffers via the 'hydra-desktop' hydra
  _C-c l_: enable lsp-mode for programming based auto-completion
  _<s tab_: enable source code based yasnippet template for Org Mode
  _<b tab_: enable bash code based yasnippet template for Org Mode
  _C-h M-a_: show the major mode keybindings with the 'discover-my-major' function
  _C-h M-o_: show the minor mode keybindings with the 'discover-my-mode' function
  _M-x free-keys_: show the available keybindings to use for later use in my Emacs config
  _M-i_: hover over a word, and find that word in any open buffer on screen via the 'helm-swoop' function
  _M-I_: hover over a word, and jump to the next instance of the word in the buffer via the 'helm-swoop-back-to-last-point' function
  _C-c M-i_: hover over a word, and find the next file that contains that specific word via the 'helm-multi-swoop' function
  _C-x M-i_: hover over a word, and find the next file that contains that specific word via the 'helm-multi-swoop-all' function
  _C-c e_: edit Emacs config at any time
  _C-c r_: reload Emacs config at any time
  _C-c C-p C-b_: add the entire current buffer to an online webpaste, specifically at dpaste.org
  _C-c C-p C-r_: add the selected region to an online webpaste, specifically at dpaste.org
  _C-c C-p C-p_: add the selected region or buffer to an online webpaste, specifically at dpaste.org
  _C-c s_: search for a specific issue on Stack Exchange aka StackOverflow
  _M-x ytdl_: download YouTube videos directly from Emacs
  "
    ("q" nil))

  ;; (global-set-key (kbd "C-=") 'hydra-rotate/body)
#+end_src


Thanks,

Sam


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra
  2022-04-17 14:43 Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra Samuel Banya
@ 2022-04-17 15:32 ` Samuel Banya
  2022-04-17 16:36 ` [External] : " Drew Adams
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Samuel Banya @ 2022-04-17 15:32 UTC (permalink / raw)
  To: Emanuel Berg

Should I use (display-buffer) with some sort of hook function to convert that buffer into an Org Mode doc buffer accordingly?

https://www.gnu.org/software/emacs/manual/html_node/emacs/Displaying-Buffers.html

On Sun, Apr 17, 2022, at 10:43 AM, Samuel Banya wrote:
> Hey there,
> 
> So I have several Hydras and other very config centric keybindings throughout my Emacs config, to the point where I often forget about these until I view them in my Org Mode based config.
> 
> I tried to create a related Hydra as more of a 'reminder', but its now complaining since the actual keybindings aren't valid.
> 
> Is there a better method of displaying a reminder for custom keybindings so that I can personally choose how I want to present the entire buffer with reminders?
> 
> Here's what I have so far, but I've since commented it out because all I receive are warnings that the keybindings present aren't valid, which is understandable since the Hydra itself is looking for the user to actually hit the keybindings themselves, even though I'm only showing them to the user for reminder purposes:
> 
> FROM CONFIG:
> #+begin_src emacs-lisp
>   (defhydra hydra-remindkeys (:color pink
> :hint nil)
>     "
>   ^Keybindings^
>   ^^^^^^^^^^-----------------------------
>   _C-M-z_: Enable 'evil' and 'evil-collection' for Vim keybindings
>   _S-Return_: launch 'vterm'
>   _C-x w_: launch 'ranger.el'
>   _f12_: toggle full screen for Macbook workaround
>   _C-=_: rotate buffers
>   _f7 and S-f7_: start 'org-tree-slide-mode' for Org Mode based presentations, and stop them
>   _f6_: insert YouTube video link, and return the YouTube video name into pasted buffer
>   _C-x b_: enable iBuffer to check available buffers
>   _C-x C-b_: enable 'helm-buffers-list' to check list of available buffers to switch to via a Helm Mode prompt
>   _f2_: enable zoom-based Hydra to zoom in and out of available Emacs buffer
>   _C-c a_: enable 'Org-Agenda' to view agenda of tasks
>   _C-!_: enable color-theme based Hydra to change color themes on the fly
>   _M-s_: jump to a specific word in a buffer with the 'avy-goto-word-0' function
>   _M-l_: jump to a specific line in a buffer with the 'avy-goto-line' function
>   _M-y_: view the copy and paste clipboard via 'popup-kill-ring' package
>   _C-s_: search in a buffer with Counsel or Swiper via the 'counsel-grep-or-swiper' function
>   _C-c q_: first mark a section of a buffer, and then enable this to see where the highlighted section appears next to edit all instances simultaneously
>   _C-q_: enables 'expand-region' to expand a given region of text
>   _C-c C-0_: enables multiple cursors with 'mc/edit-lines' function
>   _C->_: while 'mc/edit-lines' is enabled, go to the next line
>   _C-<_: while 'mc/edit-lines' is enabled, go to the previousline
>   _C-c C-<_: while 'mc/edit-lines' is enabled, mark all of the lines that are like this
>   _C-M-s-k_: kill all buffers with 'kill-all-buffers' function, useful for end-of-day buffer cleanup
>   _C-c w l_: copy the entire line of text with 'copy-whole-line' function
>   _C-x k_: kill the current buffer with the 'kill-current-buffer' function
>   _s-e_: edit the buffer as the 'sudo' user with the 'sudo-edit' function
>   _C-c w w_: kill an entire word with the 'kill-whole-word' function
>   _C-$_: enable desktop based hydra to save, clear, or revert the current desktop of Emacs buffers via the 'hydra-desktop' hydra
>   _C-c l_: enable lsp-mode for programming based auto-completion
>   _<s tab_: enable source code based yasnippet template for Org Mode
>   _<b tab_: enable bash code based yasnippet template for Org Mode
>   _C-h M-a_: show the major mode keybindings with the 'discover-my-major' function
>   _C-h M-o_: show the minor mode keybindings with the 'discover-my-mode' function
>   _M-x free-keys_: show the available keybindings to use for later use in my Emacs config
>   _M-i_: hover over a word, and find that word in any open buffer on screen via the 'helm-swoop' function
>   _M-I_: hover over a word, and jump to the next instance of the word in the buffer via the 'helm-swoop-back-to-last-point' function
>   _C-c M-i_: hover over a word, and find the next file that contains that specific word via the 'helm-multi-swoop' function
>   _C-x M-i_: hover over a word, and find the next file that contains that specific word via the 'helm-multi-swoop-all' function
>   _C-c e_: edit Emacs config at any time
>   _C-c r_: reload Emacs config at any time
>   _C-c C-p C-b_: add the entire current buffer to an online webpaste, specifically at dpaste.org
>   _C-c C-p C-r_: add the selected region to an online webpaste, specifically at dpaste.org
>   _C-c C-p C-p_: add the selected region or buffer to an online webpaste, specifically at dpaste.org
>   _C-c s_: search for a specific issue on Stack Exchange aka StackOverflow
>   _M-x ytdl_: download YouTube videos directly from Emacs
>   "
>     ("q" nil))
> 
>   ;; (global-set-key (kbd "C-=") 'hydra-rotate/body)
> #+end_src
> 
> 
> Thanks,
> 
> Sam
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra
  2022-04-17 14:43 Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra Samuel Banya
  2022-04-17 15:32 ` Samuel Banya
@ 2022-04-17 16:36 ` Drew Adams
  2022-04-17 18:55 ` Eduardo Ochs
  2022-04-28 16:42 ` Samuel Banya
  3 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2022-04-17 16:36 UTC (permalink / raw)
  To: Samuel Banya, Emanuel Berg
  Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

No doubt someone will point you to `which-key'...
___

As an alternative, I'll point you to key
completion with `keysee.el'.

(Better yet is key completion with Icicles;
Key See is a reduced version, without any
particular completion support/features.)

Key See shows you, at any time, in any
context - including at the top level (i.e.,
not just after a prefix key), the keys that
are currently available, and the commands
they're bound to.  All available keys, any
time.

These are shown in buffer *Completions* as
completion candidates: `KEY  =  COMMAND'.
You can match KEY, or COMMAND, or both,
against minibuffer input to filter the
candidates, and then choose one to invoke.

A prefix-key candidate has `...' as its
COMMAND portion: `PREFIX-KEY  =  ...'.

If you invoke a candidate that's a prefix
key, you're shown all the keys/commands
you can continue with, etc.  Choose a final
candidate to invoke it, or use `C-g' to end
without invoking any command.

Except at the top level, you also have the
candidate `..' (no `KEY  =  COMAND'), which
takes you up a level.

E.g., if you're showing the keys on prefix
key `C-x 4' then `..' takes you up a level
to show you the keys on `C-x'.  Choosing
`..' again then takes you to the top level.

This gives you a dynamic, on-the-fly way
to see _any_ part of the entire forest of
key bindings (including menu-bar menus!).
Explore it up, down, and around - not just
down, down... into a given prefix key.

(`menu-bar' is the name of a prefix key.
Exploring the entire menu-bar hierarchy is
no different from exploring `C-x'.  Just
choose `menu-bar  =  ...' and dig in...)

You can change the candidate sort order on
the fly, using `C-,'.  Sort by key name -
either prefix keys first or local (i.e.,
major-mode) keys first.  Or sort by command
name.

You can configure which keymaps to recognize
for top-level key completion.

You can have key completion kick in only on
demand (by hitting, e.g., `S-TAB) or also
automatically, after a given delay.

Being able to complete also against command
names is an advantage.  Among other things,
it means you can filter (and sort) by
matching parts of command names.  You can
often remember or guess part of a command
name, even if you don't have a clue which
keys might be involved.

Key completion is a good way to learn keys -
it's at your fingertips, either on demand
or automatically.

Being able to match parts of key names and
command names is helpful, but sometimes
you might want to just hit a candidate key
to match it (`which-key' behavior), rather
than type text to match its name (e.g.
"C-x").  You can do that by prefixing the
key with `M-q': `C-q C-x' inserts "C-x".
___

(If you use Icicles then the key completion
you get is more feature-full.  You can
progressively narrow a set of candidates by
matching multiple patterns, show the doc
for candidate keys/commands, etc.

You can perhaps get some such benefit if
you combine `keysee.el' with another
completion "framework" besides Icicles -
dunno.  `keysee.el' is itself independent
of Icicles.)
___

https://www.emacswiki.org/emacs/KeySee

https://www.emacswiki.org/emacs/download/keysee.el



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra
  2022-04-17 14:43 Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra Samuel Banya
  2022-04-17 15:32 ` Samuel Banya
  2022-04-17 16:36 ` [External] : " Drew Adams
@ 2022-04-17 18:55 ` Eduardo Ochs
  2022-04-28 16:42 ` Samuel Banya
  3 siblings, 0 replies; 5+ messages in thread
From: Eduardo Ochs @ 2022-04-17 18:55 UTC (permalink / raw)
  To: Samuel Banya; +Cc: Emanuel Berg

On Sun, 17 Apr 2022 at 11:44, Samuel Banya <sbanya@fastmail.com> wrote:
> Hey there,
>
> So I have several Hydras and other very config centric keybindings throughout my Emacs config, to the point where I often forget about these until I view them in my Org Mode based config.
>
> I tried to create a related Hydra as more of a 'reminder', but its now complaining since the actual keybindings aren't valid.
>
> Is there a better method of displaying a reminder for custom keybindings so that I can personally choose how I want to present the entire buffer with reminders?


Hi Samuel,

if you were asking how people would display reminders using their
favorite tools, then here is my way. It needs eev but it doesn't need
eev-mode being turned on. See:

  http://angg.twu.net/eev-intros/find-eev-quick-intro.html#1
  (find-eev-quick-intro "1. Installing eev")
  http://angg.twu.net/eev-current/eev-load.el.html#autoloads

The preparation is:

  mkdir ~/HELP/
  cd    ~/HELP/
  wget http://angg.twu.net/HELP/sb-reminders

and the lisp code is:

  ;; See: (find-eev "eev-load.el" "autoloads")
  ;;      (find-eev-quick-intro)
  ;;      (find-multiwindow-intro)
  ;;      (find-multiwindow-intro "3. High-level words")
  ;;      (find-multiwindow-intro "3. High-level words" "find-2a")
  (require 'eev-load)

  (defun rems ()
    "Display Samuel Banya's reminders at the window at the right.
  See: https://lists.gnu.org/archive/html/help-gnu-emacs/2022-04/msg00119.html"
    (interactive)
    (find-2a nil '(find-fline "~/HELP/sb-reminders")))

Cheers,
  Eduardo Ochs
  http://angg.twu.net/#eev



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra
  2022-04-17 14:43 Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra Samuel Banya
                   ` (2 preceding siblings ...)
  2022-04-17 18:55 ` Eduardo Ochs
@ 2022-04-28 16:42 ` Samuel Banya
  3 siblings, 0 replies; 5+ messages in thread
From: Samuel Banya @ 2022-04-28 16:42 UTC (permalink / raw)
  To: Emanuel Berg

Hey there,

Although 'Org-Menu' is really cool, I actually am looking to still make a Hydra that is a non functional hydra.

Meaning, that it would be able to just popup a context menu to remind me of my own personal keybindings in a transient menu like that, but not actually RUN any of the functions either.

Hoping someone else might have another idea for this :)

Thanks,

Sam

On Sun, Apr 17, 2022, at 10:43 AM, Samuel Banya wrote:
> Hey there,
> 
> So I have several Hydras and other very config centric keybindings throughout my Emacs config, to the point where I often forget about these until I view them in my Org Mode based config.
> 
> I tried to create a related Hydra as more of a 'reminder', but its now complaining since the actual keybindings aren't valid.
> 
> Is there a better method of displaying a reminder for custom keybindings so that I can personally choose how I want to present the entire buffer with reminders?
> 
> Here's what I have so far, but I've since commented it out because all I receive are warnings that the keybindings present aren't valid, which is understandable since the Hydra itself is looking for the user to actually hit the keybindings themselves, even though I'm only showing them to the user for reminder purposes:
> 
> FROM CONFIG:
> #+begin_src emacs-lisp
>   (defhydra hydra-remindkeys (:color pink
> :hint nil)
>     "
>   ^Keybindings^
>   ^^^^^^^^^^-----------------------------
>   _C-M-z_: Enable 'evil' and 'evil-collection' for Vim keybindings
>   _S-Return_: launch 'vterm'
>   _C-x w_: launch 'ranger.el'
>   _f12_: toggle full screen for Macbook workaround
>   _C-=_: rotate buffers
>   _f7 and S-f7_: start 'org-tree-slide-mode' for Org Mode based presentations, and stop them
>   _f6_: insert YouTube video link, and return the YouTube video name into pasted buffer
>   _C-x b_: enable iBuffer to check available buffers
>   _C-x C-b_: enable 'helm-buffers-list' to check list of available buffers to switch to via a Helm Mode prompt
>   _f2_: enable zoom-based Hydra to zoom in and out of available Emacs buffer
>   _C-c a_: enable 'Org-Agenda' to view agenda of tasks
>   _C-!_: enable color-theme based Hydra to change color themes on the fly
>   _M-s_: jump to a specific word in a buffer with the 'avy-goto-word-0' function
>   _M-l_: jump to a specific line in a buffer with the 'avy-goto-line' function
>   _M-y_: view the copy and paste clipboard via 'popup-kill-ring' package
>   _C-s_: search in a buffer with Counsel or Swiper via the 'counsel-grep-or-swiper' function
>   _C-c q_: first mark a section of a buffer, and then enable this to see where the highlighted section appears next to edit all instances simultaneously
>   _C-q_: enables 'expand-region' to expand a given region of text
>   _C-c C-0_: enables multiple cursors with 'mc/edit-lines' function
>   _C->_: while 'mc/edit-lines' is enabled, go to the next line
>   _C-<_: while 'mc/edit-lines' is enabled, go to the previousline
>   _C-c C-<_: while 'mc/edit-lines' is enabled, mark all of the lines that are like this
>   _C-M-s-k_: kill all buffers with 'kill-all-buffers' function, useful for end-of-day buffer cleanup
>   _C-c w l_: copy the entire line of text with 'copy-whole-line' function
>   _C-x k_: kill the current buffer with the 'kill-current-buffer' function
>   _s-e_: edit the buffer as the 'sudo' user with the 'sudo-edit' function
>   _C-c w w_: kill an entire word with the 'kill-whole-word' function
>   _C-$_: enable desktop based hydra to save, clear, or revert the current desktop of Emacs buffers via the 'hydra-desktop' hydra
>   _C-c l_: enable lsp-mode for programming based auto-completion
>   _<s tab_: enable source code based yasnippet template for Org Mode
>   _<b tab_: enable bash code based yasnippet template for Org Mode
>   _C-h M-a_: show the major mode keybindings with the 'discover-my-major' function
>   _C-h M-o_: show the minor mode keybindings with the 'discover-my-mode' function
>   _M-x free-keys_: show the available keybindings to use for later use in my Emacs config
>   _M-i_: hover over a word, and find that word in any open buffer on screen via the 'helm-swoop' function
>   _M-I_: hover over a word, and jump to the next instance of the word in the buffer via the 'helm-swoop-back-to-last-point' function
>   _C-c M-i_: hover over a word, and find the next file that contains that specific word via the 'helm-multi-swoop' function
>   _C-x M-i_: hover over a word, and find the next file that contains that specific word via the 'helm-multi-swoop-all' function
>   _C-c e_: edit Emacs config at any time
>   _C-c r_: reload Emacs config at any time
>   _C-c C-p C-b_: add the entire current buffer to an online webpaste, specifically at dpaste.org
>   _C-c C-p C-r_: add the selected region to an online webpaste, specifically at dpaste.org
>   _C-c C-p C-p_: add the selected region or buffer to an online webpaste, specifically at dpaste.org
>   _C-c s_: search for a specific issue on Stack Exchange aka StackOverflow
>   _M-x ytdl_: download YouTube videos directly from Emacs
>   "
>     ("q" nil))
> 
>   ;; (global-set-key (kbd "C-=") 'hydra-rotate/body)
> #+end_src
> 
> 
> Thanks,
> 
> Sam


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-28 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-17 14:43 Question Regarding Creating A Random Buffer For Keybinding Reminders / Attempt To Do Via A Reminder Hydra Samuel Banya
2022-04-17 15:32 ` Samuel Banya
2022-04-17 16:36 ` [External] : " Drew Adams
2022-04-17 18:55 ` Eduardo Ochs
2022-04-28 16:42 ` Samuel Banya

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.