From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qG+uL1wGTV+YVgAA0tVLHw (envelope-from ) for ; Mon, 31 Aug 2020 14:17:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GFqPK1wGTV9ZWwAAB5/wlQ (envelope-from ) for ; Mon, 31 Aug 2020 14:17:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 47E3D940942 for ; Mon, 31 Aug 2020 14:17:00 +0000 (UTC) Received: from localhost ([::1]:58784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCkcF-0007gF-5C for larch@yhetil.org; Mon, 31 Aug 2020 10:16:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCkbd-0007fm-TL for emacs-orgmode@gnu.org; Mon, 31 Aug 2020 10:16:21 -0400 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:36863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCkbb-0007AC-OY for emacs-orgmode@gnu.org; Mon, 31 Aug 2020 10:16:21 -0400 Received: by mail-qv1-xf2a.google.com with SMTP id e5so2734498qvr.3 for ; Mon, 31 Aug 2020 07:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version; bh=fNGOI5iNILtMcwY0KBfU+RW+DOe60itGRazqEiHKEHY=; b=Tbn2Fl1F/81DCPp9cO1aPTzrtIef7pHKmKlIVBDgiljFJ6bdTESSJe3u/V93EX9J4/ rPVfgYxv/hBlGYDj04XKV/b9uoDj50NQPcRhd6d5c4qW/7I+m+LtNeD5WZOYaJBH4Vve 89b/8Yvhg6ZMLrcGqFwNwqhnUVUHTbXG1GSclNXp7eUKwvRaMmYy1+uZVtXmNiSSgvce qlBaL1F/hzR41JA2Y4Swrf4+AfNYX/J2YLqcQ5S6dT5soIPidomwc+TRUidFkCIgZkZu BqNIr0AMUXuuHUcK/bW4ALI36+nHYobLqmtLpCaGn+hruWMcoYgZ02yL+G3ELt8FoWVZ yiuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:message-id:in-reply-to :references:subject:mime-version; bh=fNGOI5iNILtMcwY0KBfU+RW+DOe60itGRazqEiHKEHY=; b=KsTVireym8QsjAIwizyEJNmUHEv/tp8ndB4bq1GzanIkphLtgZjRETkLap/CXIiNcj Ki0yUCLE607VrbqlxXp/Ed4eFcjzXnfzO9anH86cUvulZhukUkOC4Bi0LJ0PSR5CjF1w I93jFTB1r1Xj6eAi+NeD3pBeXdY1loKN53mRsIKAMe3TVjStxOH6j+T9ZJtj657RqMLd XcOGOK/2jvfjIStOF3xs5fhnoukGorgYdQonxnOpvrqUq7EogEuLuy+Hd4Dd+nYuf84k AL/Qk5pLKkWfPpfNRNy1rmQ/P/MblDnov0mcUtvN00wojugxA3DWX8/BhrLi0A5TcJLP XBAw== X-Gm-Message-State: AOAM531vpxXBUYbaOAvihregufPGJAuYlvtiM+rSv7CsLlLWxOHaJm06 EW2IvxoC4wITxt8n0TzPY1X+na2RGg== X-Google-Smtp-Source: ABdhPJzA42vxm3RTEdLapfovvjE/iQ+XMoAYMrcm8LXE92S0zbVYBSc+GK2IaVmO378wfTchX5ifPw== X-Received: by 2002:a05:6214:305:: with SMTP id i5mr1236836qvu.129.1598883376542; Mon, 31 Aug 2020 07:16:16 -0700 (PDT) Received: from [192.168.1.118] (128.67-212-35-net.sccoast.net. [67.212.35.128]) by smtp.gmail.com with ESMTPSA id c185sm9683169qkb.135.2020.08.31.07.16.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2020 07:16:15 -0700 (PDT) Date: Mon, 31 Aug 2020 10:16:08 -0400 From: CRSHCMDR To: emacs-orgmode@gnu.org Message-ID: <21ef0e94-e766-455c-a45c-fe30e316c121@Spark> In-Reply-To: <1f08be2e-0299-462b-9cfd-fcc0a447d7d8@Spark> References: <1f08be2e-0299-462b-9cfd-fcc0a447d7d8@Spark> Subject: org-format-outline-path fonts sizes in the minibuffer X-Readdle-Message-ID: 21ef0e94-e766-455c-a45c-fe30e316c121@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="5f4d062e_41b71efb_164" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=typkrft@gmail.com; helo=mail-qv1-xf2a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HK_RANDOM_ENVFROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=Tbn2Fl1F; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: aHolqTnM0JwX --5f4d062e_41b71efb_164 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline *I=E2=80=99m not sure If this is actually a bug so I haven=E2=80=99t incl= uded any backtrace/debug information.* =46orgive me I am not sure the exact terminology. I have, within the last= two weeks, began to transition to emacs from vim, specifically for org m= ode. In addition I am not a developer by trade and my knowledge of elisp = is limited. What exactly did you do=3F Move cursor to any header in a .org file. What did you expect to happen=3F An outline to appear within the =E2=80=9Cecho area,=E2=80=9D which does n= ot resize the minibuffer. What happened instead=3F I have set various headers to various faces and sizes, when I move my cur= sor over a header the outline appears to use all of the fonts information= when displaying it in the minibuffer/echo area. What should happen=3F Of course this is subjective, but I believe that only the color should be= passed on in the outline if anything. Or some variables exposed that can= be set to change this behavior. (setq org-outline-echo OPTION) t - Defualt Behavior color-only - Passes the color of the headers to the outline in the echo a= rea plain-text - just passes the text letting the fonts already set elsewhere= display Or some kind of hook that lets us choose what fonts to use for which head= ing in the echo. You can see a picture of what is occurring here.=C2=A0https://preview.red= d.it/2cgllvc9aak51.png=3Fwidth=3D1638&format=3Dpng&auto=3Dwebp&s=3Df7636f= 477b08aba5c0b34b3e49611de3fba82188 A fellow Redditor u/BulkyLoad87 proposed this solution, which appears to = work, but I=E2=80=99m not sure what else this might effect. (defun org-format-outline-path (path &optional width prefix separator) =22=46ormat the outline path PATH for display. WIDTH is the maximum number of characters that is available. PRE=46IX is a prefix to be included in the returned string, such as the file name. SEPARATOR is inserted between the different parts of the path, the default is =5C=22/=5C=22.=22 (setq width (or width 79)) (setq path (delq nil path)) (unless (> width 0) (user-error =22Argument =60width' must be positive=22)) (setq separator (or separator =22/=22)) (let* ((org-odd-levels-only nil) (fpath (concat prefix (and prefix path separator) (mapconcat (lambda (s) (replace-regexp-in-string =22=5B =5Ct=5D+=5C= =5C'=22 =22=22 s)) (cl-loop for head in path for n from 0 for face =3D (nth (% n org-n-level-faces) org-l= evel-faces) collect (org-add-props head nil 'face =60(:foreground ,(face-foreground f= ace nil t) :weight bold))) separator)))) (when (> (length fpath) width) (if (< width 7) ;; It's unlikely that =60width' will be this small, but don't ;; waste characters by adding =22..=22 if it is. (setq fpath (substring fpath 0 width)) (setf (substring fpath (- width 2)) =22..=22))) fpath)) Very Respectfully, Brandon --5f4d062e_41b71efb_164 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
*I=E2=80=99m not sure If this is actually a bug so = I haven=E2=80=99t included any backtrace/debug information.*

=46orgive me I am not sure the exact terminology. I have, within the last= two weeks, began to transition to emacs from vim, specifically for org m= ode. In addition I am not a developer by trade and my knowledge of elisp = is limited.&=23160;

What exactly did you do=3F
Move cursor to any header in a .org file.

What did you expect to happen=3F
An outline to appear within the =E2=80=9Cecho area,=E2=80=9D which does n= ot resize the minibuffer.&=23160;&=23160;

What happened instead=3F
I have set various headers to various faces and sizes, when I move my cur= sor over a header the outline appears to use all of the fonts information= when displaying it in the minibuffer/echo area.&=23160;

What should happen=3F
Of course this is subjective, but I believe that only the color should be= passed on in the outline if anything. Or some variables exposed that can= be set to change this behavior.&=23160;

(setq org-outline-echo OPTION)

t - Defualt Behavior&=23160;
color-only - Passes the color of the headers to the outline in the echo a= rea
plain-text - just passes the text letting the fonts already set elsewhere= display

Or some kind of hook that lets us choose what fonts to use for which head= ing in the echo.&=23160;

You can see a picture of what is occurring here.&=23160;https://preview.redd.it/2cgllvc9aak51.png=3Fwidth=3D1638&a= mp;format=3Dpng&auto=3Dwebp&s=3Df7636f477b08aba5c0b34b3e49611de3f= ba82188

A fellow Redditor u/BulkyLoad87 proposed this solution, which appears to = work, but I=E2=80=99m not sure what else this might effect.&=23160;
=
(defun org-format-outline-path (path &optional width prefix sepa=
rator)
  =22=46ormat the outline path PATH for display.
WIDTH is the maximum number of characters that is available.
PRE=46IX is a prefix to be included in the returned string,
such as the file name.
SEPARATOR is inserted between the different parts of the path,
the default is =5C=22/=5C=22.=22
  (setq width (or width 79))
  (setq path (delq nil path))
  (unless (> width 0)
    (user-error =22Argument =60width' must be positive=22))
  (setq separator (or separator =22/=22))
  (let* ((org-odd-levels-only nil)
         (fpath (concat
                 prefix (and prefix path separator)
                 (mapconcat
                  (lambda (s) (replace-regexp-in-string =22=5B =5Ct=5D+=5C=
=5C'=22 =22=22 s))
                  (cl-loop for head in path
                           for n from 0
                           for face =3D (nth (% n org-n-level-faces) org-=
level-faces)
                           collect (org-add-props
                                       head nil 'face
                                       =60(:foreground ,(face-foreground =
face nil t) :weight bold)))
                  separator))))
    (when (> (length fpath) width)
      (if (< width 7)
          ;; It's unlikely that =60width' will be this small, but don't
          ;; waste characters by adding =22..=22 if it is.
          (setq fpath (substring fpath 0 width))
        (setf (substring fpath (- width 2)) =22..=22)))
    fpath))

Very Respectfully,
Brandon&=23160;
--5f4d062e_41b71efb_164--