unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49166: Writing in help-buffer does not show in history
@ 2021-06-21 21:44 philip-agee
  2021-06-22  9:34 ` Basil L. Contovounesios
  2021-06-22 13:30 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: philip-agee @ 2021-06-21 21:44 UTC (permalink / raw)
  To: 49166

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

Have written the following function that inserts text in the
help-buffer.

Was curious to see whether the inserted text persist if one uses
the buttons or commands in the Help Buffer that take you
back/forth in the history of visited entries (you can invoke
those commands with 'l' for left ('help-go-back') and 'r' for
right ('help-go-forward')).



It does not show in the history when using ('help-go-back').


Does it make sense to include the text in the history?


--------



(defun brief ()
  "todo docstring"
  (interactive)

  (with-help-window (help-buffer)
    (with-current-buffer (help-buffer)

      (insert "Abbreviated Capabilities\n\n")

      (insert "* orderless minibuffer completion\n")
      (princ "   orderless-enable\n")
      (princ "   orderless-disable\n\n")

      (insert "* ivy minibuffer completion\n")
      (princ "   ivy-enable\n")
      (princ "   ivy-disable\n\n")

      (insert "* Minibuffer Completion Style\n")
      (princ "   complt-style\n")  )) )



[-- Attachment #2: Type: text/html, Size: 1323 bytes --]

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

* bug#49166: Writing in help-buffer does not show in history
  2021-06-21 21:44 bug#49166: Writing in help-buffer does not show in history philip-agee
@ 2021-06-22  9:34 ` Basil L. Contovounesios
  2021-06-22 13:30 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Basil L. Contovounesios @ 2021-06-22  9:34 UTC (permalink / raw)
  To: philip-agee; +Cc: 49166

philip-agee@africamel.net writes:

> Have written the following function that inserts text in the
> help-buffer.
>
> Was curious to see whether the inserted text persist if one uses
> the buttons or commands in the Help Buffer that take you
> back/forth in the history of visited entries (you can invoke
> those commands with 'l' for left ('help-go-back') and 'r' for
> right ('help-go-forward')).
>
> It does not show in the history when using ('help-go-back').

These history commands rely on help-xref-stack being set up
appropriately, which is done with the function help-setup-xref.

See (info "(elisp) Help Functions") [0] and the linked
example in (info "(elisp) Accessing Documentation") [1]
(or look at the definitions of describe-function, etc.).

[0]: https://gnu.org/software/emacs/manual/html_node/elisp/Help-Functions.html
[1]: https://gnu.org/software/emacs/manual/html_node/elisp/Accessing-Documentation.html

HTH,

-- 
Basil





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

* bug#49166: Writing in help-buffer does not show in history
  2021-06-21 21:44 bug#49166: Writing in help-buffer does not show in history philip-agee
  2021-06-22  9:34 ` Basil L. Contovounesios
@ 2021-06-22 13:30 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-22 13:30 UTC (permalink / raw)
  To: philip-agee; +Cc: 49166

philip-agee@africamel.net writes:

> Have written the following function that inserts text in the
> help-buffer.
>
> Was curious to see whether the inserted text persist if one uses
> the buttons or commands in the Help Buffer that take you
> back/forth in the history of visited entries (you can invoke
> those commands with 'l' for left ('help-go-back') and 'r' for
> right ('help-go-forward')).
>
> It does not show in the history when using ('help-go-back').
>
> Does it make sense to include the text in the history?

The *Help* history doesn't save the actual text in the buffer, but
regenerates it based on the parameters given -- so if you go back to the
documentation for, say `describe-mode', it'll regenerate the buffer
based on the current documentation for that command.  This also means
that if you change the documentation (loading a new version, for
instance), you'll get the new version of the doc string, and not the old
one.

So this is working as intended, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-06-22 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 21:44 bug#49166: Writing in help-buffer does not show in history philip-agee
2021-06-22  9:34 ` Basil L. Contovounesios
2021-06-22 13:30 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).