Comments (6)
By the way, in case this is helpful to others, the reason we were getting different values for prenote
and postnote
(as I just realized) is that I have citar-markdown-prompt-for-extra-arguments
set to nil
. Because I am not prompted for a prefix or a suffix, the value of those variables ends up being nil
rather than an empty string.
from citar.
That's weird; testing just now, I don't see that. This is what I get when inserting without affix and with respectively.
# Testing ...
[@burwell2014]
[see @kohn2008, p12]
from citar.
Okay, I now realize that this is not an intended behavior: looking at citar-markdown-insert-citation
more carefully, I see that when the value of prenote
and postnote
is an empty string, it should not insert any extra characters. When I run edebug on citar-markdown-insert-citation
, I see that prenote
and postnote
are evaluated to nil, so (string= "" prenote)
and (string= "" postnote)
evaluate to nil, and as a consequence prenote
and postnote
are assigned the values (concat prenote " ")
and (concat ", " postnote)
, respectively.
Presumably in your case the value of prenote
and postnote
is an empty string rather than nil, which would explain why the citations are inserted without any extra characters. Do you have a sense of what might be causing the difference in the values of those two variables between us?
from citar.
No; I tried in both my default doom setup, and a minimal custom one.
Seems regardless it would be better for it to check for a non-empty string?
Care to submit a PR for that?
from citar.
Sure. To confirm, this would just involve replacing (string= "" prenote)
with (= (length prenote) 0)
, and (string= "" postnote)
with (= (length postnote) 0)
, in citar-markdown-insert-citation
, right?
from citar.
from citar.
Related Issues (20)
- Feature request: `citar-open-files-or-links` HOT 4
- Customizable `citar-add-file-to-library` HOT 3
- Display transform function for full names HOT 15
- Alignment doesn't work with star in template HOT 1
- Misaligned completion suggestions with company mode HOT 2
- citar--format-candidates docstring confusion
- The Homepage button on melpa leads to a 404 HOT 5
- Installing citar with guix: "Symbol's value as variable is void: citar-indicator-create" HOT 7
- citeproc: add way to specify output format
- Citar fails to display files containing commas HOT 5
- Feature request: Allow `citar` to add multiple files to library item/citeky via `citar-add-file-to-library` HOT 1
- `citar-open-entry` receives wrong citekey HOT 6
- modularizing citar--select-multiple HOT 2
- citar functions to act on buffers HOT 6
- (How to?) add a direct call to `citar-file-open-external` from citar's "menu"
- Problems rendering superscripts correctly for in-text citations when exporting to ODT HOT 3
- Make citar-open more configurable HOT 9
- Issues with `citar-export-local-bib-file` HOT 8
- embark-related parsing problems when multiple citekeys HOT 14
- Add org-mode markup to citar-insert-reference HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citar.