emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Regarding arbitrary Org blocks
@ 2022-05-11 16:14 Russell Adams
  2022-05-11 18:23 ` Daniel Fleischer
  2022-05-12 10:19 ` Ihor Radchenko
  0 siblings, 2 replies; 8+ messages in thread
From: Russell Adams @ 2022-05-11 16:14 UTC (permalink / raw)
  To: emacs-orgmode

I used to insert arbitrary blocks like:

#+BEGIN_IMPORTANT
yadda yadda
#+END_IMPORTANT

in my documents, and when I hit C-c ' to edit them it would give me a
basic buffer and I could edit the plain text within.

Some recent change instead now says "No special environment to edit
here". How can I get back that behavior?

I'm really just editing text blocks for Latex export, and the source
block type triggers some latex formatting. It's not source code
language, just plain text.

Could I add some minor mode to say text-mode with auto-fill-mode and
aspell somewhere when opening those blocks?

Thanks.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com
                                    https://www.adamsinfoserv.com/


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

* Re: Regarding arbitrary Org blocks
  2022-05-11 16:14 Regarding arbitrary Org blocks Russell Adams
@ 2022-05-11 18:23 ` Daniel Fleischer
  2022-05-11 18:39   ` Russell Adams
  2022-05-12 10:19 ` Ihor Radchenko
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Fleischer @ 2022-05-11 18:23 UTC (permalink / raw)
  To: emacs-orgmode

Russell Adams [2022-05-11 Wed 18:14] wrote:

> Could I add some minor mode to say text-mode with auto-fill-mode and
> aspell somewhere when opening those blocks?

Hi! If you're editing text why do you need a special buffer? You can
edit them in the orgmode buffer and enjoy all its textual features. The
special buffer is for major modes which are not orgmode such as
programming languages or latex which use different
completions/highlighting/minor-modes and editing them in orgmode is a
hassle. 

-- 

Daniel Fleischer


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

* Re: Regarding arbitrary Org blocks
  2022-05-11 18:23 ` Daniel Fleischer
@ 2022-05-11 18:39   ` Russell Adams
  2022-05-11 19:06     ` Colin Baxter
  2022-05-11 21:39     ` Greg Minshall
  0 siblings, 2 replies; 8+ messages in thread
From: Russell Adams @ 2022-05-11 18:39 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, May 11, 2022 at 09:23:27PM +0300, Daniel Fleischer wrote:
> Russell Adams [2022-05-11 Wed 18:14] wrote:
>
> > Could I add some minor mode to say text-mode with auto-fill-mode and
> > aspell somewhere when opening those blocks?
>
> Hi! If you're editing text why do you need a special buffer? You can
> edit them in the orgmode buffer and enjoy all its textual features.

First up, it's because it used to work and now it doesn't. ;]

Second it can be very useful to work on a sub-buffer, or indirect
buffer for some content. Why shouldn't I be able to edit the contents
of that block inside an indirect buffer where my beginning-of-buffer,
end-of-buffer, word wrap, or global find and replace are constrained
to that block of text?

This works for example blocks, but no longer for verse and quote
blocks. These are native Org block types and not my fanciful made up
ones. Why should the popup work for example blocks, but not the
others? That borders on a bug, where my question was considered as a
configuration question.

Finally when you edit in the popup buffer, the results are indented
which makes the document more legible. Regular text tools do that
inconsistently.

> The special buffer is for major modes which are not orgmode such as
> programming languages or latex which use different
> completions/highlighting/minor-modes and editing them in orgmode is
> a hassle.

I think what I am using were once called "special blocks". You're
referring to source blocks. They have many more features but are
outside the question.

https://orgmode.org/manual/Special-blocks-in-LaTeX-export.html

Thanks.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com
                                    https://www.adamsinfoserv.com/


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

* Re: Regarding arbitrary Org blocks
  2022-05-11 18:39   ` Russell Adams
@ 2022-05-11 19:06     ` Colin Baxter
  2022-05-11 21:39     ` Greg Minshall
  1 sibling, 0 replies; 8+ messages in thread
From: Colin Baxter @ 2022-05-11 19:06 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> Russell Adams <RLAdams@adamsinfoserv.com> writes:

    > On Wed, May 11, 2022 at 09:23:27PM +0300, Daniel Fleischer wrote:
    >> Russell Adams [2022-05-11 Wed 18:14] wrote:
    >> 
    >> > Could I add some minor mode to say text-mode with
    >> auto-fill-mode and > aspell somewhere when opening those blocks?
    >> 
    >> Hi! If you're editing text why do you need a special buffer? You
    >> can edit them in the orgmode buffer and enjoy all its textual
    >> features.

    > First up, it's because it used to work and now it doesn't. ;]

    > Second it can be very useful to work on a sub-buffer, or indirect
    > buffer for some content. Why shouldn't I be able to edit the
    > contents of that block inside an indirect buffer where my
    > beginning-of-buffer, end-of-buffer, word wrap, or global find and
    > replace are constrained to that block of text?

    > This works for example blocks, but no longer for verse and quote
    > blocks. These are native Org block types and not my fanciful made
    > up ones. Why should the popup work for example blocks, but not the
    > others? That borders on a bug, where my question was considered as
    > a configuration question.

