emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [DEV] Text quoting backports
@ 2015-09-06  6:12 Kyle Meyer
  2015-09-06 13:24 ` Rasmus
  2015-09-07 19:18 ` Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Kyle Meyer @ 2015-09-06  6:12 UTC (permalink / raw)
  To: Org-mode

Hello,

There have been several commits made recently in the Emacs repo related
to quoting style in docstrings and messages.  I've backported the
changes touching Org files and pushed to the branch maint-quotes.  I put
them there instead of installing them directly on maint to allow time
for things in the Emacs repo to settle and to get feedback about how I
plan to incorporate these changes.  (Judging from the discussion on
emacs.devel [1-5], there may be various opinions on this.)

Regardless of how we decide to use these changes, I'd prefer to include
all the commits and then follow up with additional commits necessary to
get to the desired state.  This way there is a clear record of each
commit being considered.

Below is my plan at the moment, organized by different types of changes.
Thoughts?

------------------------------------------------------------------------

* s/'symbol/`symbol'/

  Keep changes.

* s/'.*'/‘.*’/ and s/`.*'/‘.*’/

  Revert changes. Regardless of whether these substitutions are made,
  these will be handled by message and friends to display according to
  text-quoting-style, so the displayed result in the help buffer will be
  the same.

* s/\".*\" /“.*”/

  Revert changes.

* s/'/\\='/

  Keep changes.

* s/'(.*)/(.*)/

  Some of the changes removed single quotes.  For example,

  -    '((\"c\" \"d\" ((in-mode . \"message-mode\"))))
  +   ((\"c\" \"d\" ((in-mode . \"message-mode\"))))

  Others protected the single quote. For example,

  -    '((\"p\" \"q\" ((in-file . \"\\\\.txt\\\\'\"))))
  +    \\='((\"p\" \"q\" ((in-file . \"\\\\.txt\\\\'\"))))

  I've been unable to figure out the logic here as to when a quote form
  like this was removed versus protected.  I plan to convert all cases
  that were removed to \\=' instead.

* s/format/format-message/ calls

  Keep changes.

* Added substitute-command-keys calls

  Keep changes, but extend to use command names instead of hard coding
  keys.

------------------------------------------------------------------------

[1] http://thread.gmane.org/gmane.emacs.devel/189240
[2] http://thread.gmane.org/gmane.emacs.devel/188822
[3] http://thread.gmane.org/gmane.emacs.devel/189331
[4] http://thread.gmane.org/gmane.emacs.devel/189621
[5] And maybe other threads I'm missing

--
Kyle

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

* Re: [DEV] Text quoting backports
  2015-09-06  6:12 [DEV] Text quoting backports Kyle Meyer
@ 2015-09-06 13:24 ` Rasmus
  2015-09-06 14:43   ` Kyle Meyer
  2015-09-07 19:18 ` Nicolas Goaziou
  1 sibling, 1 reply; 4+ messages in thread
From: Rasmus @ 2015-09-06 13:24 UTC (permalink / raw)
  To: emacs-orgmode

Kyle Meyer <kyle <at> kyleam.com> writes:

> 
 
> There have been several commits made recently in the Emacs repo related
> to quoting style in docstrings and messages.  I've backported the
> changes touching Org files and pushed to the branch maint-quotes.  I put
> them there instead of installing them directly on maint to allow time
> for things in the Emacs repo to settle and to get feedback about how I
> plan to incorporate these changes.  (Judging from the discussion on
> emacs.devel [1-5], there may be various opinions on this.)

Isn't this dependent on Emacs 25? Currently maint target emacs 23 and master
targets 24.3. On the specific proposals I have no opinions.

Unless the changes will work with Emacs 23 or 24, I guess we will have to
wait to orgmode 10, or what? Or bump the requirement for master.

Rasmus

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

* Re: [DEV] Text quoting backports
  2015-09-06 13:24 ` Rasmus
@ 2015-09-06 14:43   ` Kyle Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2015-09-06 14:43 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Isn't this dependent on Emacs 25? Currently maint target emacs 23 and master
> targets 24.3.

They will only affect Emacs 25 users, but IIUC none of these would break
the any supported Emacs versions.

If the Emacs version doesn't have functions that look at
text-quoting-style and change the output, quotes should appear how they
do in the source.  This is part of my motivation for wanting to revert
the s/'.*'/‘.*’/ and s/`.*'/‘.*’/ changes.  That way, if the installed
Emacs has a function that substitutes based on text-quoting-style, fine.
Otherwise, things look how they did.

The one new function is format-message, which is given a defalias to
format if it's not defined.  So again, things should continue as usual
when not running Emacs 25.

The changes that protect single quotes in docstrings will work in
earlier versions, but they are needed in Emacs 25 to avoid

 (setq org-agenda-custom-commands
   '((\"h\" . \"HOME + Name tag searches\") ; describe prefix \"h\"
 ...

being displayed in the help buffer as

   (setq org-agenda-custom-commands
   ’(("h" . "HOME + Name tag searches") ; describe prefix "h"
   ...

--
Kyle

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

* Re: [DEV] Text quoting backports
  2015-09-06  6:12 [DEV] Text quoting backports Kyle Meyer
  2015-09-06 13:24 ` Rasmus
@ 2015-09-07 19:18 ` Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2015-09-07 19:18 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: Org-mode

Hello,

Kyle Meyer <kyle@kyleam.com> writes:

> There have been several commits made recently in the Emacs repo related
> to quoting style in docstrings and messages.  I've backported the
> changes touching Org files and pushed to the branch maint-quotes.  I put
> them there instead of installing them directly on maint to allow time
> for things in the Emacs repo to settle and to get feedback about how I
> plan to incorporate these changes.  (Judging from the discussion on
> emacs.devel [1-5], there may be various opinions on this.)

There is no hurry indeed. Most changes can wait, IMO, however

> * Added substitute-command-keys calls
>
>   Keep changes, but extend to use command names instead of hard coding
>   keys.

is something we should already be doing in maint. I think they can be
applied there right away.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2015-09-07 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-06  6:12 [DEV] Text quoting backports Kyle Meyer
2015-09-06 13:24 ` Rasmus
2015-09-06 14:43   ` Kyle Meyer
2015-09-07 19:18 ` Nicolas Goaziou

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).