Bug 58685 - Add *option* for proposing a file name based on the content of the document on first save (comment 13 for suggested sources in priority order)
Summary: Add *option* for proposing a file name based on the content of the document o...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
: 61053 68671 98342 100213 104484 113951 117378 135556 139236 139976 147229 156906 157563 158883 (view as bug list)
Depends on:
Blocks: UX File-Name
  Show dependency treegraph
 
Reported: 2012-12-23 16:39 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2023-12-27 09:53 UTC (History)
23 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2012-12-23 16:39:11 UTC
When saving a Text document, instead of suggesting "Untitled 1" as filename, this could be more intelligent.

The suggestion should be based the used styles in an order like this:

- Title
- Heading 1
- Text Body
- Default Style

This means, if the document has a "Title" style, suggest it as filename. If not, look for "Heading 1", etc.

It should be limited to 3-5 Words or so.
Comment 1 Jorendc 2012-12-26 12:52:37 UTC
That would be a great feature.
Thanks for reporting!

Kind regards and happy holidays,
Joren
Comment 2 Joel Madero 2014-02-27 22:55:24 UTC
In order to limit the confusion between ProposedEasyHack and EasyHack and to make queries much easier we are changing ProposedEasyHack to NeedsDevEval.

Thank you and apologies for the noise
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:21:01 UTC Comment hidden (obsolete)
Comment 4 Samuel Mehrbrodt (allotropia) 2016-06-06 10:52:12 UTC
*** Bug 100213 has been marked as a duplicate of this bug. ***
Comment 5 Cor Nouws 2016-06-06 11:14:49 UTC
already extensively discussed in bug 61053
Mind the thoughtful negative comments there ;)
Therefore I suggest to ad an option to allow sending our Writer files with the title "Dear Simon", "Yesterday evening I was watchting .." ;)
Comment 6 Cor Nouws 2016-06-06 11:15:23 UTC
*** Bug 61053 has been marked as a duplicate of this bug. ***
Comment 7 V Stuart Foote 2016-06-06 12:16:51 UTC
*** Bug 68671 has been marked as a duplicate of this bug. ***
Comment 8 V Stuart Foote 2016-06-06 12:17:11 UTC
*** Bug 98342 has been marked as a duplicate of this bug. ***
Comment 9 Claudius Ellsel 2016-06-06 13:02:24 UTC
So optional is ok to avoid stupid file names.

But what if the first words are formatted as a headline or if the title has been set already?

In this both cases it looks ok to me to propose them directly without an option.

There would be an hierarchy needed which String will be proposed then.
Comment 10 V Stuart Foote 2016-06-06 14:10:03 UTC
Samuel's suggestions in OP ( comment 0 )of pulling text from  specific Style are fine--certainly better than grabbing the first string encountered.

Suggest also the File -> Properties dialog: Description tab any entries made to the Title, Subject, Comments or Keywords fields (given a hierarchical preference in that order).  These fields are always picked up and incorporated into the ODF  meta.xml as "Dublin Core" DCMI (ANSI/NISO Z39.85 and ISO 15386-2009) values, i.e. dc:title, dc:subject, dc:description, and meta:keyword

Seems reasonable to parse them first as potential for automated file naming ahead of content from the document styles listed.

Also, can see some utility in improving the GUI (status bar/dialog/navigator) related to metadata manipulated via the File -> Properties dialog, especially with ongoing addition of CMIS and other "Cloud" formats.

Naming a file on initial save to ODF is just the facet here.
Comment 11 Claudius Ellsel 2016-06-06 14:41:42 UTC
I agree that the given order is good.

