emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Bruce D'Arcus" <bdarcus@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>,
	John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: A minor suggestion about formatting citations
Date: Mon, 11 Oct 2021 12:55:44 -0400	[thread overview]
Message-ID: <CAF-FPGMZbjeNkLBKjg28h1qjuFxCbjtVyxZVQiM5n-r6EcSJtA@mail.gmail.com> (raw)
In-Reply-To: <87pmsbftg5.fsf@nicolasgoaziou.fr>

On Mon, Oct 11, 2021 at 11:54 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > On Mon, Oct 11, 2021 at 10:28 AM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> >>
> >> you should probably trim each key, and re-add spaces where you want them in the function that does these kinds of things.
> >
> > I realize that's an option, but something about that feels wrong to me.
> >
> > We're adding a single space as prefix, not because it's meaningful for
> > citation purposes (there actually is no prefix, though org-cite
> > interprets it as " "), but only so buffer formatting works correctly.
>
> I don't think that's totally true. The additional space makes sense
> typographically, in particular when some suffix is associated to the
> key.

Can you give an example of what you mean here? I can't think of one
off the top-of-my-head.

> > And then presumably code needs to be added to the export machinery to
> > strip those empty affixes?
>
> I think they are ignored already. I didn't check though.

I just checked, and believe you are correct.

> > Am not saying the latter goal isn't important; just seems like the
> > side effect isn't ideal.
> >
> >> Maybe that should even be controlled by a defcustom that allows 0-1 spaces.
> >
> > You mean in org-cite? I think that'd be my preference, unless there's
> > a better solution to this issue.
>
> Org Cite is unrelated to this. One could as well have inserted spaces
> manually, i.e., without calling `org-cite-insert' at all.

I know; but you changed the default behavior of org-cite-make-insert-processor.

The OP asked if there were any implications for this generally, and
I'm just saying "yes, there is."

You do have to trim the whitespace on either side of the key, since
the space is the delimiter. I guess it's not possible for the citation
parser to ignore the other whitespace?

> The functions responsible for swapping citations ought to cope with this situation
> too.

So check if the content of an affix, for example, is " " (rather than
whether there's an affix), and adjust accordingly?

Bruce


  reply	other threads:[~2021-10-11 16:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10 23:09 A minor suggestion about formatting citations Vikas Rawal
2021-10-11  7:38 ` Eric S Fraga
2021-10-11  9:40 ` Nicolas Goaziou
2021-10-11 13:38   ` Bruce D'Arcus
2021-10-11 14:28     ` John Kitchin
2021-10-11 14:54       ` Bruce D'Arcus
2021-10-11 15:54         ` Nicolas Goaziou
2021-10-11 16:55           ` Bruce D'Arcus [this message]
2021-10-13 12:51             ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF-FPGMZbjeNkLBKjg28h1qjuFxCbjtVyxZVQiM5n-r6EcSJtA@mail.gmail.com \
    --to=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).