Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bibtex parser #2137

Merged
merged 9 commits into from
Jul 11, 2019
Merged

Bibtex parser #2137

merged 9 commits into from
Jul 11, 2019

Conversation

TwlyY29
Copy link
Contributor

@TwlyY29 TwlyY29 commented Jul 10, 2019

Hi,

as a user of geany I was missing an overview of bibliographic entries when opening bibtex files for a long time.
After contacting the maintainers of geany and proposing some code that adds the missing functionality, they recommended me to add such a parser to the ctags project as well (https://www.mail-archive.com/devel@lists.geany.org/msg03221.html).
Well, and here I am, proposing my bibtex-parser to you guys as well. It differs from the geany implementation in that it is now based on the existing tex-parser that ships with ctags.
The result of the parser is a list of identifiers for bibtex entries.

Let me know what you think.

Best
Mirco

@coveralls
Copy link

coveralls commented Jul 10, 2019

Coverage Status

Coverage increased (+0.04%) to 86.051% when pulling 1e8c3f2 on TwlyY29:bibtex-parser into 1258adf on universal-ctags:master.

parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
@masatake
Copy link
Member

Thank you. I have 3 requests.

  1. add test cases. See http://docs.ctags.io/en/latest/units.html . Many examples are in Units/*.
  2. update win32/ctags_vs2013.vcxproj and ctags_vs2013.vcxproj.filters. An example can be found in
    ce36273 .
    3 add your parsre to docs/news.rst as a new parser.

… bibtex parser to the news, and checking for bibtex keywords is now case insensitive.
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
parsers/bibtex.c Outdated Show resolved Hide resolved
Units/parser-bibtex.r/bib-simple.d/input.bib Show resolved Hide resolved
@TwlyY29
Copy link
Contributor Author

TwlyY29 commented Jul 11, 2019

Thanks for your thorough review and helpful hints, @masatake !

@masatake masatake merged commit 68f6cb9 into universal-ctags:master Jul 11, 2019
@masatake
Copy link
Member

Thank you!

I have two extra comments.

You chose "BibTex" as the name of parser. How do you think to change it to "BibTeX" parser?

Could you consider to add "abbreviation" kind defined with @string keyword as described in
http://www.bibtex.org/Format/ ?

@TwlyY29
Copy link
Contributor Author

TwlyY29 commented Jul 12, 2019

Hi, sure, I can rename the parser. Is it just in the bibtex.c file or somewhere else?
Also, I added the @string keyword. I'll create a separate pull request for that.

Best,
Mirco

TwlyY29 pushed a commit to TwlyY29/geany that referenced this pull request Sep 18, 2019
clrpackages pushed a commit to clearlinux-pkgs/geany that referenced this pull request Oct 27, 2020
Admiraldesvl (1):
      a minor translation update. (#2367)

Andrej Herceg (1):
      Update of Slovak translation

Andy Alt (1):
      add 'folding margin width setting' (#2140)

Carmina16 (1):
      Add Interlingue translation

Colomban Wendling (13):
      Add support for selecting the default Python command
      Use the `py` launcher for Python filetype on Windows
      Post release version bump
      Small update of making-a-release
      Remove explicit static accessible name from the main window
      Update NEWS to upcoming 1.37 release
      Small update of the French translation
      vte: Free VteFunctions after destroying the widget
      Revert "add 'folding margin width setting' (#2140)"
      Size symbols and fold margins proportional to line height
      Recalculate margins size when changing font
      Update NEWS
      Small NEWS update

Daniel Napora (1):
      Polish translation update

Dmitry (3):
      Corrected a Russian translation of the word Appearance in Preferences
      Sync javascript keywords
      Update Russian translation

Dominic Hopf (1):
      #2459: Add Geany to Category TextEditor (#2460)

Enrico Tröger (12):
      Add missing HAVE_SOCKET guard on in main_lib()
      Save main and project configuration whenever documents are opened/closed
      Add setting, defaulting to TRUE, to disable automatic configuration save
      Windows: bundle the GLib GSpawn helper binaries with the installer
      Windows: Make TCP socket port number configurable (#2585)
      Update Scintilla to version 3.21.1 (#2506)
      Use Python interpreter detected by autotools for geany-gtkdoc.h
      Remove deprecated config options for Doxygen
      Update FreeBasic keywords
      Add note about programming ligatures support on Windows to NEWS
      Windows: Update indirect dependencies for bundle creation
      Set release date

Filip Szymański (1):
      filetypes.lua: Change block comment (#2566)

Forest (1):
      Define text color when setting dark background

Frank Lanitz (18):
      Small update of German translation
      Small update of German translation
      Update of Swedish translation
      Small upate of metadata
      Small update of German translation on Replace and Search
      Small update of German translation
      Update NEWS with transaltions updates done so far since 1.36
      Update po files for string freeze of 1.37
      Danish translation was updated
      Adding update of Greek and Slovak translation to NEWS
      Update Japanese translation
      Italian and Japanese translation were updated for 1.37
      Update Portugese translation
      Update NEWS with recent translation updates
      Dutch translation was updated, too
      Update of German translation
      Revert update of German translation due to unclean local checkout
      Remove intl_stats.sh script

Giuseppe Penone (1):
      it.po for 1.37

Guido Falsi (1):
      Disconnect signal handler from vte before destroying the widget.

Ingmārs Dīriņš (1):
      Small update of Latvian translation (#2383)

Jiří Techet (1):
      Fix gtk2/gtk3 mac integration test

LarsGit223 (1):
      doc: added documentation for the Color Chooser

Lucas Vieites (1):
      Updated Spanish translation

Matthew Brush (7):
      Set a default widget name on all GtkBuilder widgets. (#2469)
      Remove geany.glade from POTFILES.skip
      Show OS info in debug messages
      Persist colour picker palette
      Make GTK3 build default, and GTK2 build optional
      Add utils function to get OS info string
      Use new `utils_get_os_info_string` function

Michael Misirlis (1):
      Greek translation update for Geany 1.37

Mirco Schoenfeld (5):
      added a bibtex parser that extracts identifiers of entries in bib-files and makes them accessible on the sidebar
      added filetypes.bibtex to relevant Makefile plus made lookup of bibtex keywords case insensitive
      Copied BibTeX-parser from universal-ctags/ctags#2137
      added lexer-settings for comments to be highlighted
      moved bibtex definition to the end of filetypes and parser definitions

Nick Treleaven (17):
      Make Open Project dialog cancellable without closing existing session
      Make New Project dialog cancellable without closing existing session
      Opening recent projects: Don't ask whether to close current project
      docs: Clarify that "filetype & independent commands" mean build commands
      Rename superseded "Build menu commands" command to "Set Build Commands"
      Tweak build docs
      Clarify editing build commands from preferences
      Break long lines
      review tweaks
      Wrap joined paragraphs
      g_print handler: Don't add newline
      g_printerr handler: Don't add newline
      build.c: Only set next/prev error menu items sensitive on first error
      build_menu_update: Only enable next/prev error items when errors found
      Fix gcc warning: "/*" within comment
      Re-use "File patterns" string in Find in Files dialog vs "Files"
      Use project file patterns tooltip from #2356 in Find in Files dialog

Peter C. S. Scholtens (1):
      Update nl.po

Pino Toscano (1):
      Include <unistd.h> for pathconf() (#2402)

Samsul Maarif (2):
      Update Indonesian translation
      Fix wrong email address for Samsul Maarif

Snowflake the Pony (1):
      Add Smalltalk filetype

Yaroslav Salnikov (1):
      Corrected russian translation.

pmralbuquerque (1):
      --all

scootergrisen (1):
      Update Danish translation to 1.37

柳东原 · Dongyuan Liu (1):
      Update zh_CN.po

Geany 1.37 (October 25, 2020)

    General
    * Build with GTK3 by default.
    * Add an option (enabled by default) to save main and project configuration
      whenever documents are opened/closed to reduce accidental loss of current
      session in the event of a crash.
    * List Geany in the category TextEditor (Dominic Hopf, Issue#2460).

    Bug Fixes
    * Fix main window name as seen by accessibility tools (Issue#2421).
    * Add missing include (Pino Toscano, PR#2402).
    * Fix a possible crash when quitting (Hodong & Guido Falsi, Issue#2457,
      PR#2634).

(NEWS truncated at 15 lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants