emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to avoid "Listing 1" on all code examples in org2blog export to wordpress?
@ 2019-12-27 19:40 Steinar Bang
  2019-12-28  8:13 ` Steinar Bang
  0 siblings, 1 reply; 3+ messages in thread
From: Steinar Bang @ 2019-12-27 19:40 UTC (permalink / raw)
  To: emacs-orgmode

Platform: GNU Emacs 26.3 (build 1, i686-w64-mingw32) of 2019-08-29
          Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ c:/ProgramFiles/emacs-26.3-i686/share/emacs/26.3/lisp/org/)
          Org2Blog 1.1.1

When I export to wordpress I get "Listing 1" on all text or code
examples in the wordpress blog, se e.g.
 https://steinar.bang.priv.no/2019/11/30/rewriting-applications-to-use-pax-jdbc-config-and-liquibase/

Is there a way to lose the "Listing 1" text completely? 

Or failing that: is there a way to increment the number so that they
aren't all "1"?

Thanks!

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

* Re: How to avoid "Listing 1" on all code examples in org2blog export to wordpress?
  2019-12-27 19:40 How to avoid "Listing 1" on all code examples in org2blog export to wordpress? Steinar Bang
@ 2019-12-28  8:13 ` Steinar Bang
  2019-12-28 20:32   ` Steinar Bang
  0 siblings, 1 reply; 3+ messages in thread
From: Steinar Bang @ 2019-12-28  8:13 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> Steinar Bang <sb@dod.no>:

> Platform: GNU Emacs 26.3 (build 1, i686-w64-mingw32) of 2019-08-29
>           Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ c:/ProgramFiles/emacs-26.3-i686/share/emacs/26.3/lisp/org/)
>           Org2Blog 1.1.1

> When I export to wordpress I get "Listing 1" on all text or code
> examples in the wordpress blog, se e.g.
>  https://steinar.bang.priv.no/2019/11/30/rewriting-applications-to-use-pax-jdbc-config-and-liquibase/

> Is there a way to lose the "Listing 1" text completely? 

I haven't been able to remove them from the export, which would have
been my preferred solution, but I have been able to make them not show.

I googled for 'org export "listing 1"' and found a mention of the CSS
class listing-number, so I googled for 'org export "listing-number"' and
found:
 https://github.com/emacs-china/org-mode/blob/master/etc/ORG-NEWS#listings-with-captions-are-now-numbered-in-html-export

So from https://mysite.wordpress.com/wp-admin/ I clicked on
 Appearance->Customize
and then clicked on
 CSS

Then I pasted the following into the text field
 .listing-number { display: none; }
and clicked on the "Publish" button.

And then the "Listing 1" titles were gone (or at least: not shown) in
the blogposts.

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

* Re: How to avoid "Listing 1" on all code examples in org2blog export to wordpress?
  2019-12-28  8:13 ` Steinar Bang
@ 2019-12-28 20:32   ` Steinar Bang
  0 siblings, 0 replies; 3+ messages in thread
From: Steinar Bang @ 2019-12-28 20:32 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> Steinar Bang <sb@dod.no>:

>> Platform: GNU Emacs 26.3 (build 1, i686-w64-mingw32) of 2019-08-29
>> Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ c:/ProgramFiles/emacs-26.3-i686/share/emacs/26.3/lisp/org/)
>> Org2Blog 1.1.1

>> When I export to wordpress I get "Listing 1" on all text or code
>> examples in the wordpress blog, se e.g.
>>  https://steinar.bang.priv.no/2019/11/30/rewriting-applications-to-use-pax-jdbc-config-and-liquibase/

>> Is there a way to lose the "Listing 1" text completely? 

> I haven't been able to remove them from the export, which would have
> been my preferred solution,

The two lines of ox-html.el that produce "Listing 1", are:
 https://github.com/bzg/org-mode/blob/master/lisp/ox-html.el#L2401
and
 https://github.com/bzg/org-mode/blob/master/lisp/ox-html.el#L3487

I think the second one can be made empty by giving the code example an
empty caption (and this is probably also the one hidden by the CSS?)

But I have one case where neither the CSS suppression or an empty
caption works.  It still shows the useless and meaningless "Listing 1".

Very annoying.

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

end of thread, other threads:[~2019-12-28 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 19:40 How to avoid "Listing 1" on all code examples in org2blog export to wordpress? Steinar Bang
2019-12-28  8:13 ` Steinar Bang
2019-12-28 20:32   ` Steinar Bang

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