* Is this possible/how do I?
@ 2020-12-01 15:47 Arthur Miller
2020-12-01 16:02 ` Stefan Monnier
2020-12-01 16:07 ` Andreas Schwab
0 siblings, 2 replies; 5+ messages in thread
From: Arthur Miller @ 2020-12-01 15:47 UTC (permalink / raw)
To: emacs-devel
I am trying to font-lock a buffer and append the buffer content to
another buffer in different major mode (an org-buffer -> dired buffer).
My strategy was to open buffer in temp-buffer; insert content, activate
major mode, make it do it's own magic and then just copy text with
properties. Yeah, right; no free-lunch seems lilke.
The buffer does not seem to be font-locked despite major mode (org-mode)
enabled in that buffer. Is font-lock run only when text is displayed
i.e. when I switch-to-buffer?
1. Is there any way to get it to font-lock when not displayed?
Once both buffered are font-locked; if I turn off font-locking than
those text properties are not shown; seems like font-lock has it's own
set of text properties?
2. Do I have to copy those, or is there any other way to get those two
buffers to be displayed as font-lock, without a particual major mode
font-locking active?
I am sorry if this is too noob question, it is just lots to read; I have
been experimenting, but I am not really into the details of font locking
and text properties yet.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is this possible/how do I?
2020-12-01 15:47 Is this possible/how do I? Arthur Miller
@ 2020-12-01 16:02 ` Stefan Monnier
2020-12-01 19:12 ` arthur miller
2020-12-01 16:07 ` Andreas Schwab
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2020-12-01 16:02 UTC (permalink / raw)
To: Arthur Miller; +Cc: emacs-devel
> The buffer does not seem to be font-locked despite major mode (org-mode)
> enabled in that buffer. Is font-lock run only when text is displayed
> i.e. when I switch-to-buffer?
>
> 1. Is there any way to get it to font-lock when not displayed?
`font-lock-ensure`.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Is this possible/how do I?
2020-12-01 16:02 ` Stefan Monnier
@ 2020-12-01 19:12 ` arthur miller
0 siblings, 0 replies; 5+ messages in thread
From: arthur miller @ 2020-12-01 19:12 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
That was the very first thing I tried, there is a small program I posted where it didn't worked, few days ago. I get though some colors, but very little. Since then I have tried to activate org mode in that buffer but still with same result.
I probably misunderstand how it works. Do I need to activate theme engine too for that buffer or is it done automatically?
-------- Originalmeddelande --------
Från: Stefan Monnier <monnier@iro.umontreal.ca>
Datum: 2020-12-01 17:02 (GMT+01:00)
Till: Arthur Miller <arthur.miller@live.com>
Kopia: emacs-devel@gnu.org
Ämne: Re: Is this possible/how do I?
> The buffer does not seem to be font-locked despite major mode (org-mode)
> enabled in that buffer. Is font-lock run only when text is displayed
> i.e. when I switch-to-buffer?
>
> 1. Is there any way to get it to font-lock when not displayed?
`font-lock-ensure`.
Stefan
[-- Attachment #2: Type: text/html, Size: 1722 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is this possible/how do I?
2020-12-01 15:47 Is this possible/how do I? Arthur Miller
2020-12-01 16:02 ` Stefan Monnier
@ 2020-12-01 16:07 ` Andreas Schwab
2020-12-01 23:11 ` arthur miller
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2020-12-01 16:07 UTC (permalink / raw)
To: Arthur Miller; +Cc: emacs-devel
On Dez 01 2020, Arthur Miller wrote:
> 1. Is there any way to get it to font-lock when not displayed?
Does font-lock-ensure do what you need?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Is this possible/how do I?
2020-12-01 16:07 ` Andreas Schwab
@ 2020-12-01 23:11 ` arthur miller
0 siblings, 0 replies; 5+ messages in thread
From: arthur miller @ 2020-12-01 23:11 UTC (permalink / raw)
To: Andreas Schwab; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]
No, it does not, unfortunately. That was first thing I tried. I was manually switching to created buffer to see what it does.
I was following the find-file function and trying to switch parts of it out, and also to call org mode in the buffer myself, but I don't get nearly as coloured and processed output as if I get when calling org mode when I have buffer displayed or with find-file.
Seems like there are more things in the play, which I am not aware of yet.
-------- Originalmeddelande --------
Från: Andreas Schwab <schwab@linux-m68k.org>
Datum: 2020-12-01 17:07 (GMT+01:00)
Till: Arthur Miller <arthur.miller@live.com>
Kopia: emacs-devel@gnu.org
Ämne: Re: Is this possible/how do I?
On Dez 01 2020, Arthur Miller wrote:
> 1. Is there any way to get it to font-lock when not displayed?
Does font-lock-ensure do what you need?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
[-- Attachment #2: Type: text/html, Size: 1848 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-01 23:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 15:47 Is this possible/how do I? Arthur Miller
2020-12-01 16:02 ` Stefan Monnier
2020-12-01 19:12 ` arthur miller
2020-12-01 16:07 ` Andreas Schwab
2020-12-01 23:11 ` arthur miller
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.