I very much support the idea that special and source blocks should be
treatable in the same way. I'd like to be able to edit example and quote
using C-c '.

Best wishes,

Colin Baxter.


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

* Re: Regarding arbitrary Org blocks
  2022-05-11 18:39   ` Russell Adams
  2022-05-11 19:06     ` Colin Baxter
@ 2022-05-11 21:39     ` Greg Minshall
  2022-05-11 23:06       ` Russell Adams
  1 sibling, 1 reply; 8+ messages in thread
From: Greg Minshall @ 2022-05-11 21:39 UTC (permalink / raw)
  To: emacs-orgmode

Russell, the behavior you describe, that used to work, sounds reasonable
to me.  otoh, in case you haven't discovered =narrow-to-region= and
friends, (which i only recently did), that might also give you some of
what you want.  cheers, Greg


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

* Re: Regarding arbitrary Org blocks
  2022-05-11 21:39     ` Greg Minshall
@ 2022-05-11 23:06       ` Russell Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Russell Adams @ 2022-05-11 23:06 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, May 11, 2022 at 02:39:28PM -0700, Greg Minshall wrote:
> Russell, the behavior you describe, that used to work, sounds reasonable
> to me.  otoh, in case you haven't discovered =narrow-to-region= and
> friends, (which i only recently did), that might also give you some of
> what you want.  cheers, Greg


Check out org-tree-to-indirect-buffer ;]


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com
                                    https://www.adamsinfoserv.com/


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

* Re: Regarding arbitrary Org blocks
  2022-05-11 16:14 Regarding arbitrary Org blocks Russell Adams
  2022-05-11 18:23 ` Daniel Fleischer
@ 2022-05-12 10:19 ` Ihor Radchenko
  2022-05-12 12:44   ` Russell Adams
  1 sibling, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-05-12 10:19 UTC (permalink / raw)
  To: Russell Adams; +Cc: emacs-orgmode

Russell Adams <RLAdams@adamsinfoserv.com> writes:

> I used to insert arbitrary blocks like:
>
> #+BEGIN_IMPORTANT
> yadda yadda
> #+END_IMPORTANT
>
> in my documents, and when I hit C-c ' to edit them it would give me a
> basic buffer and I could edit the plain text within.
>
> Some recent change instead now says "No special environment to edit
> here". How can I get back that behavior?

I am unable to get the described behaviour even using Org 8.2.10. Could
you elaborate what you mean by "used to"? Which Org version?

> I'm really just editing text blocks for Latex export, and the source
> block type triggers some latex formatting. It's not source code
> language, just plain text.
>
> Could I add some minor mode to say text-mode with auto-fill-mode and
> aspell somewhere when opening those blocks?

Not currently, unless you advice org-edit-special. Though we might add
something like org-edit-special-hook (similar to org-ctrl-c-ctrl-c-hook)
if others are also interested in this functionality.

Best,
Ihor



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

* Re: Regarding arbitrary Org blocks
  2022-05-12 10:19 ` Ihor Radchenko
@ 2022-05-12 12:44   ` Russell Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Russell Adams @ 2022-05-12 12:44 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, May 12, 2022 at 06:19:35PM +0800, Ihor Radchenko wrote:
> > Some recent change instead now says "No special environment to edit
> > here". How can I get back that behavior?
>
> I am unable to get the described behaviour even using Org 8.2.10. Could
> you elaborate what you mean by "used to"? Which Org version?

It's been quite some time. I've been using Org for years and I don't
keep it up to date. I can't identify when it changed, only that my
muscle memory started throwing errors. ;]

To be fair, I think I only moved to v9 this year. So I may have
learned this in versions before v8.

> > Could I add some minor mode to say text-mode with auto-fill-mode and
> > aspell somewhere when opening those blocks?
>
> Not currently, unless you advice org-edit-special. Though we might add
> something like org-edit-special-hook (similar to org-ctrl-c-ctrl-c-hook)
> if others are also interested in this functionality.

That's the kind of configuration I was referring to. It'd be fine to
me to add items to match the tags I use.

On the other hand, perhaps it would be useful to have a fallback
behavior to use the current org-mode settings in a popup buffer for a
block that has no mode associated with it?

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com
                                    https://www.adamsinfoserv.com/


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

end of thread, other threads:[~2022-05-12 12:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 16:14 Regarding arbitrary Org blocks Russell Adams
2022-05-11 18:23 ` Daniel Fleischer
2022-05-11 18:39   ` Russell Adams
2022-05-11 19:06     ` Colin Baxter
2022-05-11 21:39     ` Greg Minshall
2022-05-11 23:06       ` Russell Adams
2022-05-12 10:19 ` Ihor Radchenko
2022-05-12 12:44   ` Russell Adams

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

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