emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Shower thought: submit an IETF RFC to register Org as a MIME type
@ 2021-10-22  1:21 Carlos Pita
  2021-10-23  6:45 ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Carlos Pita @ 2021-10-22  1:21 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

in https://list.orgmode.org/87tuuw3n15.fsf@nicolasgoaziou.fr/#t it's stated:

> Org is standardized on lower case. Uppercase is used in the manual as
> a poor man's bold, and supported for historical reasons.

But C-c C-x p still inserts stuff like:

   :PROPERTIES:
   :ARCHIVE:  ...
   :END:

Maybe it should be updated or maybe I don't fully understand the
convention, perhaps it's just for blocks?

But then c-a-p is very lenient since it lists lower and upper case block
variants even when I typed a lower case prefix, and upper case usually
will go first in the list, hence promoting a seemingly bad practice.

Can you clarify?

Thank you in advance,
Carlos




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

* Re: Shower thought: submit an IETF RFC to register Org as a MIME type
  2021-10-22  1:21 Shower thought: submit an IETF RFC to register Org as a MIME type Carlos Pita
@ 2021-10-23  6:45 ` Ihor Radchenko
  2021-10-23  8:34   ` Carlos Pita
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2021-10-23  6:45 UTC (permalink / raw)
  To: Carlos Pita; +Cc: emacs-orgmode

Carlos Pita <carlosjosepita2@gmail.com> writes:

>> Org is standardized on lower case. Uppercase is used in the manual as
>> a poor man's bold, and supported for historical reasons.
>
> But C-c C-x p still inserts stuff like:
>
>    :PROPERTIES:
>    :ARCHIVE:  ...
>    :END:
>
> Maybe it should be updated or maybe I don't fully understand the
> convention, perhaps it's just for blocks?

The conversation was about keywords and similar constructs (i.e.
^#+keyword). You are looking at property drawer and properties inside.
There is no preference here, though internally properties in property
drawer are all converted to upper case.

> But then c-a-p is very lenient since it lists lower and upper case block
> variants even when I typed a lower case prefix, and upper case usually
> will go first in the list, hence promoting a seemingly bad practice.

Could you clarify what is "c-a-p"?

Best,
Ihor


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

* Re: Shower thought: submit an IETF RFC to register Org as a MIME type
  2021-10-23  6:45 ` Ihor Radchenko
@ 2021-10-23  8:34   ` Carlos Pita
  2021-10-23  8:36     ` Timothy
  2021-10-23 13:41     ` Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type) Ihor Radchenko
  0 siblings, 2 replies; 8+ messages in thread
From: Carlos Pita @ 2021-10-23  8:34 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Hi Igor,

> The conversation was about keywords and similar constructs (i.e.
> ^#+keyword). You are looking at property drawer and properties inside.
> There is no preference here, though internally properties in property
> drawer are all converted to upper case.

Ok, thank you very much for the clarification.

>> But then c-a-p is very lenient since it lists lower and upper case block
>> variants even when I typed a lower case prefix, and upper case usually
>> will go first in the list, hence promoting a seemingly bad practice.
>
> Could you clarify what is "c-a-p"?

Yes, I just meant completion-at-point. At least some org functions,
which I believe are implemented using pcomplete and then exposed through
the completion-at-point interface, provide completions in both lower and
uppercase variants and except when completion-ignore-case is nil (not
the default) uppercase candidates will be sorted first in the list.
It's often quite inconvenient to scroll down a completion menu to pick
the lowercase completion for a short prefix, which either promotes using
the uppercase variant at hand or offsets the benefits of
autocompletion. Moreover, popular external collections of snippets have
already adopted the lowercase convention of org-mode, hence introducing
inconsistency in the document when one mixes both sources of completion
(lowercase snippets and org-mode uppercase completions). So perhaps
uppercase completions should be provided only when the user explicitly
typed an uppercase prefix. What do you think?

Best regards,
Carlos


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

* Re: Shower thought: submit an IETF RFC to register Org as a MIME type
  2021-10-23  8:34   ` Carlos Pita
@ 2021-10-23  8:36     ` Timothy
  2021-10-23 13:41     ` Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type) Ihor Radchenko
  1 sibling, 0 replies; 8+ messages in thread
From: Timothy @ 2021-10-23  8:36 UTC (permalink / raw)
  To: Carlos Pita; +Cc: emacs-orgmode, Ihor Radchenko

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

Hi  Carlos,

Just a minor point from me, this really should be a new thread IMO. While not
much may have happened with the IETF RFC, it’s still something on my mind that I
hope to get back to eventually.

All the best,
Timothy

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

* Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type)
  2021-10-23  8:34   ` Carlos Pita
  2021-10-23  8:36     ` Timothy
@ 2021-10-23 13:41     ` Ihor Radchenko
  2021-10-23 13:51       ` Bruce D'Arcus
  2021-10-23 18:55       ` Keyword completion list: uppercase or lowercase? Carlos Pita
  1 sibling, 2 replies; 8+ messages in thread
From: Ihor Radchenko @ 2021-10-23 13:41 UTC (permalink / raw)
  To: Carlos Pita; +Cc: emacs-orgmode

Carlos Pita <carlosjosepita2@gmail.com> writes:

>>> But then c-a-p is very lenient since it lists lower and upper case block
>>> variants even when I typed a lower case prefix, and upper case usually
>>> will go first in the list, hence promoting a seemingly bad practice.
>>
>> Could you clarify what is "c-a-p"?
>
> Yes, I just meant completion-at-point. At least some org functions,
> which I believe are implemented using pcomplete and then exposed through
> the completion-at-point interface, provide completions in both lower and
> uppercase variants and except when completion-ignore-case is nil (not
> the default) uppercase candidates will be sorted first in the list.
> It's often quite inconvenient to scroll down a completion menu to pick
> the lowercase completion for a short prefix, which either promotes using
> the uppercase variant at hand or offsets the benefits of
> autocompletion. Moreover, popular external collections of snippets have
> already adopted the lowercase convention of org-mode, hence introducing
> inconsistency in the document when one mixes both sources of completion
> (lowercase snippets and org-mode uppercase completions). So perhaps
> uppercase completions should be provided only when the user explicitly
> typed an uppercase prefix. What do you think?

I just tried with clean Emacs:

#+beg<complete -> #+begin_<complete> -> list of completions, all in lower case
#+BEG<complete -> #+BEGIN_<complete> -> list of completions, all in upper case

Seems to be all right.

Can you provide a more concrete example when you are given both
uppercase and lowercase completions?

Best,
Ihor


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

* Re: Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type)
  2021-10-23 13:41     ` Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type) Ihor Radchenko
@ 2021-10-23 13:51       ` Bruce D'Arcus
  2021-10-23 14:21         ` Ihor Radchenko
  2021-10-23 18:55       ` Keyword completion list: uppercase or lowercase? Carlos Pita
  1 sibling, 1 reply; 8+ messages in thread
From: Bruce D'Arcus @ 2021-10-23 13:51 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Carlos Pita, org-mode-email

On Sat, Oct 23, 2021 at 9:41 AM Ihor Radchenko <yantar92@gmail.com> wrote:
>
> Carlos Pita <carlosjosepita2@gmail.com> writes:
>
> >>> But then c-a-p is very lenient since it lists lower and upper case block
> >>> variants even when I typed a lower case prefix, and upper case usually
> >>> will go first in the list, hence promoting a seemingly bad practice.
> >>
> >> Could you clarify what is "c-a-p"?
> >
> > Yes, I just meant completion-at-point. At least some org functions,
> > which I believe are implemented using pcomplete and then exposed through
> > the completion-at-point interface, provide completions in both lower and
> > uppercase variants and except when completion-ignore-case is nil (not
> > the default) uppercase candidates will be sorted first in the list.
> > It's often quite inconvenient to scroll down a completion menu to pick
> > the lowercase completion for a short prefix, which either promotes using
> > the uppercase variant at hand or offsets the benefits of
> > autocompletion. Moreover, popular external collections of snippets have
> > already adopted the lowercase convention of org-mode, hence introducing
> > inconsistency in the document when one mixes both sources of completion
> > (lowercase snippets and org-mode uppercase completions). So perhaps
> > uppercase completions should be provided only when the user explicitly
> > typed an uppercase prefix. What do you think?
>
> I just tried with clean Emacs:
>
> #+beg<complete -> #+begin_<complete> -> list of completions, all in lower case
> #+BEG<complete -> #+BEGIN_<complete> -> list of completions, all in upper case

Perhaps at some point the upper case should just be removed?

This raises a related question I've wondered about:

Why doesn't the completion insert the full begin/end, and put point inside?

It's a bit of an awkward UX to add the end line ATM.

Bruce


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

* Re: Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type)
  2021-10-23 13:51       ` Bruce D'Arcus
@ 2021-10-23 14:21         ` Ihor Radchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2021-10-23 14:21 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: Carlos Pita, org-mode-email

"Bruce D'Arcus" <bdarcus@gmail.com> writes:

>> I just tried with clean Emacs:
>>
>> #+beg<complete -> #+begin_<complete> -> list of completions, all in lower case
>> #+BEG<complete -> #+BEGIN_<complete> -> list of completions, all in upper case
>
> Perhaps at some point the upper case should just be removed?

I am not sure if it is a good idea from backward compatibility point of
view. On the other hand, we managed to change the property drawer
default position. So, I do not see why it is impossible if most users
prefer lower case.

> This raises a related question I've wondered about:
>
> Why doesn't the completion insert the full begin/end, and put point inside?
>
> It's a bit of an awkward UX to add the end line ATM.

Adding full begin/end may not be good idea for completion-at-point:
1. It becomes awkward i.e. to insert the source block language and
   arguments (#+begin_src my-super-cool-programming-language :var x=1)
2. completion-at-point usually does not behave in such way.

Note that Org mode provides org-tempo doing exactly what you describe.

Best,
Ihor


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

* Re: Keyword completion list: uppercase or lowercase?
  2021-10-23 13:41     ` Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type) Ihor Radchenko
  2021-10-23 13:51       ` Bruce D'Arcus
@ 2021-10-23 18:55       ` Carlos Pita
  1 sibling, 0 replies; 8+ messages in thread
From: Carlos Pita @ 2021-10-23 18:55 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@gmail.com> writes:

Hi Igor,

> I just tried with clean Emacs:
>
> #+beg<complete -> #+begin_<complete> -> list of completions, all in lower case
> #+BEG<complete -> #+BEGIN_<complete> -> list of completions, all in upper case
>
> Seems to be all right.

You're right, I was under the impression that completion-ignore-case = t
was the default, but it's just an ancient customization of mine that I
got used to and had forgotten about. My apologies for the noise.

Best regards,
Carlos


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

end of thread, other threads:[~2021-10-23 18:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22  1:21 Shower thought: submit an IETF RFC to register Org as a MIME type Carlos Pita
2021-10-23  6:45 ` Ihor Radchenko
2021-10-23  8:34   ` Carlos Pita
2021-10-23  8:36     ` Timothy
2021-10-23 13:41     ` Keyword completion list: uppercase or lowercase? (was: Shower thought: submit an IETF RFC to register Org as a MIME type) Ihor Radchenko
2021-10-23 13:51       ` Bruce D'Arcus
2021-10-23 14:21         ` Ihor Radchenko
2021-10-23 18:55       ` Keyword completion list: uppercase or lowercase? Carlos Pita

Code repositories for project(s) associated with this 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).