extracting fields from a Jira “issue” (like a very nice and useful description)? how to get the markup source of the issue description?

No, Jira does not let you read (“per se“) the markup source of an “issue” – that’s why I went this way in the first place  🙄

jq . X.json > X.pretty.json
jq -c 'path(..)|[.[]|tostring]|join("/")|"."+.' X.pretty.json
  • the field we are interested in is fields/description
jq ".fields.description" X.json > X.description.txt
  • save the value of that field to a separate file!
  • remove the leading and trailing double-quotes!
  • replace all \" with ordinary double-quotes!
  • remove \r!
  • replace \n with ordinary new-lines!
jq ".fields.description" X.json | 
perl -pe 's/^"(.*)"$/$1/; s/\\"/"/g; s/\\r//g; s/\\n/\n/g' > X.description.txt
  • looks good, doesn’t it?

another nice JSON file: how to extract its structure using jq

jq -c 'path(..)|[.[]|tostring]|join("/")|"."+.'

The idea is to use one of the output lines in order to access the respective field on your next jq command line:

jq ".fields.description" X.json

Oracle SQL scripts: how to use a variable for the table name

There is a “test table” and there is a “serious table” – use a variable name for the table(s) in question!

how can I create a copy of an Oracle table without copying the data?

create table xyz_new as select * from xyz where rownum < 0;

In Oracle SQL Developer

  • use the menu-function (maybe right-click) on the table you want to operate on (i.e. that you want to copy),
  • Table“,
  • Copy…“,
  • w/o checking “Include Data“.

emacs table-mode: why does a kill-ring-save on a (single) cell mark the (entire) buffer as “changed”?

That “feature” (marking the buffer as changed) is terribly annoying!!! You try to copy (AKA kill-ring-save) text from a table, and from now on something “tells” you, you “changed” the table – but actually you did not. You may be tempted to think, saving a file is a cheap operation, but what if the file is actually located on a remote machine and you are operating on the file through tramp and you cannot reach the machine for a couple of hours?!!

Why not change the buffer to read-only and kill-ring-save than? if you try to kill-ring-save in read-only mode, emacs shouts at you:

apply: Buffer is read-only: #<buffer …>

But yes, although emacs shouted at you, you succeeded copying the text in question to the kill-ring, and now you can paste it into wherever you want.

emacs table-mode

emacs table-mode, how to print, …

Rendering an emacs table as HTML table, possible for further intermediate processing – like splitting … – quite useful!

So far I have always printed an emacs table as fixed-font text document – sort of ugly, but still useful.

emacs: in table-mode, how do I change the face used for cells?

I find it very useful and necessary to know immediately, that a table got recognised by emacs as such.

With the default settings I find the background blue1 (together with foreground gray90) sometimes / often “far too heavy”, let’s say: a contrast far too exhausting for my eyes. Really!

But what is a “less heavy” pair of foreground / background settings for table-cell? “For the time being” I am using plain “black” for the background through emacs customisation (“table-cell” in my “custom-file“).

horde / IMP / New Message / Save Draft – a shortcut in “dynamic mode”

I know, there is a shortcut for “Save Draft” in “basic mode” (Accesskey D) – but my preferred mode is “dynamic mode” – and Accesskey D does something else in Chrome on the Mac – it deletes a character on the right side of the text cursor.

In file editors I save the current state using a keyboard shortcut, in horde I can not do that, that’s a pity – it’s quite important for me – every now and then horde logs me out and I loose the e-mail I have been writing.

At least there is an advanced feature to get drafts auto-saved every minute.

Emacs: visiting symlinks – the variable find-file-visit-truename

What a surprise! I would have liked to use that functionality for a long, long time – not only in the context of a file under VC. How often did my symlinks get disconnected erroneously / accidentally from their link targets?