However my main point was that if a file has a title or heading 1 set the name will be set by default, not only as an option. (So there is an opt-out instead an opt-in in the settings for this case).
Comment 12 V Stuart Foote 2016-06-06 15:55:06 UTC
(In reply to V Stuart Foote from comment #10)
> 
> Also, can see some utility in improving the GUI (status
> bar/dialog/navigator) related to metadata manipulated via the File ->
> Properties dialog, especially with ongoing addition of CMIS and other
> "Cloud" formats.

Believe that work for linking the Properties meta fields, or for linking text from suitable styles as file names and to the UI status bar/navigator as above should also be able to address concerns of https://bugs.documentfoundation.org/show_bug.cgi?id=61053#c13 and the OP. Providing a filename "preview" to display in the inserted fields.

The "previewed" fields would of course change to the actual filename and path once the ODF document is created on save.

=-note on usage-=
Actually Fields can be placed in any location, not just Header or Footer. Set using an Insert button from a selection on the <Ctrl>+F2 Fields dialog: Document or DocInformation tabs.
Comment 13 Cor Nouws 2016-06-07 13:06:09 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #0)
> [...]
> The suggestion should be based the used styles in an order like this:
> 
> - Title
> - Heading 1
> - Text Body
> - Default Style

(In reply to V Stuart Foote from comment #10)
> [...]
> Suggest also the File -> Properties dialog: Description tab any entries made
> to the Title, Subject, Comments or Keywords fields (given a hierarchical
> preference in that order).
> [...]
> Seems reasonable to parse them first as potential for automated file naming
> ahead of content from the document styles listed.

I like that thinking as improvement on the idea. Comments I expect to be more a grab-bag, but..
Thus order could be
  Properties Title
  Properties Subject
  Properties Keywords
  Style Title
  (Style Heading 1 etc)

The expected useful information from (other) styles is IMO low, but..
Also I do not over-estimate the proper use of the mentioned keywords. And I expect organizations where the use of those is properly incorporated, have other means of name-giving (anyway, I facilitate in that ;) )

Ciao
Comment 14 Heiko Tietze 2016-09-14 11:30:32 UTC
Removing NeedsUXEval since all agree on this feature using the proposed order of properties. 

Samuel qualified this ticket initially as an EASYHACK. So please check skill, topic and add code pointers (NEEDINFO for this).
Comment 15 Samuel Mehrbrodt (allotropia) 2016-09-14 11:34:58 UTC
Too complex for an easy hack, removing the keywords.
Comment 16 Maxim Monastirsky 2016-12-08 08:33:11 UTC
*** Bug 104484 has been marked as a duplicate of this bug. ***
Comment 17 Buovjaga 2017-11-20 20:07:54 UTC
*** Bug 113951 has been marked as a duplicate of this bug. ***
Comment 18 V Stuart Foote 2018-05-01 20:22:37 UTC
*** Bug 117378 has been marked as a duplicate of this bug. ***
Comment 19 david.cortes.rivera 2018-08-25 09:23:32 UTC Comment hidden (me-too)
Comment 20 ibelin123 2019-01-12 11:02:49 UTC Comment hidden (me-too)
Comment 21 Xisco Faulí 2020-03-09 13:28:48 UTC
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.
Comment 22 V Stuart Foote 2020-12-27 18:01:29 UTC
*** Bug 139236 has been marked as a duplicate of this bug. ***
Comment 23 V Stuart Foote 2021-01-29 04:39:17 UTC
*** Bug 139976 has been marked as a duplicate of this bug. ***
Comment 24 Mark Aitchison 2021-01-30 00:13:26 UTC
A possible solution to the problem of potentially creating silly filenames might be to have a document property (that is inherited from the template, and so can be set to whatever suits the particular workplace and type of document), and if the property is blank then the default behaviour when saving a file for the first time would be:

1. If the document has a title or Heading 1, use that (after removing any problematic characters like backticks, dollar signs, etc), otherwise
2. Use the present system for untitled documents.

But if the specific property is set then it could, like a spreadsheet cell, be a constant or could be the result of calculating/combining/formatting particular document properties, headings, cells, user-defined fields, the day/month/etc and/or the text set as the title. But, to make life easy for the average user, it should be easy to set it to something like "do what [some other popular software] does"
Comment 25 Heiko Tietze 2022-02-07 09:00:39 UTC
*** Bug 147229 has been marked as a duplicate of this bug. ***
Comment 26 Heiko Tietze 2022-02-07 09:00:52 UTC
*** Bug 135556 has been marked as a duplicate of this bug. ***
Comment 27 Mike Kaganski 2023-08-25 07:26:31 UTC
*** Bug 156906 has been marked as a duplicate of this bug. ***
Comment 28 Stéphane Guillou (stragu) 2023-10-02 15:23:27 UTC
*** Bug 157563 has been marked as a duplicate of this bug. ***
Comment 29 Stéphane Guillou (stragu) 2023-12-27 09:51:05 UTC
*** Bug 158883 has been marked as a duplicate of this bug. ***
Comment 30 Buovjaga 2023-12-27 09:53:10 UTC Comment hidden (obsolete)