unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges
@ 2023-07-31 12:53 Gustavo Barros
  2023-08-05  9:27 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Barros @ 2023-07-31 12:53 UTC (permalink / raw)
  To: 64972

Hi All,

I think this counts more as a feature request than a bug report.  But,
currently, `bibtex.el's `bibtex-autokey-get-year' cannot handle
`biblatex' date ranges, and it would be nice if it did.

For example, calling `M-: (bibtex-autokey-get-year)' with point inside
the entry:

    @Article{,
      author       = {Author, J.},
      title        = {Title},
      journaltitle = {Journal},
      date         = {2020-10/2020-12},
    }

Results in user-error "Year or date field ‘2020-10/2020-12’ invalid".

The "date" field, however, is valid `biblatex' syntax for a date
range, according to the section "2.3.8 Date and Time Specifications"
of `biblatex's manual.

Best regards,
Gustavo.





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

* bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges
  2023-07-31 12:53 bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges Gustavo Barros
@ 2023-08-05  9:27 ` Eli Zaretskii
  2023-08-06 16:09   ` Roland Winkler
  2023-08-23  0:09   ` Roland Winkler
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-05  9:27 UTC (permalink / raw)
  To: Gustavo Barros, Roland Winkler; +Cc: 64972

> From: Gustavo Barros <gusbrs.2016@gmail.com>
> Date: Mon, 31 Jul 2023 09:53:41 -0300
> 
> Hi All,
> 
> I think this counts more as a feature request than a bug report.  But,
> currently, `bibtex.el's `bibtex-autokey-get-year' cannot handle
> `biblatex' date ranges, and it would be nice if it did.
> 
> For example, calling `M-: (bibtex-autokey-get-year)' with point inside
> the entry:
> 
>     @Article{,
>       author       = {Author, J.},
>       title        = {Title},
>       journaltitle = {Journal},
>       date         = {2020-10/2020-12},
>     }
> 
> Results in user-error "Year or date field ‘2020-10/2020-12’ invalid".
> 
> The "date" field, however, is valid `biblatex' syntax for a date
> range, according to the section "2.3.8 Date and Time Specifications"
> of `biblatex's manual.

Roland, any comments?

Thanks.





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

* bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges
  2023-08-05  9:27 ` Eli Zaretskii
@ 2023-08-06 16:09   ` Roland Winkler
  2023-08-23  0:09   ` Roland Winkler
  1 sibling, 0 replies; 5+ messages in thread
From: Roland Winkler @ 2023-08-06 16:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Gustavo Barros, 64972

On Sat, Aug 05 2023, Eli Zaretskii wrote:
>>     @Article{,
>>       author       = {Author, J.},
>>       title        = {Title},
>>       journaltitle = {Journal},
>>       date         = {2020-10/2020-12},
>>     }
>> 
>> Results in user-error "Year or date field ‘2020-10/2020-12’ invalid".
>> 
>> The "date" field, however, is valid `biblatex' syntax for a date
>> range, according to the section "2.3.8 Date and Time Specifications"
>> of `biblatex's manual.
>
> Roland, any comments?

Thanks, I'll look into this!





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

* bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges
  2023-08-05  9:27 ` Eli Zaretskii
  2023-08-06 16:09   ` Roland Winkler
@ 2023-08-23  0:09   ` Roland Winkler
  2023-08-23 11:30     ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Roland Winkler @ 2023-08-23  0:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Gustavo Barros, 64972

On Sat, Aug 05 2023, Eli Zaretskii wrote:
>>       date         = {2020-10/2020-12},
>> 
>> Results in user-error "Year or date field ‘2020-10/2020-12’ invalid".
>> 
>> The "date" field, however, is valid `biblatex' syntax for a date
>> range, according to the section "2.3.8 Date and Time Specifications"
>> of `biblatex's manual.
>
> Roland, any comments?

biblatex permits dates and date ranges according to ISO 8601.

The problem in bibtex-autokey-get-year arises because iso8601-valid-p
believes that the string "2020-10/2020-12" is not valid according to
ISO 8601, though iso8601-parse-interval parses that string correctly.

So it seems to me that this problem requires, first of all, some changes
in iso8601.el.  Who is familiar with this code and can possibly make
suggestions?

Roland





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

* bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges
  2023-08-23  0:09   ` Roland Winkler
@ 2023-08-23 11:30     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-23 11:30 UTC (permalink / raw)
  To: Roland Winkler, Paul Eggert; +Cc: gusbrs.2016, 64972

> From: Roland Winkler <winkler@gnu.org>
> Cc: Gustavo Barros <gusbrs.2016@gmail.com>,  64972@debbugs.gnu.org
> Date: Tue, 22 Aug 2023 19:09:31 -0500
> 
> On Sat, Aug 05 2023, Eli Zaretskii wrote:
> >>       date         = {2020-10/2020-12},
> >> 
> >> Results in user-error "Year or date field ‘2020-10/2020-12’ invalid".
> >> 
> >> The "date" field, however, is valid `biblatex' syntax for a date
> >> range, according to the section "2.3.8 Date and Time Specifications"
> >> of `biblatex's manual.
> >
> > Roland, any comments?
> 
> biblatex permits dates and date ranges according to ISO 8601.
> 
> The problem in bibtex-autokey-get-year arises because iso8601-valid-p
> believes that the string "2020-10/2020-12" is not valid according to
> ISO 8601, though iso8601-parse-interval parses that string correctly.
> 
> So it seems to me that this problem requires, first of all, some changes
> in iso8601.el.  Who is familiar with this code and can possibly make
> suggestions?

I hope Paul (CC'ed) will.





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

end of thread, other threads:[~2023-08-23 11:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-31 12:53 bug#64972: bibtex-autokey-get-year does not recognize biblatex date ranges Gustavo Barros
2023-08-05  9:27 ` Eli Zaretskii
2023-08-06 16:09   ` Roland Winkler
2023-08-23  0:09   ` Roland Winkler
2023-08-23 11:30     ` Eli Zaretskii

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

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