unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: philip-agee@africamel.net
To: moasenwood@zoho.eu, help-gnu-emacs@gnu.org
Subject: Printing as documentation
Date: Mon, 21 Jun 2021 00:11:23 +0200 (CEST)	[thread overview]
Message-ID: <ea-mime-60cfbd0b-1b3c-37f356cd@www-8.mailo.com> (raw)
In-Reply-To: <87k0moiuk9.fsf@zoho.eu>

I would like to display text in the help window without it being selected



The following achieves that.



  (with-help-window (help-buffer)
    (with-current-buffer (help-buffer)
      (print "test"))) )



Would I need   (with-current-buffer (help-buffer) actually?




From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Printing as documentation
Date: 20/06/2021 14:34:14 Europe/Paris

philip-agee wrote:

> I am really wondering about the utility of the two functions
> below, which seem
>
> to be doing the same thing, at least from my perspective.

Examine what the _individual functions_ are doing.

You should be able to answer like this for every line of code
you ever write: "at line n, I use function X with args
Y because I want to accomplish Z".

This is how you know what your code does - knowing the
individual building blocks - not bunching together functions
like you do, from other planets, almost, then comparing the
"result" to another piece of code, written in the same style!

That method doesn't work and it will never work.

-- 
underground experts united
https://dataswamp.org/~incal





      reply	other threads:[~2021-06-20 22:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20  4:41 Printing as documentation philip-agee
2021-06-20  5:54 ` philip-agee
2021-06-20  6:19   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-20  7:33   ` Christopher Dimech
2021-06-20  7:43     ` philip-agee
2021-06-20  7:52       ` philip-agee
2021-06-20 11:53         ` philip-agee
2021-06-20 12:34           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-20 22:11             ` philip-agee [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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=ea-mime-60cfbd0b-1b3c-37f356cd@www-8.mailo.com \
    --to=philip-agee@africamel.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.
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).